summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile4
-rw-r--r--Vagrantfile4
-rw-r--r--common_features.mk10
-rw-r--r--docs/_summary.md5
-rw-r--r--docs/config_options.md17
-rw-r--r--docs/custom_quantum_functions.md94
-rw-r--r--docs/faq_build.md15
-rw-r--r--docs/feature_audio.md31
-rw-r--r--docs/feature_debounce_type.md5
-rw-r--r--docs/feature_grave_esc.md2
-rw-r--r--docs/feature_macros.md97
-rw-r--r--docs/feature_mouse_keys.md107
-rw-r--r--docs/feature_rgb_matrix.md276
-rw-r--r--docs/feature_rgblight.md58
-rw-r--r--docs/flashing.md21
-rw-r--r--docs/getting_started_build_tools.md2
-rw-r--r--docs/how_keyboards_work.md2
-rw-r--r--docs/i2c_driver.md2
-rw-r--r--docs/isp_flashing_guide.md5
-rw-r--r--docs/keymap.md56
-rw-r--r--docs/newbs_flashing.md69
-rw-r--r--docs/newbs_getting_started.md6
-rw-r--r--docs/other_eclipse.md (renamed from docs/eclipse.md)0
-rw-r--r--docs/other_vscode.md117
-rw-r--r--docs/understanding_qmk.md2
-rw-r--r--drivers/arm/i2c_master.c3
-rw-r--r--drivers/arm/i2c_master.h2
-rwxr-xr-xdrivers/avr/i2c_master.c172
-rwxr-xr-xdrivers/avr/i2c_master.h2
-rwxr-xr-xdrivers/avr/i2c_slave.c2
-rw-r--r--keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c2
-rw-r--r--keyboards/1upkeyboards/1up60hte/1up60hte.h11
-rw-r--r--keyboards/1upkeyboards/1up60hte/config.h2
-rw-r--r--keyboards/1upkeyboards/1up60hte/info.json15
-rw-r--r--keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c28
-rw-r--r--keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c55
-rw-r--r--keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c2
-rw-r--r--keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c48
-rw-r--r--keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c2
-rw-r--r--keyboards/40percentclub/half_n_half/config.h3
-rw-r--r--keyboards/40percentclub/half_n_half/half_n_half.h4
-rw-r--r--keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h22
-rw-r--r--keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c173
-rw-r--r--keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md2
-rw-r--r--keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk5
-rw-r--r--keyboards/40percentclub/half_n_half/rules.mk3
-rw-r--r--keyboards/40percentclub/mf68/keymaps/default/keymap.c62
-rw-r--r--keyboards/40percentclub/ut47/keymaps/default/config.h2
-rw-r--r--keyboards/ai03/orbit/config.h249
-rw-r--r--keyboards/ai03/orbit/info.json0
-rw-r--r--keyboards/ai03/orbit/keymaps/default/keymap.c91
-rw-r--r--keyboards/ai03/orbit/keymaps/default/readme.md3
-rw-r--r--keyboards/ai03/orbit/matrix.c328
-rw-r--r--keyboards/ai03/orbit/matrix.h3
-rw-r--r--keyboards/ai03/orbit/orbit.c228
-rw-r--r--keyboards/ai03/orbit/orbit.h65
-rw-r--r--keyboards/ai03/orbit/readme.md15
-rw-r--r--keyboards/ai03/orbit/rules.mk92
-rw-r--r--keyboards/ai03/orbit/serial.c546
-rw-r--r--keyboards/ai03/orbit/serial.h62
-rw-r--r--keyboards/ai03/orbit/split_flags.c (renamed from quantum/split_common/split_flags.c)0
-rw-r--r--keyboards/ai03/orbit/split_flags.h (renamed from quantum/split_common/split_flags.h)0
-rw-r--r--keyboards/ai03/orbit/split_util.c87
-rw-r--r--keyboards/ai03/orbit/split_util.h10
-rw-r--r--keyboards/ai03/orbit/transport.c238
-rw-r--r--keyboards/ai03/orbit/transport.h42
-rw-r--r--keyboards/alice/alice.h34
-rwxr-xr-xkeyboards/alice/program106
-rw-r--r--keyboards/alice/rules.mk2
-rw-r--r--keyboards/amj96/keymaps/default/config.h6
-rw-r--r--keyboards/amjpad/keymaps/default/keymap.c4
-rw-r--r--keyboards/atomic/readme.md2
-rw-r--r--keyboards/atreus/keymaps/dvorak_42_key/keymap.c23
-rw-r--r--keyboards/atreus62/keymaps/jarred/config.h21
-rw-r--r--keyboards/atreus62/keymaps/jarred/keymap.c26
-rw-r--r--keyboards/bm16a/bm16a.c43
-rw-r--r--keyboards/bm16a/bm16a.h39
-rw-r--r--keyboards/bm16a/config.h246
-rw-r--r--keyboards/bm16a/info.json30
-rw-r--r--keyboards/bm16a/keymaps/default/config.h19
-rw-r--r--keyboards/bm16a/keymaps/default/keymap.c73
-rw-r--r--keyboards/bm16a/keymaps/default/readme.md1
-rw-r--r--keyboards/bm16a/readme.md15
-rw-r--r--keyboards/bm16a/rules.mk82
-rw-r--r--keyboards/bpiphany/tiger_lily/keymaps/default/config.h7
-rw-r--r--keyboards/bpiphany/unloved_bastard/keymaps/default/config.h7
-rwxr-xr-xkeyboards/c39/c39.c1
-rwxr-xr-xkeyboards/c39/c39.h17
-rwxr-xr-xkeyboards/c39/config.h89
-rwxr-xr-xkeyboards/c39/info.json12
-rwxr-xr-xkeyboards/c39/keymaps/default/config.h3
-rwxr-xr-xkeyboards/c39/keymaps/default/keymap.c45
-rwxr-xr-xkeyboards/c39/keymaps/default/readme.md1
-rwxr-xr-xkeyboards/c39/readme.md16
-rwxr-xr-xkeyboards/c39/rules.mk66
-rw-r--r--keyboards/candybar/keymaps/default/keymap.c4
-rw-r--r--keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c109
-rw-r--r--keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h922
-rw-r--r--keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk5
-rw-r--r--keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg703
-rw-r--r--keyboards/cannonkeys/instant60/bootloader_defs.h7
-rw-r--r--keyboards/cannonkeys/instant60/chconf.h524
-rw-r--r--keyboards/cannonkeys/instant60/config.h92
-rw-r--r--keyboards/cannonkeys/instant60/halconf.h354
-rw-r--r--keyboards/cannonkeys/instant60/instant60.c1
-rw-r--r--keyboards/cannonkeys/instant60/instant60.h47
-rw-r--r--keyboards/cannonkeys/instant60/keymaps/default/keymap.c48
-rw-r--r--keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c48
-rw-r--r--keyboards/cannonkeys/instant60/mcuconf.h176
-rw-r--r--keyboards/cannonkeys/instant60/readme.md12
-rw-r--r--keyboards/cannonkeys/instant60/rules.mk56
-rw-r--r--keyboards/cannonkeys/satisfaction75/config.h23
-rw-r--r--keyboards/cannonkeys/satisfaction75/i2c_master.c2
-rw-r--r--keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c37
-rw-r--r--keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk1
-rw-r--r--keyboards/cannonkeys/satisfaction75/prototype/prototype.h19
-rw-r--r--keyboards/cannonkeys/satisfaction75/prototype/rules.mk0
-rw-r--r--keyboards/cannonkeys/satisfaction75/rev1/rev1.h108
-rw-r--r--keyboards/cannonkeys/satisfaction75/rev1/rules.mk0
-rw-r--r--keyboards/cannonkeys/satisfaction75/rules.mk2
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction75.c132
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction75.h33
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c12
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction_oled.c2
-rw-r--r--keyboards/cannonkeys/stm32f072/keyboard.c125
-rw-r--r--keyboards/cannonkeys/stm32f072/keyboard.h23
-rw-r--r--keyboards/cannonkeys/stm32f072/led.c252
-rw-r--r--keyboards/cannonkeys/stm32f072/led_custom.h6
-rw-r--r--keyboards/cannonkeys/stm32f072/ws2812.c150
-rw-r--r--keyboards/cannonkeys/stm32f072/ws2812.h20
-rw-r--r--keyboards/chibios_test/keymaps/default/keymap.c2
-rw-r--r--keyboards/christmas_tree/keymaps/default/config.h7
-rw-r--r--keyboards/ckeys/obelus/keymaps/default/config.h7
-rw-r--r--keyboards/ckeys/obelus/keymaps/default/keymap.c3
-rw-r--r--keyboards/claw44/claw44.c10
-rw-r--r--keyboards/claw44/claw44.h5
-rw-r--r--keyboards/claw44/config.h (renamed from keyboards/orthodox/config.h)17
-rw-r--r--keyboards/claw44/i2c.c (renamed from keyboards/orthodox/i2c.c)2
-rw-r--r--keyboards/claw44/i2c.h (renamed from keyboards/orthodox/i2c.h)10
-rw-r--r--keyboards/claw44/keymaps/default/config.h (renamed from keyboards/facew/i2c.h)24
-rw-r--r--keyboards/claw44/keymaps/default/keymap.c169
-rw-r--r--keyboards/claw44/keymaps/yfuku/config.h36
-rw-r--r--keyboards/claw44/keymaps/yfuku/keymap.c221
-rw-r--r--keyboards/claw44/lib/glcdfont.c243
-rw-r--r--keyboards/claw44/lib/host_led_state_reader.c15
-rw-r--r--keyboards/claw44/lib/keylogger.c45
-rw-r--r--keyboards/claw44/lib/layer_state_reader.c35
-rw-r--r--keyboards/claw44/lib/logo_reader.c11
-rw-r--r--keyboards/claw44/lib/mode_icon_reader.c15
-rw-r--r--keyboards/claw44/lib/rgb_state_reader.c15
-rw-r--r--keyboards/claw44/lib/timelogger.c16
-rw-r--r--keyboards/claw44/readme.md15
-rw-r--r--keyboards/claw44/rev1/config.h76
-rw-r--r--keyboards/claw44/rev1/matrix.c (renamed from keyboards/orthodox/matrix.c)133
-rw-r--r--keyboards/claw44/rev1/rev1.c8
-rw-r--r--keyboards/claw44/rev1/rev1.h57
-rw-r--r--keyboards/claw44/rev1/rules.mk31
-rw-r--r--keyboards/claw44/rev1/serial_config.h4
-rw-r--r--keyboards/claw44/rev1/split_scomm.c91
-rw-r--r--keyboards/claw44/rev1/split_scomm.h24
-rw-r--r--keyboards/claw44/rev1/split_util.c (renamed from keyboards/orthodox/split_util.c)26
-rw-r--r--keyboards/claw44/rev1/split_util.h (renamed from keyboards/orthodox/split_util.h)2
-rw-r--r--keyboards/claw44/rules.mk74
-rw-r--r--keyboards/claw44/serial.c590
-rw-r--r--keyboards/claw44/serial.h84
-rw-r--r--keyboards/claw44/ssd1306.c346
-rw-r--r--keyboards/claw44/ssd1306.h91
-rw-r--r--keyboards/clueboard/2x1800/keymaps/default/config.h2
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/config.h5
-rw-r--r--keyboards/comet46/keymaps/default/config.h8
-rw-r--r--keyboards/contra/keymaps/default/config.h8
-rw-r--r--keyboards/contra/keymaps/msiu/config.h37
-rw-r--r--keyboards/contra/keymaps/msiu/keymap.c175
-rw-r--r--keyboards/contra/keymaps/msiu/readme.md2
-rw-r--r--keyboards/converter/usb_usb/keymaps/default/config.h7
-rw-r--r--keyboards/cospad/keymaps/default/keymap.c4
-rw-r--r--keyboards/crkbd/keymaps/drashna/keymap.c10
-rw-r--r--keyboards/crkbd/keymaps/drashna/rules.mk2
-rw-r--r--keyboards/crkbd/keymaps/jarred/config.h44
-rw-r--r--keyboards/crkbd/keymaps/jarred/keymap.c182
-rw-r--r--keyboards/crkbd/keymaps/jarred/readme.md9
-rw-r--r--keyboards/crkbd/keymaps/jarred/rules.mk31
-rw-r--r--keyboards/cu24/keymaps/default/keymap.c2
-rw-r--r--keyboards/cu75/keymaps/default/config.h7
-rw-r--r--keyboards/dc01/left/matrix.c4
-rw-r--r--keyboards/deltasplit75/keymaps/default/config.h10
-rwxr-xr-xkeyboards/dichotomy/keymaps/default/keymap.c2
-rw-r--r--keyboards/diverge3/keymaps/default/config.h7
-rw-r--r--keyboards/dk60/dk60.c10
-rw-r--r--keyboards/do60/keymaps/default/keymap.c1
-rw-r--r--keyboards/donutcables/budget96/budget96.c80
-rw-r--r--keyboards/donutcables/budget96/budget96.h56
-rw-r--r--keyboards/donutcables/budget96/config.h41
-rw-r--r--keyboards/donutcables/budget96/info.json16
-rw-r--r--keyboards/donutcables/budget96/keymaps/default/config.h (renamed from keyboards/scrabblepad/keymaps/default/config.h)7
-rw-r--r--keyboards/donutcables/budget96/keymaps/default/keymap.c35
-rw-r--r--keyboards/donutcables/budget96/keymaps/default/readme.md1
-rw-r--r--keyboards/donutcables/budget96/readme.md44
-rw-r--r--keyboards/donutcables/budget96/rules.mk49
-rw-r--r--keyboards/donutcables/budget96/usbconfig.h394
-rw-r--r--keyboards/donutcables/readme.md12
-rw-r--r--keyboards/donutcables/scrabblepad/config.h (renamed from keyboards/scrabblepad/config.h)7
-rw-r--r--keyboards/donutcables/scrabblepad/info.json (renamed from keyboards/scrabblepad/info.json)0
-rw-r--r--keyboards/donutcables/scrabblepad/keymaps/default/config.h19
-rw-r--r--keyboards/donutcables/scrabblepad/keymaps/default/keymap.c (renamed from keyboards/scrabblepad/keymaps/default/keymap.c)2
-rw-r--r--keyboards/donutcables/scrabblepad/keymaps/default/readme.md (renamed from keyboards/scrabblepad/keymaps/default/readme.md)0
-rw-r--r--keyboards/donutcables/scrabblepad/keymaps/random/keymap.c (renamed from keyboards/scrabblepad/keymaps/random/keymap.c)0
-rw-r--r--keyboards/donutcables/scrabblepad/keymaps/random/readme.md (renamed from keyboards/scrabblepad/keymaps/random/readme.md)0
-rw-r--r--keyboards/donutcables/scrabblepad/readme.md (renamed from keyboards/scrabblepad/readme.md)4
-rw-r--r--keyboards/donutcables/scrabblepad/rules.mk (renamed from keyboards/scrabblepad/rules.mk)0
-rw-r--r--keyboards/donutcables/scrabblepad/scrabblepad.c (renamed from keyboards/scrabblepad/scrabblepad.c)0
-rw-r--r--keyboards/donutcables/scrabblepad/scrabblepad.h (renamed from keyboards/scrabblepad/scrabblepad.h)5
-rw-r--r--keyboards/doro67/multi/config.h33
-rw-r--r--keyboards/doro67/multi/info.json18
-rw-r--r--keyboards/doro67/multi/keymaps/default/keymap.c36
-rw-r--r--keyboards/doro67/multi/keymaps/default/readme.md36
-rw-r--r--keyboards/doro67/multi/keymaps/default_iso/keymap.c36
-rw-r--r--keyboards/doro67/multi/keymaps/default_iso/readme.md36
-rw-r--r--keyboards/doro67/multi/keymaps/default_multi/keymap.c36
-rw-r--r--keyboards/doro67/multi/keymaps/default_multi/readme.md39
-rw-r--r--keyboards/doro67/multi/multi.c43
-rw-r--r--keyboards/doro67/multi/multi.h59
-rw-r--r--keyboards/doro67/multi/readme.md16
-rw-r--r--keyboards/doro67/multi/rules.mk47
-rw-r--r--keyboards/dozen0/config.h5
-rw-r--r--keyboards/duck/duck_led/duck_led.c7
-rw-r--r--keyboards/duck/duck_led/duck_led.h16
-rw-r--r--keyboards/duck/eagle_viper/readme.md1
-rw-r--r--keyboards/duck/eagle_viper/v2/config.h8
-rw-r--r--keyboards/duck/eagle_viper/v2/indicator_leds.c23
-rw-r--r--keyboards/duck/eagle_viper/v2/indicator_leds.h1
-rw-r--r--keyboards/duck/eagle_viper/v2/matrix.c3
-rw-r--r--keyboards/duck/eagle_viper/v2/readme.md2
-rw-r--r--keyboards/duck/eagle_viper/v2/rules.mk28
-rw-r--r--keyboards/duck/eagle_viper/v2/v2.h4
-rw-r--r--keyboards/duck/jetfire/config.h4
-rw-r--r--keyboards/duck/jetfire/indicator_leds.c (renamed from keyboards/duck/jetfire/backlight_led.c)43
-rw-r--r--keyboards/duck/jetfire/indicator_leds.h (renamed from keyboards/duck/jetfire/backlight_led.h)11
-rw-r--r--keyboards/duck/jetfire/jetfire.c10
-rw-r--r--keyboards/duck/jetfire/jetfire.h4
-rw-r--r--keyboards/duck/jetfire/readme.md2
-rw-r--r--keyboards/duck/jetfire/rules.mk6
-rw-r--r--keyboards/duck/lightsaver/config.h8
-rw-r--r--keyboards/duck/lightsaver/indicator_leds.c49
-rw-r--r--keyboards/duck/lightsaver/lightsaver.h4
-rw-r--r--keyboards/duck/lightsaver/matrix.c3
-rw-r--r--keyboards/duck/lightsaver/rules.mk28
-rw-r--r--keyboards/duck/octagon/v1/config.h9
-rw-r--r--keyboards/duck/octagon/v1/matrix.c3
-rw-r--r--keyboards/duck/octagon/v1/rules.mk26
-rw-r--r--keyboards/duck/octagon/v1/v1.h4
-rw-r--r--keyboards/duck/octagon/v2/config.h8
-rw-r--r--keyboards/duck/octagon/v2/indicator_leds.c36
-rw-r--r--keyboards/duck/octagon/v2/indicator_leds.h6
-rw-r--r--keyboards/duck/octagon/v2/matrix.c3
-rw-r--r--keyboards/duck/octagon/v2/readme.md2
-rw-r--r--keyboards/duck/octagon/v2/rules.mk28
-rw-r--r--keyboards/duck/octagon/v2/v2.h4
-rw-r--r--keyboards/dztech/dz40rgb/config.h2
-rw-r--r--keyboards/dztech/dz60rgb/config.h3
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/default/keymap.c166
-rw-r--r--keyboards/emptystring/NQG/NQG.c1
-rw-r--r--keyboards/emptystring/NQG/NQG.h15
-rw-r--r--keyboards/emptystring/NQG/config.h42
-rw-r--r--keyboards/emptystring/NQG/keymaps/default/keymap.c61
-rw-r--r--keyboards/emptystring/NQG/keymaps/default/rules.mk1
-rw-r--r--keyboards/emptystring/NQG/readme.md15
-rw-r--r--keyboards/emptystring/NQG/rules.mk64
-rw-r--r--keyboards/ergodash/rev1/keymaps/default/config.h7
-rw-r--r--keyboards/ergodash/rev1/keymaps/default/keymap.c2
-rw-r--r--keyboards/ergodash/rev2/keymaps/default/config.h6
-rw-r--r--keyboards/ergodash/rev2/keymaps/default/keymap.c2
-rw-r--r--keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h41
-rw-r--r--keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json460
-rw-r--r--keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c136
-rw-r--r--keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk3
-rw-r--r--keyboards/ergodone/keymaps/default/keymap.c2
-rw-r--r--keyboards/ergodox_ez/config.h1
-rw-r--r--keyboards/ergodox_ez/ergodox_ez.c121
-rw-r--r--keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c84
-rw-r--r--keyboards/ergodox_ez/matrix.c458
-rw-r--r--keyboards/ergodox_ez/rules.mk1
-rw-r--r--keyboards/ergodox_infinity/keymaps/default/keymap.c2
-rw-r--r--keyboards/ergotaco/config.h61
-rw-r--r--keyboards/ergotaco/ergotaco.c72
-rw-r--r--keyboards/ergotaco/ergotaco.h50
-rw-r--r--keyboards/ergotaco/info.json61
-rw-r--r--keyboards/ergotaco/keymaps/default/keymap.c42
-rw-r--r--keyboards/ergotaco/keymaps/default/readme.md6
-rw-r--r--keyboards/ergotaco/keymaps/default/rules.mk10
-rw-r--r--keyboards/ergotaco/matrix.c366
-rw-r--r--keyboards/ergotaco/readme.md24
-rw-r--r--keyboards/ergotaco/rules.mk26
-rw-r--r--keyboards/ergotravel/keymaps/jarred/config.h (renamed from quantum/template/ps2avrgb/i2c.h)18
-rw-r--r--keyboards/ergotravel/keymaps/jarred/keymap.c50
-rw-r--r--keyboards/exclusive/e6v2/bmc/bmc.c96
-rw-r--r--keyboards/exclusive/e6v2/bmc/bmc.h101
-rw-r--r--keyboards/exclusive/e6v2/bmc/config.h49
-rw-r--r--keyboards/exclusive/e6v2/bmc/info.json24
-rw-r--r--keyboards/exclusive/e6v2/bmc/keymaps/default/config.h19
-rw-r--r--keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c74
-rw-r--r--keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md1
-rw-r--r--keyboards/exclusive/e6v2/bmc/readme.md44
-rw-r--r--keyboards/exclusive/e6v2/bmc/rules.mk90
-rw-r--r--keyboards/exclusive/e6v2/bmc/usbconfig.h393
-rw-r--r--keyboards/facew/config.h7
-rw-r--r--keyboards/facew/facew.c4
-rw-r--r--keyboards/facew/facew.h9
-rw-r--r--keyboards/facew/i2c.c106
-rw-r--r--keyboards/facew/info.json2
-rw-r--r--keyboards/facew/keymaps/default/keymap.c6
-rw-r--r--keyboards/facew/keymaps/mechmerlin/keymap.c51
-rw-r--r--keyboards/facew/keymaps/mechmerlin/readme.md18
-rw-r--r--keyboards/facew/matrix.c106
-rw-r--r--keyboards/facew/readme.md20
-rw-r--r--keyboards/facew/rules.mk9
-rw-r--r--keyboards/facew/usbconfig.h13
-rw-r--r--keyboards/fc660c/keymaps/default/config.h7
-rw-r--r--keyboards/fc980c/README.md2
-rw-r--r--keyboards/fc980c/keymaps/default/config.h6
-rw-r--r--keyboards/fortitude60/keymaps/default/config.h7
-rw-r--r--keyboards/fortitude60/keymaps/default/keymap.c1
-rw-r--r--keyboards/four_banger/keymaps/default/keymap.c2
-rw-r--r--keyboards/georgi/config.h74
-rw-r--r--keyboards/georgi/georgi.c68
-rw-r--r--keyboards/georgi/georgi.h82
-rw-r--r--keyboards/georgi/info.json133
-rw-r--r--keyboards/georgi/keymaps/default/keymap.c229
-rw-r--r--keyboards/georgi/keymaps/default/readme.md11
-rw-r--r--keyboards/georgi/keymaps/default/rules.mk27
-rw-r--r--keyboards/georgi/keymaps/template/keymap.c216
-rw-r--r--keyboards/georgi/keymaps/template/readme.md6
-rw-r--r--keyboards/georgi/keymaps/template/rules.mk27
-rw-r--r--keyboards/georgi/matrix.c402
-rw-r--r--keyboards/georgi/readme.md29
-rw-r--r--keyboards/georgi/rules.mk22
-rw-r--r--keyboards/georgi/sten.c2
-rw-r--r--keyboards/georgi/sten.h290
-rw-r--r--keyboards/gergo/gergo.c4
-rw-r--r--keyboards/gergo/matrix.c36
-rw-r--r--keyboards/gray_studio/hb85/config.h5
-rw-r--r--keyboards/gray_studio/hb85/hb85.c7
-rw-r--r--keyboards/gray_studio/hb85/hb85.h100
-rw-r--r--keyboards/gray_studio/hb85/i2c.c106
-rw-r--r--keyboards/gray_studio/hb85/info.json24
-rw-r--r--keyboards/gray_studio/hb85/keymaps/default/keymap.c6
-rw-r--r--keyboards/gray_studio/hb85/keymaps/stt/keymap.c38
-rw-r--r--keyboards/gray_studio/hb85/readme.md72
-rw-r--r--keyboards/gray_studio/hb85/rules.mk6
-rw-r--r--keyboards/gray_studio/hb85/usbconfig.h5
-rw-r--r--keyboards/hadron/ver2/keymaps/default/keymap.c3
-rw-r--r--keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h2
-rw-r--r--keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c5
-rw-r--r--keyboards/handwired/frenchdev/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/frenchdev/readme.md1
-rw-r--r--keyboards/handwired/hacked_motospeed/config.h249
-rw-r--r--keyboards/handwired/hacked_motospeed/hacked_motospeed.c43
-rw-r--r--keyboards/handwired/hacked_motospeed/hacked_motospeed.h46
-rw-r--r--keyboards/handwired/hacked_motospeed/info.json12
-rw-r--r--keyboards/handwired/hacked_motospeed/keymaps/default/config.h19
-rw-r--r--keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c65
-rw-r--r--keyboards/handwired/hacked_motospeed/keymaps/default/readme.md1
-rw-r--r--keyboards/handwired/hacked_motospeed/readme.md23
-rw-r--r--keyboards/handwired/hacked_motospeed/rules.mk81
-rw-r--r--keyboards/handwired/hexon38/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/jot50/config.h38
-rw-r--r--keyboards/handwired/jot50/jot50.c6
-rw-r--r--keyboards/handwired/jot50/jot50.h19
-rw-r--r--keyboards/handwired/jot50/keymaps/default/keymap.c84
-rw-r--r--keyboards/handwired/jot50/readme.md35
-rw-r--r--keyboards/handwired/jot50/rules.mk66
-rw-r--r--keyboards/handwired/jotanck/config.h2
-rw-r--r--keyboards/handwired/jotanck/jotanck.h2
-rw-r--r--keyboards/handwired/jotanck/keymaps/default/keymap.c39
-rw-r--r--keyboards/handwired/jotanck/readme.md2
-rw-r--r--keyboards/handwired/jotanck/rules.mk2
-rw-r--r--keyboards/handwired/lovelive9/config.h39
-rw-r--r--keyboards/handwired/lovelive9/info.json12
-rw-r--r--keyboards/handwired/lovelive9/keymaps/default/keymap.c338
-rw-r--r--keyboards/handwired/lovelive9/lovelive9.c7
-rw-r--r--keyboards/handwired/lovelive9/lovelive9.h9
-rw-r--r--keyboards/handwired/lovelive9/readme.md14
-rw-r--r--keyboards/handwired/lovelive9/rules.mk67
-rwxr-xr-xkeyboards/handwired/maartenwut/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/magicforce61/README.md24
-rw-r--r--keyboards/handwired/magicforce61/config.h7
-rw-r--r--keyboards/handwired/magicforce61/info.json74
-rw-r--r--keyboards/handwired/magicforce61/keymaps/default/keymap.c93
-rw-r--r--keyboards/handwired/magicforce61/magicforce61.h17
-rw-r--r--keyboards/handwired/magicforce61/readme.md31
-rw-r--r--keyboards/handwired/mechboards_micropad/config.h245
-rw-r--r--keyboards/handwired/mechboards_micropad/info.json12
-rw-r--r--keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c84
-rw-r--r--keyboards/handwired/mechboards_micropad/keymaps/default/readme.md4
-rw-r--r--keyboards/handwired/mechboards_micropad/mechboards_micropad.c43
-rw-r--r--keyboards/handwired/mechboards_micropad/mechboards_micropad.h33
-rw-r--r--keyboards/handwired/mechboards_micropad/readme.md14
-rw-r--r--keyboards/handwired/mechboards_micropad/rules.mk81
-rw-r--r--keyboards/handwired/minorca/keymaps/default/config.h8
-rw-r--r--keyboards/handwired/prime_exl/keymaps/default/keymap.c16
-rw-r--r--keyboards/handwired/prime_exl/keymaps/via/keymap.c16
-rw-r--r--keyboards/handwired/splittest/config.h75
-rw-r--r--keyboards/handwired/splittest/keymaps/default/config.h (renamed from keyboards/panc60/i2c.h)16
-rw-r--r--keyboards/handwired/splittest/keymaps/default/keymap.c5
-rw-r--r--keyboards/handwired/splittest/readme.md26
-rw-r--r--keyboards/handwired/splittest/rules.mk65
-rw-r--r--keyboards/handwired/splittest/splittest.c1
-rw-r--r--keyboards/handwired/splittest/splittest.h5
-rw-r--r--keyboards/handwired/tennie/config.h240
-rw-r--r--keyboards/handwired/tennie/info.json12
-rw-r--r--keyboards/handwired/tennie/keymaps/default/config.h19
-rw-r--r--keyboards/handwired/tennie/keymaps/default/keymap.c95
-rw-r--r--keyboards/handwired/tennie/keymaps/default/readme.md68
-rw-r--r--keyboards/handwired/tennie/keymaps/simple-numbpad/config.h19
-rw-r--r--keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c37
-rw-r--r--keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md18
-rw-r--r--keyboards/handwired/tennie/keymaps/soundboard/config.h19
-rw-r--r--keyboards/handwired/tennie/keymaps/soundboard/keymap.c37
-rw-r--r--keyboards/handwired/tennie/keymaps/soundboard/readme.md19
-rw-r--r--keyboards/handwired/tennie/readme.md15
-rw-r--r--keyboards/handwired/tennie/rules.mk80
-rw-r--r--keyboards/handwired/tennie/tennie.c45
-rw-r--r--keyboards/handwired/tennie/tennie.h37
-rw-r--r--keyboards/handwired/terminus_mini/keymaps/default/config.h9
-rw-r--r--keyboards/handwired/traveller/keymaps/default/keymap.c61
-rw-r--r--keyboards/handwired/woodpad/keymaps/default/config.h7
-rw-r--r--keyboards/handwired/woodpad/keymaps/default/keymap.c4
-rw-r--r--keyboards/handwired/xealous/config.h12
-rw-r--r--keyboards/handwired/xealous/debounce.c63
-rw-r--r--keyboards/handwired/xealous/matrix.c329
-rw-r--r--keyboards/handwired/xealous/rules.mk6
-rw-r--r--keyboards/hecomi/keymaps/default/keymap.c1
-rw-r--r--keyboards/helix/pico/keymaps/default/config.h5
-rw-r--r--keyboards/helix/rev1/keymaps/default/config.h7
-rw-r--r--keyboards/helix/rev2/keymaps/default/config.h5
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/keymap.c2
-rw-r--r--keyboards/hifumi/config.h56
-rw-r--r--keyboards/hifumi/hifumi.h31
-rw-r--r--keyboards/hifumi/info.json12
-rw-r--r--keyboards/hifumi/keymaps/default/keymap.c47
-rw-r--r--keyboards/hifumi/keymaps/test/keymap.c32
-rw-r--r--keyboards/hifumi/readme.md13
-rw-r--r--keyboards/hifumi/rules.mk62
-rw-r--r--keyboards/hotdox/config.h78
-rw-r--r--keyboards/hotdox/hotdox.c44
-rw-r--r--keyboards/hotdox/hotdox.h187
-rw-r--r--keyboards/hotdox/info.json107
-rw-r--r--keyboards/hotdox/keymaps/default/keymap.c189
-rw-r--r--keyboards/hotdox/keymaps/eozaki/keymap.c192
-rw-r--r--keyboards/hotdox/keymaps/kloki/keymap.c210
-rw-r--r--keyboards/hotdox/left.c130
-rw-r--r--keyboards/hotdox/left.h57
-rw-r--r--keyboards/hotdox/matrix.c283
-rw-r--r--keyboards/hotdox/readme.md23
-rw-r--r--keyboards/hotdox/rules.mk82
-rw-r--r--keyboards/hs60/v1/config.h1
-rw-r--r--keyboards/hs60/v2/config.h15
-rw-r--r--keyboards/hs60/v2/keymaps/goatmaster/config.h37
-rw-r--r--keyboards/hs60/v2/keymaps/goatmaster/keymap.c71
-rw-r--r--keyboards/hs60/v2/keymaps/goatmaster/readme.md6
-rw-r--r--keyboards/hs60/v2/keymaps/goatmaster/rules.mk66
-rw-r--r--keyboards/hs60/v2/keymaps/stanrc85/config.h19
-rw-r--r--keyboards/hs60/v2/keymaps/stanrc85/keymap.c15
-rw-r--r--keyboards/hs60/v2/keymaps/stanrc85/readme.md2
-rw-r--r--keyboards/hs60/v2/keymaps/stanrc85/rules.mk2
-rw-r--r--keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json190
-rw-r--r--keyboards/idobo/keymaps/greenshadowmaker/keymap.c152
-rw-r--r--keyboards/idobo/keymaps/greenshadowmaker/readme.md3
-rw-r--r--keyboards/idobo/keymaps/greenshadowmaker/rules.mk3
-rw-r--r--keyboards/jc65/v32u4/keymaps/default/config.h4
-rw-r--r--keyboards/jj40/README.md2
-rw-r--r--keyboards/jj4x4/README.md2
-rw-r--r--keyboards/jj50/README.md2
-rw-r--r--keyboards/jj50/keymaps/abstractkb/keymap.c135
-rw-r--r--keyboards/jj50/keymaps/abstractkb/readme.md6
-rw-r--r--keyboards/jj50/keymaps/archetype/README.md22
-rw-r--r--keyboards/jj50/keymaps/archetype/config.h8
-rw-r--r--keyboards/jj50/keymaps/archetype/keymap.c215
-rw-r--r--keyboards/jj50/keymaps/archetype/rules.mk65
-rw-r--r--keyboards/jj50/keymaps/default/keymap.c4
-rw-r--r--keyboards/jj50/program74
-rw-r--r--keyboards/jj50/rules.mk2
-rw-r--r--keyboards/k_type/keymaps/default/keymap.c2
-rw-r--r--keyboards/katana60/keymaps/default/config.h7
-rw-r--r--keyboards/katana60/keymaps/msiu/config.h21
-rw-r--r--keyboards/katana60/keymaps/msiu/keymap.c70
-rw-r--r--keyboards/katana60/keymaps/msiu/readme.md3
-rw-r--r--keyboards/kbdfans/kbd19x/info.json415
-rw-r--r--keyboards/kbdfans/kbd66/keymaps/default/config.h7
-rw-r--r--[-rwxr-xr-x]keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h0
-rw-r--r--keyboards/kbdfans/kbd67/readme.md6
-rw-r--r--keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h17
-rw-r--r--keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c61
-rw-r--r--keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md7
-rw-r--r--keyboards/kbdfans/kbd67/rev1/readme.md4
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/keymap.c657
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme.md2
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_ch3.md2
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_ch5.md12
-rw-r--r--keyboards/kc60/keymaps/stanleylai/readme.md4
-rw-r--r--keyboards/kc60/readme.md1
-rw-r--r--keyboards/kc60se/keymaps/default/config.h7
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/config.h37
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c92
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md5
-rw-r--r--keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk1
-rw-r--r--keyboards/keebio/chocopad/keymaps/default/config.h7
-rw-r--r--keyboards/keebio/iris/keymaps/davidrambo/config.h8
-rw-r--r--keyboards/keebio/iris/keymaps/davidrambo/keymap.c10
-rw-r--r--keyboards/keebio/iris/keymaps/davidrambo/readme.md8
-rw-r--r--keyboards/keebio/iris/keymaps/default/config.h10
-rw-r--r--keyboards/keebio/iris/keymaps/default/keymap.c18
-rw-r--r--keyboards/keebio/iris/keymaps/moonfall/config.h36
-rw-r--r--keyboards/keebio/iris/keymaps/moonfall/keymap.c114
-rw-r--r--keyboards/keebio/iris/keymaps/moonfall/rules.mk2
-rw-r--r--keyboards/keebio/iris/rev3/config.h1
-rw-r--r--keyboards/keebio/nyquist/rev3/config.h1
-rw-r--r--keyboards/keebio/quefrency/info.json197
-rw-r--r--keyboards/kinesis/keymaps/default/config.h7
-rw-r--r--keyboards/kira75/keymaps/default/config.h7
-rw-r--r--keyboards/kmac/keymaps/default/config.h7
-rw-r--r--keyboards/kmac/readme.md2
-rw-r--r--keyboards/knops/mini/keymaps/default/config.h7
-rw-r--r--keyboards/knops/readme.md2
-rw-r--r--keyboards/kona_classic/keymaps/default/config.h7
-rw-r--r--keyboards/launchpad/keymaps/default/keymap.c14
-rw-r--r--keyboards/launchpad/keymaps/default_rgb/config.h9
-rw-r--r--keyboards/launchpad/keymaps/default_rgb/keymap.c76
-rw-r--r--keyboards/launchpad/keymaps/default_rgb/readme.md41
-rw-r--r--keyboards/launchpad/keymaps/default_rgb/rules.mk1
-rw-r--r--keyboards/lazydesigners/the60/config.h38
-rw-r--r--keyboards/lazydesigners/the60/info.json79
-rw-r--r--keyboards/lazydesigners/the60/keymaps/default/keymap.c54
-rw-r--r--keyboards/lazydesigners/the60/keymaps/default/readme.md32
-rw-r--r--keyboards/lazydesigners/the60/readme.md18
-rw-r--r--keyboards/lazydesigners/the60/rules.mk51
-rw-r--r--keyboards/lazydesigners/the60/the60.c2
-rw-r--r--keyboards/lazydesigners/the60/the60.h32
-rw-r--r--keyboards/lets_split/keymaps/piemod/README.md3
-rw-r--r--keyboards/lets_split/keymaps/vim-mode/config.h39
-rw-r--r--keyboards/lets_split/keymaps/vim-mode/keymap.c196
-rw-r--r--keyboards/lets_split/keymaps/vim-mode/readme.md22
-rw-r--r--keyboards/lets_split/keymaps/vim-mode/rules.mk0
-rw-r--r--keyboards/lets_split_eh/keymaps/msiu/config.h (renamed from keyboards/gray_studio/hb85/i2c.h)16
-rw-r--r--keyboards/lets_split_eh/keymaps/msiu/keymap.c195
-rw-r--r--keyboards/lfkeyboards/lfk87/keymaps/default/config.h7
-rw-r--r--keyboards/lfkeyboards/lfkpad/keymaps/default/config.h7
-rw-r--r--keyboards/lfkeyboards/mini1800/keymaps/default/config.h7
-rw-r--r--keyboards/lfkeyboards/smk65/keymaps/default/config.h7
-rw-r--r--keyboards/lily58/config.h10
-rw-r--r--keyboards/lily58/keymaps/default/keymap.c6
-rw-r--r--keyboards/lily58/rev1/info.json18
-rw-r--r--keyboards/lily58/rules.mk4
-rw-r--r--keyboards/m10a/keymaps/default/keymap.c5
-rw-r--r--keyboards/massdrop/alt/config.h7
-rw-r--r--keyboards/massdrop/alt/config_led.c148
-rw-r--r--keyboards/massdrop/alt/config_led.h25
-rw-r--r--keyboards/massdrop/alt/keymaps/abishalom/keymap.c122
-rw-r--r--keyboards/massdrop/alt/keymaps/default/keymap.c122
-rw-r--r--keyboards/massdrop/alt/keymaps/default_md/keymap.c223
-rw-r--r--keyboards/massdrop/alt/keymaps/default_md/rules.mk2
-rw-r--r--keyboards/massdrop/alt/keymaps/mac/keymap.c122
-rw-r--r--keyboards/massdrop/alt/keymaps/mac_md/keymap.c193
-rw-r--r--keyboards/massdrop/alt/keymaps/mac_md/rules.mk2
-rw-r--r--keyboards/massdrop/alt/keymaps/reywood/README.md5
-rw-r--r--keyboards/massdrop/alt/keymaps/reywood/rules.mk5
-rw-r--r--keyboards/massdrop/alt/led_programs.c120
-rw-r--r--keyboards/massdrop/alt/rules.mk7
-rw-r--r--keyboards/massdrop/ctrl/config.h7
-rw-r--r--keyboards/massdrop/ctrl/config_led.c144
-rw-r--r--keyboards/massdrop/ctrl/config_led.h25
-rw-r--r--keyboards/massdrop/ctrl/keymaps/default/keymap.c126
-rw-r--r--keyboards/massdrop/ctrl/keymaps/default_md/keymap.c226
-rw-r--r--keyboards/massdrop/ctrl/keymaps/default_md/rules.mk2
-rw-r--r--keyboards/massdrop/ctrl/keymaps/mac/keymap.c126
-rw-r--r--keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c196
-rw-r--r--keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk2
-rw-r--r--keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md5
-rw-r--r--keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c5
-rw-r--r--keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk2
-rw-r--r--keyboards/massdrop/ctrl/rules.mk7
-rw-r--r--keyboards/mechmini/v1/README.md2
-rw-r--r--keyboards/mechmini/v1/keymaps/default/keymap.c3
-rw-r--r--keyboards/mechmini/v2/keymaps/arkag/keymap.c44
-rw-r--r--keyboards/mechmini/v2/keymaps/arkag/rules.mk4
-rw-r--r--keyboards/mehkee96/program105
-rw-r--r--keyboards/mehkee96/rules.mk2
-rw-r--r--keyboards/meira/keymaps/default/config.h7
-rw-r--r--keyboards/meira/keymaps/default/keymap.c2
-rw-r--r--keyboards/meishi/keymaps/default/keymap.c2
-rw-r--r--keyboards/meme/keymaps/default/config.h7
-rw-r--r--keyboards/miuni32/keymaps/default/config.h7
-rw-r--r--keyboards/mt40/keymaps/default/config.h7
-rw-r--r--keyboards/mt980/config.h52
-rw-r--r--keyboards/mt980/info.json117
-rw-r--r--keyboards/mt980/keymaps/default/keymap.c21
-rw-r--r--keyboards/mt980/keymaps/walker/config.h5
-rw-r--r--keyboards/mt980/keymaps/walker/keymap.c168
-rw-r--r--keyboards/mt980/keymaps/walker/rules.mk1
-rw-r--r--keyboards/mt980/mt980.c65
-rw-r--r--keyboards/mt980/mt980.h25
-rw-r--r--keyboards/mt980/readme.md14
-rw-r--r--keyboards/mt980/rules.mk55
-rw-r--r--keyboards/mxss/keymaps/default/config.h7
-rw-r--r--keyboards/mxss/rgblight.h166
-rw-r--r--keyboards/org60/keymaps/default/keymap.c1
-rw-r--r--keyboards/org60/keymaps/jarred/keymap.c25
-rw-r--r--keyboards/orthodox/keymaps/default/config.h8
-rw-r--r--keyboards/orthodox/orthodox.h9
-rw-r--r--keyboards/orthodox/rev1/config.h7
-rw-r--r--keyboards/orthodox/rev1/rev1.h7
-rw-r--r--keyboards/orthodox/rev3/config.h7
-rw-r--r--keyboards/orthodox/rev3/rev3.h6
-rw-r--r--keyboards/orthodox/rev3_teensy/config.h7
-rw-r--r--keyboards/orthodox/rev3_teensy/rev3_teensy.h6
-rw-r--r--keyboards/orthodox/rules.mk13
-rw-r--r--keyboards/orthodox/serial.c230
-rw-r--r--keyboards/orthodox/serial.h27
-rw-r--r--keyboards/panc60/config.h2
-rw-r--r--keyboards/panc60/i2c.c106
-rw-r--r--keyboards/panc60/matrix.c145
-rw-r--r--keyboards/panc60/panc60.c4
-rw-r--r--keyboards/panc60/panc60.h5
-rw-r--r--keyboards/panc60/readme.md8
-rw-r--r--keyboards/panc60/rules.mk5
-rw-r--r--keyboards/panc60/usbconfig.h5
-rw-r--r--keyboards/phantom/keymaps/default/config.h7
-rw-r--r--keyboards/plaid/config.h248
-rw-r--r--keyboards/plaid/info.json113
-rw-r--r--keyboards/plaid/keymaps/default/config.h19
-rw-r--r--keyboards/plaid/keymaps/default/keymap.c222
-rw-r--r--keyboards/plaid/keymaps/default/readme.md2
-rw-r--r--keyboards/plaid/plaid.c43
-rw-r--r--keyboards/plaid/plaid.h63
-rw-r--r--keyboards/plaid/readme.md23
-rw-r--r--keyboards/plaid/rules.mk101
-rw-r--r--keyboards/plaid/usbconfig.h397
-rw-r--r--keyboards/planck/keymaps/callum/config.h7
-rw-r--r--keyboards/planck/keymaps/callum/keymap.c73
-rw-r--r--keyboards/planck/keymaps/callum/readme.md67
-rw-r--r--keyboards/planck/keymaps/callum/rules.mk2
-rw-r--r--keyboards/planck/keymaps/davidrambo/config.h6
-rw-r--r--keyboards/planck/keymaps/davidrambo/keymap.c46
-rw-r--r--keyboards/planck/keymaps/davidrambo/rules.mk2
-rw-r--r--keyboards/planck/keymaps/dsanchezseco/config.h39
-rw-r--r--keyboards/planck/keymaps/dsanchezseco/keymap.c116
-rw-r--r--keyboards/planck/keymaps/dsanchezseco/readme.md2
-rw-r--r--keyboards/planck/keymaps/dsanchezseco/rules.mk1
-rw-r--r--keyboards/planck/keymaps/msiu/config.h40
-rw-r--r--keyboards/planck/keymaps/msiu/keymap.c208
-rw-r--r--keyboards/planck/keymaps/msiu/readme.md2
-rw-r--r--keyboards/planck/keymaps/msiu/rules.mk1
-rw-r--r--keyboards/planck/keymaps/piemod/README.md4
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/config.h35
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/keymap.c153
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/readme.md63
-rw-r--r--keyboards/planck/keymaps/rjhilgefort/rules.mk0
-rw-r--r--keyboards/planck/keymaps/samuel/README.org509
-rw-r--r--keyboards/planck/keymaps/samuel/keymap.c372
-rw-r--r--keyboards/planck/keymaps/tom/config.h39
-rw-r--r--keyboards/planck/keymaps/tom/keymap.c264
-rw-r--r--keyboards/planck/keymaps/tom/readme.md35
-rw-r--r--keyboards/planck/keymaps/tom/rules.mk1
-rw-r--r--keyboards/preonic/keymaps/default/config.h7
-rw-r--r--keyboards/primekb/prime_e/keymaps/default/keymap.c16
-rw-r--r--keyboards/primekb/prime_e/keymaps/via/keymap.c16
-rw-r--r--keyboards/primekb/prime_r/keymaps/default/config.h7
-rw-r--r--keyboards/ps2avrGB/README.md2
-rw-r--r--keyboards/ps2avrGB/keymaps/default/keymap.c2
-rwxr-xr-xkeyboards/ps2avrGB/program105
-rw-r--r--keyboards/ps2avrGB/ps2avrGB.h9
-rw-r--r--keyboards/ps2avrGB/rules.mk2
-rw-r--r--keyboards/quantrik/kyuu/config.h245
-rw-r--r--keyboards/quantrik/kyuu/info.json82
-rw-r--r--keyboards/quantrik/kyuu/keymaps/default/config.h19
-rw-r--r--keyboards/quantrik/kyuu/keymaps/default/keymap.c74
-rw-r--r--keyboards/quantrik/kyuu/keymaps/default/readme.md1
-rw-r--r--keyboards/quantrik/kyuu/kyuu.c43
-rw-r--r--keyboards/quantrik/kyuu/kyuu.h42
-rw-r--r--keyboards/quantrik/kyuu/readme.md13
-rw-r--r--keyboards/quantrik/kyuu/rules.mk81
-rw-r--r--keyboards/rama/koyu/config.h127
-rw-r--r--keyboards/rama/koyu/info.json13
-rw-r--r--keyboards/rama/koyu/keymaps/default/keymap.c36
-rw-r--r--keyboards/rama/koyu/koyu.c18
-rw-r--r--keyboards/rama/koyu/koyu.h42
-rw-r--r--keyboards/rama/koyu/readme.md23
-rw-r--r--keyboards/rama/koyu/rules.mk80
-rw-r--r--keyboards/rama/m10_b/keymaps/default/config.h7
-rw-r--r--keyboards/rama/m60_a/config.h15
-rw-r--r--keyboards/rama/m6_b/config.h15
-rw-r--r--keyboards/readme.md4
-rw-r--r--keyboards/redox/keymaps/fculpo/config.h34
-rw-r--r--keyboards/redox/keymaps/fculpo/keymap.c92
-rw-r--r--keyboards/redox/keymaps/fculpo/keymap.json399
-rw-r--r--keyboards/redox/keymaps/fculpo/readme.md18
-rw-r--r--keyboards/redox/keymaps/fculpo/rules.mk2
-rw-r--r--keyboards/redox/keymaps/finex/config.h4
-rw-r--r--keyboards/redox/keymaps/finex/keymap.c398
-rw-r--r--keyboards/redox/keymaps/finex/readme.md57
-rw-r--r--keyboards/redox/keymaps/finex/rules.mk3
-rwxr-xr-xkeyboards/redox/keymaps/nrichers/config.h34
-rwxr-xr-xkeyboards/redox/keymaps/nrichers/keymap.c92
-rw-r--r--keyboards/redox/keymaps/nrichers/keymap.pngbin0 -> 146904 bytes
-rwxr-xr-xkeyboards/redox/keymaps/nrichers/readme.md28
-rwxr-xr-xkeyboards/redox/keymaps/nrichers/rules.mk2
-rw-r--r--keyboards/romac/config.h40
-rw-r--r--keyboards/romac/info.json13
-rw-r--r--keyboards/romac/keymaps/default/keymap.c37
-rw-r--r--keyboards/romac/readme.md16
-rw-r--r--keyboards/romac/romac.c1
-rw-r--r--keyboards/romac/romac.h16
-rw-r--r--keyboards/romac/rules.mk57
-rw-r--r--keyboards/scarletbandana/keymaps/default/config.h7
-rw-r--r--keyboards/singa/keymaps/default/config.h7
-rw-r--r--keyboards/speedo/keymaps/default/config.h7
-rw-r--r--keyboards/standaside/config.h204
-rw-r--r--keyboards/standaside/keymaps/default/config.h5
-rw-r--r--keyboards/standaside/keymaps/default/keymap.c77
-rw-r--r--keyboards/standaside/readme.md15
-rw-r--r--keyboards/standaside/rules.mk73
-rw-r--r--keyboards/standaside/standaside.c14
-rw-r--r--keyboards/standaside/standaside.h29
-rw-r--r--keyboards/staryu/backlight_staryu.c52
-rw-r--r--keyboards/staryu/backlight_staryu.h25
-rwxr-xr-xkeyboards/staryu/config.h60
-rwxr-xr-xkeyboards/staryu/keymaps/default/keymap.c120
-rwxr-xr-xkeyboards/staryu/rules.mk50
-rwxr-xr-xkeyboards/staryu/staryu.c34
-rwxr-xr-xkeyboards/staryu/staryu.h12
-rw-r--r--keyboards/subatomic/keymaps/default/config.h7
-rw-r--r--keyboards/subatomic/keymaps/default/keymap.c7
-rw-r--r--keyboards/sx60/keymaps/default/config.h4
-rw-r--r--keyboards/tanuki/keymaps/default/keymap.c1
-rw-r--r--keyboards/telophase/keymaps/default/keymap.c5
-rw-r--r--keyboards/tetris/keymaps/default/keymap.c1
-rw-r--r--keyboards/the_ruler/keymaps/default/config.h7
-rw-r--r--keyboards/the_ruler/keymaps/default/keymap.c2
-rw-r--r--keyboards/thevankeyboards/bananasplit/keymaps/default/config.h7
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/default/config.h7
-rw-r--r--keyboards/thevankeyboards/roadkit/keymaps/default/config.h7
-rw-r--r--keyboards/tmo50/keymaps/pyrol/keymap.c61
-rw-r--r--keyboards/treadstone48/common/glcdfont.c244
-rw-r--r--keyboards/treadstone48/common/oled_helper.c83
-rw-r--r--keyboards/treadstone48/common/oled_helper.h35
-rw-r--r--keyboards/treadstone48/config.h43
-rw-r--r--keyboards/treadstone48/i2c.c (renamed from quantum/split_common/i2c.c)34
-rw-r--r--keyboards/treadstone48/i2c.h (renamed from quantum/split_common/i2c.h)21
-rw-r--r--keyboards/treadstone48/keymaps/default/config.h60
-rw-r--r--keyboards/treadstone48/keymaps/default/keymap.c278
-rw-r--r--keyboards/treadstone48/keymaps/default/readme.md5
-rw-r--r--keyboards/treadstone48/keymaps/default/readme_jp.md80
-rw-r--r--keyboards/treadstone48/keymaps/default/rules.mk67
-rw-r--r--keyboards/treadstone48/keymaps/like_jis/config.h60
-rw-r--r--keyboards/treadstone48/keymaps/like_jis/keymap.c278
-rw-r--r--keyboards/treadstone48/keymaps/like_jis/readme.md5
-rw-r--r--keyboards/treadstone48/keymaps/like_jis/readme_jp.md80
-rw-r--r--keyboards/treadstone48/keymaps/like_jis/rules.mk67
-rw-r--r--keyboards/treadstone48/keymaps/like_jis_rs/config.h60
-rw-r--r--keyboards/treadstone48/keymaps/like_jis_rs/keymap.c342
-rw-r--r--keyboards/treadstone48/keymaps/like_jis_rs/readme.md5
-rw-r--r--keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md84
-rw-r--r--keyboards/treadstone48/keymaps/like_jis_rs/rules.mk67
-rw-r--r--keyboards/treadstone48/pro_micro.h362
-rw-r--r--keyboards/treadstone48/readme.md18
-rw-r--r--keyboards/treadstone48/rev1/config.h128
-rw-r--r--keyboards/treadstone48/rev1/info.json261
-rw-r--r--keyboards/treadstone48/rev1/matrix.c357
-rw-r--r--keyboards/treadstone48/rev1/rev1.c15
-rw-r--r--keyboards/treadstone48/rev1/rev1.h202
-rw-r--r--keyboards/treadstone48/rev1/rules.mk3
-rw-r--r--keyboards/treadstone48/rev1/serial_config.h8
-rw-r--r--keyboards/treadstone48/rev1/serial_config_simpleapi.h8
-rw-r--r--keyboards/treadstone48/rev1/split_scomm.c92
-rw-r--r--keyboards/treadstone48/rev1/split_scomm.h21
-rw-r--r--keyboards/treadstone48/rev1/split_util.c70
-rw-r--r--keyboards/treadstone48/rev1/split_util.h16
-rw-r--r--keyboards/treadstone48/rules.mk73
-rw-r--r--keyboards/treadstone48/serial.c590
-rw-r--r--keyboards/treadstone48/serial.h86
-rw-r--r--keyboards/treadstone48/ssd1306.c342
-rw-r--r--keyboards/treadstone48/ssd1306.h90
-rw-r--r--keyboards/treadstone48/treadstone48.c1
-rw-r--r--keyboards/treadstone48/treadstone48.h15
-rw-r--r--keyboards/v60_type_r/config.h7
-rw-r--r--keyboards/v60_type_r/keymaps/default/config.h9
-rw-r--r--keyboards/v60_type_r/keymaps/default/keymap.c2
-rw-r--r--keyboards/v60_type_r/keymaps/default/readme.md5
-rw-r--r--keyboards/v60_type_r/keymaps/default/rules.mk2
-rw-r--r--keyboards/v60_type_r/keymaps/vimouse/config.h9
-rw-r--r--keyboards/v60_type_r/keymaps/vimouse/keymap.c2
-rw-r--r--keyboards/v60_type_r/readme.md16
-rw-r--r--keyboards/v60_type_r/rules.mk28
-rw-r--r--keyboards/v60_type_r/v60_type_r.c2
-rw-r--r--keyboards/v60_type_r/v60_type_r.h6
-rw-r--r--keyboards/vision_division/keymaps/default/config.h8
-rw-r--r--keyboards/vision_division/keymaps/default/keymap.c9
-rw-r--r--keyboards/westfoxtrot/cypher/config.h66
-rw-r--r--keyboards/westfoxtrot/cypher/cypher.c56
-rw-r--r--keyboards/westfoxtrot/cypher/cypher.h68
-rw-r--r--keyboards/westfoxtrot/cypher/info.json12
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h19
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c49
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md1
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/default/config.h19
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/default/keymap.c49
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/default/readme.md1
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/kwer/config.h33
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c79
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md39
-rw-r--r--keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk2
-rw-r--r--keyboards/westfoxtrot/cypher/readme.md15
-rw-r--r--keyboards/westfoxtrot/cypher/rules.mk81
-rwxr-xr-xkeyboards/winkeyless/bface/program105
-rw-r--r--keyboards/winkeyless/bface/rules.mk2
-rw-r--r--keyboards/xd60/keymaps/default/keymap.c1
-rw-r--r--keyboards/xd75/keymaps/adi/config.h7
-rw-r--r--keyboards/xd75/keymaps/adi/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/adi/rules.mk1
-rw-r--r--keyboards/xd75/keymaps/atomic_style/config.h7
-rw-r--r--keyboards/xd75/keymaps/atomic_style/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/bbaserdem/config.h7
-rw-r--r--keyboards/xd75/keymaps/bbaserdem/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/bramver/readme.md (renamed from keyboards/xd75/keymaps/bramver/README.md)0
-rw-r--r--keyboards/xd75/keymaps/c4software_bepo/config.h2
-rw-r--r--keyboards/xd75/keymaps/c4software_bepo/readme.md (renamed from keyboards/xd75/keymaps/c4software_bepo/README.md)0
-rw-r--r--keyboards/xd75/keymaps/cbbrowne/config.h13
-rw-r--r--keyboards/xd75/keymaps/cbbrowne/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/cbbrowne/rules.mk6
-rw-r--r--keyboards/xd75/keymaps/colinta/config.h7
-rw-r--r--keyboards/xd75/keymaps/colinta/keymap.c10
-rw-r--r--keyboards/xd75/keymaps/davidrambo/config.h7
-rw-r--r--keyboards/xd75/keymaps/davidrambo/keymap.c118
-rw-r--r--keyboards/xd75/keymaps/davidrambo/readme.md11
-rw-r--r--keyboards/xd75/keymaps/default/config.h7
-rw-r--r--keyboards/xd75/keymaps/default/keymap.c86
-rw-r--r--keyboards/xd75/keymaps/developper_bepo/config.h2
-rw-r--r--keyboards/xd75/keymaps/developper_bepo/readme.md (renamed from keyboards/xd75/keymaps/developper_bepo/README.md)0
-rw-r--r--keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h7
-rw-r--r--keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/emilyh/config.h7
-rw-r--r--keyboards/xd75/keymaps/emilyh/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/fabian/config.h7
-rw-r--r--keyboards/xd75/keymaps/french/config.h7
-rw-r--r--keyboards/xd75/keymaps/french/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/french/readme.md (renamed from keyboards/xd75/keymaps/french/README.md)0
-rw-r--r--keyboards/xd75/keymaps/germanized/config.h6
-rw-r--r--keyboards/xd75/keymaps/germanized/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/kim-kim-xd73/config.h7
-rw-r--r--keyboards/xd75/keymaps/kim-kim/config.h7
-rw-r--r--keyboards/xd75/keymaps/kloki/config.h7
-rw-r--r--keyboards/xd75/keymaps/kloki/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/markus/config.h7
-rw-r--r--keyboards/xd75/keymaps/markus/keymap.c2
-rw-r--r--keyboards/xd75/keymaps/msiu/config.h18
-rw-r--r--keyboards/xd75/keymaps/msiu/keymap.c120
-rw-r--r--keyboards/xd75/keymaps/msiu/readme.md1
-rw-r--r--keyboards/xd75/keymaps/mtdjr/config.h7
-rw-r--r--keyboards/xd75/keymaps/mtdjr/keymap.c6
-rw-r--r--keyboards/xd75/keymaps/tdl-jturner/config.h7
-rw-r--r--keyboards/xd75/keymaps/tdl-jturner/keymap.c2
-rw-r--r--keyboards/xd75/readme.md51
-rw-r--r--keyboards/xd75/xd75.h11
-rw-r--r--keyboards/xd96/config.h244
-rw-r--r--keyboards/xd96/custom_matrix_helper.c127
-rw-r--r--keyboards/xd96/info.json17
-rw-r--r--keyboards/xd96/keymaps/default/keymap.c38
-rw-r--r--keyboards/xd96/keymaps/default_iso/keymap.c38
-rw-r--r--keyboards/xd96/matrix.c96
-rw-r--r--keyboards/xd96/pca9555.c78
-rw-r--r--keyboards/xd96/pca9555.h55
-rw-r--r--keyboards/xd96/readme.md22
-rw-r--r--keyboards/xd96/rules.mk86
-rw-r--r--keyboards/xd96/xd96.c34
-rw-r--r--keyboards/xd96/xd96.h59
-rw-r--r--keyboards/ymd75/README.md2
-rw-r--r--keyboards/ymd75/program74
-rw-r--r--keyboards/ymd75/rules.mk2
-rw-r--r--keyboards/ymd96/keymaps/default/keymap.c12
-rw-r--r--keyboards/ymd96/program74
-rw-r--r--keyboards/zeal60/config.h15
-rw-r--r--keyboards/zeal60/rgb_backlight.c16
-rw-r--r--keyboards/zeal60/zeal60_api.h3
-rw-r--r--keyboards/zeal65/config.h15
-rw-r--r--keyboards/zen/keymaps/default/config.h7
-rw-r--r--keyboards/zen/matrix.c3
-rw-r--r--layouts/community/60_ansi/stanrc85-ansi/keymap.c15
-rw-r--r--layouts/community/60_ansi/stanrc85-ansi/readme.md50
-rw-r--r--layouts/community/ergodox/bepo_alt/keymap.c127
-rw-r--r--layouts/community/ergodox/bepo_alt/readme.md66
-rw-r--r--layouts/community/ergodox/bepo_alt/rules.mk5
-rw-r--r--layouts/community/ergodox/drashna/keymap.c16
-rw-r--r--layouts/community/ergodox/drashna_glow/README.md1
-rw-r--r--layouts/community/ergodox/drashna_glow/config.h10
-rw-r--r--layouts/community/ergodox/drashna_glow/keymap.c65
-rw-r--r--layouts/community/ergodox/dvorak_programmer_swe/keymap.c29
-rw-r--r--layouts/community/ergodox/dvorak_programmer_swe/readme.md31
-rw-r--r--layouts/community/ergodox/dvorak_spanish/readme.md1
-rw-r--r--layouts/community/ergodox/osx_de/readme.md3
-rw-r--r--layouts/community/ergodox/osx_de_experimental/readme.md1
-rw-r--r--layouts/community/ergodox/teckinesis/readme.md2
-rw-r--r--layouts/community/ergodox/tm2030/readme.md2
-rw-r--r--layouts/community/numpad_5x6/bjohnson/config.h25
-rw-r--r--layouts/community/numpad_5x6/bjohnson/keymap.c51
-rw-r--r--layouts/community/numpad_5x6/bjohnson/rules.mk5
-rw-r--r--layouts/community/numpad_5x6/drashna/config.h18
-rw-r--r--layouts/community/numpad_5x6/drashna/keymap.c22
-rw-r--r--layouts/community/numpad_5x6/drashna/rules.mk9
-rw-r--r--layouts/community/numpad_5x6/layout.json6
-rw-r--r--layouts/community/numpad_5x6/readme.md3
-rw-r--r--layouts/community/ortho_4x12/bakingpy/config.h1
-rw-r--r--layouts/community/ortho_4x12/bakingpy/rules.mk7
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h11
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c39
-rw-r--r--layouts/community/ortho_4x12/drashna/rules.mk2
-rw-r--r--layouts/community/ortho_4x12/jotix/keymap.c77
-rw-r--r--layouts/community/ortho_4x12/jotix/readme.md4
-rw-r--r--layouts/community/ortho_4x12/jotix2/keymap.c87
-rw-r--r--layouts/community/ortho_4x12/jotix2/readme.md8
-rw-r--r--lib/lib8tion/LICENSE20
-rw-r--r--lib/lib8tion/lib8tion.c242
-rw-r--r--lib/lib8tion/lib8tion.h934
-rw-r--r--lib/lib8tion/math8.h552
-rw-r--r--lib/lib8tion/random8.h94
-rw-r--r--lib/lib8tion/scale8.h542
-rw-r--r--lib/lib8tion/trig8.h259
-rw-r--r--message.mk1
-rw-r--r--quantum/api.c2
-rw-r--r--quantum/audio/musical_notes.h4
-rw-r--r--quantum/audio/song_list.h260
-rw-r--r--quantum/color.c2
-rw-r--r--quantum/config_common.h5
-rw-r--r--quantum/debounce/eager_pr.c100
-rw-r--r--quantum/debounce/readme.md2
-rw-r--r--quantum/encoder.c33
-rw-r--r--quantum/encoder.h8
-rw-r--r--quantum/keymap_common.c22
-rw-r--r--quantum/process_keycode/process_unicode_common.c3
-rw-r--r--quantum/quantum.c76
-rw-r--r--quantum/quantum.h6
-rw-r--r--quantum/rgb_matrix.c1185
-rw-r--r--quantum/rgb_matrix.h149
-rw-r--r--quantum/rgb_matrix_animations/alpha_mods_anim.h26
-rw-r--r--quantum/rgb_matrix_animations/breathing_anim.h20
-rw-r--r--quantum/rgb_matrix_animations/cycle_all_anim.h21
-rw-r--r--quantum/rgb_matrix_animations/cycle_left_right_anim.h22
-rw-r--r--quantum/rgb_matrix_animations/cycle_up_down_anim.h22
-rw-r--r--quantum/rgb_matrix_animations/digital_rain_anim.h74
-rw-r--r--quantum/rgb_matrix_animations/dual_beacon_anim.h24
-rw-r--r--quantum/rgb_matrix_animations/gradient_up_down_anim.h22
-rw-r--r--quantum/rgb_matrix_animations/jellybean_raindrops_anim.h30
-rw-r--r--quantum/rgb_matrix_animations/rainbow_beacon_anim.h24
-rw-r--r--quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h22
-rw-r--r--quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h24
-rw-r--r--quantum/rgb_matrix_animations/raindrops_anim.h40
-rw-r--r--quantum/rgb_matrix_animations/solid_color_anim.h14
-rw-r--r--quantum/rgb_matrix_animations/solid_reactive_anim.h33
-rw-r--r--quantum/rgb_matrix_animations/solid_reactive_simple_anim.h32
-rw-r--r--quantum/rgb_matrix_animations/solid_splash_anim.h42
-rw-r--r--quantum/rgb_matrix_animations/splash_anim.h44
-rw-r--r--quantum/rgb_matrix_types.h97
-rw-r--r--quantum/rgblight.c41
-rw-r--r--quantum/rgblight.h2
-rw-r--r--quantum/split_common/matrix.c8
-rw-r--r--quantum/split_common/split_util.c37
-rw-r--r--quantum/split_common/transport.c284
-rw-r--r--quantum/template/avr/template.c30
-rw-r--r--quantum/template/ps2avrgb/config.h13
-rw-r--r--quantum/template/ps2avrgb/i2c.c106
-rw-r--r--quantum/template/ps2avrgb/matrix.c112
-rw-r--r--quantum/template/ps2avrgb/rules.mk4
-rw-r--r--quantum/template/ps2avrgb/template.c77
-rw-r--r--quantum/visualizer/readme.md2
-rw-r--r--tmk_core/avr.mk23
-rw-r--r--tmk_core/common/action_tapping.c20
-rw-r--r--tmk_core/common/action_tapping.h2
-rw-r--r--tmk_core/common/arm_atsam/suspend.c9
-rw-r--r--tmk_core/common/avr/suspend.c9
-rw-r--r--tmk_core/common/mousekey.c372
-rw-r--r--tmk_core/common/mousekey.h56
-rw-r--r--tmk_core/protocol/arm_atsam.mk5
-rw-r--r--tmk_core/protocol/arm_atsam/arm_atsam_protocol.h3
-rw-r--r--tmk_core/protocol/arm_atsam/i2c_master.c8
-rw-r--r--tmk_core/protocol/arm_atsam/led_matrix.c554
-rw-r--r--tmk_core/protocol/arm_atsam/led_matrix.h84
-rw-r--r--tmk_core/protocol/arm_atsam/led_matrix_programs.c (renamed from keyboards/massdrop/ctrl/led_programs.c)5
-rw-r--r--tmk_core/protocol/arm_atsam/main_arm_atsam.c16
-rw-r--r--tmk_core/protocol/arm_atsam/usb/usb2422.c6
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.cpp3
-rw-r--r--tmk_core/protocol/vusb/usbdrv/usbdrv.c2
-rw-r--r--tmk_core/rules.mk12
-rw-r--r--users/arkag/arkag.c286
-rw-r--r--users/arkag/arkag.h35
-rw-r--r--users/arkag/config.h2
-rw-r--r--users/drashna/config.h8
-rw-r--r--users/drashna/drashna.c6
-rw-r--r--users/drashna/drashna.h5
-rw-r--r--users/drashna/process_records.c45
-rw-r--r--users/drashna/rgb_stuff.c37
-rw-r--r--users/drashna/rules.mk4
-rw-r--r--users/jarred/jarred.h4
-rw-r--r--users/stanrc85/config.h2
-rw-r--r--users/stanrc85/stanrc85.c56
-rw-r--r--users/stanrc85/stanrc85.h31
-rw-r--r--util/bootloader_atmega32a_1_0_0.hex154
-rwxr-xr-xutil/docker_build.sh2
1006 files changed, 45920 insertions, 8815 deletions
diff --git a/Dockerfile b/Dockerfile
index 8f78dc2bf..c4acfec71 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian
+FROM debian:9
RUN apt-get update && apt-get install --no-install-recommends -y \
avr-libc \
@@ -26,4 +26,4 @@ VOLUME /qmk_firmware
WORKDIR /qmk_firmware
COPY . .
-CMD make $KEYBOARD:$KEYMAP
+CMD make clean ; make git-submodule ; make $KEYBOARD:$KEYMAP
diff --git a/Vagrantfile b/Vagrantfile
index 5aa56bf2a..2235d9c2e 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
config.vm.define "qmk_firmware"
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
- config.vm.box = "bento/ubuntu-16.04"
+ config.vm.box = "generic/debian9"
# This section allows you to customize the Virtualbox VM
# settings, ie showing the GUI or upping the memory
@@ -55,7 +55,7 @@ Vagrant.configure(2) do |config|
# image, you'll need to: chmod -R a+rw .
config.vm.provider "docker" do |docker, override|
override.vm.box = nil
- docker.image = "jesselang/debian-vagrant:jessie"
+ docker.image = "jesselang/debian-vagrant:stretch"
docker.has_ssh = true
end
diff --git a/common_features.mk b/common_features.mk
index 20c38ae82..046f94d1d 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -308,16 +308,16 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
OPT_DEFS += -DSPLIT_KEYBOARD
# Include files used by all split keyboards
- QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
- $(QUANTUM_DIR)/split_common/split_util.c
+ QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
- # Unused functions are pruned away, which is why we can add both drivers here without bloat.
- QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \
- $(QUANTUM_DIR)/split_common/serial.c
+ # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
+ QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \
+ i2c_master.c \
+ i2c_slave.c
endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
diff --git a/docs/_summary.md b/docs/_summary.md
index 35936df00..c9d6c2bb1 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -3,7 +3,7 @@
* [Building Your First Firmware](newbs_building_firmware.md)
* [Flashing Firmware](newbs_flashing.md)
* [Testing and Debugging](newbs_testing_debugging.md)
- * [Best Practices](newbs_best_practices.md)
+ * [Git Best Practices](newbs_best_practices.md)
* [Learning Resources](newbs_learn_more_resources.md)
* [QMK Basics](README.md)
@@ -92,7 +92,8 @@
* [Understanding QMK](understanding_qmk.md)
* Other Topics
- * [Using Eclipse with QMK](eclipse.md)
+ * [Using Eclipse with QMK](other_eclipse.md)
+ * [Using VSCode with QMK](other_vscode.md)
* [Support](support.md)
* QMK Internals (In Progress)
diff --git a/docs/config_options.md b/docs/config_options.md
index 336feee8f..c5131a841 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -126,6 +126,8 @@ If you define these options you will enable the associated feature, which may in
* `#define TAPPING_TERM 200`
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
+* `#define TAPPING_TERM_PER_KEY`
+ * enables handling for per key `TAPPING_TERM` settings
* `#define RETRO_TAPPING`
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
* See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details
@@ -171,11 +173,15 @@ If you define these options you will enable the associated feature, which may in
## RGB Light Configuration
* `#define RGB_DI_PIN D7`
- * pin the DI on the ws2812 is hooked-up to
+ * pin the DI on the WS2812 is hooked-up to
* `#define RGBLIGHT_ANIMATIONS`
* run RGB animations
-* `#define RGBLED_NUM 15`
+* `#define RGBLED_NUM 12`
* number of LEDs
+* `#define RGBLED_SPLIT { 6, 6 }`
+ * number of LEDs connected that are directly wired to `RGB_DI_PIN` on each half of a split keyboard
+ * First value indicates number of LEDs for left half, second value is for the right half
+ * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
* `#define RGBLIGHT_HUE_STEP 12`
* units to step when in/decreasing hue
* `#define RGBLIGHT_SAT_STEP 25`
@@ -208,9 +214,13 @@ There are a few different ways to set handedness for split keyboards (listed in
1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side
2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half
+ * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files
+ * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right`
3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
+#### Defines for handedness
+
* `#define SPLIT_HAND_PIN B7`
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
@@ -232,6 +242,9 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
+* `#define RGBLED_SPLIT { 6, 6 }`
+ * See [RGB Light Configuration](#rgb-light-configuration)
+
* `#define SELECT_SOFT_SERIAL_SPEED <speed>` (default speed is 1)
* Sets the protocol speed when using serial communication
* Speeds:
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index f291fc2d2..6287b9530 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -116,29 +116,29 @@ Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macro
```c
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- PORTB |= (1<<0);
+ writePinLow(B0);
} else {
- PORTB &= ~(1<<0);
+ writePinHigh(B0);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- PORTB |= (1<<1);
+ writePinLow(B1);
} else {
- PORTB &= ~(1<<1);
+ writePinHigh(B1);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- PORTB |= (1<<2);
+ writePinLow(B2);
} else {
- PORTB &= ~(1<<2);
+ writePinHigh(B2);
}
if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
- PORTB |= (1<<3);
+ writePinLow(B3);
} else {
- PORTB &= ~(1<<3);
+ writePinHigh(B3);
}
if (IS_LED_ON(usb_led, USB_LED_KANA)) {
- PORTB |= (1<<4);
+ writePinLow(B4);
} else {
- PORTB &= ~(1<<4);
+ writePinHigh(B4);
}
}
```
@@ -189,16 +189,18 @@ However, if you have hardware stuff that you need initialized, this is the best
### Example `keyboard_pre_init_user()` Implementation
-This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
+This example, at the keyboard level, sets up B0, B1, B2, B3, and B4 as LED pins.
```c
void keyboard_pre_init_user(void) {
// Call the keyboard pre init code.
// Set our LED pins as output
- DDRB |= (1<<1);
- DDRB |= (1<<2);
- DDRB |= (1<<3);
+ setPinOutput(B0);
+ setPinOutput(B1);
+ setPinOutput(B2);
+ setPinOutput(B3);
+ setPinOutput(B4);
}
```
@@ -233,7 +235,7 @@ This example, running after everything else has initialized, sets up the rgb und
void keyboard_post_init_user(void) {
// Call the post init code.
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
- rgblight_sethsv_noeeprom(180, 255, 255): // sets the color to teal/cyan without saving
+ rgblight_sethsv_noeeprom(180, 255, 255); // sets the color to teal/cyan without saving
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
}
```
@@ -270,16 +272,13 @@ This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_
### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
-This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
```c
-void suspend_power_down_user(void)
-{
+void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
}
-void suspend_wakeup_init_user(void)
-{
+void suspend_wakeup_init_user(void) {
rgb_matrix_set_suspend_state(false);
}
```
@@ -324,6 +323,7 @@ uint32_t layer_state_set_user(uint32_t state) {
* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
+
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
@@ -343,7 +343,7 @@ This is an example of how to add settings, and read and write it. We're using th
In your keymap.c file, add this to the top:
-```
+```c
typedef union {
uint32_t raw;
struct {
@@ -356,11 +356,11 @@ user_config_t user_config;
This sets up a 32 bit structure that we can store settings with in memory, and write to the EEPROM. Using this removes the need to define variables, since they're defined in this structure. Remember that `bool` (boolean) values use 1 bit, `uint8_t` uses 8 bits, `uint16_t` uses up 16 bits. You can mix and match, but changing the order can cause issues, as it will change the values that are read and written.
-We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `matrix_init_user` and `process_record_user` to configure everything.
+We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `keyboard_post_init_user` and `process_record_user` to configure everything.
-Now, using the `matrix_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like:
-```
-void matrix_init_user(void) {
+Now, using the `keyboard_post_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like:
+```c
+void keyboard_post_init_user(void) {
// Call the keymap level matrix init.
// Read the user config from EEPROM
@@ -376,7 +376,7 @@ void matrix_init_user(void) {
```
The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above.
-```
+```c
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _RAISE:
@@ -398,8 +398,8 @@ uint32_t layer_state_set_user(uint32_t state) {
return state;
}
```
-This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR` and `EPRM`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this:
-```
+This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this:
+```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
@@ -416,11 +416,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
PLAY_NOTE_ARRAY(tone_qwerty);
}
return true; // Let QMK send the enter press/release events
- case EPRM:
- if (record->event.pressed) {
- eeconfig_init(); // resets the EEPROM to default
- }
- return false;
case RGB_LYR: // This allows me to use underglow as layer indication, or as normal
if (record->event.pressed) {
user_config.rgb_layer_change ^= 1; // Toggles the status
@@ -443,10 +438,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
```
-And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. For example, if you want to set rgb layer indication by default, and save the default valued.
+And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
-```
+```c
void eeconfig_init_user(void) { // EEPROM is getting reset!
+ user_config.raw = 0;
user_config.rgb_layer_change = true; // We want this enabled by default
eeconfig_update_user(user_config.raw); // Write default value to EEPROM now
@@ -465,3 +461,31 @@ And you're done. The RGB layer indication will only work if you want it to. And
* Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)`
The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM.
+
+# Custom Tapping Term
+
+By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`.
+
+To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first.
+
+
+## Example `get_tapping_term` Implementation
+
+To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file:
+
+```c
+uint16_t get_tapping_term(uint16_t keycode) {
+ switch (keycode) {
+ case SFT_T(KC_SPC):
+ return TAPPING_TERM + 1250;
+ case LT(1, KC_GRV):
+ return 130;
+ default:
+ return TAPPING_TERM;
+ }
+}
+```
+
+### `get_tapping_term` Function Documentation
+
+Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such.
diff --git a/docs/faq_build.md b/docs/faq_build.md
index be26a7c58..0c1bedd71 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -15,7 +15,7 @@ or just:
$ sudo make <keyboard>:<keymap>:dfu
-Note that running `make` with `sudo` is generally *not* a good idea, and you should use one of the former methods, if possible.
+Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible.
### Linux `udev` Rules
On Linux, you'll need proper privileges to access the MCU. You can either use
@@ -36,6 +36,12 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066
# tmk keyboard products https://github.com/tmk/tmk_keyboard
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
```
+**/etc/udev/rules.d/54-input-club-keyboard.rules:**
+
+```
+# Input Club keyboard bootloader
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
+```
### Serial device is not detected in bootloader mode on Linux
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
@@ -47,7 +53,12 @@ If you're using Windows to flash your keyboard, and you are running into issues,
Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue.
-If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUS(libusb-1.0)` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again.
+If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works.
+
+?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here.
+
+If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question.
+
## WINAVR is Obsolete
It is no longer recommended and may cause some problem.
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index 38861e8c1..e1dd4c5a8 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -100,6 +100,16 @@ In music mode, the following keycodes work differently, and don't pass through:
* `KC_UP` - speed-up playback
* `KC_DOWN` - slow-down playback
+The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
+
+ #define PITCH_STANDARD_A 432.0f
+
+You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
+
+ #define NO_MUSIC_MODE
+
+### Music Mask
+
By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
#define MUSIC_MASK keycode != KC_NO
@@ -120,13 +130,26 @@ For a more advanced way to control which keycodes should still be processed, you
Things that return false are not part of the mask, and are always processed.
-The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
+### Music Map
- #define PITCH_STANDARD_A 432.0f
+By default, the Music Mode uses the columns and row to determine the scale for the keys. For a board that uses a rectangular matrix that matches the keyboard layout, this is just fine. However, for boards that use a more complicated matrix (such as the Planck Rev6, or many split keyboards) this would result in a very skewed experience.
-You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
+However, the Music Map option allows you to remap the scaling for the music mode, so it fits the layout, and is more natural.
- #define NO_MUSIC_MODE
+To enable this feature, add `#define MUSIC_MAP` to your `config.h` file, and then you will want to add a `uint8_t music_map` to your keyboard's `c` file, or your `keymap.c`.
+
+```c
+const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12(
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
+);
+```
+
+You will want to use whichever `LAYOUT` macro that your keyboard uses here. This maps it to the correct key location. Start in the bottom left of the keyboard layout, and move to the right, and then upwards. Fill in all the entries until you have a complete matrix.
+
+You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) as an example of how to implement this.
## Audio Click
diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md
index 5d4343f08..38eca3f37 100644
--- a/docs/feature_debounce_type.md
+++ b/docs/feature_debounce_type.md
@@ -33,7 +33,10 @@ The debounce code is compatible with split keyboards.
# Changing between included debouncing methods
You can either use your own code, by including your own debounce.c, or switch to another included one.
Included debounce methods are:
-* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` millseconds of no further input for that key
+* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row.
+For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
+appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
+* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed.
diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md
index a7261d2dc..f57c6042c 100644
--- a/docs/feature_grave_esc.md
+++ b/docs/feature_grave_esc.md
@@ -18,7 +18,7 @@ If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now i
### Caveats
- * On macOS CMD/GUI + KC_GRV is actually mapped to a hot key so it will not output a backtick.
+On macOS, Command+<code>&#96;</code> is by default mapped to "Move focus to next window" so it will not output a backtick. Additionally, Terminal always recognises this shortcut to cycle between windows, even if the shortcut is changed in the Keyboard preferences.
## Configuration
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index 79419abd2..743fc3ad5 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -146,9 +146,59 @@ send_string(my_str);
SEND_STRING(".."SS_TAP(X_END));
```
-## The Old Way: `MACRO()` & `action_get_macro`
-?> This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead.
+## Advanced Macro Functions
+
+There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
+
+### `record->event.pressed`
+
+This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
+
+```c
+ if (record->event.pressed) {
+ // on keydown
+ } else {
+ // on keyup
+ }
+```
+
+### `register_code(<kc>);`
+
+This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
+
+### `unregister_code(<kc>);`
+
+Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
+
+### `tap_code(<kc>);`
+
+This will send `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it).
+
+If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds.
+
+### `register_code16(<kc>);`, `unregister_code16(<kc>);` and `tap_code16(<kc>);`
+
+These functions work similar to their regular counterparts, but allow you to use modded keycodes (with Shift, Alt, Control, and/or GUI applied to them).
+
+Eg, you could use `register_code16(S(KC_5));` instead of registering the mod, then registering the keycode.
+
+### `clear_keyboard();`
+
+This will clear all mods and keys currently pressed.
+
+### `clear_mods();`
+
+This will clear all mods currently pressed.
+
+### `clear_keyboard_but_mods();`
+
+This will clear all keys besides the mods currently pressed.
+
+
+## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro`
+
+!> This is inherited from TMK, and hasn't been updated - it's recommended that you use `SEND_STRING` and `process_record_user` instead.
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
@@ -222,49 +272,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
```
-## Advanced Macro Functions
-
-There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
-
-### `record->event.pressed`
-
-This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
-
-```c
- if (record->event.pressed) {
- // on keydown
- } else {
- // on keyup
- }
-```
-
-### `register_code(<kc>);`
-
-This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
-
-### `unregister_code(<kc>);`
-
-Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
-
-### `tap_code(<kc>);`
-
-This will send `register_code(<kc>)` and then `unregister_code(<kc>)`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it).
-
-If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds.
-
-### `clear_keyboard();`
-
-This will clear all mods and keys currently pressed.
-
-### `clear_mods();`
-
-This will clear all mods currently pressed.
-
-### `clear_keyboard_but_mods();`
-
-This will clear all keys besides the mods currently pressed.
-## Advanced Example: Single-Key Copy/Paste
+### Advanced Example: Single-Key Copy/Paste
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md
index 673eafaef..e64ddf3d0 100644
--- a/docs/feature_mouse_keys.md
+++ b/docs/feature_mouse_keys.md
@@ -1,48 +1,48 @@
# Mousekeys
-Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
+Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions.
-## Adding Mousekeys to a Keymap
+There are 2 ways to define how the mousekeys behave, using "[auto-accelerating](#configuring-the-behavior-of-mousekeys-with-auto-accelerated-movement)" or "[3-speed constant](#configuring-the-behavior-of-mousekeys-with-3-speed-constant-movement)" behavior.
-There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard.
+In either case, you will need to enable mousekeys in your makefile,
+and add the relevant [keycodes](#mapping-mouse-actions-to-keyboard-keys) to your keymap.
-### Adding Mousekeys Support in the `rules.mk`
+#### Enable Mousekeys
-To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`:
+To enable the mousekey functionality, add the following line to your keymap's `rules.mk`:
```
MOUSEKEY_ENABLE = yes
```
-You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk
-
-### Mapping Mouse Actions to Keyboard Keys
+#### Mapping Mouse Actions to Keyboard Keys
You can use these keycodes within your keymap to map button presses to mouse actions:
-|Key |Aliases |Description |
-|----------------|---------|---------------------------|
-|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
-|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
-|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
-|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
-|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
-|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
-|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
-|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
-|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
-|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
-|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
-|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
-|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
-|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
-|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
-|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
-
-You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46
-
-## Configuring the Behavior of Mousekeys
+|Key |Aliases |Description |
+|----------------|---------|-----------------------------------|
+|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
+|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
+|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
+|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
+|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
+|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
+|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
+|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
+|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
+|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
+|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
+|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
+|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
+|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0(slow) |
+|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1(medium)|
+|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2(fast) |
+
+
+## Configuring the Behavior of Mousekeys with auto-accelerated movement
+
+This behavior is intended to emulate the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms).
@@ -55,27 +55,60 @@ The default speed for controlling the mouse with the keyboard is intentionally s
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
```
-
-### `MOUSEKEY_DELAY`
+#### `MOUSEKEY_DELAY`
When one of the mouse movement buttons is pressed this setting is used to define the delay between that button press and the mouse cursor moving. Some people find that small movements are impossible if this setting is too low, while settings that are too high feel sluggish.
-### `MOUSEKEY_INTERVAL`
+#### `MOUSEKEY_INTERVAL`
When a movement key is held down this specifies how long to wait between each movement report. Lower settings will translate into an effectively higher mouse speed.
-### `MOUSEKEY_MAX_SPEED`
+#### `MOUSEKEY_MAX_SPEED`
As a movement key is held down the speed of the mouse cursor will increase until it reaches `MOUSEKEY_MAX_SPEED`.
-### `MOUSEKEY_TIME_TO_MAX`
+#### `MOUSEKEY_TIME_TO_MAX`
How long you want to hold down a movement key for until `MOUSEKEY_MAX_SPEED` is reached. This controls how quickly your cursor will accelerate.
-### `MOUSEKEY_WHEEL_MAX_SPEED`
+#### `MOUSEKEY_WHEEL_MAX_SPEED`
The top speed for scrolling movements.
-### `MOUSEKEY_WHEEL_TIME_TO_MAX`
+#### `MOUSEKEY_WHEEL_TIME_TO_MAX`
How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate.
+
+
+## Configuring the Behavior of Mousekeys with 3-speed constant movement
+
+In your keymap's `config.h`, you must add the line:
+```
+#define MK_3_SPEED
+```
+Then you can precisely define 3 different speeds for both the cursor and the mouse wheel, and also whether speed selection is momentary or tap-to-select.
+For each speed, you can specify how many milliseconds you want between reports(interval), and how far you want to it to move per report(offset).
+
+For example:
+
+```
+#define MK_3_SPEED
+#define MK_MOMENTARY_ACCEL // comment this out for tap-to-select acceleration
+// cursor speeds:
+#define MK_C_OFFSET_SLOW 1 // pixels
+#define MK_C_INTERVAL_SLOW 100 // milliseconds
+#define MK_C_OFFSET_MED 4
+#define MK_C_INTERVAL_MED 16
+#define MK_C_OFFSET_FAST 12
+#define MK_C_INTERVAL_FAST 16
+// scroll wheel speeds:
+#define MK_W_OFFSET_SLOW 1 // wheel clicks
+#define MK_W_INTERVAL_SLOW 400 // milliseconds
+#define MK_W_OFFSET_MED 1
+#define MK_W_INTERVAL_MED 200
+#define MK_W_OFFSET_FAST 1
+#define MK_W_INTERVAL_FAST 100
+```
+
+Medium values will be used as the default or unmodified speed.
+The speed at which both the cursor and scrolling move can be selected with KC_ACL0, KC_ACL1, KC_ACL2 for slow, medium, and fast. However, if you leave MK_MOMENTARY_ACCEL defined then there is no need to ever send KC_ACL1, since that will be the unmodified speed.
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 910a70469..ec1218954 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -10,39 +10,45 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem](
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
- RGB_MATRIX_ENABLE = IS31FL3731
+```C
+RGB_MATRIX_ENABLE = IS31FL3731
+```
Configure the hardware via your `config.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 DRIVER_ADDR_1 0b1110100
- #define DRIVER_ADDR_2 0b1110110
-
- #define DRIVER_COUNT 2
- #define DRIVER_1_LED_TOTAL 25
- #define DRIVER_2_LED_TOTAL 24
- #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
+```C
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 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_1_LED_TOTAL 25
+#define DRIVER_2_LED_TOTAL 24
+#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
+```
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
- /* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, C1_3, C2_3, C3_3},
- ....
- }
+```C
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, C1_3, C2_3, C3_3},
+ ....
+}
+```
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
@@ -50,60 +56,70 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet]
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
- RGB_MATRIX_ENABLE = IS31FL3733
+```C
+RGB_MATRIX_ENABLE = IS31FL3733
+```
Configure the hardware via your `config.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 DRIVER_ADDR_1 0b1010000
- #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
-
- #define DRIVER_COUNT 2
- #define DRIVER_1_LED_TOTAL 64
- #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+```C
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
+
+#define DRIVER_COUNT 2
+#define DRIVER_1_LED_TOTAL 64
+#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+```
Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1`
Define these arrays listing all the LEDs in your `<keyboard>.c`:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
- /* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, B_1, A_1, C_1},
- ....
- }
+```C
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, B_1, A_1, C_1},
+ ....
+}
+```
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
From this point forward the configuration is the same for all the drivers.
- const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- /* {row | col << 4}
- * | {x=0..224, y=0..64}
- * | | modifier
- * | | | */
- {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
- {{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
- ....
- }
+```C
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+/* {row | col << 4}
+ * | {x=0..224, y=0..64}
+ * | | modifier
+ * | | | */
+ {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
+ {{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
+ ....
+}
+```
The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is:
- x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION
- y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION
+```C
+x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION
+y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION
+```
Where all variables are decimels/floats.
@@ -113,47 +129,50 @@ Where all variables are decimels/floats.
All RGB keycodes are currently shared with the RGBLIGHT system:
- * `RGB_TOG` - toggle
- * `RGB_MOD` - cycle through modes
- * `RGB_HUI` - increase hue
- * `RGB_HUD` - decrease hue
- * `RGB_SAI` - increase saturation
- * `RGB_SAD` - decrease saturation
- * `RGB_VAI` - increase value
- * `RGB_VAD` - decrease value
- * `RGB_SPI` - increase speed effect (no EEPROM support)
- * `RGB_SPD` - decrease speed effect (no EEPROM support)
-
-
- * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
+* `RGB_TOG` - toggle
+* `RGB_MOD` - cycle through modes
+* `RGB_HUI` - increase hue
+* `RGB_HUD` - decrease hue
+* `RGB_SAI` - increase saturation
+* `RGB_SAD` - decrease saturation
+* `RGB_VAI` - increase value
+* `RGB_VAD` - decrease value
+* `RGB_SPI` - increase speed effect (no EEPROM support)
+* `RGB_SPD` - decrease speed effect (no EEPROM support)
+* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
## RGB Matrix Effects
-These are the effects that are currently available:
-
- enum rgb_matrix_effects {
- RGB_MATRIX_SOLID_COLOR = 1,
- RGB_MATRIX_ALPHAS_MODS,
- RGB_MATRIX_DUAL_BEACON,
- RGB_MATRIX_GRADIENT_UP_DOWN,
- RGB_MATRIX_RAINDROPS,
- RGB_MATRIX_CYCLE_ALL,
- RGB_MATRIX_CYCLE_LEFT_RIGHT,
- RGB_MATRIX_CYCLE_UP_DOWN,
- RGB_MATRIX_RAINBOW_BEACON,
- RGB_MATRIX_RAINBOW_PINWHEELS,
- RGB_MATRIX_RAINBOW_MOVING_CHEVRON,
- RGB_MATRIX_JELLYBEAN_RAINDROPS,
- RGB_MATRIX_DIGITAL_RAIN,
- #ifdef RGB_MATRIX_KEYPRESSES
- RGB_MATRIX_SOLID_REACTIVE,
- RGB_MATRIX_SPLASH,
- RGB_MATRIX_MULTISPLASH,
- RGB_MATRIX_SOLID_SPLASH,
- RGB_MATRIX_SOLID_MULTISPLASH,
- #endif
- RGB_MATRIX_EFFECT_MAX
- };
+All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available:
+
+```C
+enum rgb_matrix_effects {
+ RGB_MATRIX_NONE = 0,
+ RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support
+ RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue
+ RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
+ RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
+ RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
+ RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
+ RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
+ RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
+ RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
+ RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
+ RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
+ RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
+ RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
+ RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
+#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
+ 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_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
+ RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out
+#endif
+ RGB_MATRIX_EFFECT_MAX
+};
+```
You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
@@ -161,18 +180,20 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|Define |Description |
|---------------------------------------------------|--------------------------------------------|
|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` |
-|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
-|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
+|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` |
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
+|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|
+|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
-|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|
+|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLEE`|
|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` |
|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` |
|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` |
@@ -183,26 +204,33 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
Custom layer effects can be done by defining this in your `<keyboard>.c`:
- void rgb_matrix_indicators_kb(void) {
- rgb_matrix_set_color(index, red, green, blue);
- }
+```C
+void rgb_matrix_indicators_kb(void) {
+ rgb_matrix_set_color(index, red, green, blue);
+}
+```
A similar function works in the keymap as `rgb_matrix_indicators_user`.
## Additional `config.h` Options
- #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
- #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
- #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
- #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
- #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
+```C
+#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
+#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
+#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+```
## EEPROM storage
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
- #define EECONFIG_RGB_MATRIX (uint32_t *)16
+```C
+#define EECONFIG_RGB_MATRIX (uint32_t *)16
+```
Where `16` is an unused index from `eeconfig.h`.
@@ -210,12 +238,14 @@ Where `16` is an unused index from `eeconfig.h`.
To use the suspend feature, add this to your `<keyboard>.c`:
- void suspend_power_down_kb(void)
- {
- rgb_matrix_set_suspend_state(true);
- }
-
- void suspend_wakeup_init_kb(void)
- {
- rgb_matrix_set_suspend_state(false);
- }
+```C
+void suspend_power_down_kb(void)
+{
+ rgb_matrix_set_suspend_state(true);
+}
+
+void suspend_wakeup_init_kb(void)
+{
+ rgb_matrix_set_suspend_state(false);
+}
+```
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 23b6f1c94..c9323deb5 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -23,10 +23,11 @@ RGBLIGHT_ENABLE = yes
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
-|Define |Description |
-|------------|---------------------------------------------|
-|`RGB_DI_PIN`|The pin connected to the data pin of the LEDs|
-|`RGBLED_NUM`|The number of LEDs connected |
+|Define |Description |
+|---------------|---------------------------------------------------------------------------------------------------------|
+|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs |
+|`RGBLED_NUM` |The number of LEDs connected |
+|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` |
Then you should be able to use the keycodes below to change the RGB lighting to your liking.
@@ -124,6 +125,8 @@ The following options can be used to tweak the various animations:
You can also modify the speeds that the different modes animate at:
+Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
+
```c
// How long (in milliseconds) to wait between animation steps for each of the "Solid color breathing" animations
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
@@ -188,6 +191,53 @@ If you need to change your RGB lighting in code, for example in a macro to chang
Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
+## Changing the order of the LEDs
+
+If you want to make the logical order of LEDs different from the electrical connection order, you can do this by defining the `RGBLIGHT_LED_MAP` macro in your `config.h`.
+
+By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED with addressing in reverse order of the electrical connection order.
+
+```c
+// config.h
+
+#define RGBLED_NUM 10
+#define RGBLIGHT_LED_MAP { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }
+
+```
+
+For keyboards that use the RGB LEDs as a backlight for each key, you can also define it as in the example below.
+
+```c
+// config.h
+
+#define RGBLED_NUM 30
+
+/* RGB LED Conversion macro from physical array to electric array */
+#define LED_LAYOUT( \
+ L00, L01, L02, L03, L04, L05, \
+ L10, L11, L12, L13, L14, L15, \
+ L20, L21, L22, L23, L24, L25, \
+ L30, L31, L32, L33, L34, L35, \
+ L40, L41, L42, L43, L44, L45 ) \
+ { \
+ L05, L04, L03, L02, L01, L00, \
+ L10, L11, L12, L13, L14, L15, \
+ L25, L24, L23, L22, L21, L20, \
+ L30, L31, L32, L33, L34, L35, \
+ L46, L45, L44, L43, L42, L41 \
+ }
+
+/* RGB LED logical order map */
+/* Top->Bottom, Right->Left */
+#define RGBLIGHT_LED_MAP LED_LAYOUT( \
+ 25, 20, 15, 10, 5, 0, \
+ 26, 21, 16, 11, 6, 1, \
+ 27, 22, 17, 12, 7, 2, \
+ 28, 23, 18, 13, 8, 3, \
+ 29, 24, 19, 14, 9, 4 )
+
+```
+
## Hardware Modification
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
diff --git a/docs/flashing.md b/docs/flashing.md
index bc418c415..3b4582f00 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -49,9 +49,18 @@ To generate this bootloader, use the `bootloader` target, eg `make planck/rev4:d
To generate a production-ready .hex file (containing the application and the bootloader), use the `production` target, eg `make planck/rev4:default:production`.
+### DFU commands
+
+There are a number of DFU commands that you can use to flash firmware to a DFU device:
+
+* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared.
+* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon.
+* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+
## Caterina
-Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
+Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:
@@ -84,6 +93,7 @@ or if you want to flash multiple boards, use the following command
When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
+
## Halfkay
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
@@ -131,3 +141,12 @@ Flashing sequence:
* You will receive a warning about the DFU signature; Just ignore it
4. Reset the device into application mode (may be done automatically)
* If you are building from command line (e.g. `make planck/rev6:default:dfu-util`), make sure that `:leave` is passed to the `DFU_ARGS` variable inside your `rules.mk` (e.g. `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) so that your device resets after flashing
+
+### STM32 Commands
+
+There are a number of DFU commands that you can use to flash firmware to a STM32 device:
+
+* `:dfu-util` - The default command for flashing to STM32 devices.
+* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout.
+ * Eg: `make <keyboard>:<keymap>:dfu-util TIME_DELAY=5`
+* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util.
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index 1f771b1a0..b72f52e18 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -2,6 +2,8 @@
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4).
+After cloning the repo of QMK run `make git-submodule` once to download 3rd party libraries like ChibiOS.
+
<!-- FIXME: We should have ARM instructions somewhere. -->
Note: If it is your first time here, Check out the "Complete Newbs guide" instead
diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md
index cc54e566a..0772f055d 100644
--- a/docs/how_keyboards_work.md
+++ b/docs/how_keyboards_work.md
@@ -12,7 +12,7 @@ place:
``` text
+------+ +-----+ +----------+ +----------+ +----+
| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS |
-+------+ +-----+ +----------+ +----------+ |----+
++------+ +-----+ +----------+ +----------+ +----+
```
This scheme is a very simple view of what's going on, and more details follow
diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md
index 18546fc62..bb1a2d74f 100644
--- a/docs/i2c_driver.md
+++ b/docs/i2c_driver.md
@@ -12,7 +12,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. |
-|`uint8_t i2c_stop(uint16_t timeout);` |Stops the I2C driver. |
+|`uint8_t i2c_stop(void);` |Ends an I2C transaction. |
### Function Return
diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md
index 18f214784..0f786c514 100644
--- a/docs/isp_flashing_guide.md
+++ b/docs/isp_flashing_guide.md
@@ -63,6 +63,7 @@ If you just want to get things back to normal, you can flash only a bootloader f
* [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2
* [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1
+* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board.
@@ -113,6 +114,10 @@ Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
+If your board uses an `atmega32a` (e.g. on a jj40), the command is this (the extra code at the end sets the fuses correctly):
+
+ avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m
+
You should see a couple of progress bars, then you should see:
avrdude: verifying ...
diff --git a/docs/keymap.md b/docs/keymap.md
index 49e6654a2..457dbf67e 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -161,62 +161,6 @@ Some interesting things to note:
* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
-### Custom Functions
-
-At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
-
-#### `fn_actions[]`
-
-We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this:
-
- const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(0), // Calls action_function()
- };
-
-In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section.
-
-> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
-
-You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h).
-
-#### `action_function()`
-
-To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.
-
- void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t mods_pressed;
-
- switch (id) {
- case 0:
- /* Handle the combined Grave/Esc key
- */
- mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
-
- if (record->event.pressed) {
- /* The key is being pressed.
- */
- if (mods_pressed) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- /* The key is being released.
- */
- if (mods_pressed) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
- }
-
# Nitty Gritty Details
This should have given you a basic overview for creating your own keymap. For more details see the following resources:
diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md
index 9d2bf920f..a985e5d2b 100644
--- a/docs/newbs_flashing.md
+++ b/docs/newbs_flashing.md
@@ -131,6 +131,16 @@ If you have any issues with this, you may need to this:
sudo make <my_keyboard>:<my_keymap>:dfu
+#### DFU commands
+
+There are a number of DFU commands that you can use to flash firmware to a DFU device:
+
+* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared.
+* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon.
+* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+
+
### Caterina
For Arduino boards and their clones (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
@@ -199,6 +209,14 @@ If you have any issues with this, you may need to this:
sudo make <my_keyboard>:<my_keymap>:avrdude
+
+Additionally, if you want to flash multiple boards, use the following command:
+
+ make <keyboard>:<keymap>:avrdude-loop
+
+When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
+
+
## HalfKay
For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
@@ -226,12 +244,61 @@ Waiting for Teensy device...
```
Found HalfKay Bootloader
-Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage
+Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
Programming............................................................................................................................................................................
...................................................
Booting
```
+## STM32 (ARM)
+
+For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
+
+ make <my_keyboard>:<my_keymap>:dfu-util
+
+For example, if your keymap is named "xyverz" and you're building a keymap for the Planck Revision 6 keyboard, you'll use this command and then reboot the keyboard to the bootloader (before it finishes compiling):
+
+ make planck/rev6:xyverz:dfu-util
+
+Once the firmware finishes compiling, it will output something like this:
+
+```
+Linking: .build/planck_rev6_xyverz.elf [OK]
+Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK]
+Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK]
+
+Size after:
+ text data bss dec hex filename
+ 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex
+
+Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK]
+dfu-util 0.9
+
+Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
+Copyright 2010-2016 Tormod Volden and Stefan Schmidt
+This program is Free Software and has ABSOLUTELY NO WARRANTY
+Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
+
+Invalid DFU suffix signature
+A valid DFU suffix will be required in a future dfu-util release!!!
+Opening DFU capable USB device...
+ID 0483:df11
+Run-time device DFU version 011a
+Claiming USB DFU Interface...
+Setting Alternate Setting #0 ...
+Determining device status: state = dfuERROR, status = 10
+dfuERROR, clearing status
+Determining device status: state = dfuIDLE, status = 0
+dfuIDLE, continuing
+DFU mode device DFU version 011a
+Device returned transfer size 2048
+DfuSe interface name: "Internal Flash "
+Downloading to address = 0x08000000, size = 41824
+Download [=========================] 100% 41824 bytes
+Download done.
+File downloaded successfully
+Transitioning to dfuMANIFEST state
+```
## Test It Out!
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md
index aefa1b738..ae4b799a9 100644
--- a/docs/newbs_getting_started.md
+++ b/docs/newbs_getting_started.md
@@ -66,8 +66,10 @@ You will need to install Git. It's very likely that you already have it, but if
Once you have set up your Linux/Unix environment, you are ready to download QMK. We will do this by using Git to "clone" the QMK repository. Open a Terminal or MSYS2 MinGW window and leave it open for the remainder of this guide. Inside that window run these two commands:
- git clone https://github.com/qmk/qmk_firmware.git
- cd qmk_firmware
+```shell
+git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
+cd qmk_firmware
+```
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create and clone your own fork instead. If you don't know what that means, you can safely ignore this message.
diff --git a/docs/eclipse.md b/docs/other_eclipse.md
index 2cb90647a..2cb90647a 100644
--- a/docs/eclipse.md
+++ b/docs/other_eclipse.md
diff --git a/docs/other_vscode.md b/docs/other_vscode.md
new file mode 100644
index 000000000..7427f758e
--- /dev/null
+++ b/docs/other_vscode.md
@@ -0,0 +1,117 @@
+# Setting up Visual Studio Code for QMK Development
+
+[Visual Studio Code](https://code.visualstudio.com/) (VS Code) is an open-source code editor that supports many different programming languages.
+
+Using a full-featured editor such as VS Code provides many advantages over a plain text editor, such as:
+* intelligent code completion
+* convenient navigation in the code
+* refactoring tools
+* build automation (no need for the command-line)
+* a graphical front end for GIT
+* many other tools such as debugging, code formatting, showing call hierarchies etc.
+
+The purpose of this page is to document how to set up VS Code for developing QMK Firmware.
+
+This guide covers how to configure everything needed on Windows and Ubuntu 18.04
+
+# Set up VS Code
+Before starting, you will want to make sure that you have all of the build tools set up, and QMK Firmware cloned. Head to the the [Newbs Getting Started Guide](newbs_getting_started.md) to get things set up, if you haven't already.
+
+## Windows
+
+### Prerequisites
+
+* [Git for Windows](https://git-scm.com/download/win) (This link will prompt to save/run the installer)
+
+ 1. Disable all of the options but `Git LFS (Large File Support)` and `Check daily for Git for Windows updates`.
+ 2. Set the default editor to `Use Visual Studio Code as Git's default editor`
+ 3. Select the `Use Git from Git Bash only` option, since that's the option that you should use here.
+ 4. For the `Choosing HTTPS transport backend`, either option should be fine.
+ 5. Select the `Checkout as-is, commit Unix-style line endings` option. QMK Firmware uses Unix style commits.
+ 6. For the extra options, leave the default options as is.
+
+ This software is needed for Git support in VS Code. It may be possible to not include this, but it is much simpler to just use this.
+
+* [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (Optional)
+
+ This software provides better support for Git by providing secure storage for git credentials, MFA and personal access token generation.
+
+ This isn't strictly needed, but we would recommend it.
+
+
+### Installing VS Code
+
+1. Head to [VS Code](https://code.visualstudio.com/) and download the installer
+2. Run the installer
+
+This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly.
+
+### Configuring VS Code
+
+First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.
+
+Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS.
+
+Once you have saved this file, you will need to reload VS Code, if it was already running.
+
+?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well.
+
+
+Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window.
+
+1. Click <kbd><kbd>File</kbd> > <kbd>Preferences ></kbd> > <kbd>Settings</kbd> </kbd>
+2. Click on the <kbd>{}</kbd> button, in the top right to open the `settings.json` file.
+3. Set the file's content to:
+
+ ```json
+ {
+ "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
+ "terminal.integrated.env.windows": {
+ "MSYSTEM": "MINGW64",
+ "CHERE_INVOKING": "1"
+ },
+ "terminal.integrated.shellArgs.windows": [
+ "--login"
+ ],
+ "terminal.integrated.cursorStyle": "line"
+ }
+ ```
+
+ If there are settings here already, then just add everything between the first and last curly brackets.
+
+?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system.
+
+4. Hit Ctrl-` (grave) to bring up the terminal.
+
+ This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard.
+
+
+## Every other Operating System
+
+1. Head to [VS Code](https://code.visualstudio.com/) and download the installer
+2. Run the installer
+3. That's it
+
+No, really, that's it. The paths needed are already included when installing the packages, and it is much better about detecting the current workspace files and parsing them for IntelliSense.
+
+## Plugins
+
+There are a number of extensions that you may want to install:
+
+* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) -
+This installs a bunch of Git related tools that may make using Git with QMK Firmware easier.
+* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions.
+* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code.
+* [Github Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's.
+* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody.
+* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too.
+* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up.
+
+Restart once you've installed any extensions
+
+# Configure VS Code for QMK
+1. Click <kbd><kbd>File</kbd> > <kbd>Open Folder</kbd></kbd>
+2. Open the QMK Firmware folder that you cloned from GitHub.
+3. Click <kbd><kbd>File</kbd> > <kbd>Save Workspace As...</kbd></kbd>
+
+And now you're ready to code QMK Firmware in VS Code
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index bf4b5eadc..a94c9c319 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -135,9 +135,11 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172)
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206)
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226)
+ * [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27)
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119)
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62)
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79)
+ * [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216)
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c
index 50a30ebce..0e5edcc38 100644
--- a/drivers/arm/i2c_master.c
+++ b/drivers/arm/i2c_master.c
@@ -101,8 +101,7 @@ uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t l
return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
}
-// This is usually not needed. It releases the driver to allow pins to become GPIO again.
-uint8_t i2c_stop(uint16_t timeout)
+uint8_t i2c_stop(void)
{
i2cStop(&I2C_DRIVER);
return 0;
diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h
index 7a9eb32eb..4ab2301f8 100644
--- a/drivers/arm/i2c_master.h
+++ b/drivers/arm/i2c_master.h
@@ -47,4 +47,4 @@ uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t ti
uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_stop(uint16_t timeout);
+uint8_t i2c_stop(void);
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c
index 19bae33e9..ba6d0d158 100755
--- a/drivers/avr/i2c_master.c
+++ b/drivers/avr/i2c_master.c
@@ -7,43 +7,56 @@
#include "i2c_master.h"
#include "timer.h"
+#include "wait.h"
#ifndef F_SCL
-#define F_SCL 400000UL // SCL frequency
+# define F_SCL 400000UL // SCL frequency
#endif
#define Prescaler 1
-#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2)
+#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16) / 2)
-void i2c_init(void)
-{
- TWSR = 0; /* no prescaler */
+void i2c_init(void) {
+ TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;
+
+ #ifdef __AVR_ATmega32A__
+ // set pull-up resistors on I2C bus pins
+ PORTC |= 0b11;
+
+ // enable TWI (two-wire interface)
+ TWCR |= (1 << TWEN);
+
+ // enable TWI interrupt and slave address ACK
+ TWCR |= (1 << TWIE);
+ TWCR |= (1 << TWEA);
+ #endif
}
-i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
-{
+i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
// reset TWI control register
TWCR = 0;
// transmit START condition
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
+ TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN);
uint16_t timeout_timer = timer_read();
- while( !(TWCR & (1<<TWINT)) ) {
+ while (!(TWCR & (1 << TWINT))) {
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
return I2C_STATUS_TIMEOUT;
}
}
// check if the start condition was successfully transmitted
- if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; }
+ if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) {
+ return I2C_STATUS_ERROR;
+ }
// load slave address into data register
TWDR = address;
// start transmission of address
- TWCR = (1<<TWINT) | (1<<TWEN);
+ TWCR = (1 << TWINT) | (1 << TWEN);
timeout_timer = timer_read();
- while( !(TWCR & (1<<TWINT)) ) {
+ while (!(TWCR & (1 << TWINT))) {
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
return I2C_STATUS_TIMEOUT;
}
@@ -51,38 +64,39 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
// check if the device has acknowledged the READ / WRITE mode
uint8_t twst = TW_STATUS & 0xF8;
- if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR;
+ if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
+ return I2C_STATUS_ERROR;
+ }
return I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_write(uint8_t data, uint16_t timeout)
-{
+i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
// load data into data register
TWDR = data;
// start transmission of data
- TWCR = (1<<TWINT) | (1<<TWEN);
+ TWCR = (1 << TWINT) | (1 << TWEN);
uint16_t timeout_timer = timer_read();
- while( !(TWCR & (1<<TWINT)) ) {
+ while (!(TWCR & (1 << TWINT))) {
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
return I2C_STATUS_TIMEOUT;
}
}
- if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; }
+ if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) {
+ return I2C_STATUS_ERROR;
+ }
return I2C_STATUS_SUCCESS;
}
-int16_t i2c_read_ack(uint16_t timeout)
-{
-
+int16_t i2c_read_ack(uint16_t timeout) {
// start TWI module and acknowledge data after reception
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
+ TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWEA);
uint16_t timeout_timer = timer_read();
- while( !(TWCR & (1<<TWINT)) ) {
+ while (!(TWCR & (1 << TWINT))) {
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
return I2C_STATUS_TIMEOUT;
}
@@ -92,14 +106,12 @@ int16_t i2c_read_ack(uint16_t timeout)
return TWDR;
}
-int16_t i2c_read_nack(uint16_t timeout)
-{
-
+int16_t i2c_read_nack(uint16_t timeout) {
// start receiving without acknowledging reception
- TWCR = (1<<TWINT) | (1<<TWEN);
+ TWCR = (1 << TWINT) | (1 << TWEN);
uint16_t timeout_timer = timer_read();
- while( !(TWCR & (1<<TWINT)) ) {
+ while (!(TWCR & (1 << TWINT))) {
if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
return I2C_STATUS_TIMEOUT;
}
@@ -109,115 +121,89 @@ int16_t i2c_read_nack(uint16_t timeout)
return TWDR;
}
-i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
-{
+i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
- if (status) return status;
- for (uint16_t i = 0; i < length; i++) {
+ for (uint16_t i = 0; i < length && status >= 0; i++) {
status = i2c_write(data[i], timeout);
- if (status) return status;
}
- status = i2c_stop(timeout);
- if (status) return status;
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return status;
}
-i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
-{
+i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(address | I2C_READ, timeout);
- if (status) return status;
- for (uint16_t i = 0; i < (length-1); i++) {
+ for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) {
status = i2c_read_ack(timeout);
if (status >= 0) {
data[i] = status;
- } else {
- return status;
}
}
- status = i2c_read_nack(timeout);
- if (status >= 0 ) {
- data[(length-1)] = status;
- } else {
- return status;
+ if (status >= 0) {
+ status = i2c_read_nack(timeout);
+ if (status >= 0) {
+ data[(length - 1)] = status;
+ }
}
- status = i2c_stop(timeout);
- if (status) return status;
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return (status < 0) ? status : I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
-{
+i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(devaddr | 0x00, timeout);
- if (status) return status;
+ if (status >= 0) {
+ status = i2c_write(regaddr, timeout);
- status = i2c_write(regaddr, timeout);
- if (status) return status;
-
- for (uint16_t i = 0; i < length; i++) {
- status = i2c_write(data[i], timeout);
- if (status) return status;
+ for (uint16_t i = 0; i < length && status >= 0; i++) {
+ status = i2c_write(data[i], timeout);
+ }
}
- status = i2c_stop(timeout);
- if (status) return status;
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return status;
}
-i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
-{
+i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(devaddr, timeout);
- if (status) return status;
+ if (status < 0) {
+ goto error;
+ }
status = i2c_write(regaddr, timeout);
- if (status) return status;
-
- status = i2c_stop(timeout);
- if (status) return status;
+ if (status < 0) {
+ goto error;
+ }
status = i2c_start(devaddr | 0x01, timeout);
- if (status) return status;
- for (uint16_t i = 0; i < (length-1); i++) {
+ for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) {
status = i2c_read_ack(timeout);
if (status >= 0) {
data[i] = status;
- } else {
- return status;
}
}
- status = i2c_read_nack(timeout);
- if (status >= 0 ) {
- data[(length-1)] = status;
- } else {
- return status;
+ if (status >= 0) {
+ status = i2c_read_nack(timeout);
+ if (status >= 0) {
+ data[(length - 1)] = status;
+ }
}
- status = i2c_stop(timeout);
- if (status) return status;
+error:
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return (status < 0) ? status : I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_stop(uint16_t timeout)
-{
+void i2c_stop(void) {
// transmit STOP condition
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-
- uint16_t timeout_timer = timer_read();
- while(TWCR & (1<<TWSTO)) {
- if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) {
- return I2C_STATUS_TIMEOUT;
- }
- }
-
- return I2C_STATUS_SUCCESS;
+ TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
}
diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h
index 89c64599c..81a7fb5e3 100755
--- a/drivers/avr/i2c_master.h
+++ b/drivers/avr/i2c_master.h
@@ -26,6 +26,6 @@ i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint1
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_stop(uint16_t timeout);
+void i2c_stop(void);
#endif // I2C_MASTER_H \ No newline at end of file
diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c
index 18a29a45a..dbb9fb0df 100755
--- a/drivers/avr/i2c_slave.c
+++ b/drivers/avr/i2c_slave.c
@@ -16,7 +16,7 @@ static volatile bool slave_has_register_set = false;
void i2c_slave_init(uint8_t address){
// load address into TWI address register
- TWAR = (address << 1);
+ TWAR = address;
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN);
}
diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c
index 48350a53e..39473f606 100644
--- a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LCTL
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL
),
[1] = LAYOUT_60_ansi(
diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h
index eb4082f1a..b6d3c8e0d 100644
--- a/keyboards/1upkeyboards/1up60hte/1up60hte.h
+++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h
@@ -19,12 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
-#define LAYOUT_all( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+#define LAYOUT_tsangan( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
- K400, K401, K402, K406, K410, K411, K412, K413 \
+ K400, K401, K402, K406, K410, K411, K412 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
@@ -35,11 +35,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* HHKB Variant */
#define LAYOUT_60_hhkb( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
- K401, K402, K406, K410, K411, K413 \
+ K401, K402, K406, K410, K411 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
@@ -47,4 +47,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \
{ KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413 } \
}
-
diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h
index c7e023a5e..892a8b9fe 100644
--- a/keyboards/1upkeyboards/1up60hte/config.h
+++ b/keyboards/1upkeyboards/1up60hte/config.h
@@ -62,4 +62,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
-#endif
+#endif \ No newline at end of file
diff --git a/keyboards/1upkeyboards/1up60hte/info.json b/keyboards/1upkeyboards/1up60hte/info.json
new file mode 100644
index 000000000..86521d36b
--- /dev/null
+++ b/keyboards/1upkeyboards/1up60hte/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "1up60hte",
+ "url": "https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/",
+ "maintainer": "1upkeyboards",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_tsangan": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
+ },
+ "LAYOUT_60_hhkb": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c
index 8c3916629..359ac7540 100644
--- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c
@@ -17,21 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [0] = LAYOUT_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_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_ENT,
- 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_NO,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC),
-
- [1] = LAYOUT_all(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
-
+ [0] = LAYOUT_tsangan(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL),
+
+ [1] = LAYOUT_tsangan(
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
+ KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
void matrix_init_user(void) {
diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c
index 1b06739b6..5312e3b67 100644
--- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c
+++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c
@@ -17,20 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [0] = LAYOUT_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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1),
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC),
-
- [1] = LAYOUT_all(
- RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS,
- KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
- KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL)
+ [0] = LAYOUT_tsangan(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_NO),
+
+ [1] = LAYOUT_tsangan(
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
+ KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
void matrix_init_user(void) {
@@ -45,35 +44,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(B6);
} else {
writePinHigh(B6);
}
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
}
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
index cb372e15d..8567b780a 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "1up60rgb.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c
new file mode 100644
index 000000000..bb0d10405
--- /dev/null
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c
@@ -0,0 +1,48 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ * Layer 0
+ * ,-----------------------------------------------------------------------------------------.
+ * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ |
+ * |-----------------------------------------------------------------------------------------+
+ * | Esc | a | s | d | f | g | h | j | k | l | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | z | x | c | v | b | n | m | , | . | / | Shift |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | L1 | Alt | space | Alt | Sup | L1 | Ctrl |
+ * \-----------------------------------------------------------------------------------------/
+ *
+ */
+ LAYOUT_all(
+ 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_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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT,
+ KC_LSHIFT, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_RSHIFT,
+ KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
+
+/*
+ * Layer 1
+ * ,-----------------------------------------------------------------------------------------.
+ * | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10 | f11 | f12 | Del |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | Ins | | Paus| | | Prnt |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | L | D | U | R | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | Hom | PDn | PUp | End | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | |
+ * \-----------------------------------------------------------------------------------------/
+ *
+ */
+ LAYOUT_all(
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, KC_PSCR,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
index 899afaba1..4cc754dc1 100644
--- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "sweet16.h"
+#include QMK_KEYBOARD_H
enum custom_keycodes {
UP_URL = SAFE_RANGE
diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h
index 9aa8e810d..c74fcacbb 100644
--- a/keyboards/40percentclub/half_n_half/config.h
+++ b/keyboards/40percentclub/half_n_half/config.h
@@ -46,12 +46,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION ROW2COL
+#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define USE_SERIAL
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h
index e20d42fde..bc330c9cb 100644
--- a/keyboards/40percentclub/half_n_half/half_n_half.h
+++ b/keyboards/40percentclub/half_n_half/half_n_half.h
@@ -42,3 +42,7 @@
{ R26, R25, R24, R23, R22, R21, R20 }, \
{ ___, ___, ___, ___, R32, ___, ___ } \
}
+
+#ifdef USE_I2C
+ #error "I2C not Supported"
+#endif
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h
new file mode 100644
index 000000000..f73fd055c
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2019 Boy_314
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// place overrides here
+#define IGNORE_MOD_TAP_INTERRUPT
+#define PERMISSIVE_HOLD
+#define TAPPING_TERM 200
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c
new file mode 100644
index 000000000..2eef3dc48
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c
@@ -0,0 +1,173 @@
+/* Copyright 2019 Boy_314
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// Tap Dance Declarations
+enum {
+ TD_SWAP_LAYERS = 0
+};
+
+enum layers {
+ _DVORAK,
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+};
+
+enum halfnhalf_keycodes {
+ NEWTAB = SAFE_RANGE,
+ ALTF4,
+ CLSTAB,
+ PRVWIN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* DVORAK
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Tab |' |, |. |P |Y |Brght+|= |F |G |C |R |L |Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |CtlCps|A |O |E |U |I |Brght-|Ctrl+F|D |H |T |N |S |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LShift|; |Q |J |K |X |LAlt |- |B |M |W |V |Z |RShift|
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |TD Swap Layer| |Space |
+ * `-------------' `-------------'
+ */
+ [_DVORAK] = LAYOUT(/* Base Dvorak */
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT,
+ KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC,
+ TD(TD_SWAP_LAYERS), KC_SPC
+ ),
+
+ /* QWERTY
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Tab |Q |W |E |R |T |Brght+|' |Y |U |I |O |P |Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |CtlCps|A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LShift|Z |X |C |V |B |LAlt |- |N |M |, |. |/ |RShift|
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |TD Swap Layer| |Space |
+ * `-------------' `-------------'
+ */
+ [_QWERTY] = LAYOUT(/* Base Qwerty */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LCTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ TD(TD_SWAP_LAYERS), KC_SPC
+ ),
+
+ /* LOWER
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Esc |1 |2 |3 |4 |5 | | |6 |7 |8 |9 |0 |/ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Caps |F1 |F2 |F3 |F4 |F5 |F6 |Vol Up|Play |_ |+ |{ |} || |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | |F7 |F8 |F9 |F10 |F11 |F12 |Vol Dn|Next |Home |PgDn |PgUp |End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | |
+ * `-------------' `-------------'
+ */
+ [_LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH,
+ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MNXT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ /* RAISE
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Reset | | |Up | | | |PRVWIN|CLSTAB| | | | |Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |` | |Left |Down |Right | | |NEWTAB|ALTF4 |- |= |[ |] |\ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | |! |@ |# |$ |% | | |^ |& |* |( |) | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | |
+ * `-------------' `-------------'
+ */
+ [_RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Macros */
+ RESET, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, PRVWIN, CLSTAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
+ KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, NEWTAB, ALTF4, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ )
+};
+
+void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ layer_on(_LOWER);
+ break;
+ case 2:
+ layer_on(_RAISE);
+ break;
+ }
+}
+
+void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ layer_off(_LOWER);
+ break;
+ case 2:
+ layer_off(_RAISE);
+ break;
+ case 3:
+ if (biton32(default_layer_state) == _DVORAK) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ else if (biton32(default_layer_state) == _QWERTY) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ break;
+ }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset)
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // Control + T
+ case NEWTAB:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL("t"));
+ }
+ break;
+ // Alt + F4
+ case ALTF4:
+ if (record->event.pressed) {
+ SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_F4)SS_UP(X_LALT));
+ }
+ break;
+ // Control + W
+ case CLSTAB:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL("w"));
+ }
+ break;
+ // Control + Shift + N
+ case PRVWIN:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL(SS_LSFT("n")));
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md
new file mode 100644
index 000000000..9eff08b5e
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md
@@ -0,0 +1,2 @@
+# Boy_314's keymap for half_n_half
+# Currently only supports DVORAK. QWERTY Support is on the TODO list. \ No newline at end of file
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk
new file mode 100644
index 000000000..59c7ccf82
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk
@@ -0,0 +1,5 @@
+TAP_DANCE_ENABLE = yes # Enable Tap Dance
+NKRO_ENABLE = yes # USB Nkey Rollover
+
+# Enable generic behavior for split boards
+SPLIT_KEYBOARD = yes \ No newline at end of file
diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk
index bd0d8f808..cc5fccee9 100644
--- a/keyboards/40percentclub/half_n_half/rules.mk
+++ b/keyboards/40percentclub/half_n_half/rules.mk
@@ -79,3 +79,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+# Enable generic behavior for split boards
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/40percentclub/mf68/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/default/keymap.c
index ae7e7297c..c91b9b908 100644
--- a/keyboards/40percentclub/mf68/keymaps/default/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/default/keymap.c
@@ -3,51 +3,29 @@
#define _QWERTY 0
#define _FN1 1
#define _FN2 2
-#define KC_ KC_TRNS
-#define KC_X0 LT(_FN2, KC_GRV)
-#define KC_X1 MO(_FN1)
-#define KC_X2 BL_STEP
+
+#define FN2_GRV LT(_FN2, KC_GRV)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
- /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
- /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
- X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
- /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
- /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
- LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
- /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
+ [_QWERTY] = LAYOUT_68_ansi(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_PGUP,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
+ FN2_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
-
- [_FN1] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , , , , , , X2 , , VOLD,END,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , , , , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , ,MUTE, , , , , MUTE,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
+ [_FN1] = LAYOUT_68_ansi(
+ 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_BSPC, KC_VOLU, KC_HOME,
+ _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, _______, KC_VOLD, KC_END,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
),
-
- [_FN2] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , 0 , 1 , 2 , 3 , , , MUTE,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
+ [_FN2] = LAYOUT_68_ansi(
+ 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_BSPC, KC_VOLU, KC_HOME,
+ _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
)
};
diff --git a/keyboards/40percentclub/ut47/keymaps/default/config.h b/keyboards/40percentclub/ut47/keymaps/default/config.h
index f88ebf7e8..023c753c2 100644
--- a/keyboards/40percentclub/ut47/keymaps/default/config.h
+++ b/keyboards/40percentclub/ut47/keymaps/default/config.h
@@ -16,6 +16,4 @@
#pragma once
-#include "config_common.h"
-
// place overrides here
diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h
new file mode 100644
index 000000000..f4dc4fd63
--- /dev/null
+++ b/keyboards/ai03/orbit/config.h
@@ -0,0 +1,249 @@
+/*
+Copyright 2018 Ryota Goto
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xA103
+#define PRODUCT_ID 0x0003
+#define DEVICE_VER 0x0003
+#define MANUFACTURER ai03 Keyboard Designs
+#define PRODUCT Orbit
+#define DESCRIPTION Split ergonomic keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 10 // Double rows for split keyboards. Orbit has 5, so define 10
+#define MATRIX_COLS 7
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F7, F6, F5, F4, D3 }
+#define MATRIX_COL_PINS { C7, B4, D7, D6, D4, F1, F0 }
+#define MATRIX_ROW_PINS_RIGHT { B6, B5, B4, D7, E6 }
+#define MATRIX_COL_PINS_RIGHT { D4, D6, F1, F0, F4, F5, C6 }
+
+#define SPLIT_HAND_PIN D5
+
+//#define USE_I2C
+
+#define SELECT_SOFT_SERIAL_SPEED 1
+
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/ai03/orbit/info.json b/keyboards/ai03/orbit/info.json
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/ai03/orbit/info.json
diff --git a/keyboards/ai03/orbit/keymaps/default/keymap.c b/keyboards/ai03/orbit/keymaps/default/keymap.c
new file mode 100644
index 000000000..4c8c39fb0
--- /dev/null
+++ b/keyboards/ai03/orbit/keymaps/default/keymap.c
@@ -0,0 +1,91 @@
+/* Copyright 2018 Ryota Goto
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ MANUAL = SAFE_RANGE,
+ DBLZERO
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ TO(1), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_BSPC, \
+ TO(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS, \
+ KC_NO, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_DEL, \
+ KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_GRV, KC_MENU, KC_MINS, KC_EQL
+ ),
+ [1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */
+ TO(2), _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU, _______, \
+ TO(2), _______, _______, KC_PGUP, _______, _______, KC_F11, KC_F12, _______, KC_UP, _______, _______, KC_VOLD, BL_STEP, \
+ TO(0), _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \
+ TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [2] = LAYOUT( /* Mousekeys and Numpad */
+ KC_NO, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, \
+ KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, \
+ TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, \
+ TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MANUAL:
+ if (record->event.pressed)
+ {
+ // Keypress
+ SEND_STRING("https://kb.ai03.me/redir/orbit");
+ }
+ else
+ {
+ // Key release
+ }
+ break;
+ case DBLZERO:
+ if (record->event.pressed)
+ {
+ // Keypress
+ SEND_STRING("00");
+ }
+ else
+ {
+ // Key release
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+
+ return state;
+}
diff --git a/keyboards/ai03/orbit/keymaps/default/readme.md b/keyboards/ai03/orbit/keymaps/default/readme.md
new file mode 100644
index 000000000..63c528abf
--- /dev/null
+++ b/keyboards/ai03/orbit/keymaps/default/readme.md
@@ -0,0 +1,3 @@
+# The default keymap for Orbit
+
+[KLE of layout](http://www.keyboard-layout-editor.com/#/gists/53ebf59524de12515cb7e2e6de94f0d6) \ No newline at end of file
diff --git a/keyboards/ai03/orbit/matrix.c b/keyboards/ai03/orbit/matrix.c
new file mode 100644
index 000000000..a1509666c
--- /dev/null
+++ b/keyboards/ai03/orbit/matrix.c
@@ -0,0 +1,328 @@
+/*
+Copyright 2012 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/>.
+*/
+
+/*
+ * scan matrix
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "split_util.h"
+#include "config.h"
+#include "split_flags.h"
+#include "quantum.h"
+#include "debounce.h"
+#include "transport.h"
+
+#if (MATRIX_COLS <= 8)
+# define print_matrix_header() print("\nr/c 01234567\n")
+# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop(matrix[i])
+# define ROW_SHIFTER ((uint8_t)1)
+#elif (MATRIX_COLS <= 16)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop16(matrix[i])
+# define ROW_SHIFTER ((uint16_t)1)
+#elif (MATRIX_COLS <= 32)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop32(matrix[i])
+# define ROW_SHIFTER ((uint32_t)1)
+#endif
+
+#define ERROR_DISCONNECT_COUNT 5
+
+//#define ROWS_PER_HAND (MATRIX_ROWS / 2)
+
+#ifdef DIRECT_PINS
+static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
+#else
+static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+#endif
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t raw_matrix[ROWS_PER_HAND];
+
+// row offsets for each hand
+uint8_t thisHand, thatHand;
+
+// user-defined overridable functions
+
+__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
+
+__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
+
+__attribute__((weak)) void matrix_init_user(void) {}
+
+__attribute__((weak)) void matrix_scan_user(void) {}
+
+__attribute__((weak)) void matrix_slave_scan_user(void) {}
+
+// helper functions
+
+inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
+
+inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
+
+bool matrix_is_modified(void) {
+ if (debounce_active()) return false;
+ return true;
+}
+
+inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
+
+inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {
+ print_matrix_header();
+
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row);
+ print(": ");
+ print_matrix_row(row);
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void) {
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += matrix_bitpop(i);
+ }
+ return count;
+}
+
+// matrix code
+
+#ifdef DIRECT_PINS
+
+static void init_pins(void) {
+ for (int row = 0; row < MATRIX_ROWS; row++) {
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ pin_t pin = direct_pins[row][col];
+ if (pin != NO_PIN) {
+ setPinInputHigh(pin);
+ }
+ }
+ }
+}
+
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+ matrix_row_t last_row_value = current_matrix[current_row];
+ current_matrix[current_row] = 0;
+
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ pin_t pin = direct_pins[current_row][col_index];
+ if (pin != NO_PIN) {
+ current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index);
+ }
+ }
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+#elif (DIODE_DIRECTION == COL2ROW)
+
+static void select_row(uint8_t row) {
+ setPinOutput(row_pins[row]);
+ writePinLow(row_pins[row]);
+}
+
+static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
+
+static void unselect_rows(void) {
+ for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ setPinInputHigh(row_pins[x]);
+ }
+}
+
+static void init_pins(void) {
+ unselect_rows();
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinInputHigh(col_pins[x]);
+ }
+}
+
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[current_row];
+
+ // Clear data in matrix row
+ current_matrix[current_row] = 0;
+
+ // Select row and wait for row selecton to stabilize
+ select_row(current_row);
+ wait_us(30);
+
+ // For each col...
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Populate the matrix row with the state of the col pin
+ current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index);
+ }
+
+ // Unselect row
+ unselect_row(current_row);
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+#elif (DIODE_DIRECTION == ROW2COL)
+
+static void select_col(uint8_t col) {
+ setPinOutput(col_pins[col]);
+ writePinLow(col_pins[col]);
+}
+
+static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); }
+
+static void unselect_cols(void) {
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinInputHigh(col_pins[x]);
+ }
+}
+
+static void init_pins(void) {
+ unselect_cols();
+ for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ setPinInputHigh(row_pins[x]);
+ }
+}
+
+static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
+ bool matrix_changed = false;
+
+ // Select col and wait for col selecton to stabilize
+ select_col(current_col);
+ wait_us(30);
+
+ // For each row...
+ for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) {
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[row_index];
+
+ // Check row pin state
+ if (readPin(row_pins[row_index])) {
+ // Pin HI, clear col bit
+ current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
+ } else {
+ // Pin LO, set col bit
+ current_matrix[row_index] |= (ROW_SHIFTER << current_col);
+ }
+
+ // Determine if the matrix changed state
+ if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) {
+ matrix_changed = true;
+ }
+ }
+
+ // Unselect col
+ unselect_col(current_col);
+
+ return matrix_changed;
+}
+
+#endif
+
+void matrix_init(void) {
+ debug_enable = true;
+ debug_matrix = true;
+ debug_mouse = true;
+
+ // Set pinout for right half if pinout for that half is defined
+ if (!isLeftHand) {
+#ifdef MATRIX_ROW_PINS_RIGHT
+ const uint8_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ row_pins[i] = row_pins_right[i];
+ }
+#endif
+#ifdef MATRIX_COL_PINS_RIGHT
+ const uint8_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_COLS; i++) {
+ col_pins[i] = col_pins_right[i];
+ }
+#endif
+ }
+
+ thisHand = isLeftHand ? 0 : (ROWS_PER_HAND);
+ thatHand = ROWS_PER_HAND - thisHand;
+
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
+
+ debounce_init(ROWS_PER_HAND);
+
+ matrix_init_quantum();
+}
+
+uint8_t _matrix_scan(void) {
+ bool changed = false;
+
+#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
+ // Set row, read cols
+ for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
+ changed |= read_cols_on_row(raw_matrix, current_row);
+ }
+#elif (DIODE_DIRECTION == ROW2COL)
+ // Set col, read rows
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ changed |= read_rows_on_col(raw_matrix, current_col);
+ }
+#endif
+
+ debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed);
+
+ return 1;
+}
+
+uint8_t matrix_scan(void) {
+ uint8_t ret = _matrix_scan();
+
+ if (is_keyboard_master()) {
+ static uint8_t error_count;
+
+ if (!transport_master(matrix + thatHand)) {
+ error_count++;
+
+ if (error_count > ERROR_DISCONNECT_COUNT) {
+ // reset other half if disconnected
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[thatHand + i] = 0;
+ }
+ }
+ } else {
+ error_count = 0;
+ }
+
+ matrix_scan_quantum();
+ } else {
+ transport_slave(matrix + thisHand);
+ matrix_slave_scan_user();
+ }
+
+ return ret;
+}
diff --git a/keyboards/ai03/orbit/matrix.h b/keyboards/ai03/orbit/matrix.h
new file mode 100644
index 000000000..c2bdd3098
--- /dev/null
+++ b/keyboards/ai03/orbit/matrix.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include <common/matrix.h>
diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c
new file mode 100644
index 000000000..2f149875b
--- /dev/null
+++ b/keyboards/ai03/orbit/orbit.c
@@ -0,0 +1,228 @@
+/* Copyright 2018 Ryota Goto
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "orbit.h"
+#include "split_util.h"
+#include "transport.h"
+
+
+// Call led_toggle to set LEDs easily
+// LED IDs:
+//
+// (LEFT) 0 1 2 | 3 4 5 (RIGHT)
+
+void led_toggle(int id, bool on) {
+
+ if (isLeftHand) {
+ switch(id) {
+ case 0:
+ // Left hand C6
+ if (on)
+ //PORTC |= (1<<6);
+ writePinHigh(C6);
+ else
+ //PORTC &= ~(1<<6);
+ writePinLow(C6);
+ break;
+ case 1:
+ // Left hand B6
+ if (on)
+ //PORTB |= (1<<6);
+ writePinHigh(B6);
+ else
+ //PORTB &= ~(1<<6);
+ writePinLow(B6);
+ break;
+ case 2:
+ // Left hand B5
+ if (on)
+ //PORTB |= (1<<5);
+ writePinHigh(B5);
+ else
+ //PORTB &= ~(1<<5);
+ writePinLow(B5);
+ break;
+ default:
+ break;
+ }
+ } else {
+ switch(id) {
+ case 3:
+ // Right hand F6
+ if (on)
+ //PORTF |= (1<<6);
+ writePinHigh(F6);
+ else
+ //PORTF &= ~(1<<6);
+ writePinLow(F6);
+ break;
+ case 4:
+ // Right hand F7
+ if (on)
+ //PORTF |= (1<<7);
+ writePinHigh(F7);
+ else
+ //PORTF &= ~(1<<7);
+ writePinLow(F7);
+ break;
+ case 5:
+ // Right hand C7
+ if (on)
+ //PORTC |= (1<<7);
+ writePinHigh(C7);
+ else
+ //PORTC &= ~(1<<7);
+ writePinLow(C7);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+// Set all LEDs at once using an array of 6 booleans
+// LED IDs:
+//
+// (LEFT) 0 1 2 | 3 4 5 (RIGHT)
+//
+// Ex. set_all_leds({ false, false, false, true, true, true }) would turn off left hand, turn on right hand
+
+void set_all_leds(bool leds[6]) {
+ for (int i = 0; i < 6; i++) {
+ led_toggle(i, leds[i]);
+ }
+}
+
+void set_layer_indicators(uint8_t layer) {
+
+ switch (layer)
+ {
+ case 0:
+ led_toggle(0, true);
+ led_toggle(1, false);
+ led_toggle(2, false);
+ break;
+ case 1:
+ led_toggle(0, true);
+ led_toggle(1, true);
+ led_toggle(2, false);
+ break;
+ case 2:
+ led_toggle(0, true);
+ led_toggle(1, true);
+ led_toggle(2, true);
+ break;
+ case 3:
+ led_toggle(0, false);
+ led_toggle(1, true);
+ led_toggle(2, true);
+ break;
+ case 4:
+ led_toggle(0, false);
+ led_toggle(1, false);
+ led_toggle(2, true);
+ break;
+ default:
+ led_toggle(0, true);
+ led_toggle(1, false);
+ led_toggle(2, true);
+ break;
+ }
+
+}
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ // Initialize indicator LEDs to output
+ if (isLeftHand)
+ {
+ setPinOutput(C6);
+ setPinOutput(B6);
+ setPinOutput(B5);
+ //DDRC |= (1<<6);
+ //DDRB |= (1<<6);
+ //DDRB |= (1<<5);
+ }
+ else
+ {
+ setPinOutput(F6);
+ setPinOutput(F7);
+ setPinOutput(C7);
+ //DDRF |= (1<<6);
+ //DDRF |= (1<<7);
+ //DDRC |= (1<<7);
+ }
+
+ set_layer_indicators(0);
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ if (is_keyboard_master()) {
+
+ serial_m2s_buffer.nlock_led = IS_LED_ON(usb_led, USB_LED_NUM_LOCK);
+ serial_m2s_buffer.clock_led = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK);
+ serial_m2s_buffer.slock_led = IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK);
+
+ led_toggle(3, IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
+ led_toggle(4, IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ led_toggle(5, IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+
+ }
+
+ led_set_user(usb_led);
+}
+
+uint32_t layer_state_set_kb(uint32_t state) {
+
+ if (is_keyboard_master())
+ {
+
+ current_layer = biton32(state);
+ serial_m2s_buffer.current_layer = biton32(state);
+
+ // If left half, do the LED toggle thing
+ if (isLeftHand)
+ {
+ set_layer_indicators(biton32(state));
+ }
+
+ }
+ // NOTE: Do not set slave LEDs here.
+ // This is not called on slave
+
+ return layer_state_set_user(state);
+}
+
+
diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h
new file mode 100644
index 000000000..211b9ebca
--- /dev/null
+++ b/keyboards/ai03/orbit/orbit.h
@@ -0,0 +1,65 @@
+/* Copyright 2018 Ryota Goto
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef ORBIT_H
+#define ORBIT_H
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/interrupt.h>
+#endif
+#endif
+
+
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
+ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
+ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
+ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
+ L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45 \
+) \
+{ \
+ { L00, L01, L02, L03, L04, L05, L06 }, \
+ { L10, L11, L12, L13, L14, L15, L16 }, \
+ { L20, L21, L22, L23, L24, L25, L26 }, \
+ { L30, L31, L32, L33, L34, L35, L36 }, \
+ { KC_NO, L41, L42, L43, L44, L45, L46 }, \
+ { R00, R01, R02, R03, R04, R05, R06 }, \
+ { R10, R11, R12, R13, R14, R15, R16 }, \
+ { R20, R21, R22, R23, R24, R25, R26 }, \
+ { R30, R31, R32, R33, R34, R35, R36 }, \
+ { R40, R41, R42, R43, R44, R45, KC_NO } \
+}
+
+uint8_t current_layer;
+
+extern void led_toggle(int id, bool on);
+void set_all_leds(bool leds[6]);
+extern void set_layer_indicators(uint8_t layer);
+
+#endif
diff --git a/keyboards/ai03/orbit/readme.md b/keyboards/ai03/orbit/readme.md
new file mode 100644
index 000000000..58ba2079d
--- /dev/null
+++ b/keyboards/ai03/orbit/readme.md
@@ -0,0 +1,15 @@
+# Orbit
+
+![Orbit](https://raw.githubusercontent.com/ai03-2725/Orbit/master/Images/PCB-R2.0.jpg)
+
+A split ergonomic keyboard project.
+
+Keyboard Maintainer: [ai03](https://github.com/ai03-2725)
+Hardware Supported: The [Orbit PCB](https://github.com/ai03-2725/Orbit)
+Hardware Availability: [This repository](https://github.com/ai03-2725/Orbit) has PCB files. Case group buy orders are currently closed.
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ai03/orbit: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/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk
new file mode 100644
index 000000000..4b40e47cb
--- /dev/null
+++ b/keyboards/ai03/orbit/rules.mk
@@ -0,0 +1,92 @@
+SRC += split_util.c \
+ split_flags.c \
+ serial.c \
+ transport.c \
+ matrix.c
+
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+USE_I2C = no # I2C for split communication
+CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c)
+# SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files
+
+
diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c
new file mode 100644
index 000000000..1315377a3
--- /dev/null
+++ b/keyboards/ai03/orbit/serial.c
@@ -0,0 +1,546 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ *
+ * 2018-10-28 checked
+ * avr-gcc 4.9.2
+ * avr-gcc 5.4.0
+ * avr-gcc 7.3.0
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "serial.h"
+//#include <pro_micro.h>
+
+#ifdef SOFT_SERIAL_PIN
+
+#ifdef __AVR_ATmega32U4__
+ // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
+ #ifdef USE_AVR_I2C
+ #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
+ #error Using ATmega32U4 I2C, so can not use PD0, PD1
+ #endif
+ #endif
+
+ #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
+ #define SERIAL_PIN_DDR DDRD
+ #define SERIAL_PIN_PORT PORTD
+ #define SERIAL_PIN_INPUT PIND
+ #if SOFT_SERIAL_PIN == D0
+ #define SERIAL_PIN_MASK _BV(PD0)
+ #define EIMSK_BIT _BV(INT0)
+ #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
+ #define SERIAL_PIN_INTERRUPT INT0_vect
+ #elif SOFT_SERIAL_PIN == D1
+ #define SERIAL_PIN_MASK _BV(PD1)
+ #define EIMSK_BIT _BV(INT1)
+ #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
+ #define SERIAL_PIN_INTERRUPT INT1_vect
+ #elif SOFT_SERIAL_PIN == D2
+ #define SERIAL_PIN_MASK _BV(PD2)
+ #define EIMSK_BIT _BV(INT2)
+ #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
+ #define SERIAL_PIN_INTERRUPT INT2_vect
+ #elif SOFT_SERIAL_PIN == D3
+ #define SERIAL_PIN_MASK _BV(PD3)
+ #define EIMSK_BIT _BV(INT3)
+ #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
+ #define SERIAL_PIN_INTERRUPT INT3_vect
+ #endif
+ #elif SOFT_SERIAL_PIN == E6
+ #define SERIAL_PIN_DDR DDRE
+ #define SERIAL_PIN_PORT PORTE
+ #define SERIAL_PIN_INPUT PINE
+ #define SERIAL_PIN_MASK _BV(PE6)
+ #define EIMSK_BIT _BV(INT6)
+ #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
+ #define SERIAL_PIN_INTERRUPT INT6_vect
+ #else
+ #error invalid SOFT_SERIAL_PIN value
+ #endif
+
+#else
+ #error serial.c now support ATmega32U4 only
+#endif
+
+#define ALWAYS_INLINE __attribute__((always_inline))
+#define NO_INLINE __attribute__((noinline))
+#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
+
+// parity check
+#define ODD_PARITY 1
+#define EVEN_PARITY 0
+#define PARITY EVEN_PARITY
+
+#ifdef SERIAL_DELAY
+ // custom setup in config.h
+ // #define TID_SEND_ADJUST 2
+ // #define SERIAL_DELAY 6 // micro sec
+ // #define READ_WRITE_START_ADJUST 30 // cycles
+ // #define READ_WRITE_WIDTH_ADJUST 8 // cycles
+#else
+// ============ Standard setups ============
+
+#ifndef SELECT_SOFT_SERIAL_SPEED
+#define SELECT_SOFT_SERIAL_SPEED 1
+// 0: about 189kbps (Experimental only)
+// 1: about 137kbps (default)
+// 2: about 75kbps
+// 3: about 39kbps
+// 4: about 26kbps
+// 5: about 20kbps
+#endif
+
+#if __GNUC__ < 6
+ #define TID_SEND_ADJUST 14
+#else
+ #define TID_SEND_ADJUST 2
+#endif
+
+#if SELECT_SOFT_SERIAL_SPEED == 0
+ // Very High speed
+ #define SERIAL_DELAY 4 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 34 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 1
+ // High speed
+ #define SERIAL_DELAY 6 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 2
+ // Middle speed
+ #define SERIAL_DELAY 12 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 3
+ // Low speed
+ #define SERIAL_DELAY 24 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 4
+ // Very Low speed
+ #define SERIAL_DELAY 36 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 5
+ // Ultra Low speed
+ #define SERIAL_DELAY 48 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#else
+#error invalid SELECT_SOFT_SERIAL_SPEED value
+#endif /* SELECT_SOFT_SERIAL_SPEED */
+#endif /* SERIAL_DELAY */
+
+#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
+#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
+
+#define SLAVE_INT_WIDTH_US 1
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
+#else
+ #define SLAVE_INT_ACK_WIDTH_UNIT 2
+ #define SLAVE_INT_ACK_WIDTH 4
+#endif
+
+static SSTD_t *Transaction_table = NULL;
+static uint8_t Transaction_table_size = 0;
+
+inline static void serial_delay(void) ALWAYS_INLINE;
+inline static
+void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
+
+inline static void serial_delay_half1(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half1(void) {
+ _delay_us(SERIAL_DELAY_HALF1);
+}
+
+inline static void serial_delay_half2(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half2(void) {
+ _delay_us(SERIAL_DELAY_HALF2);
+}
+
+inline static void serial_output(void) ALWAYS_INLINE;
+inline static
+void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static void serial_input_with_pullup(void) ALWAYS_INLINE;
+inline static
+void serial_input_with_pullup(void) {
+ SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
+inline static
+uint8_t serial_read_pin(void) {
+ return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static void serial_low(void) ALWAYS_INLINE;
+inline static
+void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static void serial_high(void) ALWAYS_INLINE;
+inline static
+void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_output();
+ serial_high();
+}
+
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_input_with_pullup();
+
+ // Enable INT0-INT3,INT6
+ EIMSK |= EIMSK_BIT;
+#if SERIAL_PIN_MASK == _BV(PE6)
+ // Trigger on falling edge of INT6
+ EICRB &= EICRx_BIT;
+#else
+ // Trigger on falling edge of INT0-INT3
+ EICRA &= EICRx_BIT;
+#endif
+}
+
+// Used by the sender to synchronize timing with the reciver.
+static void sync_recv(void) NO_INLINE;
+static
+void sync_recv(void) {
+ for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
+ }
+ // This shouldn't hang if the target disconnects because the
+ // serial line will float to high if the target does disconnect.
+ while (!serial_read_pin());
+}
+
+// Used by the reciver to send a synchronization signal to the sender.
+static void sync_send(void) NO_INLINE;
+static
+void sync_send(void) {
+ serial_low();
+ serial_delay();
+ serial_high();
+}
+
+// Reads a byte from the serial line
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
+ uint8_t byte, i, p, pb;
+
+ _delay_sub_us(READ_WRITE_START_ADJUST);
+ for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
+ serial_delay_half1(); // read the middle of pulses
+ if( serial_read_pin() ) {
+ byte = (byte << 1) | 1; p ^= 1;
+ } else {
+ byte = (byte << 1) | 0; p ^= 0;
+ }
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+ }
+ /* recive parity bit */
+ serial_delay_half1(); // read the middle of pulses
+ pb = serial_read_pin();
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+
+ *pterrcount += (p != pb)? 1 : 0;
+
+ return byte;
+}
+
+// Sends a byte with MSB ordering
+void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
+void serial_write_chunk(uint8_t data, uint8_t bit) {
+ uint8_t b, p;
+ for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
+ if(data & b) {
+ serial_high(); p ^= 1;
+ } else {
+ serial_low(); p ^= 0;
+ }
+ serial_delay();
+ }
+ /* send parity bit */
+ if(p & 1) { serial_high(); }
+ else { serial_low(); }
+ serial_delay();
+
+ serial_low(); // sync_send() / senc_recv() need raise edge
+}
+
+static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+void serial_send_packet(uint8_t *buffer, uint8_t size) {
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ data = buffer[i];
+ sync_send();
+ serial_write_chunk(data,8);
+ }
+}
+
+static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
+ uint8_t pecount = 0;
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ sync_recv();
+ data = serial_read_chunk(&pecount, 8);
+ buffer[i] = data;
+ }
+ return pecount == 0;
+}
+
+inline static
+void change_sender2reciver(void) {
+ sync_send(); //0
+ serial_delay_half1(); //1
+ serial_low(); //2
+ serial_input_with_pullup(); //2
+ serial_delay_half1(); //3
+}
+
+inline static
+void change_reciver2sender(void) {
+ sync_recv(); //0
+ serial_delay(); //1
+ serial_low(); //3
+ serial_output(); //3
+ serial_delay_half1(); //4
+}
+
+static inline uint8_t nibble_bits_count(uint8_t bits)
+{
+ bits = (bits & 0x5) + (bits >> 1 & 0x5);
+ bits = (bits & 0x3) + (bits >> 2 & 0x3);
+ return bits;
+}
+
+// interrupt handle to be used by the target device
+ISR(SERIAL_PIN_INTERRUPT) {
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ serial_low();
+ serial_output();
+ SSTD_t *trans = Transaction_table;
+#else
+ // recive transaction table index
+ uint8_t tid, bits;
+ uint8_t pecount = 0;
+ sync_recv();
+ bits = serial_read_chunk(&pecount,7);
+ tid = bits>>3;
+ bits = (bits&7) != nibble_bits_count(tid);
+ if( bits || pecount> 0 || tid > Transaction_table_size ) {
+ return;
+ }
+ serial_delay_half1();
+
+ serial_high(); // response step1 low->high
+ serial_output();
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
+ SSTD_t *trans = &Transaction_table[tid];
+ serial_low(); // response step2 ack high->low
+#endif
+
+ // target send phase
+ if( trans->target2initiator_buffer_size > 0 )
+ serial_send_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size);
+ // target switch to input
+ change_sender2reciver();
+
+ // target recive phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size) ) {
+ *trans->status = TRANSACTION_ACCEPTED;
+ } else {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ }
+ } else {
+ *trans->status = TRANSACTION_ACCEPTED;
+ }
+
+ sync_recv(); //weit initiator output to high
+}
+
+/////////
+// start transaction by initiator
+//
+// int soft_serial_transaction(int sstd_index)
+//
+// Returns:
+// TRANSACTION_END
+// TRANSACTION_NO_RESPONSE
+// TRANSACTION_DATA_ERROR
+// this code is very time dependent, so we need to disable interrupts
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void) {
+ SSTD_t *trans = Transaction_table;
+#else
+int soft_serial_transaction(int sstd_index) {
+ if( sstd_index > Transaction_table_size )
+ return TRANSACTION_TYPE_ERROR;
+ SSTD_t *trans = &Transaction_table[sstd_index];
+#endif
+ cli();
+
+ // signal to the target that we want to start a transaction
+ serial_output();
+ serial_low();
+ _delay_us(SLAVE_INT_WIDTH_US);
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ // wait for the target response
+ serial_input_with_pullup();
+ _delay_us(SLAVE_INT_RESPONSE_TIME);
+
+ // check if the target is present
+ if (serial_read_pin()) {
+ // target failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+
+#else
+ // send transaction table index
+ int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
+ sync_send();
+ _delay_sub_us(TID_SEND_ADJUST);
+ serial_write_chunk(tid, 7);
+ serial_delay_half1();
+
+ // wait for the target response (step1 low->high)
+ serial_input_with_pullup();
+ while( !serial_read_pin() ) {
+ _delay_sub_us(2);
+ }
+
+ // check if the target is present (step2 high->low)
+ for( int i = 0; serial_read_pin(); i++ ) {
+ if (i > SLAVE_INT_ACK_WIDTH + 1) {
+ // slave failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
+ }
+#endif
+
+ // initiator recive phase
+ // if the target is present syncronize with it
+ if( trans->target2initiator_buffer_size > 0 ) {
+ if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size) ) {
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_DATA_ERROR;
+ sei();
+ return TRANSACTION_DATA_ERROR;
+ }
+ }
+
+ // initiator switch to output
+ change_reciver2sender();
+
+ // initiator send phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ serial_send_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size);
+ }
+
+ // always, release the line when not in use
+ sync_send();
+
+ *trans->status = TRANSACTION_END;
+ sei();
+ return TRANSACTION_END;
+}
+
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index) {
+ SSTD_t *trans = &Transaction_table[sstd_index];
+ cli();
+ int retval = *trans->status;
+ *trans->status = 0;;
+ sei();
+ return retval;
+}
+#endif
+
+#endif
+
+// Helix serial.c history
+// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
+// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
+// (adjusted with avr-gcc 7.3.0)
+// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
+// (adjusted with avr-gcc 5.4.0, 7.3.0)
+// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669)
diff --git a/keyboards/ai03/orbit/serial.h b/keyboards/ai03/orbit/serial.h
new file mode 100644
index 000000000..1c1e64006
--- /dev/null
+++ b/keyboards/ai03/orbit/serial.h
@@ -0,0 +1,62 @@
+#pragma once
+
+#include <stdbool.h>
+
+// /////////////////////////////////////////////////////////////////
+// Need Soft Serial defines in config.h
+// /////////////////////////////////////////////////////////////////
+// ex.
+// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
+// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
+// // 1: about 137kbps (default)
+// // 2: about 75kbps
+// // 3: about 39kbps
+// // 4: about 26kbps
+// // 5: about 20kbps
+//
+// //// USE simple API (using signle-type transaction function)
+// /* nothing */
+// //// USE flexible API (using multi-type transaction function)
+// #define SERIAL_USE_MULTI_TRANSACTION
+//
+// /////////////////////////////////////////////////////////////////
+
+// Soft Serial Transaction Descriptor
+typedef struct _SSTD_t {
+ uint8_t *status;
+ uint8_t initiator2target_buffer_size;
+ uint8_t *initiator2target_buffer;
+ uint8_t target2initiator_buffer_size;
+ uint8_t *target2initiator_buffer;
+} SSTD_t;
+#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
+
+// initiator is transaction start side
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
+// target is interrupt accept side
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
+
+// initiator resullt
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void);
+#else
+int soft_serial_transaction(int sstd_index);
+#endif
+
+// target status
+// *SSTD_t.status has
+// initiator:
+// TRANSACTION_END
+// or TRANSACTION_NO_RESPONSE
+// or TRANSACTION_DATA_ERROR
+// target:
+// TRANSACTION_DATA_ERROR
+// or TRANSACTION_ACCEPTED
+#define TRANSACTION_ACCEPTED 0x8
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index);
+#endif
diff --git a/quantum/split_common/split_flags.c b/keyboards/ai03/orbit/split_flags.c
index 1f5825d65..1f5825d65 100644
--- a/quantum/split_common/split_flags.c
+++ b/keyboards/ai03/orbit/split_flags.c
diff --git a/quantum/split_common/split_flags.h b/keyboards/ai03/orbit/split_flags.h
index aaac474a7..aaac474a7 100644
--- a/quantum/split_common/split_flags.h
+++ b/keyboards/ai03/orbit/split_flags.h
diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c
new file mode 100644
index 000000000..5095cb8fd
--- /dev/null
+++ b/keyboards/ai03/orbit/split_util.c
@@ -0,0 +1,87 @@
+#include "split_util.h"
+#include "matrix.h"
+#include "keyboard.h"
+#include "config.h"
+#include "timer.h"
+#include "split_flags.h"
+#include "transport.h"
+#include "quantum.h"
+
+#ifdef EE_HANDS
+# include "tmk_core/common/eeprom.h"
+# include "eeconfig.h"
+#endif
+
+volatile bool isLeftHand = true;
+
+__attribute__((weak))
+bool is_keyboard_left(void) {
+ #ifdef SPLIT_HAND_PIN
+ // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
+ setPinInput(SPLIT_HAND_PIN);
+ return readPin(SPLIT_HAND_PIN);
+ #else
+ #ifdef EE_HANDS
+ return eeprom_read_byte(EECONFIG_HANDEDNESS);
+ #else
+ #ifdef MASTER_RIGHT
+ return !is_keyboard_master();
+ #else
+ return is_keyboard_master();
+ #endif
+ #endif
+ #endif
+}
+
+bool is_keyboard_master(void)
+{
+#ifdef __AVR__
+ static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
+
+ // only check once, as this is called often
+ if (usbstate == UNKNOWN)
+ {
+ USBCON |= (1 << OTGPADE); // enables VBUS pad
+ wait_us(5);
+
+ usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS
+ }
+
+ return (usbstate == MASTER);
+#else
+ return true;
+#endif
+}
+
+static void keyboard_master_setup(void) {
+#if defined(USE_I2C) || defined(EH)
+ #ifdef SSD1306OLED
+ matrix_master_OLED_init ();
+ #endif
+#endif
+ transport_master_init();
+
+ // For master the Backlight info needs to be sent on startup
+ // Otherwise the salve won't start with the proper info until an update
+ BACKLIT_DIRTY = true;
+}
+
+static void keyboard_slave_setup(void)
+{
+ transport_slave_init();
+}
+
+// this code runs before the usb and keyboard is initialized
+void matrix_setup(void)
+{
+ isLeftHand = is_keyboard_left();
+
+ if (is_keyboard_master())
+ {
+ keyboard_master_setup();
+ }
+ else
+ {
+ keyboard_slave_setup();
+ }
+}
diff --git a/keyboards/ai03/orbit/split_util.h b/keyboards/ai03/orbit/split_util.h
new file mode 100644
index 000000000..20f7535bf
--- /dev/null
+++ b/keyboards/ai03/orbit/split_util.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+extern volatile bool isLeftHand;
+
+void matrix_master_OLED_init (void);
diff --git a/keyboards/ai03/orbit/transport.c b/keyboards/ai03/orbit/transport.c
new file mode 100644
index 000000000..adedf2432
--- /dev/null
+++ b/keyboards/ai03/orbit/transport.c
@@ -0,0 +1,238 @@
+
+#include "transport.h"
+
+#include "config.h"
+#include "matrix.h"
+#include "quantum.h"
+
+#include "orbit.h"
+
+#define ROWS_PER_HAND (MATRIX_ROWS/2)
+
+#ifdef RGBLIGHT_ENABLE
+# include "rgblight.h"
+#endif
+
+#ifdef BACKLIGHT_ENABLE
+# include "backlight.h"
+ extern backlight_config_t backlight_config;
+#endif
+
+#if defined(USE_I2C) || defined(EH)
+
+#include "i2c.h"
+
+#ifndef SLAVE_I2C_ADDRESS
+# define SLAVE_I2C_ADDRESS 0x32
+#endif
+
+#if (MATRIX_COLS > 8)
+# error "Currently only supports 8 COLS"
+#endif
+
+// Get rows from other half over i2c
+bool transport_master(matrix_row_t matrix[]) {
+ int err = 0;
+
+ // write backlight info
+#ifdef BACKLIGHT_ENABLE
+ if (BACKLIT_DIRTY) {
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) { goto i2c_error; }
+
+ // Backlight location
+ err = i2c_master_write(I2C_BACKLIT_START);
+ if (err) { goto i2c_error; }
+
+ // Write backlight
+ i2c_master_write(get_backlight_level());
+
+ BACKLIT_DIRTY = false;
+ }
+#endif
+
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) { goto i2c_error; }
+
+ // start of matrix stored at I2C_KEYMAP_START
+ err = i2c_master_write(I2C_KEYMAP_START);
+ if (err) { goto i2c_error; }
+
+ // Start read
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
+ if (err) { goto i2c_error; }
+
+ if (!err) {
+ int i;
+ for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+ matrix[i] = i2c_master_read(I2C_ACK);
+ }
+ matrix[i] = i2c_master_read(I2C_NACK);
+ i2c_master_stop();
+ } else {
+i2c_error: // the cable is disconnceted, or something else went wrong
+ i2c_reset_state();
+ return false;
+ }
+
+#ifdef RGBLIGHT_ENABLE
+ if (RGB_DIRTY) {
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) { goto i2c_error; }
+
+ // RGB Location
+ err = i2c_master_write(I2C_RGB_START);
+ if (err) { goto i2c_error; }
+
+ uint32_t dword = eeconfig_read_rgblight();
+
+ // Write RGB
+ err = i2c_master_write_data(&dword, 4);
+ if (err) { goto i2c_error; }
+
+ RGB_DIRTY = false;
+ i2c_master_stop();
+ }
+#endif
+
+ return true;
+}
+
+void transport_slave(matrix_row_t matrix[]) {
+
+ for (int i = 0; i < ROWS_PER_HAND; ++i)
+ {
+ i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i];
+ }
+ // Read Backlight Info
+ #ifdef BACKLIGHT_ENABLE
+ if (BACKLIT_DIRTY)
+ {
+ backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]);
+ BACKLIT_DIRTY = false;
+ }
+ #endif
+ #ifdef RGBLIGHT_ENABLE
+ if (RGB_DIRTY)
+ {
+ // Disable interupts (RGB data is big)
+ cli();
+ // Create new DWORD for RGB data
+ uint32_t dword;
+
+ // Fill the new DWORD with the data that was sent over
+ uint8_t * dword_dat = (uint8_t *)(&dword);
+ for (int i = 0; i < 4; i++)
+ {
+ dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i];
+ }
+
+ // Update the RGB now with the new data and set RGB_DIRTY to false
+ rgblight_update_dword(dword);
+ RGB_DIRTY = false;
+ // Re-enable interupts now that RGB is set
+ sei();
+ }
+ #endif
+}
+
+void transport_master_init(void) {
+ i2c_master_init();
+}
+
+void transport_slave_init(void) {
+ i2c_slave_init(SLAVE_I2C_ADDRESS);
+}
+
+#else // USE_SERIAL
+
+#include "serial.h"
+
+
+
+volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
+volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
+uint8_t volatile status0 = 0;
+
+SSTD_t transactions[] = {
+ { (uint8_t *)&status0,
+ sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer,
+ sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer
+ }
+};
+
+uint8_t slave_layer_cache;
+uint8_t slave_nlock_cache;
+uint8_t slave_clock_cache;
+uint8_t slave_slock_cache;
+
+void transport_master_init(void)
+{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
+
+void transport_slave_init(void)
+{
+ soft_serial_target_init(transactions, TID_LIMIT(transactions));
+ slave_layer_cache = 255;
+ slave_nlock_cache = 255;
+ slave_clock_cache = 255;
+ slave_slock_cache = 255;
+}
+
+bool transport_master(matrix_row_t matrix[]) {
+
+ if (soft_serial_transaction()) {
+ return false;
+ }
+
+ // TODO: if MATRIX_COLS > 8 change to unpack()
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[i] = serial_s2m_buffer.smatrix[i];
+ }
+
+ #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ // Code to send RGB over serial goes here (not implemented yet)
+ #endif
+
+ #ifdef BACKLIGHT_ENABLE
+ // Write backlight level for slave to read
+ serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0;
+ #endif
+
+ return true;
+}
+
+void transport_slave(matrix_row_t matrix[]) {
+
+ // TODO: if MATRIX_COLS > 8 change to pack()
+ for (int i = 0; i < ROWS_PER_HAND; ++i)
+ {
+ serial_s2m_buffer.smatrix[i] = matrix[i];
+ }
+ #ifdef BACKLIGHT_ENABLE
+ backlight_set(serial_m2s_buffer.backlight_level);
+ #endif
+ #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ // Add serial implementation for RGB here
+ #endif
+
+ if (slave_layer_cache != serial_m2s_buffer.current_layer) {
+ slave_layer_cache = serial_m2s_buffer.current_layer;
+ set_layer_indicators(slave_layer_cache);
+ }
+
+ if (slave_nlock_cache != serial_m2s_buffer.nlock_led) {
+ slave_nlock_cache = serial_m2s_buffer.nlock_led;
+ led_toggle(3, slave_nlock_cache);
+ }
+ if (slave_clock_cache != serial_m2s_buffer.clock_led) {
+ slave_clock_cache = serial_m2s_buffer.clock_led;
+ led_toggle(4, slave_clock_cache);
+ }
+ if (slave_slock_cache != serial_m2s_buffer.slock_led) {
+ slave_slock_cache = serial_m2s_buffer.slock_led;
+ led_toggle(5, slave_slock_cache);
+ }
+
+}
+
+#endif
diff --git a/keyboards/ai03/orbit/transport.h b/keyboards/ai03/orbit/transport.h
new file mode 100644
index 000000000..422e2ecb9
--- /dev/null
+++ b/keyboards/ai03/orbit/transport.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include <common/matrix.h>
+
+#define ROWS_PER_HAND (MATRIX_ROWS/2)
+
+typedef struct _Serial_s2m_buffer_t {
+ // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
+ matrix_row_t smatrix[ROWS_PER_HAND];
+} Serial_s2m_buffer_t;
+
+typedef struct _Serial_m2s_buffer_t {
+#ifdef BACKLIGHT_ENABLE
+ uint8_t backlight_level;
+#endif
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ rgblight_config_t rgblight_config; //not yet use
+ //
+ // When MCUs on both sides drive their respective RGB LED chains,
+ // it is necessary to synchronize, so it is necessary to communicate RGB information.
+ // In that case, define the RGBLIGHT_SPLIT macro.
+ //
+ // Otherwise, if the master side MCU drives both sides RGB LED chains,
+ // there is no need to communicate.
+#endif
+
+ uint8_t current_layer;
+ uint8_t nlock_led;
+ uint8_t clock_led;
+ uint8_t slock_led;
+
+} Serial_m2s_buffer_t;
+
+extern volatile Serial_s2m_buffer_t serial_s2m_buffer;
+extern volatile Serial_m2s_buffer_t serial_m2s_buffer;
+
+void transport_master_init(void);
+void transport_slave_init(void);
+
+// returns false if valid data not received from slave
+bool transport_master(matrix_row_t matrix[]);
+void transport_slave(matrix_row_t matrix[]);
diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h
index 16460ed70..1486612f9 100644
--- a/keyboards/alice/alice.h
+++ b/keyboards/alice/alice.h
@@ -1,5 +1,5 @@
/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Copyright 2019 Felipe Coury <felipe.coury@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
@@ -21,30 +21,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* LAYOUT
* ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐
- * │63 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │10 │11 │12 │13 │14 │
+ * │50 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │0A │0B │0C │0D │0E │
* ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
- * │64 │ │15 │16 │17 │18 │19 │20 │ │21 │22 │23 │24 │25 │26 │27 │28 │
+ * │51 │ │10 │11 │12 │13 │14 │15 │ │16 │17 │18 │19 │1A │1B │1C │1D │
* ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
- * │65 │ │29 │30 │31 │32 │33 │34 │ │35 │36 │37 │38 │39 │40 │41 │
+ * │52 │ │20 │21 │22 │23 │24 │25 │ │26 │27 │28 │29 │2A │2B │2C │
* └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
- * │42 │43 │44 │45 │46 │47 │ │48 │49 │50 │51 │52 │53 │54 │55 │
+ * │30 │31 │32 │33 │34 │35 │ │36 │37 │38 │39 │4A │4B │4C │4D │
* ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤
- * │56 │ │57 │58 │59 │ │60 │61 │ │62 │
+ * │40 │ │41 │42 │43 │ │46 │47 │ │48 │
* └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘
*/
#define LAYOUT( \
- K63, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \
- K64, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \
- K65, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \
- K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \
- K56, K57, K58, K59, K60, K61, K62 \
+ K50, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K51, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K52, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K4A, K4B, K4C, K4D, \
+ K40, K41, K42, K43, K46, K47, K48 \
) \
{ \
- { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , K13 , K14 }, \
- { K15 , K16 , K17 , K18 , K19 , K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 , KC_NO }, \
- { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , KC_NO, KC_NO }, \
- { K42 , K43 , K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , K52 , K53 , K54 , K55 , KC_NO }, \
- { K56 , K57 , K58 , K59 , KC_NO, KC_NO, K60 , K61 , K62 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K63 , K64 , K65 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
+ { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K0A , K0B , K0C , K0D , K0E }, \
+ { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 , K18 , K19 , K1A , K1B , K1C , K1D , KC_NO }, \
+ { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 , K29 , K2A , K2B , K2C , KC_NO, KC_NO }, \
+ { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K4A , K4B , K4C , K4D , KC_NO }, \
+ { K40 , K41 , K42 , K43 , KC_NO, KC_NO, K46 , K47 , K48 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { K50 , K51 , K52 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
}
diff --git a/keyboards/alice/program b/keyboards/alice/program
deleted file mode 100755
index 3779bad04..000000000
--- a/keyboards/alice/program
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>, Sebastian Kaim <sebb@sebb767.de>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-
-def checkForKeyboardInNormalMode():
- """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
- return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-
-def checkForKeyboardInBootloaderMode():
- """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
- return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
-
-def flashKeyboard(firmware_file):
- """Calls bootloadHID to flash the given file to the device."""
- print('Flashing firmware to device ...')
- if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
- print('\nDone!')
- else:
- print('\nbootloadHID returned an error.')
-
-def printDeviceInfo(dev):
- """Prints all infos for a given USB device"""
- print('Device Information:')
- print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
- print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
- print('Manufacturer: %s' % (dev.iManufacturer))
- print('Serial: %s' % (dev.iSerialNumber))
- print('Product: %s' % (dev.iProduct), end='\n\n')
-
-def sendDeviceToBootloaderMode(dev):
- """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
- try:
- dev.set_configuration()
-
- request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
- USBRQ_HID_SET_REPORT = 0x09
- HID_REPORT_OPTION = 0x0301
-
- dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5)
- except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-kb = checkForKeyboardInNormalMode()
-
-if kb is not None:
- print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='')
- printDeviceInfo(kb)
- sendDeviceToBootloaderMode(kb)
- print(' done.')
- print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
- print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
-
-attempts = 12 # 60 seconds
-found = False
-for attempt in range(1, attempts + 1):
- print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
-
- if checkForKeyboardInBootloaderMode():
- print('Found', end='\n\n')
- flashKeyboard(sys.argv[1])
- found = True
- break
- else:
- print('Nothing.', end='')
-
- if attempt != attempts: # no need to wait on the last attempt
- print(' Sleeping 5 seconds.', end='')
- time.sleep(5)
-
- # print a newline
- print()
-
-if not found:
- print("Couldn't find a flashable keyboard. Aborting.")
- sys.exit(2)
-
diff --git a/keyboards/alice/rules.mk b/keyboards/alice/rules.mk
index bb57cbeae..eecd38d7e 100644
--- a/keyboards/alice/rules.mk
+++ b/keyboards/alice/rules.mk
@@ -45,4 +45,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0
SRC += i2c_master.c
# programming options
-PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/amj96/keymaps/default/config.h b/keyboards/amj96/keymaps/default/config.h
index 5e346088e..0c01a8559 100644
--- a/keyboards/amj96/keymaps/default/config.h
+++ b/keyboards/amj96/keymaps/default/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
+#pragma once
-#include "config_common.h"
// place overrides here
-
-#endif
diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c
index 431537d25..1c9122c9e 100644
--- a/keyboards/amjpad/keymaps/default/keymap.c
+++ b/keyboards/amjpad/keymaps/default/keymap.c
@@ -1,9 +1,5 @@
#include QMK_KEYBOARD_H
-#ifdef RGBLIGHT_ENABLE
-#include "rgblight.h"
-#endif
-
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
diff --git a/keyboards/atomic/readme.md b/keyboards/atomic/readme.md
index ab2fa4a23..0561c4fea 100644
--- a/keyboards/atomic/readme.md
+++ b/keyboards/atomic/readme.md
@@ -3,7 +3,7 @@ Atomic
![Atomic](http://i.imgur.com/3gNDJAh.jpg)
-A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. [More info on qmk.fm](http://qmk.fm/atomic/)
+A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB.
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
Hardware Supported: Atomic PCB rev1, Teensy 2.0
diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c
index a6efd1bef..0fda245e2 100644
--- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c
+++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c
@@ -8,6 +8,21 @@
#define COMBINED 3
#define BROWSER_CONTROL 4
+// aliases
+// shell
+#define SHELL_DEL_WORD RCTL(KC_W)
+// android studio
+
+#define AS_TABLEFT LALT(KC_LEFT)
+#define AS_TABRIGHT LALT(KC_RIGHT)
+#define AS_SYMBOL LCTL(LALT(KC_N))
+#define AS_CLASS LCTL(KC_N)
+#define AS_FINDUSAGE LALT(KC_F7)
+#define AS_BACK LCTL(LALT(KC_LEFT))
+#define AS_GO_DECLARATION LCTL(KC_B)
+#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B))
+#define AS_CLOSETAB LCTL(KC_F4)
+#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4))
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
@@ -37,10 +52,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[KEYNAV] = LAYOUT(
- KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,
- MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT),
- MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE)
+ KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP,
+ AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT),
+ AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN,
+ AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE)
),
[KEYSEL] = LAYOUT(
diff --git a/keyboards/atreus62/keymaps/jarred/config.h b/keyboards/atreus62/keymaps/jarred/config.h
new file mode 100644
index 000000000..34ab0baaf
--- /dev/null
+++ b/keyboards/atreus62/keymaps/jarred/config.h
@@ -0,0 +1,21 @@
+/* Copyright 2018 Jarred Steenvoorden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// My hand wire diodes are in the opposite direction to the Atreus62 PCB
+#undef DIODE_DIRECTION
+#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/atreus62/keymaps/jarred/keymap.c b/keyboards/atreus62/keymaps/jarred/keymap.c
new file mode 100644
index 000000000..7a49b2890
--- /dev/null
+++ b/keyboards/atreus62/keymaps/jarred/keymap.c
@@ -0,0 +1,26 @@
+/* Copyright 2018 Jarred Steenvoorden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 "jarred.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_L4, KC_NO, KC_NO, QWERTY_R4),
+ [_LW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, LOWER_1_12 , LOWER_2_12 , LOWER_3_12 , LOWER_L4 , KC_NO, KC_NO, LOWER_R4 ),
+ [_NV] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NAV_1_12 , NAV_2_12 , NAV_3_12 , NAV_L4 , KC_NO, KC_NO, NAV_R4 ),
+ [_NP] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_L4, KC_NO, KC_NO, NUMPAD_R4),
+ [_MS] = LAYOUT_atreus62_grid_wrapper(BLANK_12, MOUSE_1_12 , MOUSE_2_12 , MOUSE_3_12 , MOUSE_L4 , KC_NO, KC_NO, MOUSE_R4 )
+};
diff --git a/keyboards/bm16a/bm16a.c b/keyboards/bm16a/bm16a.c
new file mode 100644
index 000000000..3d616f29e
--- /dev/null
+++ b/keyboards/bm16a/bm16a.c
@@ -0,0 +1,43 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "bm16a.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/bm16a/bm16a.h b/keyboards/bm16a/bm16a.h
new file mode 100644
index 000000000..cf8bab473
--- /dev/null
+++ b/keyboards/bm16a/bm16a.h
@@ -0,0 +1,39 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT_ortho_4x4( \
+ K01, K02, K03, K04, \
+ K11, K12, K13, K14, \
+ K21, K22, K23, K24, \
+ K31, K32, K33, K34 \
+) \
+{ \
+ { K01, K02, K03, K04 }, \
+ { K11, K12, K13, K14 }, \
+ { K21, K22, K23, K24 }, \
+ { K31, K32, K33, K34 } \
+}
diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h
new file mode 100644
index 000000000..c6b460a11
--- /dev/null
+++ b/keyboards/bm16a/config.h
@@ -0,0 +1,246 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x424D
+#define DEVICE_VER 0x0001
+#define MANUFACTURER KPrepublic
+#define PRODUCT bm16a
+#define DESCRIPTION KPrepublic bm16a
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D3, D5, D1, D2}
+#define MATRIX_COL_PINS { D6, D4, D7, B4}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B6
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 5
+
+#define RGB_DI_PIN E2
+#define RGBLED_NUM 4
+#define RGBLIGHT_ANIMATIONS
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/bm16a/info.json b/keyboards/bm16a/info.json
new file mode 100644
index 000000000..4f87c5ae1
--- /dev/null
+++ b/keyboards/bm16a/info.json
@@ -0,0 +1,30 @@
+{
+ "keyboard_name": "bm16a",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "key_count": 16,
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":3, "y":0},
+ {"x":0, "y":1},
+ {"x":1, "y":1},
+ {"x":2, "y":1},
+ {"x":3, "y":1},
+ {"x":0, "y":2},
+ {"x":1, "y":2},
+ {"x":2, "y":2},
+ {"x":3, "y":2},
+ {"x":0, "y":3},
+ {"x":1, "y":3},
+ {"x":2, "y":3},
+ {"x":3, "y":3}
+ ]
+ }
+ }
+ } \ No newline at end of file
diff --git a/keyboards/bm16a/keymaps/default/config.h b/keyboards/bm16a/keymaps/default/config.h
new file mode 100644
index 000000000..08c234aee
--- /dev/null
+++ b/keyboards/bm16a/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/bm16a/keymaps/default/keymap.c b/keyboards/bm16a/keymaps/default/keymap.c
new file mode 100644
index 000000000..a0b06ee92
--- /dev/null
+++ b/keyboards/bm16a/keymaps/default/keymap.c
@@ -0,0 +1,73 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _BASE = 0,
+ _FN1,
+ _FN2,
+};
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = LAYOUT_ortho_4x4(
+ KC_PGUP, KC_HOME, KC_UP, KC_END , \
+ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \
+ MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \
+ MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \
+ ),
+ [_FN1] = LAYOUT_ortho_4x4(
+ KC_ESC, KC_P7, KC_P8, KC_P9, \
+ KC_TAB, KC_P4, KC_P5, KC_P6, \
+ KC_ENT, KC_P1, KC_P2, KC_P3, \
+ _______, KC_P0, KC_P0, KC_DOT \
+ ),
+ [_FN2] = LAYOUT_ortho_4x4(
+ RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
+ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \
+ _______, _______, _______, RESET, \
+ BL_STEP, _______, QMKBEST, QMKURL \
+ )
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/bm16a/keymaps/default/readme.md b/keyboards/bm16a/keymaps/default/readme.md
new file mode 100644
index 000000000..f356f2cca
--- /dev/null
+++ b/keyboards/bm16a/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for bm16a \ No newline at end of file
diff --git a/keyboards/bm16a/readme.md b/keyboards/bm16a/readme.md
new file mode 100644
index 000000000..8d43b7014
--- /dev/null
+++ b/keyboards/bm16a/readme.md
@@ -0,0 +1,15 @@
+# bm16a
+
+![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg)
+
+A 16 key macropad, with USB C, RGB underglow and backlight.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: The PCBs, controllers supported
+Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make bm16a:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/bm16a/rules.mk b/keyboards/bm16a/rules.mk
new file mode 100644
index 000000000..013dac3c9
--- /dev/null
+++ b/keyboards/bm16a/rules.mk
@@ -0,0 +1,82 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+LAYOUTS = ortho_4x4
diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h
+++ b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h
index c55f7f9f7..ed56340c3 100644
--- a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h
+++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/c39/c39.c b/keyboards/c39/c39.c
new file mode 100755
index 000000000..78ecae5a3
--- /dev/null
+++ b/keyboards/c39/c39.c
@@ -0,0 +1 @@
+#include "c39.h"
diff --git a/keyboards/c39/c39.h b/keyboards/c39/c39.h
new file mode 100755
index 000000000..797dd1ef7
--- /dev/null
+++ b/keyboards/c39/c39.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "quantum.h"
+
+#define ___ KC_NO
+
+#define LAYOUT( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C \
+ ) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C } \
+}
+
+#define LAYOUT_ortho_3x13 LAYOUT
diff --git a/keyboards/c39/config.h b/keyboards/c39/config.h
new file mode 100755
index 000000000..3adc79670
--- /dev/null
+++ b/keyboards/c39/config.h
@@ -0,0 +1,89 @@
+/*
+Copyright 2012 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/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xCA17
+#define PRODUCT_ID 0xCA39
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Maple Computing
+#define PRODUCT C39
+#define DESCRIPTION A compact 39 key keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 13
+
+#define MATRIX_ROW_PINS { D1, B4, B5 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, C6, D2, D3 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/c39/info.json b/keyboards/c39/info.json
new file mode 100755
index 000000000..4ed7f018c
--- /dev/null
+++ b/keyboards/c39/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "C39",
+ "url": "",
+ "maintainer": "Space Cat",
+ "width": 13.25,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Back", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"M1", "x":11.25, "y":0}, {"label":"M2", "x":12.25, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"Enter", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"M3", "x":11.25, "y":1}, {"label":"M4", "x":12.25, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"Fn", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":">", "x":9, "y":2}, {"label":"?", "x":10, "y":2}, {"label":"M5", "x":11.25, "y":2}, {"label":"M6", "x":12.25, "y":2}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/c39/keymaps/default/config.h b/keyboards/c39/keymaps/default/config.h
new file mode 100755
index 000000000..271f48d00
--- /dev/null
+++ b/keyboards/c39/keymaps/default/config.h
@@ -0,0 +1,3 @@
+#pragma once
+
+// place overrides here
diff --git a/keyboards/c39/keymaps/default/keymap.c b/keyboards/c39/keymaps/default/keymap.c
new file mode 100755
index 000000000..9de75190d
--- /dev/null
+++ b/keyboards/c39/keymaps/default/keymap.c
@@ -0,0 +1,45 @@
+#include QMK_KEYBOARD_H
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _FN1 1
+
+// Defines for task manager and such
+#define CALTDEL LCTL(LALT(KC_DEL))
+#define TSKMGR LCTL(LSFT(KC_ESC))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,----------------------------------------------------------------------------. ,-------------.
+ * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 |
+ * `----------------------------------------------------------------------------' `-------------'
+ */
+[_QWERTY] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2,
+ KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4,
+ KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6
+),
+
+/* FN1
+ * ,----------------------------------------------------------------------------. ,-------------.
+ * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 |
+ * `----------------------------------------------------------------------------' `-------------'
+ */
+[_FN1] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2,
+ KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4,
+ KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6
+),
+};
diff --git a/keyboards/c39/keymaps/default/readme.md b/keyboards/c39/keymaps/default/readme.md
new file mode 100755
index 000000000..f5b1b6ac1
--- /dev/null
+++ b/keyboards/c39/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for the C39
diff --git a/keyboards/c39/readme.md b/keyboards/c39/readme.md
new file mode 100755
index 000000000..0454f1c12
--- /dev/null
+++ b/keyboards/c39/readme.md
@@ -0,0 +1,16 @@
+# C39
+=======
+
+![C39](https://i.imgur.com/KuWIIuW.png)
+
+A compact 39 key keyboard.
+
+Keyboard Maintainer: [Maple Computing]()
+Hardware Supported: C39 PCB
+Hardware Availability: [SpaceCat.design](https://spacecat.design)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make c39: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/c39/rules.mk b/keyboards/c39/rules.mk
new file mode 100755
index 000000000..8fcb08981
--- /dev/null
+++ b/keyboards/c39/rules.mk
@@ -0,0 +1,66 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+RGBLIGHT_ENABLE = no # RGB Enable / Disable
diff --git a/keyboards/candybar/keymaps/default/keymap.c b/keyboards/candybar/keymaps/default/keymap.c
index bf589289a..8f4cc08c7 100644
--- a/keyboards/candybar/keymaps/default/keymap.c
+++ b/keyboards/candybar/keymaps/default/keymap.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "candybar.h"
+#include QMK_KEYBOARD_H
#define _BL 0
#define _FL 1
@@ -35,4 +35,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \
KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \
KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT),
-}; \ No newline at end of file
+};
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
new file mode 100644
index 000000000..9d10fbd75
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -0,0 +1,109 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+#if STM32_HAS_GPIOA
+ {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
+ VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
+#endif
+#if STM32_HAS_GPIOB
+ {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
+ VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
+#endif
+#if STM32_HAS_GPIOC
+ {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
+ VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
+#endif
+#if STM32_HAS_GPIOD
+ {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
+ VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
+#endif
+#if STM32_HAS_GPIOE
+ {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
+ VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
+#endif
+#if STM32_HAS_GPIOF
+ {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
+ VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
+#endif
+#if STM32_HAS_GPIOG
+ {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
+ VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
+#endif
+#if STM32_HAS_GPIOH
+ {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
+ VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
+#endif
+#if STM32_HAS_GPIOI
+ {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
+#endif
+};
+#endif
+
+void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ stm32_clock_init();
+}
+
+#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
+/**
+ * @brief MMC_SPI card detection.
+ */
+bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief MMC_SPI card write protection detection.
+ */
+bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+}
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
new file mode 100644
index 000000000..de3a93d1c
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -0,0 +1,922 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#ifndef BOARD_H
+#define BOARD_H
+
+/*
+ * Setup for ST STM32F072B-Discovery board.
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_ST_STM32F072B_DISCOVERY
+#define BOARD_NAME "ST STM32F072B-Discovery"
+
+/*
+ * Board oscillators-related settings.
+ * NOTE: HSE not fitted.
+ */
+#if !defined(STM32_LSECLK)
+#define STM32_LSECLK 32768
+#endif
+
+#define STM32_LSEDRV (3U << 3U)
+
+#if !defined(STM32_HSECLK)
+#define STM32_HSECLK 0U
+#endif
+
+#define STM32_HSE_BYPASS
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define STM32F072xB
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_BUTTON 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_USB_DM 11U
+#define GPIOA_USB_DP 12U
+#define GPIOA_SWDIO 13U
+#define GPIOA_SWCLK 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_SPI2_SCK 13U
+#define GPIOB_SPI2_MISO 14U
+#define GPIOB_SPI2_MOSI 15U
+
+#define GPIOC_MEMS_CS 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_LED_RED 6U
+#define GPIOC_LED_BLUE 7U
+#define GPIOC_LED_ORANGE 8U
+#define GPIOC_LED_GREEN 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_OSC32_IN 14U
+#define GPIOC_OSC32_OUT 15U
+
+#define GPIOD_PIN0 0U
+#define GPIOD_PIN1 1U
+#define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+#define GPIOD_PIN12 12U
+#define GPIOD_PIN13 13U
+#define GPIOD_PIN14 14U
+#define GPIOD_PIN15 15U
+
+#define GPIOE_PIN0 0U
+#define GPIOE_PIN1 1U
+#define GPIOE_PIN2 2U
+#define GPIOE_PIN3 3U
+#define GPIOE_PIN4 4U
+#define GPIOE_PIN5 5U
+#define GPIOE_PIN6 6U
+#define GPIOE_PIN7 7U
+#define GPIOE_PIN8 8U
+#define GPIOE_PIN9 9U
+#define GPIOE_PIN10 10U
+#define GPIOE_PIN11 11U
+#define GPIOE_PIN12 12U
+#define GPIOE_PIN13 13U
+#define GPIOE_PIN14 14U
+#define GPIOE_PIN15 15U
+
+#define GPIOF_OSC_IN 0U
+#define GPIOF_OSC_OUT 1U
+#define GPIOF_PIN2 2U
+#define GPIOF_PIN3 3U
+#define GPIOF_PIN4 4U
+#define GPIOF_PIN5 5U
+#define GPIOF_PIN6 6U
+#define GPIOF_PIN7 7U
+#define GPIOF_PIN8 8U
+#define GPIOF_PIN9 9U
+#define GPIOF_PIN10 10U
+#define GPIOF_PIN11 11U
+#define GPIOF_PIN12 12U
+#define GPIOF_PIN13 13U
+#define GPIOF_PIN14 14U
+#define GPIOF_PIN15 15U
+
+/*
+ * IO lines assignments.
+ */
+#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
+#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
+#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
+
+#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
+#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
+#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
+
+#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
+#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
+#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
+#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
+#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
+#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
+#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
+
+
+
+#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
+#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the STM32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
+#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
+#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
+#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
+#define PIN_ODR_LOW(n) (0U << (n))
+#define PIN_ODR_HIGH(n) (1U << (n))
+#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
+#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
+#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
+#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
+#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
+#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
+#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
+#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
+#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
+#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - BUTTON (input floating).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA10 - PIN10 (input pullup).
+ * PA11 - USB_DM (input floating).
+ * PA12 - USB_DP (input floating).
+ * PA13 - SWDIO (alternate 0).
+ * PA14 - SWCLK (alternate 0).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
+ PIN_MODE_INPUT(GPIOA_PIN1) | \
+ PIN_MODE_INPUT(GPIOA_PIN2) | \
+ PIN_MODE_INPUT(GPIOA_PIN3) | \
+ PIN_MODE_INPUT(GPIOA_PIN4) | \
+ PIN_MODE_INPUT(GPIOA_PIN5) | \
+ PIN_MODE_INPUT(GPIOA_PIN6) | \
+ PIN_MODE_INPUT(GPIOA_PIN7) | \
+ PIN_MODE_INPUT(GPIOA_PIN8) | \
+ PIN_MODE_INPUT(GPIOA_PIN9) | \
+ PIN_MODE_INPUT(GPIOA_PIN10) | \
+ PIN_MODE_INPUT(GPIOA_USB_DM) | \
+ PIN_MODE_INPUT(GPIOA_USB_DP) | \
+ PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
+ PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
+ PIN_MODE_INPUT(GPIOA_PIN15))
+#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
+#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \
+ PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
+ PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
+ PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
+ PIN_OSPEED_HIGH(GPIOA_PIN15))
+#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
+ PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
+ PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
+ PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
+ PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN15))
+#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
+ PIN_ODR_HIGH(GPIOA_PIN1) | \
+ PIN_ODR_HIGH(GPIOA_PIN2) | \
+ PIN_ODR_HIGH(GPIOA_PIN3) | \
+ PIN_ODR_HIGH(GPIOA_PIN4) | \
+ PIN_ODR_HIGH(GPIOA_PIN5) | \
+ PIN_ODR_HIGH(GPIOA_PIN6) | \
+ PIN_ODR_HIGH(GPIOA_PIN7) | \
+ PIN_ODR_HIGH(GPIOA_PIN8) | \
+ PIN_ODR_HIGH(GPIOA_PIN9) | \
+ PIN_ODR_HIGH(GPIOA_PIN10) | \
+ PIN_ODR_HIGH(GPIOA_USB_DM) | \
+ PIN_ODR_HIGH(GPIOA_USB_DP) | \
+ PIN_ODR_HIGH(GPIOA_SWDIO) | \
+ PIN_ODR_HIGH(GPIOA_SWCLK) | \
+ PIN_ODR_HIGH(GPIOA_PIN15))
+#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN7, 0U))
+#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \
+ PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \
+ PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
+ PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN15, 0U))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - SPI2_SCK (alternate 0).
+ * PB14 - SPI2_MISO (alternate 0).
+ * PB15 - SPI2_MOSI (alternate 0).
+ */
+#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
+ PIN_MODE_INPUT(GPIOB_PIN1) | \
+ PIN_MODE_INPUT(GPIOB_PIN2) | \
+ PIN_MODE_INPUT(GPIOB_PIN3) | \
+ PIN_MODE_INPUT(GPIOB_PIN4) | \
+ PIN_MODE_INPUT(GPIOB_PIN5) | \
+ PIN_MODE_INPUT(GPIOB_PIN6) | \
+ PIN_MODE_INPUT(GPIOB_PIN7) | \
+ PIN_MODE_INPUT(GPIOB_PIN8) | \
+ PIN_MODE_INPUT(GPIOB_PIN9) | \
+ PIN_MODE_INPUT(GPIOB_PIN10) | \
+ PIN_MODE_INPUT(GPIOB_PIN11) | \
+ PIN_MODE_INPUT(GPIOB_PIN12) | \
+ PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \
+ PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \
+ PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
+ PIN_OSPEED_HIGH(GPIOB_PIN2) | \
+ PIN_OSPEED_HIGH(GPIOB_PIN3) | \
+ PIN_OSPEED_HIGH(GPIOB_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \
+ PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \
+ PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
+ PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \
+ PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \
+ PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
+ PIN_ODR_HIGH(GPIOB_PIN1) | \
+ PIN_ODR_HIGH(GPIOB_PIN2) | \
+ PIN_ODR_HIGH(GPIOB_PIN3) | \
+ PIN_ODR_HIGH(GPIOB_PIN4) | \
+ PIN_ODR_HIGH(GPIOB_PIN5) | \
+ PIN_ODR_HIGH(GPIOB_PIN6) | \
+ PIN_ODR_HIGH(GPIOB_PIN7) | \
+ PIN_ODR_HIGH(GPIOB_PIN8) | \
+ PIN_ODR_HIGH(GPIOB_PIN9) | \
+ PIN_ODR_HIGH(GPIOB_PIN10) | \
+ PIN_ODR_HIGH(GPIOB_PIN11) | \
+ PIN_ODR_HIGH(GPIOB_PIN12) | \
+ PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \
+ PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \
+ PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN7, 0U))
+#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \
+ PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \
+ PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
+
+/*
+ * GPIOC setup:
+ *
+ * PC0 - MEMS_CS (output pushpull maximum).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - LED_RED (output pushpull maximum).
+ * PC7 - LED_BLUE (output pushpull maximum).
+ * PC8 - LED_ORANGE (output pushpull maximum).
+ * PC9 - LED_GREEN (output pushpull maximum).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - OSC32_IN (input floating).
+ * PC15 - OSC32_OUT (input floating).
+ */
+#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \
+ PIN_MODE_INPUT(GPIOC_PIN1) | \
+ PIN_MODE_INPUT(GPIOC_PIN2) | \
+ PIN_MODE_INPUT(GPIOC_PIN3) | \
+ PIN_MODE_INPUT(GPIOC_PIN4) | \
+ PIN_MODE_INPUT(GPIOC_PIN5) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_RED) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \
+ PIN_MODE_INPUT(GPIOC_PIN10) | \
+ PIN_MODE_INPUT(GPIOC_PIN11) | \
+ PIN_MODE_INPUT(GPIOC_PIN12) | \
+ PIN_MODE_INPUT(GPIOC_PIN13) | \
+ PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
+ PIN_MODE_INPUT(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_RED) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
+ PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
+ PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
+ PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
+ PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \
+ PIN_ODR_HIGH(GPIOC_PIN1) | \
+ PIN_ODR_HIGH(GPIOC_PIN2) | \
+ PIN_ODR_HIGH(GPIOC_PIN3) | \
+ PIN_ODR_HIGH(GPIOC_PIN4) | \
+ PIN_ODR_HIGH(GPIOC_PIN5) | \
+ PIN_ODR_LOW(GPIOC_LED_RED) | \
+ PIN_ODR_LOW(GPIOC_LED_BLUE) | \
+ PIN_ODR_LOW(GPIOC_LED_ORANGE) | \
+ PIN_ODR_LOW(GPIOC_LED_GREEN) | \
+ PIN_ODR_HIGH(GPIOC_PIN10) | \
+ PIN_ODR_HIGH(GPIOC_PIN11) | \
+ PIN_ODR_HIGH(GPIOC_PIN12) | \
+ PIN_ODR_HIGH(GPIOC_PIN13) | \
+ PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
+ PIN_ODR_HIGH(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \
+ PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
+#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \
+ PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
+ PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD10 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
+ PIN_MODE_INPUT(GPIOD_PIN1) | \
+ PIN_MODE_INPUT(GPIOD_PIN2) | \
+ PIN_MODE_INPUT(GPIOD_PIN3) | \
+ PIN_MODE_INPUT(GPIOD_PIN4) | \
+ PIN_MODE_INPUT(GPIOD_PIN5) | \
+ PIN_MODE_INPUT(GPIOD_PIN6) | \
+ PIN_MODE_INPUT(GPIOD_PIN7) | \
+ PIN_MODE_INPUT(GPIOD_PIN8) | \
+ PIN_MODE_INPUT(GPIOD_PIN9) | \
+ PIN_MODE_INPUT(GPIOD_PIN10) | \
+ PIN_MODE_INPUT(GPIOD_PIN11) | \
+ PIN_MODE_INPUT(GPIOD_PIN12) | \
+ PIN_MODE_INPUT(GPIOD_PIN13) | \
+ PIN_MODE_INPUT(GPIOD_PIN14) | \
+ PIN_MODE_INPUT(GPIOD_PIN15))
+#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
+#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN15))
+#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN15))
+#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
+ PIN_ODR_HIGH(GPIOD_PIN1) | \
+ PIN_ODR_HIGH(GPIOD_PIN2) | \
+ PIN_ODR_HIGH(GPIOD_PIN3) | \
+ PIN_ODR_HIGH(GPIOD_PIN4) | \
+ PIN_ODR_HIGH(GPIOD_PIN5) | \
+ PIN_ODR_HIGH(GPIOD_PIN6) | \
+ PIN_ODR_HIGH(GPIOD_PIN7) | \
+ PIN_ODR_HIGH(GPIOD_PIN8) | \
+ PIN_ODR_HIGH(GPIOD_PIN9) | \
+ PIN_ODR_HIGH(GPIOD_PIN10) | \
+ PIN_ODR_HIGH(GPIOD_PIN11) | \
+ PIN_ODR_HIGH(GPIOD_PIN12) | \
+ PIN_ODR_HIGH(GPIOD_PIN13) | \
+ PIN_ODR_HIGH(GPIOD_PIN14) | \
+ PIN_ODR_HIGH(GPIOD_PIN15))
+#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN7, 0U))
+#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN15, 0U))
+
+/*
+ * GPIOE setup:
+ *
+ * PE0 - PIN0 (input pullup).
+ * PE1 - PIN1 (input pullup).
+ * PE2 - PIN2 (input pullup).
+ * PE3 - PIN3 (input pullup).
+ * PE4 - PIN4 (input pullup).
+ * PE5 - PIN5 (input pullup).
+ * PE6 - PIN6 (input pullup).
+ * PE7 - PIN7 (input pullup).
+ * PE8 - PIN8 (input pullup).
+ * PE9 - PIN9 (input pullup).
+ * PE10 - PIN10 (input pullup).
+ * PE11 - PIN11 (input pullup).
+ * PE12 - PIN12 (input pullup).
+ * PE13 - PIN13 (input pullup).
+ * PE14 - PIN14 (input pullup).
+ * PE15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
+ PIN_MODE_INPUT(GPIOE_PIN1) | \
+ PIN_MODE_INPUT(GPIOE_PIN2) | \
+ PIN_MODE_INPUT(GPIOE_PIN3) | \
+ PIN_MODE_INPUT(GPIOE_PIN4) | \
+ PIN_MODE_INPUT(GPIOE_PIN5) | \
+ PIN_MODE_INPUT(GPIOE_PIN6) | \
+ PIN_MODE_INPUT(GPIOE_PIN7) | \
+ PIN_MODE_INPUT(GPIOE_PIN8) | \
+ PIN_MODE_INPUT(GPIOE_PIN9) | \
+ PIN_MODE_INPUT(GPIOE_PIN10) | \
+ PIN_MODE_INPUT(GPIOE_PIN11) | \
+ PIN_MODE_INPUT(GPIOE_PIN12) | \
+ PIN_MODE_INPUT(GPIOE_PIN13) | \
+ PIN_MODE_INPUT(GPIOE_PIN14) | \
+ PIN_MODE_INPUT(GPIOE_PIN15))
+#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
+#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN15))
+#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN15))
+#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
+ PIN_ODR_HIGH(GPIOE_PIN1) | \
+ PIN_ODR_HIGH(GPIOE_PIN2) | \
+ PIN_ODR_HIGH(GPIOE_PIN3) | \
+ PIN_ODR_HIGH(GPIOE_PIN4) | \
+ PIN_ODR_HIGH(GPIOE_PIN5) | \
+ PIN_ODR_HIGH(GPIOE_PIN6) | \
+ PIN_ODR_HIGH(GPIOE_PIN7) | \
+ PIN_ODR_HIGH(GPIOE_PIN8) | \
+ PIN_ODR_HIGH(GPIOE_PIN9) | \
+ PIN_ODR_HIGH(GPIOE_PIN10) | \
+ PIN_ODR_HIGH(GPIOE_PIN11) | \
+ PIN_ODR_HIGH(GPIOE_PIN12) | \
+ PIN_ODR_HIGH(GPIOE_PIN13) | \
+ PIN_ODR_HIGH(GPIOE_PIN14) | \
+ PIN_ODR_HIGH(GPIOE_PIN15))
+#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN7, 0U))
+#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN15, 0U))
+
+/*
+ * GPIOF setup:
+ *
+ * PF0 - OSC_IN (input floating).
+ * PF1 - OSC_OUT (input floating).
+ * PF2 - PIN2 (input pullup).
+ * PF3 - PIN3 (input pullup).
+ * PF4 - PIN4 (input pullup).
+ * PF5 - PIN5 (input pullup).
+ * PF6 - PIN6 (input pullup).
+ * PF7 - PIN7 (input pullup).
+ * PF8 - PIN8 (input pullup).
+ * PF9 - PIN9 (input pullup).
+ * PF10 - PIN10 (input pullup).
+ * PF11 - PIN11 (input pullup).
+ * PF12 - PIN12 (input pullup).
+ * PF13 - PIN13 (input pullup).
+ * PF14 - PIN14 (input pullup).
+ * PF15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
+ PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
+ PIN_MODE_INPUT(GPIOF_PIN2) | \
+ PIN_MODE_INPUT(GPIOF_PIN3) | \
+ PIN_MODE_INPUT(GPIOF_PIN4) | \
+ PIN_MODE_INPUT(GPIOF_PIN5) | \
+ PIN_MODE_INPUT(GPIOF_PIN6) | \
+ PIN_MODE_INPUT(GPIOF_PIN7) | \
+ PIN_MODE_INPUT(GPIOF_PIN8) | \
+ PIN_MODE_INPUT(GPIOF_PIN9) | \
+ PIN_MODE_INPUT(GPIOF_PIN10) | \
+ PIN_MODE_INPUT(GPIOF_PIN11) | \
+ PIN_MODE_INPUT(GPIOF_PIN12) | \
+ PIN_MODE_INPUT(GPIOF_PIN13) | \
+ PIN_MODE_INPUT(GPIOF_PIN14) | \
+ PIN_MODE_INPUT(GPIOF_PIN15))
+#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
+#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
+ PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN15))
+#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
+ PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN15))
+#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
+ PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
+ PIN_ODR_HIGH(GPIOF_PIN2) | \
+ PIN_ODR_HIGH(GPIOF_PIN3) | \
+ PIN_ODR_HIGH(GPIOF_PIN4) | \
+ PIN_ODR_HIGH(GPIOF_PIN5) | \
+ PIN_ODR_HIGH(GPIOF_PIN6) | \
+ PIN_ODR_HIGH(GPIOF_PIN7) | \
+ PIN_ODR_HIGH(GPIOF_PIN8) | \
+ PIN_ODR_HIGH(GPIOF_PIN9) | \
+ PIN_ODR_HIGH(GPIOF_PIN10) | \
+ PIN_ODR_HIGH(GPIOF_PIN11) | \
+ PIN_ODR_HIGH(GPIOF_PIN12) | \
+ PIN_ODR_HIGH(GPIOF_PIN13) | \
+ PIN_ODR_HIGH(GPIOF_PIN14) | \
+ PIN_ODR_HIGH(GPIOF_PIN15))
+#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
+ PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN7, 0U))
+#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN15, 0U))
+
+
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
+#endif /* BOARD_H */
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk
new file mode 100644
index 000000000..b98dcdd26
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg
new file mode 100644
index 000000000..9c7cf4fd7
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- STM32F0xx board Template -->
+<board
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd">
+ <configuration_settings>
+ <templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path>
+ <output_path>..</output_path>
+ <hal_version>3.0.x</hal_version>
+ </configuration_settings>
+ <board_name>ST STM32F072B-Discovery</board_name>
+ <board_id>ST_STM32F072B_DISCOVERY</board_id>
+ <board_functions></board_functions>
+ <subtype>STM32F072xB</subtype>
+ <clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0"
+ LSEBypass="false" LSEDrive="3 High Drive (default)" />
+ <ports>
+ <GPIOA>
+ <pin0
+ ID="BUTTON"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin1
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin2
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin3
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin4
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin5
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin6
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin7
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin8
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin9
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin10
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin11
+ ID="USB_DM"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin12
+ ID="USB_DP"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin13
+ ID="SWDIO"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Alternate"
+ Alternate="0" />
+ <pin14
+ ID="SWCLK"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="PullDown"
+ Level="High"
+ Mode="Alternate"
+ Alternate="0" />
+ <pin15
+ ID=""
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ </GPIOA>
+ <GPIOB>
+ <pin0
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin1
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin2
+ ID=""
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin3
+ ID=""
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin4
+ ID=""
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin5
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin6
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin7
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin8
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin9
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin10
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin11
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin12
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin13
+ ID="SPI2_SCK"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Alternate"
+ Alternate="0" />
+ <pin14
+ ID="SPI2_MISO"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Alternate"
+ Alternate="0" />
+ <pin15
+ ID="SPI2_MOSI"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Alternate"
+ Alternate="0" />
+ </GPIOB>
+ <GPIOC>
+ <pin0
+ ID="MEMS_CS"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Output"
+ Alternate="0" />
+ <pin1
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin2
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin3
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin4
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin5
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin6
+ ID="LED_RED"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="Low"
+ Mode="Output"
+ Alternate="0" />
+ <pin7
+ ID="LED_BLUE"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="Low"
+ Mode="Output"
+ Alternate="0" />
+ <pin8
+ ID="LED_ORANGE"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="Low"
+ Mode="Output"
+ Alternate="0" ></pin8>
+ <pin9
+ ID="LED_GREEN"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="Low"
+ Mode="Output"
+ Alternate="0" />
+ <pin10
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin11
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin12
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin13
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin14
+ ID="OSC32_IN"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin15
+ ID="OSC32_OUT"
+ Type="PushPull"
+ Speed="Maximum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ </GPIOC>
+ <GPIOD>
+ <pin0
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin1
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin2
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin3
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin4
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin5
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin6
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin7
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin8
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin9
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin10
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin11
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin12
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin13
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin14
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin15
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ </GPIOD>
+ <GPIOE>
+ <pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ <pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
+ Level="High" Mode="Input" Alternate="0" />
+ </GPIOE>
+ <GPIOF>
+ <pin0
+ ID="OSC_IN"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin1
+ ID="OSC_OUT"
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="Floating"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin2
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin3
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin4
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin5
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin6
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin7
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin8
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin9
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin10
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin11
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin12
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin13
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin14
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ <pin15
+ ID=""
+ Type="PushPull"
+ Speed="Minimum"
+ Resistor="PullUp"
+ Level="High"
+ Mode="Input"
+ Alternate="0" />
+ </GPIOF>
+ </ports>
+</board>
diff --git a/keyboards/cannonkeys/instant60/bootloader_defs.h b/keyboards/cannonkeys/instant60/bootloader_defs.h
new file mode 100644
index 000000000..02c48c4e6
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/bootloader_defs.h
@@ -0,0 +1,7 @@
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up here (page 175):
+ * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+ * This also requires a patch to chibios:
+ * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
+ */
+#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h
new file mode 100644
index 000000000..99fa8ce39
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/chconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/chconf.h
+ * @brief Configuration file template.
+ * @details A copy of this file must be placed in each project directory, it
+ * contains the application specific kernel settings.
+ *
+ * @addtogroup config
+ * @details Kernel related settings and hooks.
+ * @{
+ */
+
+#ifndef CHCONF_H
+#define CHCONF_H
+
+#define _CHIBIOS_RT_CONF_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#define CH_CFG_ST_RESOLUTION 32
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+#define CH_CFG_ST_FREQUENCY 10000
+
+/**
+ * @brief Time delta constant for the tick-less mode.
+ * @note If this value is zero then the system uses the classic
+ * periodic tick. This value represents the minimum number
+ * of ticks that is safe to specify in a timeout directive.
+ * The value one is not valid, timeouts are rounded up to
+ * this value.
+ */
+#define CH_CFG_ST_TIMEDELTA 2
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel parameters and options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Round robin interval.
+ * @details This constant is the number of system ticks allowed for the
+ * threads before preemption occurs. Setting this value to zero
+ * disables the preemption for threads with equal priority and the
+ * round robin becomes cooperative. Note that higher priority
+ * threads can still preempt, the kernel is always preemptive.
+ * @note Disabling the round robin preemption makes the kernel more compact
+ * and generally faster.
+ * @note The round robin preemption is not supported in tickless mode and
+ * must be set to zero in that case.
+ */
+#define CH_CFG_TIME_QUANTUM 0
+
+/**
+ * @brief Managed RAM size.
+ * @details Size of the RAM area to be managed by the OS. If set to zero
+ * then the whole available RAM is used. The core memory is made
+ * available to the heap allocator and/or can be used directly through
+ * the simplified core memory allocator.
+ *
+ * @note In order to let the OS manage the whole RAM the linker script must
+ * provide the @p __heap_base__ and @p __heap_end__ symbols.
+ * @note Requires @p CH_CFG_USE_MEMCORE.
+ */
+#define CH_CFG_MEMCORE_SIZE 0
+
+/**
+ * @brief Idle thread automatic spawn suppression.
+ * @details When this option is activated the function @p chSysInit()
+ * does not spawn the idle thread. The application @p main()
+ * function becomes the idle thread and must implement an
+ * infinite loop.
+ */
+#define CH_CFG_NO_IDLE_THREAD FALSE
+
+/* Use __WFI in the idle thread for waiting. Does lower the power
+ * consumption. */
+#define CORTEX_ENABLE_WFI_IDLE TRUE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Performance options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief OS optimization.
+ * @details If enabled then time efficient rather than space efficient code
+ * is used when two possible implementations exist.
+ *
+ * @note This is not related to the compiler optimization options.
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_OPTIMIZE_SPEED FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Subsystem options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Time Measurement APIs.
+ * @details If enabled then the time measurement APIs are included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_TM FALSE
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_REGISTRY TRUE
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_WAITEXIT TRUE
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_SEMAPHORES TRUE
+
+/**
+ * @brief Semaphores queuing mode.
+ * @details If enabled then the threads are enqueued on semaphores by
+ * priority rather than in FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MUTEXES TRUE
+
+/**
+ * @brief Enables recursive behavior on mutexes.
+ * @note Recursive mutexes are heavier and have an increased
+ * memory footprint.
+ *
+ * @note The default is @p FALSE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+
+/**
+ * @brief Conditional Variables APIs.
+ * @details If enabled then the conditional variables APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MUTEXES.
+ */
+#define CH_CFG_USE_CONDVARS TRUE
+
+/**
+ * @brief Conditional Variables APIs with timeout.
+ * @details If enabled then the conditional variables APIs with timeout
+ * specification are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_CONDVARS.
+ */
+#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_EVENTS TRUE
+
+/**
+ * @brief Events Flags APIs with timeout.
+ * @details If enabled then the events APIs with timeout specification
+ * are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_EVENTS.
+ */
+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MESSAGES TRUE
+
+/**
+ * @brief Synchronous Messages queuing mode.
+ * @details If enabled then messages are served by priority rather than in
+ * FIFO order.
+ *
+ * @note The default is @p FALSE. Enable this if you have special
+ * requirements.
+ * @note Requires @p CH_CFG_USE_MESSAGES.
+ */
+#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+
+/**
+ * @brief Mailboxes APIs.
+ * @details If enabled then the asynchronous messages (mailboxes) APIs are
+ * included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_SEMAPHORES.
+ */
+#define CH_CFG_USE_MAILBOXES TRUE
+
+/**
+ * @brief Core Memory Manager APIs.
+ * @details If enabled then the core memory manager APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MEMCORE FALSE
+
+/**
+ * @brief Heap Allocator APIs.
+ * @details If enabled then the memory heap allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
+ * @p CH_CFG_USE_SEMAPHORES.
+ * @note Mutexes are recommended.
+ */
+#define CH_CFG_USE_HEAP FALSE
+
+/**
+ * @brief Memory Pools Allocator APIs.
+ * @details If enabled then the memory pools allocator APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MEMPOOLS FALSE
+
+/**
+ * @brief Dynamic Threads APIs.
+ * @details If enabled then the dynamic threads creation APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ * @note Requires @p CH_CFG_USE_WAITEXIT.
+ * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
+ */
+#define CH_CFG_USE_DYNAMIC FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_STATISTICS FALSE
+
+/**
+ * @brief Debug option, system state check.
+ * @details If enabled the correct call protocol for system APIs is checked
+ * at runtime.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+
+/**
+ * @brief Debug option, parameters checks.
+ * @details If enabled then the checks on the API functions input
+ * parameters are activated.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_ENABLE_CHECKS FALSE
+
+/**
+ * @brief Debug option, consistency checks.
+ * @details If enabled then all the assertions in the kernel code are
+ * activated. This includes consistency checks inside the kernel,
+ * runtime anomalies and port-defined checks.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_ENABLE_ASSERTS FALSE
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_BUFFER_SIZE 128
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @note The default is @p FALSE.
+ * @note The stack check is performed in a architecture/port dependent way.
+ * It may not be implemented or some ports.
+ * @note The default failure mode is to halt the system with the global
+ * @p panic_msg variable set to @p NULL.
+ */
+#define CH_DBG_ENABLE_STACK_CHECK FALSE
+
+/**
+ * @brief Debug option, stacks initialization.
+ * @details If enabled then the threads working area is filled with a byte
+ * value when a thread is created. This can be useful for the
+ * runtime measurement of the used stack.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_FILL_THREADS FALSE
+
+/**
+ * @brief Debug option, threads profiling.
+ * @details If enabled then a field is added to the @p thread_t structure that
+ * counts the system ticks occurred while executing the thread.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+#define CH_DBG_THREADS_PROFILING FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Threads descriptor structure extension.
+ * @details User fields added to the end of the @p thread_t structure.
+ */
+#define CH_CFG_THREAD_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief Threads initialization hook.
+ * @details User initialization code added to the @p chThdInit() API.
+ *
+ * @note It is invoked from within @p chThdInit() and implicitly from all
+ * the threads creation APIs.
+ */
+#define CH_CFG_THREAD_INIT_HOOK(tp) { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
+ * @brief Threads finalization hook.
+ * @details User finalization code added to the @p chThdExit() API.
+ */
+#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
+ /* Add threads finalization code here.*/ \
+}
+
+/**
+ * @brief Context switch hook.
+ * @details This hook is invoked just before switching between threads.
+ */
+#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
+ /* Context switch code here.*/ \
+}
+
+/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
+}
+
+/**
+ * @brief Idle thread enter hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to activate a power saving mode.
+ */
+#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
+}
+
+/**
+ * @brief Idle thread leave hook.
+ * @note This hook is invoked within a critical zone, no OS functions
+ * should be invoked from here.
+ * @note This macro can be used to deactivate a power saving mode.
+ */
+#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
+}
+
+/**
+ * @brief Idle Loop hook.
+ * @details This hook is continuously invoked by the idle thread loop.
+ */
+#define CH_CFG_IDLE_LOOP_HOOK() { \
+ /* Idle loop code here.*/ \
+}
+
+/**
+ * @brief System tick event hook.
+ * @details This hook is invoked in the system tick handler immediately
+ * after processing the virtual timers queue.
+ */
+#define CH_CFG_SYSTEM_TICK_HOOK() { \
+ /* System tick event code here.*/ \
+}
+
+/**
+ * @brief System halt hook.
+ * @details This hook is invoked in case to a system halting error before
+ * the system is halted.
+ */
+#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
+ /* System halt code here.*/ \
+}
+
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */
diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h
new file mode 100644
index 000000000..d7554c172
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/config.h
@@ -0,0 +1,92 @@
+/*
+Copyright 2015 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/>.
+*/
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xCA04
+#define PRODUCT_ID 0x1600
+#define DEVICE_VER 0x0001
+/* in python2: list(u"whatever".encode('utf-16-le')) */
+/* at most 32 characters or the ugly hack in usb_main.c borks */
+#define MANUFACTURER CannonKeys
+#define PRODUCT Instant60
+#define DESCRIPTION Instant 60 Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+#define MATRIX_COL_PINS { B2, B10, B11, A9, A15, B3, B4, B5, B6, B7, B8, B9, C13, C14, C15 }
+#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 }
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_LEVELS 6
+#define BACKLIGHT_BREATHING
+#define BREATHING_PERIOD 6
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+#define RGBLIGHT_ANIMATIONS
+
+#define WS2812_LED_N 14
+#define RGBLED_NUM WS2812_LED_N
+#define PORT_WS2812 GPIOB
+#define PIN_WS2812 15
+#define WS2812_SPI SPID2
+
+
+// EEPROM usage
+// TODO: refactor with new user EEPROM code (coming soon)
+#define EEPROM_MAGIC 0x451F
+#define EEPROM_MAGIC_ADDR 32
+// Bump this every time we change what we store
+// This will automatically reset the EEPROM with defaults
+// and avoid loading invalid data from the EEPROM
+#define EEPROM_VERSION 0x01
+#define EEPROM_VERSION_ADDR 34
+
+#define EEPROM_CUSTOM_BACKLIGHT 804
+
+
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/cannonkeys/instant60/halconf.h b/keyboards/cannonkeys/instant60/halconf.h
new file mode 100644
index 000000000..38743e090
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/halconf.h
@@ -0,0 +1,354 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file templates/halconf.h
+ * @brief HAL configuration header.
+ * @details HAL configuration file, this file allows to enable or disable the
+ * various device drivers from your application. You may also use
+ * this file in order to override the device drivers default settings.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef _HALCONF_H_
+#define _HALCONF_H_
+
+#include "mcuconf.h"
+
+/**
+ * @brief Enables the PAL subsystem.
+ */
+#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
+#define HAL_USE_PAL TRUE
+#endif
+
+/**
+ * @brief Enables the ADC subsystem.
+ */
+#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
+#define HAL_USE_ADC FALSE
+#endif
+
+/**
+ * @brief Enables the CAN subsystem.
+ */
+#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+#define HAL_USE_CAN FALSE
+#endif
+
+/**
+ * @brief Enables the DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
+#endif
+
+/**
+ * @brief Enables the EXT subsystem.
+ */
+#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
+#define HAL_USE_EXT FALSE
+#endif
+
+/**
+ * @brief Enables the GPT subsystem.
+ */
+#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
+#define HAL_USE_GPT FALSE
+#endif
+
+/**
+ * @brief Enables the I2C subsystem.
+ */
+#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
+#define HAL_USE_I2C TRUE
+#endif
+
+/**
+ * @brief Enables the I2S subsystem.
+ */
+#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
+#define HAL_USE_I2S FALSE
+#endif
+
+/**
+ * @brief Enables the ICU subsystem.
+ */
+#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
+#define HAL_USE_ICU FALSE
+#endif
+
+/**
+ * @brief Enables the MAC subsystem.
+ */
+#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
+#define HAL_USE_MAC FALSE
+#endif
+
+/**
+ * @brief Enables the MMC_SPI subsystem.
+ */
+#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_MMC_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the PWM subsystem.
+ */
+#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
+#define HAL_USE_PWM TRUE
+#endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+#define HAL_USE_RTC FALSE
+#endif
+
+/**
+ * @brief Enables the SDC subsystem.
+ */
+#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
+#define HAL_USE_SDC FALSE
+#endif
+
+/**
+ * @brief Enables the SERIAL subsystem.
+ */
+#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL FALSE
+#endif
+
+/**
+ * @brief Enables the SERIAL over USB subsystem.
+ */
+#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SPI subsystem.
+ */
+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+#define HAL_USE_UART FALSE
+#endif
+
+/**
+ * @brief Enables the USB subsystem.
+ */
+#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
+#define HAL_USE_USB TRUE
+#endif
+
+/**
+ * @brief Enables the WDG subsystem.
+ */
+#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
+#define HAL_USE_WDG FALSE
+#endif
+
+/*===========================================================================*/
+/* ADC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
+#define ADC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/*===========================================================================*/
+/* CAN driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Sleep mode related APIs inclusion switch.
+ */
+#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/*===========================================================================*/
+/* I2C driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the mutual exclusion APIs on the I2C bus.
+ */
+#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/*===========================================================================*/
+/* MAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
+#define MAC_USE_ZERO_COPY FALSE
+#endif
+
+/**
+ * @brief Enables an event sources for incoming packets.
+ */
+#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
+#define MAC_USE_EVENTS TRUE
+#endif
+
+/*===========================================================================*/
+/* MMC_SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ * This option is recommended also if the SPI driver does not
+ * use a DMA channel and heavily loads the CPU.
+ */
+#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
+#define MMC_NICE_WAITING TRUE
+#endif
+
+/*===========================================================================*/
+/* SDC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Number of initialization attempts before rejecting the card.
+ * @note Attempts are performed at 10mS intervals.
+ */
+#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
+#define SDC_INIT_RETRY 100
+#endif
+
+/**
+ * @brief Include support for MMC cards.
+ * @note MMC support is not yet implemented so this option must be kept
+ * at @p FALSE.
+ */
+#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
+#define SDC_MMC_SUPPORT FALSE
+#endif
+
+/**
+ * @brief Delays insertions.
+ * @details If enabled this options inserts delays into the MMC waiting
+ * routines releasing some extra CPU time for the threads with
+ * lower priority, this may slow down the driver a bit however.
+ */
+#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/*===========================================================================*/
+/* SERIAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Default bit rate.
+ * @details Configuration parameter, this is the baud rate selected for the
+ * default configuration.
+ */
+#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
+#define SERIAL_DEFAULT_BITRATE 38400
+#endif
+
+/**
+ * @brief Serial buffers size.
+ * @details Configuration parameter, you can change the depth of the queue
+ * buffers depending on the requirements of your application.
+ * @note The default is 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_BUFFERS_SIZE 16
+#endif
+
+/*===========================================================================*/
+/* SERIAL_USB driver related setting. */
+/*===========================================================================*/
+
+/**
+ * @brief Serial over USB buffers size.
+ * @details Configuration parameter, the buffer size must be a multiple of
+ * the USB data endpoint maximum packet size.
+ * @note The default is 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/*===========================================================================*/
+/* SPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+#define USB_USE_WAIT TRUE
+#endif
+
+#endif /* _HALCONF_H_ */
+
+/** @} */
diff --git a/keyboards/cannonkeys/instant60/instant60.c b/keyboards/cannonkeys/instant60/instant60.c
new file mode 100644
index 000000000..25b7099b0
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/instant60.c
@@ -0,0 +1 @@
+#include "instant60.h"
diff --git a/keyboards/cannonkeys/instant60/instant60.h b/keyboards/cannonkeys/instant60/instant60.h
new file mode 100644
index 000000000..67d5ba98f
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/instant60.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include "quantum.h"
+
+#define KNO KC_NO
+
+#define LAYOUT_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
+ K40, K41, K42, K45, K49, K4A, K4B, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KNO}, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, KNO }, \
+ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \
+}
+
+#define LAYOUT_tsangan( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\
+ K40, K41, K42, K45, K49, K4B, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \
+ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, KNO, K4B, KNO, KNO, K4E } \
+}
+
+#define LAYOUT_all( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\
+ K40, K41, K42, K45, K49, K4A, K4B, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \
+ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \
+}
diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c
new file mode 100644
index 000000000..7753181a4
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2012,2013 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 QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_ansi(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL
+ ),
+
+ [_FN1] = LAYOUT_ansi(
+ KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
+ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ KC_GRV, _______, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c
new file mode 100644
index 000000000..e95ac1b69
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2012,2013 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 QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_tsangan(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1),\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [_FN1] = LAYOUT_tsangan(
+ KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______,\
+ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ KC_GRV, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/instant60/mcuconf.h b/keyboards/cannonkeys/instant60/mcuconf.h
new file mode 100644
index 000000000..048eb4df6
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/mcuconf.h
@@ -0,0 +1,176 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#ifndef _MCUCONF_H_
+#define _MCUCONF_H_
+
+/*
+ * STM32F0xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define STM32F0xx_MCUCONF
+// #define STM32F070xB
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_HSI_ENABLED TRUE
+#define STM32_HSI14_ENABLED TRUE
+#define STM32_HSI48_ENABLED FALSE
+#define STM32_LSI_ENABLED TRUE
+#define STM32_HSE_ENABLED FALSE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
+#define STM32_PREDIV_VALUE 1
+#define STM32_PLLMUL_VALUE 12
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE STM32_PPRE_DIV1
+#define STM32_ADCSW STM32_ADCSW_HSI14
+#define STM32_ADCPRE STM32_ADCPRE_DIV4
+#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
+#define STM32_ADCPRE STM32_ADCPRE_DIV4
+#define STM32_ADCSW STM32_ADCSW_HSI14
+#define STM32_USBSW STM32_USBSW_HSI48
+#define STM32_CECSW STM32_CECSW_HSI
+#define STM32_I2C1SW STM32_I2C1SW_HSI
+#define STM32_USART1SW STM32_USART1SW_PCLK
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_IRQ_PRIORITY 2
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
+
+/*
+ * EXT driver system settings.
+ */
+#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM3 FALSE
+#define STM32_GPT_USE_TIM14 FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY 2
+#define STM32_GPT_TIM2_IRQ_PRIORITY 2
+#define STM32_GPT_TIM3_IRQ_PRIORITY 2
+#define STM32_GPT_TIM14_IRQ_PRIORITY 2
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 TRUE
+#define STM32_I2C_USE_I2C2 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_IRQ_PRIORITY 3
+#define STM32_I2C_I2C2_IRQ_PRIORITY 3
+#define STM32_I2C_USE_DMA TRUE
+#define STM32_I2C_I2C1_DMA_PRIORITY 1
+#define STM32_I2C_I2C2_DMA_PRIORITY 1
+#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1 FALSE
+#define STM32_ICU_USE_TIM2 FALSE
+#define STM32_ICU_USE_TIM3 FALSE
+#define STM32_ICU_TIM1_IRQ_PRIORITY 3
+#define STM32_ICU_TIM2_IRQ_PRIORITY 3
+#define STM32_ICU_TIM3_IRQ_PRIORITY 3
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM3 TRUE
+#define STM32_PWM_TIM1_IRQ_PRIORITY 3
+#define STM32_PWM_TIM2_IRQ_PRIORITY 3
+#define STM32_PWM_TIM3_IRQ_PRIORITY 3
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 3
+#define STM32_SERIAL_USART2_PRIORITY 3
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI2 TRUE
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI2_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 2
+#define STM32_SPI_SPI2_IRQ_PRIORITY 2
+#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 2
+#define STM32_ST_USE_TIMER 2
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USART1_IRQ_PRIORITY 3
+#define STM32_UART_USART2_IRQ_PRIORITY 3
+#define STM32_UART_USART1_DMA_PRIORITY 0
+#define STM32_UART_USART2_DMA_PRIORITY 0
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
+
+#endif /* _MCUCONF_H_ */
diff --git a/keyboards/cannonkeys/instant60/readme.md b/keyboards/cannonkeys/instant60/readme.md
new file mode 100644
index 000000000..9cd91e951
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/readme.md
@@ -0,0 +1,12 @@
+# Instant60
+
+Instant60 Keyboard
+
+Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1)
+Hardware Supported: STM32F072CBT6
+
+Make example for this keyboard (after setting up your build environment):
+
+ make cannonkeys/instant60: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/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk
new file mode 100644
index 000000000..cd366c76a
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/rules.mk
@@ -0,0 +1,56 @@
+# project specific files
+# SRC = ssd1306.c
+## chip/board settings
+# the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = STM32
+MCU_SERIES = STM32F0xx
+# linker script to use
+# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = STM32F072xB
+# startup code to use
+# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = stm32f0xx
+# it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = ST_STM32F072B_DISCOVERY
+# Cortex version
+# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
+MCU = cortex-m0
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
+# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
+# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
+# a custom board definition that you plan to reuse).
+# If you're not setting it here, leave it commented out.
+# It is chip dependent, the correct number can be looked up here (page 175):
+# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+# This also requires a patch to chibios:
+# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
+#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
+
+# Build Options
+# comment out to disable the options.
+#
+
+# project specific files
+VPATH += keyboards/cannonkeys/stm32f072
+SRC = keyboard.c \
+ led.c
+
+#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+CUSTOM_MATRIX = no # Custom matrix file
+# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
+RGBLIGHT_ENABLE = yes
+
+# RAW_ENABLE = yes
+# DYNAMIC_KEYMAP_ENABLE = yes
+
diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h
index dd2d9bc57..e3d44990e 100644
--- a/keyboards/cannonkeys/satisfaction75/config.h
+++ b/keyboards/cannonkeys/satisfaction75/config.h
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEVICE_VER 0x0001
/* in python2: list(u"whatever".encode('utf-16-le')) */
/* at most 32 characters or the ugly hack in usb_main.c borks */
-#define MANUFACTURER QMK
+#define MANUFACTURER CannonKeys
#define PRODUCT Satisfaction75
#define DESCRIPTION Satisfaction 75 Keyboard
@@ -76,14 +76,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
-#define EEPROM_VERSION 0x02
+#define EEPROM_VERSION 0x0F
#define EEPROM_VERSION_ADDR 34
// Dynamic keymap starts after EEPROM version
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
-// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768)
-#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 803
-#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 221
+
+// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803
+
+// I'm also putting my custom stuff after that
+// 1 for enabled encoder modes
+// 1 for custom backlighting controls
+// 1 for OLED default mode
+// 6 for 3x custom encoder settings, left, right, and press (18 total)
+
+#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 803
+#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 804
+#define DYNAMIC_KEYMAP_DEFAULT_OLED 805
+#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 806
+
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 824
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c
index a19dbcc9f..d81eb92d4 100644
--- a/keyboards/cannonkeys/satisfaction75/i2c_master.c
+++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c
@@ -109,7 +109,7 @@ uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t l
}
// This is usually not needed. It releases the driver to allow pins to become GPIO again.
-uint8_t i2c_stop(uint16_t timeout)
+uint8_t i2c_stop(void)
{
i2cStop(&I2C_DRIVER);
return 0;
diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c
new file mode 100644
index 000000000..3595c107b
--- /dev/null
+++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c
@@ -0,0 +1,37 @@
+/*
+Copyright 2012,2013 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 QMK_KEYBOARD_H
+
+const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_all(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, ENC_PRESS,
+ 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_NUHS, KC_ENTER, KC_PGUP,
+ 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, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk
new file mode 100644
index 000000000..3357eb91c
--- /dev/null
+++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk
@@ -0,0 +1 @@
+QWIIC_ENABLE = no
diff --git a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h
new file mode 100644
index 000000000..42e574f3e
--- /dev/null
+++ b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "satisfaction75.h"
+
+#define LAYOUT_default( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \
+ K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, K315 }, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \
+ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
+}
diff --git a/keyboards/cannonkeys/satisfaction75/prototype/rules.mk b/keyboards/cannonkeys/satisfaction75/prototype/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/cannonkeys/satisfaction75/prototype/rules.mk
diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h
new file mode 100644
index 000000000..302b7e43d
--- /dev/null
+++ b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h
@@ -0,0 +1,108 @@
+#pragma once
+
+#include "satisfaction75.h"
+
+// This layout is the default - it's what's in VIA
+// ANSI, bottom row 1.25/1.25/1.25/6.25/1/1/1
+#define LAYOUT_default( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \
+ K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
+ K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \
+ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
+ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
+}
+
+// ISO, bottom row 1.25/1.25/1.25/6.25/1/1/1
+#define LAYOUT_iso( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
+ K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
+ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
+}
+
+// ANSI, bottom row 1.25/1.25/1.25/6.25/1.5/1.5
+#define LAYOUT_3x2( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \
+ K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
+ K500, K501, K502, K505, K509, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \
+ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
+ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, KC_NO, K511, K512, K513, KC_NO, K515 } \
+}
+
+// ANSI, WKL bottom row 1.5/1.5/7/1.5/1.5, Split Backspace
+#define LAYOUT_2x2( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \
+ K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
+ K500, K501, K505, K509, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \
+ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
+ { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, KC_NO, K511, K512, K513, KC_NO, K515 } \
+}
+
+// ANSI, bottom row 1.25/1.25/1.25/2.25/1.25/2.75/1/1/1
+// ANSI, bottom row 1.25/1.25/1.25/2.75/1.25/2.25/1/1/1
+#define LAYOUT_split_space( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \
+ K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
+ K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \
+ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
+ { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
+}
+
+
+// Expose All Keys - Split backspace - ISO Extra keys - Split space bottom row
+#define LAYOUT_all( \
+ K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
+ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
+ K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \
+) { \
+ { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
+ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
+ { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
+}
diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rules.mk b/keyboards/cannonkeys/satisfaction75/rev1/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/cannonkeys/satisfaction75/rev1/rules.mk
diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk
index 88ab45920..3e2877200 100644
--- a/keyboards/cannonkeys/satisfaction75/rules.mk
+++ b/keyboards/cannonkeys/satisfaction75/rules.mk
@@ -54,4 +54,4 @@ QWIIC_ENABLE += MICRO_OLED
# RAW_ENABLE = yes
# DYNAMIC_KEYMAP_ENABLE = yes
-DEFAULT_FOLDER = cannonkeys/satisfaction75
+DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
index 1423b11b0..0e788b29b 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
@@ -5,9 +5,10 @@
#include "ch.h"
#include "hal.h"
-// #ifdef QWIIC_MICRO_OLED_ENABLE
+#ifdef QWIIC_MICRO_OLED_ENABLE
#include "micro_oled.h"
#include "qwiic.h"
+#endif
#include "timer.h"
@@ -93,21 +94,87 @@ void raw_hid_receive( uint8_t *data, uint8_t length )
}
case id_get_keyboard_value:
{
- if ( command_data[0] == id_uptime )
- {
- uint32_t value = timer_read32();
- command_data[1] = (value >> 24 ) & 0xFF;
- command_data[2] = (value >> 16 ) & 0xFF;
- command_data[3] = (value >> 8 ) & 0xFF;
- command_data[4] = value & 0xFF;
- }
- else
- {
- *command_id = id_unhandled;
- }
+ switch( command_data[0])
+ {
+ case id_uptime:
+ {
+ uint32_t value = timer_read32();
+ command_data[1] = (value >> 24 ) & 0xFF;
+ command_data[2] = (value >> 16 ) & 0xFF;
+ command_data[3] = (value >> 8 ) & 0xFF;
+ command_data[4] = value & 0xFF;
+ break;
+ }
+ case id_oled_default_mode:
+ {
+ uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED);
+ command_data[1] = default_oled;
+ break;
+ }
+ case id_oled_mode:
+ {
+ command_data[1] = oled_mode;
+ break;
+
+ }
+ case id_encoder_modes:
+ {
+ command_data[1] = enabled_encoder_modes;
+ break;
+ }
+ case id_encoder_custom:
+ {
+ // uint8_t custom_encoder_idx = command_data[1];
+ // command_data[2] = 0x00;
+ // command_data[3] = 0x00;
+ // command_data[4] = 0x00;
+ // command_data[5] = 0x00;
+ // command_data[6] = 0x00;
+ // command_data[7] = 0x00;
+ break;
+ }
+ default:
+ {
+ *command_id = id_unhandled;
+ break;
+ }
+ }
break;
- }
+ }
#ifdef DYNAMIC_KEYMAP_ENABLE
+ case id_set_keyboard_value:
+ {
+ switch(command_data[0]){
+ case id_oled_default_mode:
+ {
+ eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED, command_data[1]);
+ break;
+ }
+ case id_oled_mode:
+ {
+ oled_mode = command_data[1];
+ draw_ui();
+ break;
+ }
+ case id_encoder_modes:
+ {
+ enabled_encoder_modes = command_data[1];
+ eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, enabled_encoder_modes);
+ break;
+ }
+ case id_encoder_custom:
+ {
+ // uint8_t custom_encoder_idx = command_data[1];
+ break;
+ }
+ default:
+ {
+ *command_id = id_unhandled;
+ break;
+ }
+ }
+ break;
+ }
case id_dynamic_keymap_get_keycode:
{
uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] );
@@ -243,9 +310,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
queue_for_send = true;
switch (keycode) {
case OLED_TOGG:
- if (record->event.pressed) {
- oled_mode = (oled_mode + 1) % _NUM_OLED_MODES;
- draw_ui();
+ if(!clock_set_mode){
+ if (record->event.pressed) {
+ oled_mode = (oled_mode + 1) % _NUM_OLED_MODES;
+ draw_ui();
+ }
}
return false;
case CLOCK_SET:
@@ -325,12 +394,34 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
}
}
+void dynamic_keymap_custom_reset(void){
+ void *p = (void*)(DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT);
+ void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR);
+ while ( p != end ) {
+ eeprom_update_byte(p, 0);
+ ++p;
+ }
+ eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, 0x1F);
+}
+
+void save_backlight_config_to_eeprom(){
+ eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT, kb_backlight_config.raw);
+}
+
+void load_custom_config(){
+ kb_backlight_config.raw = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT);
+#ifdef DYNAMIC_KEYMAP_ENABLE
+ oled_mode = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED);
+ enabled_encoder_modes = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES);
+#endif
+}
+
void eeprom_init_kb(void)
{
// If the EEPROM has the magic, the data is good.
// OK to load from EEPROM.
if (eeprom_is_valid()) {
- //backlight_config_load();
+ load_custom_config();
} else {
// If the EEPROM has not been saved before, or is out of date,
// save the default values to the EEPROM. Default values
@@ -341,6 +432,8 @@ void eeprom_init_kb(void)
dynamic_keymap_reset();
// This resets the macros in EEPROM to nothing.
dynamic_keymap_macro_reset();
+ // Reset the custom stuff
+ dynamic_keymap_custom_reset();
#endif
// Save the magic number last, in case saving was interrupted
eeprom_set_valid(true);
@@ -367,7 +460,7 @@ void matrix_scan_kb(void) {
queue_for_send = true;
}
}
-
+#ifdef QWIIC_MICRO_OLED_ENABLE
if (queue_for_send && oled_mode != OLED_OFF) {
oled_sleeping = false;
read_host_led_state();
@@ -378,5 +471,6 @@ void matrix_scan_kb(void) {
send_command(DISPLAYOFF); /* 0xAE */
oled_sleeping = true;
}
+#endif
}
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h
index 5f9a1e48b..dfab68017 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h
@@ -2,23 +2,11 @@
#include "quantum.h"
-// The first section contains all of the arguements
-// The second converts the arguments into a two-dimensional array
- #define LAYOUT_default( \
- K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
- K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
- K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
- K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \
- K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \
- K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \
-) { \
- { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \
- { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
- { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
- { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, K315 }, \
- { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \
- { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \
-}
+#ifdef KEYBOARD_cannonkeys_satisfaction75_prototype
+ #include "prototype.h"
+#else
+ #include "rev1.h"
+#endif
/* screen off after this many milliseconds */
#define ScreenOffInterval 60000 /* milliseconds */
@@ -39,6 +27,13 @@ enum my_keycodes {
OLED_TOGG
};
+enum s75_keyboard_value_id {
+ id_encoder_modes = 0x80,
+ id_oled_default_mode,
+ id_encoder_custom,
+ id_oled_mode
+};
+
enum encoder_modes {
ENC_MODE_VOLUME,
ENC_MODE_MEDIA,
@@ -114,5 +109,5 @@ void backlight_set(uint8_t level);
bool is_breathing(void);
void breathing_enable(void);
void breathing_disable(void);
-// void backlight_save_to_eeprom(uint8_t level);
-// uint8_t backlight_config_load();
+void load_custom_config(void);
+void save_backlight_config_to_eeprom(void);
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
index 88996f829..677681691 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
@@ -10,6 +10,8 @@ void pre_encoder_mode_change(){
// timespec.dstflag = last_timespec.dstflag;
timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000;
rtcSetTime(&RTCD1, &timespec);
+ } else if (encoder_mode == ENC_MODE_BACKLIGHT){
+ save_backlight_config_to_eeprom();
}
}
@@ -26,6 +28,9 @@ void post_encoder_mode_change(){
void change_encoder_mode(bool negative){
pre_encoder_mode_change();
+ if(enabled_encoder_modes == 0){
+ enabled_encoder_modes = 0x1F;
+ }
do {
if(negative){
if (encoder_mode == 0){
@@ -94,12 +99,14 @@ uint16_t handle_encoder_clockwise(){
mapped_code = KC_WH_D;
break;
case ENC_MODE_BACKLIGHT:
- // mapped_code = BL_INC;
kb_backlight_config.level = kb_backlight_config.level + 1;
if(kb_backlight_config.level > BACKLIGHT_LEVELS){
kb_backlight_config.level = BACKLIGHT_LEVELS;
}
backlight_set(kb_backlight_config.level);
+ if (kb_backlight_config.level != 0){
+ kb_backlight_config.enable = true;
+ }
break;
case ENC_MODE_BRIGHTNESS:
mapped_code = KC_BRIGHTNESS_UP;
@@ -131,6 +138,9 @@ uint16_t handle_encoder_ccw(){
kb_backlight_config.level = kb_backlight_config.level - 1;
}
backlight_set(kb_backlight_config.level);
+ if (kb_backlight_config.level == 0){
+ kb_backlight_config.enable = false;
+ }
break;
case ENC_MODE_BRIGHTNESS:
mapped_code = KC_BRIGHTNESS_DOWN;
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
index a92d61c56..4e22587db 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
@@ -3,6 +3,7 @@
__attribute__ ((weak))
void draw_ui() {
+#ifdef QWIIC_MICRO_OLED_ENABLE
clear_buffer();
last_flush = timer_read();
send_command(DISPLAYON);
@@ -22,6 +23,7 @@ void draw_ui() {
send_command(DISPLAYOFF);
break;
}
+#endif
}
void draw_encoder(int8_t startX, int8_t startY, bool show_legend){
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c
new file mode 100644
index 000000000..f94ecb5fb
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/keyboard.c
@@ -0,0 +1,125 @@
+#include "keyboard.h"
+#include "ch.h"
+#include "hal.h"
+#include "led_custom.h"
+#include "util.h"
+#include "quantum.h"
+
+#include "tmk_core/common/eeprom.h"
+
+#include "ws2812.h"
+
+backlight_config_t kb_backlight_config = {
+ .enable = true,
+ .breathing = true,
+ .level = BACKLIGHT_LEVELS
+};
+
+bool eeprom_is_valid(void)
+{
+ return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC &&
+ eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION);
+}
+
+void eeprom_set_valid(bool valid)
+{
+ eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF);
+ eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF);
+}
+
+void eeprom_reset(void)
+{
+ eeprom_set_valid(false);
+ eeconfig_disable();
+}
+
+void save_backlight_config_to_eeprom(){
+ eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw);
+}
+
+void load_custom_config(){
+ kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT);
+}
+
+void eeprom_init_kb(void)
+{
+ // If the EEPROM has the magic, the data is good.
+ // OK to load from EEPROM.
+ if (eeprom_is_valid()) {
+ load_custom_config();
+ } else {
+ // Save the magic number last, in case saving was interrupted
+ eeprom_set_valid(true);
+ save_backlight_config_to_eeprom();
+ }
+}
+
+__attribute__ ((weak))
+void matrix_init_board(void);
+
+void matrix_init_kb(void){
+ eeprom_init_kb();
+ /* MOSI pin*/
+ palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0));
+ wait_ms(500);
+
+#ifdef RGBLIGHT_ENABLE
+ leds_init();
+#endif
+ backlight_init_ports();
+
+ matrix_init_board();
+}
+
+void matrix_scan_kb(void)
+{
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_task();
+ #endif
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BL_INC:
+ if (record->event.pressed) {
+ kb_backlight_config.level = kb_backlight_config.level + 1;
+ if(kb_backlight_config.level > BACKLIGHT_LEVELS){
+ kb_backlight_config.level = BACKLIGHT_LEVELS;
+ }
+ backlight_set(kb_backlight_config.level);
+ save_backlight_config_to_eeprom();
+ }
+ return false;
+ case BL_TOGG:
+ if (record->event.pressed) {
+ kb_backlight_config.enable = !kb_backlight_config.enable;
+ if(kb_backlight_config.enable){
+ backlight_set(kb_backlight_config.level);
+ } else {
+ backlight_set(0);
+ }
+ save_backlight_config_to_eeprom();
+ }
+ return false;
+
+ case BL_DEC:
+ if (record->event.pressed) {
+ if(kb_backlight_config.level <= 1){
+ kb_backlight_config.level = 0;
+ } else {
+ kb_backlight_config.level = kb_backlight_config.level - 1;
+ }
+ backlight_set(kb_backlight_config.level);
+ save_backlight_config_to_eeprom();
+ }
+ return false;
+ case BL_BRTG:
+ if (record->event.pressed) {
+ kb_backlight_config.breathing = !kb_backlight_config.breathing;
+ breathing_toggle();
+ save_backlight_config_to_eeprom();
+ }
+ return false;
+ }
+ return true;
+}
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.h b/keyboards/cannonkeys/stm32f072/keyboard.h
new file mode 100644
index 000000000..94c973d61
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/keyboard.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "quantum.h"
+
+typedef union {
+ uint8_t raw;
+ struct {
+ bool enable :1;
+ bool breathing : 1;
+ uint8_t level :6;
+ };
+} backlight_config_t;
+
+// Backlighting
+extern backlight_config_t kb_backlight_config;
+extern bool kb_backlight_breathing;
+void backlight_init_ports(void);
+void backlight_set(uint8_t level);
+bool is_breathing(void);
+void breathing_enable(void);
+void breathing_disable(void);
+void load_custom_config(void);
+void save_backlight_config_to_eeprom(void);
diff --git a/keyboards/cannonkeys/stm32f072/led.c b/keyboards/cannonkeys/stm32f072/led.c
new file mode 100644
index 000000000..d69d94685
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/led.c
@@ -0,0 +1,252 @@
+/*
+Copyright 2012 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 "hal.h"
+#include "led_custom.h"
+#include "keyboard.h"
+#include "printf.h"
+
+static void breathing_callback(PWMDriver *pwmp);
+
+static PWMConfig pwmCFG = {
+ 0xFFFF, /* PWM clock frequency */
+ 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */
+ NULL, /* No Callback */
+ {
+ {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */
+ {PWM_OUTPUT_DISABLED, NULL},
+ {PWM_OUTPUT_DISABLED, NULL},
+ {PWM_OUTPUT_DISABLED, NULL}
+ },
+ 0, /* HW dependent part.*/
+ 0
+};
+
+static PWMConfig pwmCFG_breathing = {
+ 0xFFFF, /* 10kHz PWM clock frequency */
+ 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */
+ breathing_callback, /* Breathing Callback */
+ {
+ {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */
+ {PWM_OUTPUT_DISABLED, NULL},
+ {PWM_OUTPUT_DISABLED, NULL},
+ {PWM_OUTPUT_DISABLED, NULL}
+ },
+ 0, /* HW dependent part.*/
+ 0
+};
+
+// See http://jared.geek.nz/2013/feb/linear-led-pwm
+static uint16_t cie_lightness(uint16_t v) {
+ if (v <= 5243) // if below 8% of max
+ return v / 9; // same as dividing by 900%
+ else {
+ uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
+ // to get a useful result with integer division, we shift left in the expression above
+ // and revert what we've done again after squaring.
+ y = y * y * y >> 8;
+ if (y > 0xFFFFUL) // prevent overflow
+ return 0xFFFFU;
+ else
+ return (uint16_t) y;
+ }
+}
+
+
+uint8_t get_backlight_level(void){
+ return kb_backlight_config.level;
+}
+
+void backlight_init_ports(void) {
+ printf("backlight_init_ports()\n");
+ palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1));
+ pwmStart(&PWMD3, &pwmCFG);
+ // pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3, 0xFFFF,cie_lightness(0xFFFF)));
+ if(kb_backlight_config.enable){
+ if(kb_backlight_config.breathing){
+ breathing_enable();
+ } else{
+ backlight_set(kb_backlight_config.level);
+ }
+ } else {
+ backlight_set(0);
+ }
+
+}
+
+void backlight_set(uint8_t level) {
+ printf("backlight_set(%d)\n", level);
+ uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS));
+ printf("duty: (%d)\n", duty);
+ if (level == 0) {
+ // Turn backlight off
+ pwmDisableChannel(&PWMD3, 0);
+ } else {
+ // Turn backlight on
+ if(!is_breathing()){
+ pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty));
+ }
+ }
+}
+
+
+uint8_t backlight_tick = 0;
+
+void backlight_task(void) {
+}
+
+#define BREATHING_NO_HALT 0
+#define BREATHING_HALT_OFF 1
+#define BREATHING_HALT_ON 2
+#define BREATHING_STEPS 128
+
+static uint8_t breathing_period = BREATHING_PERIOD;
+static uint8_t breathing_halt = BREATHING_NO_HALT;
+static uint16_t breathing_counter = 0;
+
+bool is_breathing(void) {
+ return PWMD3.config == &pwmCFG_breathing;
+}
+
+#define breathing_min() do {breathing_counter = 0;} while (0)
+#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0)
+
+
+void breathing_interrupt_enable(void){
+ pwmStop(&PWMD3);
+ pwmStart(&PWMD3, &pwmCFG_breathing);
+ chSysLockFromISR();
+ pwmEnablePeriodicNotification(&PWMD3);
+ pwmEnableChannelI(
+ &PWMD3,
+ 0,
+ PWM_FRACTION_TO_WIDTH(
+ &PWMD3,
+ 0xFFFF,
+ 0xFFFF
+ )
+ );
+ chSysUnlockFromISR();
+}
+
+void breathing_interrupt_disable(void){
+ pwmStop(&PWMD3);
+ pwmStart(&PWMD3, &pwmCFG);
+}
+
+void breathing_enable(void)
+{
+ breathing_counter = 0;
+ breathing_halt = BREATHING_NO_HALT;
+ breathing_interrupt_enable();
+}
+
+void breathing_pulse(void)
+{
+ if (get_backlight_level() == 0)
+ breathing_min();
+ else
+ breathing_max();
+ breathing_halt = BREATHING_HALT_ON;
+ breathing_interrupt_enable();
+}
+
+void breathing_disable(void)
+{
+ printf("breathing_disable()\n");
+ breathing_interrupt_disable();
+ // Restore backlight level
+ backlight_set(get_backlight_level());
+}
+
+void breathing_self_disable(void)
+{
+ if (get_backlight_level() == 0)
+ breathing_halt = BREATHING_HALT_OFF;
+ else
+ breathing_halt = BREATHING_HALT_ON;
+}
+
+void breathing_toggle(void) {
+ if (is_breathing()){
+ printf("disable breathing\n");
+ breathing_disable();
+ } else {
+ printf("enable breathing\n");
+ breathing_enable();
+ }
+}
+
+void breathing_period_set(uint8_t value)
+{
+ if (!value)
+ value = 1;
+ breathing_period = value;
+}
+
+void breathing_period_default(void) {
+ breathing_period_set(BREATHING_PERIOD);
+}
+
+void breathing_period_inc(void)
+{
+ breathing_period_set(breathing_period+1);
+}
+
+void breathing_period_dec(void)
+{
+ breathing_period_set(breathing_period-1);
+}
+
+/* To generate breathing curve in python:
+ * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)]
+ */
+static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+// Use this before the cie_lightness function.
+static inline uint16_t scale_backlight(uint16_t v) {
+ return v / BACKLIGHT_LEVELS * get_backlight_level();
+}
+
+static void breathing_callback(PWMDriver *pwmp)
+{
+ (void)pwmp;
+ uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS;
+ // resetting after one period to prevent ugly reset at overflow.
+ breathing_counter = (breathing_counter + 1) % (breathing_period * 256);
+ uint8_t index = breathing_counter / interval % BREATHING_STEPS;
+
+ if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) ||
+ ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1)))
+ {
+ breathing_interrupt_disable();
+ }
+
+ uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256));
+
+ chSysLockFromISR();
+ pwmEnableChannelI(
+ &PWMD3,
+ 0,
+ PWM_FRACTION_TO_WIDTH(
+ &PWMD3,
+ 0xFFFF,
+ duty
+ )
+ );
+ chSysUnlockFromISR();
+}
diff --git a/keyboards/cannonkeys/stm32f072/led_custom.h b/keyboards/cannonkeys/stm32f072/led_custom.h
new file mode 100644
index 000000000..28e0f02ed
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/led_custom.h
@@ -0,0 +1,6 @@
+#pragma once
+
+void backlight_task(void);
+void breathing_interrupt_disable(void);
+void breathing_interrupt_enable(void);
+void breathing_toggle(void);
diff --git a/keyboards/cannonkeys/stm32f072/ws2812.c b/keyboards/cannonkeys/stm32f072/ws2812.c
new file mode 100644
index 000000000..665763931
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/ws2812.c
@@ -0,0 +1,150 @@
+#include "ch.h"
+#include "hal.h"
+
+#include "ws2812.h"
+
+#define BYTES_FOR_LED_BYTE 4
+#define NB_COLORS 3
+#define BYTES_FOR_LED BYTES_FOR_LED_BYTE*NB_COLORS
+#define DATA_SIZE BYTES_FOR_LED*NB_LEDS
+#define RESET_SIZE 200
+
+// Define the spi your LEDs are plugged to here
+#define LEDS_SPI WS2812_SPI
+// Define the number of LEDs you wish to control in your LED strip
+#define NB_LEDS RGBLED_NUM
+
+#define LED_SPIRAL 0
+
+static uint8_t txbuf[DATA_SIZE + RESET_SIZE];
+static uint8_t get_protocol_eq(uint8_t data, int pos);
+
+/*
+ * This lib is meant to be used asynchronously, thus the colors contained in
+ * the txbuf will be sent in loop, so that the colors are always the ones you
+ * put in the table (the user thus have less to worry about)
+ *
+ * Since the data are sent via DMA, and the call to spiSend is a blocking one,
+ * the processor ressources are not used to much, if you see your program being
+ * too slow, simply add a:
+ * chThdSleepMilliseconds(x);
+ * after the spiSend, where you increment x untill you are satisfied with your
+ * program speed, another trick may be to lower this thread priority : your call
+ */
+static THD_WORKING_AREA(LEDS_THREAD_WA, 128);
+static THD_FUNCTION(ledsThread, arg) {
+ (void) arg;
+ while(1){
+ spiSend(&LEDS_SPI, DATA_SIZE + RESET_SIZE, txbuf);
+ }
+}
+
+#if LED_SPIRAL
+/*
+ * 'Led spiral' is a simple demo in which we put all the leds to the same
+ * color, where this color does all the hsv circle in loop.
+ * If you want to launch the thread that will chage the led colors to the
+ * appropriate value, simply set LED_SPIRAL to 1.
+ */
+
+static THD_WORKING_AREA(HSVTRANS_WA, 128);
+static THD_FUNCTION(hsv_transThread, arg) {
+ (void) arg;
+ hsv_color color = {0, 255, 255};
+ while(1){
+ color.h += 1;
+ color.h %= 256;
+ set_leds_color_hsv(color);
+ chThdSleepMilliseconds(50);
+ }
+}
+#endif
+
+static const SPIConfig spicfg = {
+ NULL,
+ GPIOB,
+ 15,
+ SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us
+};
+
+/*
+ * Function used to initialize the driver.
+ *
+ * Starts by shutting off all the LEDs.
+ * Then gets access on the LED_SPI driver.
+ * May eventually launch an animation on the LEDs (e.g. a thread setting the
+ * txbuff values)
+ */
+void leds_init(void){
+ for(int i = 0; i < RESET_SIZE; i++)
+ txbuf[DATA_SIZE+i] = 0x00;
+ spiAcquireBus(&LEDS_SPI); /* Acquire ownership of the bus. */
+ spiStart(&LEDS_SPI, &spicfg); /* Setup transfer parameters. */
+ spiSelect(&LEDS_SPI); /* Slave Select assertion. */
+ chThdCreateStatic(LEDS_THREAD_WA, sizeof(LEDS_THREAD_WA),NORMALPRIO, ledsThread, NULL);
+#if LED_SPIRAL
+ chThdCreateStatic(HSVTRANS_WA, sizeof(HSVTRANS_WA),
+ NORMALPRIO, hsv_transThread, NULL);
+#endif
+}
+
+/*
+ * As the trick here is to use the SPI to send a huge pattern of 0 and 1 to
+ * the ws2812b protocol, we use this helper function to translate bytes into
+ * 0s and 1s for the LED (with the appropriate timing).
+ */
+static uint8_t get_protocol_eq(uint8_t data, int pos){
+ uint8_t eq = 0;
+ if (data & (1 << (2*(3-pos))))
+ eq = 0b1110;
+ else
+ eq = 0b1000;
+ if (data & (2 << (2*(3-pos))))
+ eq += 0b11100000;
+ else
+ eq += 0b10000000;
+ return eq;
+}
+
+//
+///*
+// * If you want to set a LED's color in the RGB color space, simply call this
+// * function with a hsv_color containing the desired color and the index of the
+// * led on the LED strip (starting from 0, the first one being the closest the
+// * first plugged to the board)
+// *
+// * Only set the color of the LEDs through the functions given by this API
+// * (unless you really know what you are doing)
+// */
+void set_led_color_rgb(LED_TYPE color, int pos){
+ for(int j = 0; j < 4; j++)
+ txbuf[BYTES_FOR_LED*pos + j] = get_protocol_eq(color.g, j);
+ for(int j = 0; j < 4; j++)
+ txbuf[BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE+j] = get_protocol_eq(color.r, j);
+ for(int j = 0; j < 4; j++)
+ txbuf[BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE*2+j] = get_protocol_eq(color.b, j);
+}
+
+
+void WS2812_init(void) {
+ leds_init();
+}
+
+void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) {
+ uint8_t i = 0;
+ while (i < number_of_leds) {
+ set_led_color_rgb(ledarray[i], i);
+ i++;
+ }
+}
+
+
+void set_leds_color_rgb(LED_TYPE color){
+ for(int i = 0; i < NB_LEDS; i++)
+ set_led_color_rgb(color, i);
+}
+
+
+void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds) {
+
+}
diff --git a/keyboards/cannonkeys/stm32f072/ws2812.h b/keyboards/cannonkeys/stm32f072/ws2812.h
new file mode 100644
index 000000000..3b61ddcfa
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/ws2812.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "hal.h"
+#include "rgblight_types.h"
+
+
+void set_leds_color_rgb(LED_TYPE color);
+void set_led_color_rgb(LED_TYPE color, int pos);
+void leds_init(void);
+
+
+ // This is what users will use to interface with this
+void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
+void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
+
+
+void WS2812_init(void);
+void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue );
+void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
+void WS2812_send_colors(void);
diff --git a/keyboards/chibios_test/keymaps/default/keymap.c b/keyboards/chibios_test/keymaps/default/keymap.c
index 11616cf55..0edc697bf 100644
--- a/keyboards/chibios_test/keymaps/default/keymap.c
+++ b/keyboards/chibios_test/keymaps/default/keymap.c
@@ -15,7 +15,7 @@ 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 "chibios_test.h"
+#include QMK_KEYBOARD_H
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{{KC_CAPS}}, // test with KC_CAPS, KC_A, RESET
diff --git a/keyboards/christmas_tree/keymaps/default/config.h b/keyboards/christmas_tree/keymaps/default/config.h
index 4553e621d..271f48d00 100644
--- a/keyboards/christmas_tree/keymaps/default/config.h
+++ b/keyboards/christmas_tree/keymaps/default/config.h
@@ -1,6 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
-
-#endif \ No newline at end of file
+// place overrides here
diff --git a/keyboards/ckeys/obelus/keymaps/default/config.h b/keyboards/ckeys/obelus/keymaps/default/config.h
index 04bf9f4a9..271f48d00 100644
--- a/keyboards/ckeys/obelus/keymaps/default/config.h
+++ b/keyboards/ckeys/obelus/keymaps/default/config.h
@@ -1,6 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
-// Add overrides here
-#endif
+// place overrides here
diff --git a/keyboards/ckeys/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c
index bdad1caca..f71ac5627 100644
--- a/keyboards/ckeys/obelus/keymaps/default/keymap.c
+++ b/keyboards/ckeys/obelus/keymaps/default/keymap.c
@@ -1,7 +1,4 @@
#include QMK_KEYBOARD_H
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
extern keymap_config_t keymap_config;
diff --git a/keyboards/claw44/claw44.c b/keyboards/claw44/claw44.c
new file mode 100644
index 000000000..f564fb623
--- /dev/null
+++ b/keyboards/claw44/claw44.c
@@ -0,0 +1,10 @@
+#include "claw44.h"
+#include "ssd1306.h"
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+#ifdef SSD1306OLED
+ return process_record_gfx(keycode,record) && process_record_user(keycode, record);
+#else
+ return process_record_user(keycode, record);
+#endif
+}
diff --git a/keyboards/claw44/claw44.h b/keyboards/claw44/claw44.h
new file mode 100644
index 000000000..4ca25fcb2
--- /dev/null
+++ b/keyboards/claw44/claw44.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#ifdef KEYBOARD_claw44_rev1
+ #include "rev1.h"
+#endif
diff --git a/keyboards/orthodox/config.h b/keyboards/claw44/config.h
index 821cd7e29..fb1cdf396 100644
--- a/keyboards/orthodox/config.h
+++ b/keyboards/claw44/config.h
@@ -1,9 +1,6 @@
/*
-This is the c configuration file for the keyboard
-
Copyright 2012 Jun Wako <wakojun@gmail.com>
-Copyright 2017 Jack Humbert
-Copyright 2017 Art Ortenburger
+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
@@ -19,9 +16,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
-
-#endif
+#include <serial_config.h>
+
+#define USE_I2C
+#define USE_SERIAL
+
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/orthodox/i2c.c b/keyboards/claw44/i2c.c
index 084c890c4..4bee5c639 100644
--- a/keyboards/orthodox/i2c.c
+++ b/keyboards/claw44/i2c.c
@@ -34,7 +34,7 @@ void i2c_delay(void) {
// _delay_us(100);
}
-// Setup twi to run at 100kHz
+// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK)
void i2c_master_init(void) {
// no prescaler
TWSR = 0;
diff --git a/keyboards/orthodox/i2c.h b/keyboards/claw44/i2c.h
index 2af843ff6..710662c7a 100644
--- a/keyboards/orthodox/i2c.h
+++ b/keyboards/claw44/i2c.h
@@ -1,8 +1,6 @@
-#ifndef I2C_H
-#define I2C_H
+#pragma once
#include <stdint.h>
-#include "matrix.h"
#ifndef F_CPU
#define F_CPU 16000000UL
@@ -16,8 +14,8 @@
#define SLAVE_BUFFER_SIZE 0x10
-// i2c SCL clock frequency
-#define SCL_CLOCK 100000UL
+// i2c SCL clock frequency 400kHz
+#define SCL_CLOCK 400000L
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
@@ -46,5 +44,3 @@ extern unsigned char i2c_readNak(void);
extern unsigned char i2c_read(unsigned char ack);
#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
-
-#endif
diff --git a/keyboards/facew/i2c.h b/keyboards/claw44/keymaps/default/config.h
index 93a69c94d..eff6ad3c7 100644
--- a/keyboards/facew/i2c.h
+++ b/keyboards/claw44/keymaps/default/config.h
@@ -1,5 +1,8 @@
/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+This is the c configuration file for the keymap
+
+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
@@ -15,13 +18,18 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Please do not modify this file
+#pragma once
+
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
-#ifndef __I2C_H__
-#define __I2C_H__
+#define SSD1306OLED
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
+#define USE_SERIAL_PD2
-#endif
+#define TAPPING_TERM 200
diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c
new file mode 100644
index 000000000..c34657125
--- /dev/null
+++ b/keyboards/claw44/keymaps/default/keymap.c
@@ -0,0 +1,169 @@
+#include QMK_KEYBOARD_H
+#ifdef PROTOCOL_LUFA
+ #include "lufa.h"
+ #include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+extern keymap_config_t keymap_config;
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE
+};
+
+enum macro_keycodes {
+ KC_SAMPLEMACRO,
+};
+
+#define KC_ KC_TRNS
+#define KC_RST RESET
+#define KC_L_SPC LT(_LOWER, KC_SPC) // lower
+#define KC_R_ENT LT(_RAISE, KC_ENT) // raise
+#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win
+#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win
+#define KC_C_BS LCTL_T(KC_BSPC) // ctrl
+#define KC_A_DEL ALT_T(KC_DEL) // alt
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT( \
+ //,--------+--------+---------+--------+---------+--------. ,--------+---------+--------+---------+--------+--------.
+ KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS,
+ //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------|
+ KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT,
+ //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------|
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT,
+ //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------'
+ KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL
+ // `----------+--------+---------+--------' `--------+---------+--------+---------'
+ ),
+
+ // \ ^ ! & | @ = + * % -
+ // ( # $ " ' ~ ← ↓ ↑ → ` )
+ // { [ ] }
+
+ [_RAISE] = LAYOUT( \
+ //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
+ _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______,
+ //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------'
+ _______, _______, _______, _______, _______, _______, _______, RESET
+ // `--------+--------+--------+--------' `--------+--------+--------+--------'
+ ),
+
+ [_LOWER] = LAYOUT( \
+ //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
+ KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______,
+ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
+ KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______,
+ //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------'
+ RESET , _______, _______, _______, _______, _______, _______, _______
+ // `--------+--------+--------+--------' `--------+--------+--------+--------'
+ ),
+};
+
+void matrix_init_user(void) {
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_layer_state(void);
+const char *read_logo(void);
+void set_keylog(uint16_t keycode, keyrecord_t *record);
+const char *read_keylog(void);
+const char *read_keylogs(void);
+
+// const char *read_mode_icon(bool swap);
+// const char *read_host_led_state(void);
+// void set_timelog(void);
+// const char *read_timelog(void);
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (is_master) {
+ // If you want to change the display of OLED, you need to change here
+ matrix_write_ln(matrix, read_layer_state());
+ matrix_write_ln(matrix, read_keylog());
+ matrix_write_ln(matrix, read_keylogs());
+ //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
+ //matrix_write_ln(matrix, read_host_led_state());
+ //matrix_write_ln(matrix, read_timelog());
+ } else {
+ matrix_write(matrix, read_logo());
+ }
+}
+
+void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+#endif//SSD1306OLED
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+#ifdef SSD1306OLED
+ set_keylog(keycode, record);
+#endif
+ // set_timelog();
+ }
+
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/claw44/keymaps/yfuku/config.h b/keyboards/claw44/keymaps/yfuku/config.h
new file mode 100644
index 000000000..244ffa709
--- /dev/null
+++ b/keyboards/claw44/keymaps/yfuku/config.h
@@ -0,0 +1,36 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+#define SSD1306OLED
+
+#define USE_SERIAL_PD2
+
+#define TAPPING_TERM 180
+#define IGNORE_MOD_TAP_INTERRUPT
diff --git a/keyboards/claw44/keymaps/yfuku/keymap.c b/keyboards/claw44/keymaps/yfuku/keymap.c
new file mode 100644
index 000000000..77d459b92
--- /dev/null
+++ b/keyboards/claw44/keymaps/yfuku/keymap.c
@@ -0,0 +1,221 @@
+#include QMK_KEYBOARD_H
+#ifdef PROTOCOL_LUFA
+ #include "lufa.h"
+ #include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+extern keymap_config_t keymap_config;
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE
+};
+
+enum macro_keycodes {
+ KC_SAMPLEMACRO,
+};
+
+// common
+#define KC_ KC_TRNS
+#define KC_XXXX KC_NO
+#define KC_RST RESET
+#define KC_VD KC__VOLDOWN
+#define KC_VU KC__VOLUP
+
+// layer
+#define KC_L_SPC LT(_LOWER, KC_SPC)
+#define KC_R_ENT LT(_RAISE, KC_ENT)
+
+// shift_t
+#define KC_S_TAB LSFT_T(KC_TAB)
+#define KC_S_ESC LSFT_T(KC_ESC)
+#define KC_S_JA LSFT_T(KC_LANG1)
+#define KC_S_EN LSFT_T(KC_LANG2)
+
+// cmd_t
+#define KC_M_F LCMD_T(KC_F)
+#define KC_M_D LCMD_T(KC_D)
+#define KC_M_J LCMD_T(KC_J)
+#define KC_M_K LCMD_T(KC_K)
+
+// ctl_t
+#define KC_C_S LCTL_T(KC_S)
+#define KC_C_L LCTL_T(KC_L)
+#define KC_C_BS LCTL_T(KC_BSPC)
+
+// alt_t
+#define KC_A_D ALT_T(KC_D)
+#define KC_A_K ALT_T(KC_K)
+#define KC_A_Z ALT_T(KC_Z)
+#define KC_A_SL ALT_T(KC_SLSH)
+#define KC_A_DEL ALT_T(KC_DEL)
+
+// cmd+shift_t
+#define KC_MS_Q SCMD_T(KC_Q)
+#define KC_MS_A SCMD_T(KC_A)
+#define KC_MS_S SCMD_T(KC_S)
+#define KC_MS_SC SCMD_T(KC_SCLN)
+#define KC_MS_ESC SCMD_T(KC_ESC)
+
+//
+#define KC_MR RCMD(KC_R)
+#define KC_MF RCMD(KC_F)
+#define KC_MW RCMD(KC_W)
+#define KC_MX RCMD(KC_X)
+#define KC_MC RCMD(KC_C)
+#define KC_MV RCMD(KC_V)
+#define KC_MTAB RCMD(KC_TAB)
+#define KC_MSF RCMD(RSFT(KC_F))
+#define KC_MSR RCMD(RSFT(KC_R))
+#define KC_MST RCMD(RSFT(KC_T))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ // M_ = LCMD_T(
+ // A_ = ALT_T(
+ // C_ = LCTL_T(
+ // MS_ = SMD_T(
+ // R_ = LT(_RAISE
+ // L_ = LT(_LOWER
+
+ [_QWERTY] = LAYOUT_kc( \
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ ESC , Q , W , E , R , T , Y , U , I , O , P ,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ S_TAB, A ,C_S , D ,M_F , G , H ,M_J , K ,C_L ,SCLN,S_ESC,
+ //|----+----+----+----+----+----+ |----+----+----+----+----+----|
+ , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, ,
+ //`----+----+----+----+----+----/ \----+----+----+----+----+----'
+ A_DEL,S_EN,L_SPC,C_BS, C_BS,R_ENT,S_JA,A_DEL
+ // `----+----+----+----' `----+----+----+----'
+ ),
+
+ // \ ^ ! & | @ = + * % -
+ // ( # $ " ' ~ ← ↓ ↑ → ` )
+ // { [ ] }
+
+ [_RAISE] = LAYOUT_kc( \
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ ,BSLS,CIRC,EXLM,AMPR,PIPE, AT ,EQL ,PLUS,ASTR,PERC,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LPRN,HASH,DLR ,DQT ,QUOT,TILD, LEFT,DOWN, UP ,RGHT,GRV ,RPRN,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , ,LCBR,LBRC, RBRC,RCBR, , , , ,
+ //`----+----+----+----+----+----/ \----+----+----+----+----+----'
+ , ,BSPC, , , , ,RST
+ // `----+----+----+----' `----+----+----+----'
+ ),
+
+ [_LOWER] = LAYOUT_kc( \
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ , , ,MSF ,MSR ,MST , ,EQL ,PLUS,ASTR,PERC,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , , , , , ,COMM,DOT ,SLSH, ,
+ //`----+----+----+--+-+----+----/ \----+----+----+----+----+----'
+ RST , , , , ,DEL , ,
+ // `----+----+----+----' `----+----+----+----'
+ ),
+};
+
+void matrix_init_user(void) {
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_layer_state(void);
+const char *read_logo(void);
+void set_keylog(uint16_t keycode, keyrecord_t *record);
+const char *read_keylog(void);
+const char *read_keylogs(void);
+
+// const char *read_mode_icon(bool swap);
+// const char *read_host_led_state(void);
+// void set_timelog(void);
+// const char *read_timelog(void);
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (is_master) {
+ // If you want to change the display of OLED, you need to change here
+ matrix_write_ln(matrix, read_layer_state());
+ matrix_write_ln(matrix, read_keylog());
+ matrix_write_ln(matrix, read_keylogs());
+ //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
+ //matrix_write_ln(matrix, read_host_led_state());
+ //matrix_write_ln(matrix, read_timelog());
+ } else {
+ matrix_write(matrix, read_logo());
+ }
+}
+
+void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+#endif//SSD1306OLED
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+#ifdef SSD1306OLED
+ set_keylog(keycode, record);
+#endif
+ // set_timelog();
+ }
+
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c
new file mode 100644
index 000000000..91f53d9c2
--- /dev/null
+++ b/keyboards/claw44/lib/glcdfont.c
@@ -0,0 +1,243 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+
+#ifndef FONT5X7_H
+#define FONT5X7_H
+
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/pgmspace.h>
+#elif defined(ESP8266)
+ #include <pgmspace.h>
+#else
+ #define PROGMEM
+#endif
+
+// Standard ASCII 5x7 font
+const unsigned char font[] PROGMEM = {
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
+0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
+0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
+0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
+0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x80, 0x80, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
+ 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0xC0, 0xF0, 0xF8, 0xF8,
+ 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
+0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
+0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
+0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
+0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
+0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
+0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
+0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE,
+ 0xFF, 0x1F, 0x07, 0x07, 0x07, 0x07,
+ 0x1F, 0x1F, 0x1F, 0x1E, 0x18, 0x00,
+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
+ 0x00, 0x00, 0x00, 0x9E, 0xDF, 0xDF,
+ 0xCF, 0xC7, 0xE7, 0xE7, 0xE7, 0xFF,
+ 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x03,
+ 0x3F, 0xFF, 0xFF, 0xFE, 0xC0, 0x00,
+ 0xF0, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF,
+ 0xF0, 0x00, 0xC0, 0xFC, 0xFF, 0xFF,
+ 0x3F, 0x03, 0x00, 0xC0, 0xF0, 0xF8,
+ 0xFE, 0x9F, 0x87, 0x83, 0x80, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x00,
+ 0x00, 0xE0, 0xF8, 0xFC, 0xBF, 0x8F,
+ 0x83, 0x81, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
+0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
+0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
+0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
+0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
+0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
+0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
+0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x07, 0x1F, 0x3F,
+ 0x7F, 0x7C, 0x78, 0x70, 0x70, 0x78,
+ 0x7E, 0x3E, 0x3E, 0x0E, 0x06, 0x00,
+ 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00,
+ 0x00, 0x00, 0x1F, 0x3F, 0x7F, 0x7F,
+ 0x79, 0x71, 0x70, 0x30, 0x38, 0x3F,
+ 0x7F, 0x7F, 0x7F, 0x60, 0x00, 0x00,
+ 0x00, 0x01, 0x1F, 0x7F, 0x7F, 0x7E,
+ 0x7F, 0x1F, 0x01, 0x00, 0x01, 0x3F,
+ 0x7F, 0x7E, 0x7F, 0x7F, 0x0F, 0x01,
+ 0x00, 0x00, 0x00, 0x03, 0x03, 0x03,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x7F,
+ 0x7F, 0x7F, 0x7F, 0x03, 0x03, 0x00,
+ 0x00, 0x03, 0x03, 0x03, 0x03, 0x03,
+ 0x03, 0x03, 0x7F, 0x7F, 0x7F, 0x7F,
+ 0x07, 0x03, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+#endif // FONT5X7_H
diff --git a/keyboards/claw44/lib/host_led_state_reader.c b/keyboards/claw44/lib/host_led_state_reader.c
new file mode 100644
index 000000000..980823b31
--- /dev/null
+++ b/keyboards/claw44/lib/host_led_state_reader.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include "claw44.h"
+
+char host_led_state_str[24];
+
+const char *read_host_led_state(void)
+{
+ uint8_t leds = host_keyboard_leds();
+ snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
+ (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
+ (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
+ (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- ");
+
+ return host_led_state_str;
+}
diff --git a/keyboards/claw44/lib/keylogger.c b/keyboards/claw44/lib/keylogger.c
new file mode 100644
index 000000000..092b6929b
--- /dev/null
+++ b/keyboards/claw44/lib/keylogger.c
@@ -0,0 +1,45 @@
+#include <stdio.h>
+#include "claw44.h"
+
+char keylog_str[24] = {};
+char keylogs_str[21] = {};
+int keylogs_str_idx = 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 set_keylog(uint16_t keycode, keyrecord_t *record) {
+ char name = ' ';
+ if (keycode < 60) {
+ name = code_to_name[keycode];
+ }
+
+ // update keylog
+ snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
+ record->event.key.row, record->event.key.col,
+ keycode, name);
+
+ // update keylogs
+ if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
+ keylogs_str_idx = 0;
+ for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
+ keylogs_str[i] = ' ';
+ }
+ }
+
+ keylogs_str[keylogs_str_idx] = name;
+ keylogs_str_idx++;
+}
+
+const char *read_keylog(void) {
+ return keylog_str;
+}
+
+const char *read_keylogs(void) {
+ return keylogs_str;
+}
diff --git a/keyboards/claw44/lib/layer_state_reader.c b/keyboards/claw44/lib/layer_state_reader.c
new file mode 100644
index 000000000..d92b6df58
--- /dev/null
+++ b/keyboards/claw44/lib/layer_state_reader.c
@@ -0,0 +1,35 @@
+
+#include QMK_KEYBOARD_H
+#include <stdio.h>
+#include "claw44.h"
+
+#define L_BASE 0
+#define L_LOWER (1<<_LOWER)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+char layer_state_str[24];
+
+const char *read_layer_state(void) {
+ switch (layer_state)
+ {
+ case L_BASE:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default");
+ break;
+ case L_RAISE:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
+ break;
+ case L_LOWER:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
+ break;
+ case L_ADJUST:
+ case L_ADJUST_TRI:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
+ break;
+ default:
+ snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
+ }
+
+ return layer_state_str;
+}
diff --git a/keyboards/claw44/lib/logo_reader.c b/keyboards/claw44/lib/logo_reader.c
new file mode 100644
index 000000000..b5b437b2b
--- /dev/null
+++ b/keyboards/claw44/lib/logo_reader.c
@@ -0,0 +1,11 @@
+#include "claw44.h"
+
+const char *read_logo(void) {
+ static char logo[] = {
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
+ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
+ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
+ 0};
+
+ return logo;
+}
diff --git a/keyboards/claw44/lib/mode_icon_reader.c b/keyboards/claw44/lib/mode_icon_reader.c
new file mode 100644
index 000000000..a9272bb9a
--- /dev/null
+++ b/keyboards/claw44/lib/mode_icon_reader.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include "claw44.h"
+
+char mode_icon[24];
+
+const char *read_mode_icon(bool swap) {
+ static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}};
+ if (swap == false) {
+ snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]);
+ } else {
+ snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]);
+ }
+
+ return mode_icon;
+}
diff --git a/keyboards/claw44/lib/rgb_state_reader.c b/keyboards/claw44/lib/rgb_state_reader.c
new file mode 100644
index 000000000..e0efe2e52
--- /dev/null
+++ b/keyboards/claw44/lib/rgb_state_reader.c
@@ -0,0 +1,15 @@
+#ifdef RGBLIGHT_ENABLE
+
+#include QMK_KEYBOARD_H
+#include <stdio.h>
+
+extern rgblight_config_t rgblight_config;
+char rbf_info_str[24];
+const char *read_rgb_info(void) {
+
+ snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d",
+ rgblight_config.enable ? "on" : "- ", rgblight_config.mode,
+ rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
+ return rbf_info_str;
+}
+#endif
diff --git a/keyboards/claw44/lib/timelogger.c b/keyboards/claw44/lib/timelogger.c
new file mode 100644
index 000000000..ecd4ed3ea
--- /dev/null
+++ b/keyboards/claw44/lib/timelogger.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include "claw44.h"
+
+char timelog_str[24] = {};
+int last_time = 0;
+int elapsed_time = 0;
+
+void set_timelog(void) {
+ elapsed_time = timer_elapsed(last_time);
+ last_time = timer_read();
+ snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time);
+}
+
+const char *read_timelog(void) {
+ return timelog_str;
+}
diff --git a/keyboards/claw44/readme.md b/keyboards/claw44/readme.md
new file mode 100644
index 000000000..7e72e0897
--- /dev/null
+++ b/keyboards/claw44/readme.md
@@ -0,0 +1,15 @@
+# Claw44
+
+![Claw44](https://i.imgur.com/5a8iogl.jpg)
+
+A split keyboard with 3x6 vertically staggered keys and 4 thumb keys.
+
+Keyboard Maintainer: [@yfuku_](https://twitter.com/yfuku_)
+Hardware Supported: Claw44 PCB, ProMicro
+Hardware Availability: https://yfuku.booth.pm/
+
+Make example for this keyboard (after setting up your build environment):
+
+ make claw44: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/claw44/rev1/config.h b/keyboards/claw44/rev1/config.h
new file mode 100644
index 000000000..ba2ed4559
--- /dev/null
+++ b/keyboards/claw44/rev1/config.h
@@ -0,0 +1,76 @@
+/*
+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/>.
+*/
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x3060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER yfuku
+#define PRODUCT claw44
+#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 7
+#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
+
+// wiring of each half
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
+// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/* ws2812 RGB LED */
+/*
+#define RGB_DI_PIN D3
+
+#define RGBLED_NUM 12 // Number of LEDs
+*/
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/orthodox/matrix.c b/keyboards/claw44/rev1/matrix.c
index 2ca5f4d87..718cc5744 100644
--- a/keyboards/orthodox/matrix.c
+++ b/keyboards/claw44/rev1/matrix.c
@@ -20,10 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
-#ifdef USE_I2C
-// provides memcpy for copying TWI slave buffer
-// #include <string.h>
-#endif
+#include <string.h>
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>
@@ -34,12 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "matrix.h"
#include "split_util.h"
#include "pro_micro.h"
-#include "config.h"
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
# include "i2c.h"
#else // USE_SERIAL
-# include "serial.h"
+# include "split_scomm.h"
#endif
#ifndef DEBOUNCE
@@ -51,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static uint8_t debouncing = DEBOUNCE;
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
static uint8_t error_count = 0;
+uint8_t is_master = 0 ;
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
@@ -63,6 +60,7 @@ static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
+static uint8_t matrix_master_scan(void);
__attribute__ ((weak))
@@ -105,6 +103,8 @@ void matrix_init(void)
init_cols();
TX_RX_LED_INIT;
+ TXLED0;
+ RXLED0;
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@@ -112,12 +112,14 @@ void matrix_init(void)
matrix_debouncing[i] = 0;
}
+ is_master = has_usb();
+
matrix_init_quantum();
}
uint8_t _matrix_scan(void)
{
- // Right hand is stored after the left in the matrix so, we need to offset it
+ // Right hand is stored after the left in the matirx so, we need to offset it
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
@@ -144,7 +146,7 @@ uint8_t _matrix_scan(void)
return 1;
}
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
// Get rows from other half over i2c
int i2c_transaction(void) {
@@ -162,31 +164,14 @@ int i2c_transaction(void) {
if (err) goto i2c_error;
if (!err) {
- /*
- // read from TWI byte-by-byte into matrix_row_t memory space
- size_t i;
- for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) {
- *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK);
+ int i;
+ for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+ matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
}
- // last byte to be read / end of chunk
- *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK);
- */
-
- // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8)
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+0] = i2c_master_read(I2C_ACK);
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\
- | (matrix[slaveOffset+0]&0x40U)<<2;
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\
- | (matrix[slaveOffset+0]&0x80U)<<1;
- // clear highest two bits on row 1, where the col9 bits were transported
- matrix[slaveOffset+0] &= 0x3F;
-
+ matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
i2c_master_stop();
} else {
-i2c_error: // the cable is disconnected, or something else went wrong
+i2c_error: // the cable is disconnceted, or something else went wrong
i2c_reset_state();
return err;
}
@@ -196,30 +181,64 @@ i2c_error: // the cable is disconnected, or something else went wrong
#else // USE_SERIAL
-int serial_transaction(void) {
+int serial_transaction(int master_changed) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
-
- if (serial_update_buffers()) {
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+ int ret=serial_update_buffers(master_changed);
+#else
+ int ret=serial_update_buffers();
+#endif
+ if (ret ) {
+ if(ret==2) RXLED1;
return 1;
}
-
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[slaveOffset+i] = serial_slave_buffer[i];
- }
+ RXLED0;
+ memcpy(&matrix[slaveOffset],
+ (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
return 0;
}
#endif
uint8_t matrix_scan(void)
{
+ if (is_master) {
+ matrix_master_scan();
+ }else{
+ matrix_slave_scan();
+ int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
+ memcpy(&matrix[offset],
+ (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH);
+ matrix_scan_quantum();
+ }
+ return 1;
+}
+
+
+uint8_t matrix_master_scan(void) {
+
int ret = _matrix_scan();
+ int mchanged = 1;
+ int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
+#ifdef USE_MATRIX_I2C
+// for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ /* i2c_slave_buffer[i] = matrix[offset+i]; */
+// i2c_slave_buffer[i] = matrix[offset+i];
+// }
+#else // USE_SERIAL
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ mchanged = memcmp((void *)serial_master_buffer,
+ &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH);
+ #endif
+ memcpy((void *)serial_master_buffer,
+ &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH);
+#endif
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
if( i2c_transaction() ) {
#else // USE_SERIAL
- if( serial_transaction() ) {
+ if( serial_transaction(mchanged) ) {
#endif
// turn on the indicator led when halves are disconnected
TXLED1;
@@ -247,29 +266,25 @@ void matrix_slave_scan(void) {
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
-#ifdef USE_I2C
- // SLAVE_BUFFER_SIZE is from i2c.h
- // (MATRIX_ROWS/2*sizeof(matrix_row_t))
- // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t)));
-
- // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8)
- i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\
- | (matrix[offset+1]&0x100U)>>2\
- | (matrix[offset+2]&0x100U)>>1;
- i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]);
- i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]);
- // note: looks like a possible operator-precedence bug here, in last version?
- /*
- i2c_slave_buffer[1] = (uint8_t)matrix[offset+0];
- i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8);
- i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8);
- i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8);
- i2c_slave_buffer[5] = (uint8_t)matrix[offset+2];
- */
+#ifdef USE_MATRIX_I2C
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ /* i2c_slave_buffer[i] = matrix[offset+i]; */
+ i2c_slave_buffer[i] = matrix[offset+i];
+ }
#else // USE_SERIAL
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ int change = 0;
+ #endif
for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ if( serial_slave_buffer[i] != matrix[offset+i] )
+ change = 1;
+ #endif
serial_slave_buffer[i] = matrix[offset+i];
}
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ slave_buffer_change_count += change;
+ #endif
#endif
}
diff --git a/keyboards/claw44/rev1/rev1.c b/keyboards/claw44/rev1/rev1.c
new file mode 100644
index 000000000..9529636f5
--- /dev/null
+++ b/keyboards/claw44/rev1/rev1.c
@@ -0,0 +1,8 @@
+#include "claw44.h"
+
+#ifdef SSD1306OLED
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ //led_set_user(usb_led);
+}
+#endif
diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h
new file mode 100644
index 000000000..f7ec2cbfe
--- /dev/null
+++ b/keyboards/claw44/rev1/rev1.h
@@ -0,0 +1,57 @@
+#pragma once
+
+#include "../claw44.h"
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+#ifdef RGBLIGHT_ENABLE
+//rgb led driver
+#include "ws2812.h"
+#endif
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/interrupt.h>
+#endif
+#endif
+
+//void promicro_bootloader_jmp(bool program);
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, R30, R31, R32, R33 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05 }, \
+ { L10, L11, L12, L13, L14, L15 }, \
+ { L20, L21, L22, L23, L24, L25 }, \
+ { KC_NO, KC_NO, L30, L31, L32, L33 }, \
+ { R05, R04, R03, R02, R01, R00 }, \
+ { R15, R14, R13, R12, R11, R10 }, \
+ { R25, R24, R23, R22, R21, R20 }, \
+ { KC_NO, KC_NO, R33, R32, R31, R30 } \
+ }
+
+#define LAYOUT_kc( \
+ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
+ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
+ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
+ L30, L31, L32, L33, R30, R31, R32, R33 \
+ ) \
+ LAYOUT( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \
+ )
+
+enum layer_number {
+ _QWERTY = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk
new file mode 100644
index 000000000..ae95ec401
--- /dev/null
+++ b/keyboards/claw44/rev1/rules.mk
@@ -0,0 +1,31 @@
+SRC += rev1/matrix.c
+SRC += rev1/split_util.c
+SRC += rev1/split_scomm.c
+
+# Build Options
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./lib/glcdfont.c \
+ ./lib/layer_state_reader.c \
+ ./lib/logo_reader.c \
+ ./lib/keylogger.c \
+ # ./lib/rgb_state_reader.c \
+ # ./lib/mode_icon_reader.c \
+ # ./lib/host_led_state_reader.c \
+ # ./lib/timelogger.c \
diff --git a/keyboards/claw44/rev1/serial_config.h b/keyboards/claw44/rev1/serial_config.h
new file mode 100644
index 000000000..4fab8e8dd
--- /dev/null
+++ b/keyboards/claw44/rev1/serial_config.h
@@ -0,0 +1,4 @@
+#ifndef SOFT_SERIAL_PIN
+#define SOFT_SERIAL_PIN D2
+#define SERIAL_USE_MULTI_TRANSACTION
+#endif
diff --git a/keyboards/claw44/rev1/split_scomm.c b/keyboards/claw44/rev1/split_scomm.c
new file mode 100644
index 000000000..a1fe6ba5b
--- /dev/null
+++ b/keyboards/claw44/rev1/split_scomm.c
@@ -0,0 +1,91 @@
+#ifdef USE_SERIAL
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE flexible API (using multi-type transaction function) --- */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <split_scomm.h>
+#include "serial.h"
+#ifdef CONSOLE_ENABLE
+ #include <print.h>
+#endif
+
+uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+uint8_t volatile status_com = 0;
+uint8_t volatile status1 = 0;
+uint8_t slave_buffer_change_count = 0;
+uint8_t s_change_old = 0xff;
+uint8_t s_change_new = 0xff;
+
+SSTD_t transactions[] = {
+#define GET_SLAVE_STATUS 0
+ /* master buffer not changed, only recive slave_buffer_change_count */
+ { (uint8_t *)&status_com,
+ 0, NULL,
+ sizeof(slave_buffer_change_count), &slave_buffer_change_count,
+ },
+#define PUT_MASTER_GET_SLAVE_STATUS 1
+ /* master buffer changed need send, and recive slave_buffer_change_count */
+ { (uint8_t *)&status_com,
+ sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
+ sizeof(slave_buffer_change_count), &slave_buffer_change_count,
+ },
+#define GET_SLAVE_BUFFER 2
+ /* recive serial_slave_buffer */
+ { (uint8_t *)&status1,
+ 0, NULL,
+ sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
+ }
+};
+
+void serial_master_init(void)
+{
+ soft_serial_initiator_init(transactions, TID_LIMIT(transactions));
+}
+
+void serial_slave_init(void)
+{
+ soft_serial_target_init(transactions, TID_LIMIT(transactions));
+}
+
+// 0 => no error
+// 1 => slave did not respond
+// 2 => checksum error
+int serial_update_buffers(int master_update)
+{
+ int status, smatstatus;
+ static int need_retry = 0;
+
+ if( s_change_old != s_change_new ) {
+ smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER);
+ if( smatstatus == TRANSACTION_END ) {
+ s_change_old = s_change_new;
+#ifdef CONSOLE_ENABLE
+ uprintf("slave matrix = %b %b %b %b\n",
+ serial_slave_buffer[0], serial_slave_buffer[1],
+ serial_slave_buffer[2], serial_slave_buffer[3]);
+#endif
+ }
+ } else {
+ // serial_slave_buffer dosen't change
+ smatstatus = TRANSACTION_END; // dummy status
+ }
+
+ if( !master_update && !need_retry) {
+ status = soft_serial_transaction(GET_SLAVE_STATUS);
+ } else {
+ status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS);
+ }
+ if( status == TRANSACTION_END ) {
+ s_change_new = slave_buffer_change_count;
+ need_retry = 0;
+ } else {
+ need_retry = 1;
+ }
+ return smatstatus;
+}
+
+#endif // SERIAL_USE_MULTI_TRANSACTION
+#endif /* USE_SERIAL */
diff --git a/keyboards/claw44/rev1/split_scomm.h b/keyboards/claw44/rev1/split_scomm.h
new file mode 100644
index 000000000..873d8939d
--- /dev/null
+++ b/keyboards/claw44/rev1/split_scomm.h
@@ -0,0 +1,24 @@
+#ifndef SPLIT_COMM_H
+#define SPLIT_COMM_H
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
+#include "serial.h"
+
+#else
+/* --- USE flexible API (using multi-type transaction function) --- */
+// Buffers for master - slave communication
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
+
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+extern uint8_t slave_buffer_change_count;
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(int master_changed);
+
+#endif
+
+#endif /* SPLIT_COMM_H */
diff --git a/keyboards/orthodox/split_util.c b/keyboards/claw44/rev1/split_util.c
index 39639c3b4..e1ff8b437 100644
--- a/keyboards/orthodox/split_util.c
+++ b/keyboards/claw44/rev1/split_util.c
@@ -7,12 +7,11 @@
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
-#include "config.h"
-#ifdef USE_I2C
+#ifdef USE_MATRIX_I2C
# include "i2c.h"
#else
-# include "serial.h"
+# include "split_scomm.h"
#endif
volatile bool isLeftHand = true;
@@ -31,18 +30,17 @@ static void setup_handedness(void) {
}
static void keyboard_master_setup(void) {
-#ifdef USE_I2C
+
+#ifdef USE_MATRIX_I2C
i2c_master_init();
-#ifdef SSD1306OLED
- matrix_master_OLED_init ();
-#endif
#else
serial_master_init();
#endif
}
static void keyboard_slave_setup(void) {
-#ifdef USE_I2C
+
+#ifdef USE_MATRIX_I2C
i2c_slave_init(SLAVE_I2C_ADDRESS);
#else
serial_slave_init();
@@ -66,19 +64,7 @@ void split_keyboard_setup(void) {
sei();
}
-void keyboard_slave_loop(void) {
- matrix_init();
-
- while (1) {
- matrix_slave_scan();
- }
-}
-
// this code runs before the usb and keyboard is initialized
void matrix_setup(void) {
split_keyboard_setup();
-
- if (!has_usb()) {
- keyboard_slave_loop();
- }
}
diff --git a/keyboards/orthodox/split_util.h b/keyboards/claw44/rev1/split_util.h
index a0a8dd3bf..687ca19bd 100644
--- a/keyboards/orthodox/split_util.h
+++ b/keyboards/claw44/rev1/split_util.h
@@ -4,7 +4,6 @@
#include <stdbool.h>
#include "eeconfig.h"
-
#define SLAVE_I2C_ADDRESS 0x32
extern volatile bool isLeftHand;
@@ -14,7 +13,6 @@ void matrix_slave_scan(void);
void split_keyboard_setup(void);
bool has_usb(void);
-void keyboard_slave_loop(void);
void matrix_master_OLED_init (void);
diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk
new file mode 100644
index 000000000..907a5c832
--- /dev/null
+++ b/keyboards/claw44/rules.mk
@@ -0,0 +1,74 @@
+SRC += i2c.c
+SRC += serial.c
+SRC += ssd1306.c
+
+# if firmware size over limit, try this option
+# CFLAGS += -flto
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+CUSTOM_MATRIX = yes
+
+DEFAULT_FOLDER = claw44/rev1
diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c
new file mode 100644
index 000000000..325c29a3f
--- /dev/null
+++ b/keyboards/claw44/serial.c
@@ -0,0 +1,590 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ *
+ * 2018-10-28 checked
+ * avr-gcc 4.9.2
+ * avr-gcc 5.4.0
+ * avr-gcc 7.3.0
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "serial.h"
+//#include <pro_micro.h>
+
+#ifdef SOFT_SERIAL_PIN
+
+#ifdef __AVR_ATmega32U4__
+ // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
+ #ifdef USE_I2C
+ #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
+ #error Using ATmega32U4 I2C, so can not use PD0, PD1
+ #endif
+ #endif
+
+ #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
+ #define SERIAL_PIN_DDR DDRD
+ #define SERIAL_PIN_PORT PORTD
+ #define SERIAL_PIN_INPUT PIND
+ #if SOFT_SERIAL_PIN == D0
+ #define SERIAL_PIN_MASK _BV(PD0)
+ #define EIMSK_BIT _BV(INT0)
+ #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
+ #define SERIAL_PIN_INTERRUPT INT0_vect
+ #elif SOFT_SERIAL_PIN == D1
+ #define SERIAL_PIN_MASK _BV(PD1)
+ #define EIMSK_BIT _BV(INT1)
+ #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
+ #define SERIAL_PIN_INTERRUPT INT1_vect
+ #elif SOFT_SERIAL_PIN == D2
+ #define SERIAL_PIN_MASK _BV(PD2)
+ #define EIMSK_BIT _BV(INT2)
+ #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
+ #define SERIAL_PIN_INTERRUPT INT2_vect
+ #elif SOFT_SERIAL_PIN == D3
+ #define SERIAL_PIN_MASK _BV(PD3)
+ #define EIMSK_BIT _BV(INT3)
+ #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
+ #define SERIAL_PIN_INTERRUPT INT3_vect
+ #endif
+ #elif SOFT_SERIAL_PIN == E6
+ #define SERIAL_PIN_DDR DDRE
+ #define SERIAL_PIN_PORT PORTE
+ #define SERIAL_PIN_INPUT PINE
+ #define SERIAL_PIN_MASK _BV(PE6)
+ #define EIMSK_BIT _BV(INT6)
+ #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
+ #define SERIAL_PIN_INTERRUPT INT6_vect
+ #else
+ #error invalid SOFT_SERIAL_PIN value
+ #endif
+
+#else
+ #error serial.c now support ATmega32U4 only
+#endif
+
+//////////////// for backward compatibility ////////////////////////////////
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+ #endif
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+ #endif
+ uint8_t volatile status0 = 0;
+
+SSTD_t transactions[] = {
+ { (uint8_t *)&status0,
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
+ #else
+ 0, (uint8_t *)NULL,
+ #endif
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
+ #else
+ 0, (uint8_t *)NULL,
+ #endif
+ }
+};
+
+void serial_master_init(void)
+{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
+
+void serial_slave_init(void)
+{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
+
+// 0 => no error
+// 1 => slave did not respond
+// 2 => checksum error
+int serial_update_buffers()
+{
+ int result;
+ result = soft_serial_transaction();
+ return result;
+}
+
+#endif // end of Simple API (OLD API, compatible with let's split serial.c)
+////////////////////////////////////////////////////////////////////////////
+
+#define ALWAYS_INLINE __attribute__((always_inline))
+#define NO_INLINE __attribute__((noinline))
+#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
+
+// parity check
+#define ODD_PARITY 1
+#define EVEN_PARITY 0
+#define PARITY EVEN_PARITY
+
+#ifdef SERIAL_DELAY
+ // custom setup in config.h
+ // #define TID_SEND_ADJUST 2
+ // #define SERIAL_DELAY 6 // micro sec
+ // #define READ_WRITE_START_ADJUST 30 // cycles
+ // #define READ_WRITE_WIDTH_ADJUST 8 // cycles
+#else
+// ============ Standard setups ============
+
+#ifndef SELECT_SOFT_SERIAL_SPEED
+#define SELECT_SOFT_SERIAL_SPEED 1
+// 0: about 189kbps
+// 1: about 137kbps (default)
+// 2: about 75kbps
+// 3: about 39kbps
+// 4: about 26kbps
+// 5: about 20kbps
+#endif
+
+#if __GNUC__ < 6
+ #define TID_SEND_ADJUST 14
+#else
+ #define TID_SEND_ADJUST 2
+#endif
+
+#if SELECT_SOFT_SERIAL_SPEED == 0
+ // Very High speed
+ #define SERIAL_DELAY 4 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 34 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 1
+ // High speed
+ #define SERIAL_DELAY 6 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 2
+ // Middle speed
+ #define SERIAL_DELAY 12 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 3
+ // Low speed
+ #define SERIAL_DELAY 24 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 4
+ // Very Low speed
+ #define SERIAL_DELAY 36 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 5
+ // Ultra Low speed
+ #define SERIAL_DELAY 48 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#else
+#error invalid SELECT_SOFT_SERIAL_SPEED value
+#endif /* SELECT_SOFT_SERIAL_SPEED */
+#endif /* SERIAL_DELAY */
+
+#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
+#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
+
+#define SLAVE_INT_WIDTH_US 1
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
+#else
+ #define SLAVE_INT_ACK_WIDTH_UNIT 2
+ #define SLAVE_INT_ACK_WIDTH 4
+#endif
+
+static SSTD_t *Transaction_table = NULL;
+static uint8_t Transaction_table_size = 0;
+
+inline static void serial_delay(void) ALWAYS_INLINE;
+inline static
+void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
+
+inline static void serial_delay_half1(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half1(void) {
+ _delay_us(SERIAL_DELAY_HALF1);
+}
+
+inline static void serial_delay_half2(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half2(void) {
+ _delay_us(SERIAL_DELAY_HALF2);
+}
+
+inline static void serial_output(void) ALWAYS_INLINE;
+inline static
+void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static void serial_input_with_pullup(void) ALWAYS_INLINE;
+inline static
+void serial_input_with_pullup(void) {
+ SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
+inline static
+uint8_t serial_read_pin(void) {
+ return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static void serial_low(void) ALWAYS_INLINE;
+inline static
+void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static void serial_high(void) ALWAYS_INLINE;
+inline static
+void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_output();
+ serial_high();
+}
+
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_input_with_pullup();
+
+ // Enable INT0-INT3,INT6
+ EIMSK |= EIMSK_BIT;
+#if SERIAL_PIN_MASK == _BV(PE6)
+ // Trigger on falling edge of INT6
+ EICRB &= EICRx_BIT;
+#else
+ // Trigger on falling edge of INT0-INT3
+ EICRA &= EICRx_BIT;
+#endif
+}
+
+// Used by the sender to synchronize timing with the reciver.
+static void sync_recv(void) NO_INLINE;
+static
+void sync_recv(void) {
+ for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
+ }
+ // This shouldn't hang if the target disconnects because the
+ // serial line will float to high if the target does disconnect.
+ while (!serial_read_pin());
+}
+
+// Used by the reciver to send a synchronization signal to the sender.
+static void sync_send(void) NO_INLINE;
+static
+void sync_send(void) {
+ serial_low();
+ serial_delay();
+ serial_high();
+}
+
+// Reads a byte from the serial line
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
+ uint8_t byte, i, p, pb;
+
+ _delay_sub_us(READ_WRITE_START_ADJUST);
+ for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
+ serial_delay_half1(); // read the middle of pulses
+ if( serial_read_pin() ) {
+ byte = (byte << 1) | 1; p ^= 1;
+ } else {
+ byte = (byte << 1) | 0; p ^= 0;
+ }
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+ }
+ /* recive parity bit */
+ serial_delay_half1(); // read the middle of pulses
+ pb = serial_read_pin();
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+
+ *pterrcount += (p != pb)? 1 : 0;
+
+ return byte;
+}
+
+// Sends a byte with MSB ordering
+void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
+void serial_write_chunk(uint8_t data, uint8_t bit) {
+ uint8_t b, p;
+ for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
+ if(data & b) {
+ serial_high(); p ^= 1;
+ } else {
+ serial_low(); p ^= 0;
+ }
+ serial_delay();
+ }
+ /* send parity bit */
+ if(p & 1) { serial_high(); }
+ else { serial_low(); }
+ serial_delay();
+
+ serial_low(); // sync_send() / senc_recv() need raise edge
+}
+
+static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+void serial_send_packet(uint8_t *buffer, uint8_t size) {
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ data = buffer[i];
+ sync_send();
+ serial_write_chunk(data,8);
+ }
+}
+
+static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
+ uint8_t pecount = 0;
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ sync_recv();
+ data = serial_read_chunk(&pecount, 8);
+ buffer[i] = data;
+ }
+ return pecount == 0;
+}
+
+inline static
+void change_sender2reciver(void) {
+ sync_send(); //0
+ serial_delay_half1(); //1
+ serial_low(); //2
+ serial_input_with_pullup(); //2
+ serial_delay_half1(); //3
+}
+
+inline static
+void change_reciver2sender(void) {
+ sync_recv(); //0
+ serial_delay(); //1
+ serial_low(); //3
+ serial_output(); //3
+ serial_delay_half1(); //4
+}
+
+static inline uint8_t nibble_bits_count(uint8_t bits)
+{
+ bits = (bits & 0x5) + (bits >> 1 & 0x5);
+ bits = (bits & 0x3) + (bits >> 2 & 0x3);
+ return bits;
+}
+
+// interrupt handle to be used by the target device
+ISR(SERIAL_PIN_INTERRUPT) {
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ serial_low();
+ serial_output();
+ SSTD_t *trans = Transaction_table;
+#else
+ // recive transaction table index
+ uint8_t tid, bits;
+ uint8_t pecount = 0;
+ sync_recv();
+ bits = serial_read_chunk(&pecount,7);
+ tid = bits>>3;
+ bits = (bits&7) != nibble_bits_count(tid);
+ if( bits || pecount> 0 || tid > Transaction_table_size ) {
+ return;
+ }
+ serial_delay_half1();
+
+ serial_high(); // response step1 low->high
+ serial_output();
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
+ SSTD_t *trans = &Transaction_table[tid];
+ serial_low(); // response step2 ack high->low
+#endif
+
+ // target send phase
+ if( trans->target2initiator_buffer_size > 0 )
+ serial_send_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size);
+ // target switch to input
+ change_sender2reciver();
+
+ // target recive phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size) ) {
+ *trans->status = TRANSACTION_ACCEPTED;
+ } else {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ }
+ } else {
+ *trans->status = TRANSACTION_ACCEPTED;
+ }
+
+ sync_recv(); //weit initiator output to high
+}
+
+/////////
+// start transaction by initiator
+//
+// int soft_serial_transaction(int sstd_index)
+//
+// Returns:
+// TRANSACTION_END
+// TRANSACTION_NO_RESPONSE
+// TRANSACTION_DATA_ERROR
+// this code is very time dependent, so we need to disable interrupts
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void) {
+ SSTD_t *trans = Transaction_table;
+#else
+int soft_serial_transaction(int sstd_index) {
+ if( sstd_index > Transaction_table_size )
+ return TRANSACTION_TYPE_ERROR;
+ SSTD_t *trans = &Transaction_table[sstd_index];
+#endif
+ cli();
+
+ // signal to the target that we want to start a transaction
+ serial_output();
+ serial_low();
+ _delay_us(SLAVE_INT_WIDTH_US);
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ // wait for the target response
+ serial_input_with_pullup();
+ _delay_us(SLAVE_INT_RESPONSE_TIME);
+
+ // check if the target is present
+ if (serial_read_pin()) {
+ // target failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+
+#else
+ // send transaction table index
+ int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
+ sync_send();
+ _delay_sub_us(TID_SEND_ADJUST);
+ serial_write_chunk(tid, 7);
+ serial_delay_half1();
+
+ // wait for the target response (step1 low->high)
+ serial_input_with_pullup();
+ while( !serial_read_pin() ) {
+ _delay_sub_us(2);
+ }
+
+ // check if the target is present (step2 high->low)
+ for( int i = 0; serial_read_pin(); i++ ) {
+ if (i > SLAVE_INT_ACK_WIDTH + 1) {
+ // slave failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
+ }
+#endif
+
+ // initiator recive phase
+ // if the target is present syncronize with it
+ if( trans->target2initiator_buffer_size > 0 ) {
+ if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size) ) {
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_DATA_ERROR;
+ sei();
+ return TRANSACTION_DATA_ERROR;
+ }
+ }
+
+ // initiator switch to output
+ change_reciver2sender();
+
+ // initiator send phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ serial_send_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size);
+ }
+
+ // always, release the line when not in use
+ sync_send();
+
+ *trans->status = TRANSACTION_END;
+ sei();
+ return TRANSACTION_END;
+}
+
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index) {
+ SSTD_t *trans = &Transaction_table[sstd_index];
+ cli();
+ int retval = *trans->status;
+ *trans->status = 0;;
+ sei();
+ return retval;
+}
+#endif
+
+#endif
+
+// Helix serial.c history
+// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
+// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
+// (adjusted with avr-gcc 7.3.0)
+// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
+// (adjusted with avr-gcc 5.4.0, 7.3.0)
diff --git a/keyboards/claw44/serial.h b/keyboards/claw44/serial.h
new file mode 100644
index 000000000..7e0c0847a
--- /dev/null
+++ b/keyboards/claw44/serial.h
@@ -0,0 +1,84 @@
+#ifndef SOFT_SERIAL_H
+#define SOFT_SERIAL_H
+
+#include <stdbool.h>
+
+// /////////////////////////////////////////////////////////////////
+// Need Soft Serial defines in config.h
+// /////////////////////////////////////////////////////////////////
+// ex.
+// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
+// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
+// // 1: about 137kbps (default)
+// // 2: about 75kbps
+// // 3: about 39kbps
+// // 4: about 26kbps
+// // 5: about 20kbps
+//
+// //// USE Simple API (OLD API, compatible with let's split serial.c)
+// ex.
+// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+// #define SERIAL_MASTER_BUFFER_LENGTH 1
+//
+// //// USE flexible API (using multi-type transaction function)
+// #define SERIAL_USE_MULTI_TRANSACTION
+//
+// /////////////////////////////////////////////////////////////////
+
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
+#if SERIAL_SLAVE_BUFFER_LENGTH > 0
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+#endif
+#if SERIAL_MASTER_BUFFER_LENGTH > 0
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+#endif
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(void);
+
+#endif // USE Simple API
+
+// Soft Serial Transaction Descriptor
+typedef struct _SSTD_t {
+ uint8_t *status;
+ uint8_t initiator2target_buffer_size;
+ uint8_t *initiator2target_buffer;
+ uint8_t target2initiator_buffer_size;
+ uint8_t *target2initiator_buffer;
+} SSTD_t;
+#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
+
+// initiator is transaction start side
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
+// target is interrupt accept side
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
+
+// initiator resullt
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void);
+#else
+int soft_serial_transaction(int sstd_index);
+#endif
+
+// target status
+// *SSTD_t.status has
+// initiator:
+// TRANSACTION_END
+// or TRANSACTION_NO_RESPONSE
+// or TRANSACTION_DATA_ERROR
+// target:
+// TRANSACTION_DATA_ERROR
+// or TRANSACTION_ACCEPTED
+#define TRANSACTION_ACCEPTED 0x8
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index);
+#endif
+
+#endif /* SOFT_SERIAL_H */
diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c
new file mode 100644
index 000000000..781c72263
--- /dev/null
+++ b/keyboards/claw44/ssd1306.c
@@ -0,0 +1,346 @@
+#ifdef SSD1306OLED
+
+#include "ssd1306.h"
+#include "i2c.h"
+#include <string.h>
+#include "print.h"
+#ifdef ADAFRUIT_BLE_ENABLE
+#include "adafruit_ble.h"
+#endif
+#ifdef PROTOCOL_LUFA
+#include "lufa.h"
+#endif
+#include "sendchar.h"
+#include "timer.h"
+
+static const unsigned char font[] PROGMEM;
+
+// Set this to 1 to help diagnose early startup problems
+// when testing power-on with ble. Turn it off otherwise,
+// as the latency of printing most of the debug info messes
+// with the matrix scan, causing keys to drop.
+#define DEBUG_TO_SCREEN 0
+
+//static uint16_t last_battery_update;
+//static uint32_t vbat;
+//#define BatteryUpdateInterval 10000 /* milliseconds */
+
+// 'last_flush' is declared as uint16_t,
+// so this must be less than 65535
+#define ScreenOffInterval 60000 /* milliseconds */
+#if DEBUG_TO_SCREEN
+static uint8_t displaying;
+#endif
+static uint16_t last_flush;
+
+static bool force_dirty = true;
+
+// Write command sequence.
+// Returns true on success.
+static inline bool _send_cmd1(uint8_t cmd) {
+ bool res = false;
+
+ if (i2c_start_write(SSD1306_ADDRESS)) {
+ xprintf("failed to start write to %d\n", SSD1306_ADDRESS);
+ goto done;
+ }
+
+ if (i2c_master_write(0x0 /* command byte follows */)) {
+ print("failed to write control byte\n");
+
+ goto done;
+ }
+
+ if (i2c_master_write(cmd)) {
+ xprintf("failed to write command %d\n", cmd);
+ goto done;
+ }
+ res = true;
+done:
+ i2c_master_stop();
+ return res;
+}
+
+// Write 2-byte command sequence.
+// Returns true on success
+static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) {
+ if (!_send_cmd1(cmd)) {
+ return false;
+ }
+ return _send_cmd1(opr);
+}
+
+// Write 3-byte command sequence.
+// Returns true on success
+static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) {
+ if (!_send_cmd1(cmd)) {
+ return false;
+ }
+ if (!_send_cmd1(opr1)) {
+ return false;
+ }
+ return _send_cmd1(opr2);
+}
+
+#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;}
+#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;}
+#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;}
+
+static void clear_display(void) {
+ matrix_clear(&display);
+
+ // Clear all of the display bits (there can be random noise
+ // in the RAM on startup)
+ send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1);
+ send_cmd3(ColumnAddr, 0, DisplayWidth - 1);
+
+ if (i2c_start_write(SSD1306_ADDRESS)) {
+ goto done;
+ }
+ if (i2c_master_write(0x40)) {
+ // Data mode
+ goto done;
+ }
+ for (uint8_t row = 0; row < MatrixRows; ++row) {
+ for (uint8_t col = 0; col < DisplayWidth; ++col) {
+ i2c_master_write(0);
+ }
+ }
+
+ display.dirty = false;
+
+done:
+ i2c_master_stop();
+}
+
+#if DEBUG_TO_SCREEN
+#undef sendchar
+static int8_t capture_sendchar(uint8_t c) {
+ sendchar(c);
+ iota_gfx_write_char(c);
+
+ if (!displaying) {
+ iota_gfx_flush();
+ }
+ return 0;
+}
+#endif
+
+bool iota_gfx_init(bool rotate) {
+ bool success = false;
+
+ i2c_master_init();
+ send_cmd1(DisplayOff);
+ send_cmd2(SetDisplayClockDiv, 0x80);
+ send_cmd2(SetMultiPlex, DisplayHeight - 1);
+
+ send_cmd2(SetDisplayOffset, 0);
+
+
+ send_cmd1(SetStartLine | 0x0);
+ send_cmd2(SetChargePump, 0x14 /* Enable */);
+ send_cmd2(SetMemoryMode, 0 /* horizontal addressing */);
+
+ if(rotate){
+ // the following Flip the display orientation 180 degrees
+ send_cmd1(SegRemap);
+ send_cmd1(ComScanInc);
+ }else{
+ // Flips the display orientation 0 degrees
+ send_cmd1(SegRemap | 0x1);
+ send_cmd1(ComScanDec);
+ }
+
+ send_cmd2(SetComPins, 0x2);
+ send_cmd2(SetContrast, 0x8f);
+ send_cmd2(SetPreCharge, 0xf1);
+ send_cmd2(SetVComDetect, 0x40);
+ send_cmd1(DisplayAllOnResume);
+ send_cmd1(NormalDisplay);
+ send_cmd1(DeActivateScroll);
+ send_cmd1(DisplayOn);
+
+ send_cmd2(SetContrast, 0); // Dim
+
+ clear_display();
+
+ success = true;
+
+ iota_gfx_flush();
+
+#if DEBUG_TO_SCREEN
+ print_set_sendchar(capture_sendchar);
+#endif
+
+done:
+ return success;
+}
+
+bool iota_gfx_off(void) {
+ bool success = false;
+
+ send_cmd1(DisplayOff);
+ success = true;
+
+done:
+ return success;
+}
+
+bool iota_gfx_on(void) {
+ bool success = false;
+
+ send_cmd1(DisplayOn);
+ success = true;
+
+done:
+ return success;
+}
+
+void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) {
+ *matrix->cursor = c;
+ ++matrix->cursor;
+
+ if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) {
+ // We went off the end; scroll the display upwards by one line
+ memmove(&matrix->display[0], &matrix->display[1],
+ MatrixCols * (MatrixRows - 1));
+ matrix->cursor = &matrix->display[MatrixRows - 1][0];
+ memset(matrix->cursor, ' ', MatrixCols);
+ }
+}
+
+void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) {
+ matrix->dirty = true;
+
+ if (c == '\n') {
+ // Clear to end of line from the cursor and then move to the
+ // start of the next line
+ uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols;
+
+ while (cursor_col++ < MatrixCols) {
+ matrix_write_char_inner(matrix, ' ');
+ }
+ return;
+ }
+
+ matrix_write_char_inner(matrix, c);
+}
+
+void iota_gfx_write_char(uint8_t c) {
+ matrix_write_char(&display, c);
+}
+
+void matrix_write(struct CharacterMatrix *matrix, const char *data) {
+ const char *end = data + strlen(data);
+ while (data < end) {
+ matrix_write_char(matrix, *data);
+ ++data;
+ }
+}
+
+void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) {
+ char data_ln[strlen(data)+2];
+ snprintf(data_ln, sizeof(data_ln), "%s\n", data);
+ matrix_write(matrix, data_ln);
+}
+
+void iota_gfx_write(const char *data) {
+ matrix_write(&display, data);
+}
+
+void matrix_write_P(struct CharacterMatrix *matrix, const char *data) {
+ while (true) {
+ uint8_t c = pgm_read_byte(data);
+ if (c == 0) {
+ return;
+ }
+ matrix_write_char(matrix, c);
+ ++data;
+ }
+}
+
+void iota_gfx_write_P(const char *data) {
+ matrix_write_P(&display, data);
+}
+
+void matrix_clear(struct CharacterMatrix *matrix) {
+ memset(matrix->display, ' ', sizeof(matrix->display));
+ matrix->cursor = &matrix->display[0][0];
+ matrix->dirty = true;
+}
+
+void iota_gfx_clear_screen(void) {
+ matrix_clear(&display);
+}
+
+void matrix_render(struct CharacterMatrix *matrix) {
+ last_flush = timer_read();
+ iota_gfx_on();
+#if DEBUG_TO_SCREEN
+ ++displaying;
+#endif
+
+ // Move to the home position
+ send_cmd3(PageAddr, 0, MatrixRows - 1);
+ send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1);
+
+ if (i2c_start_write(SSD1306_ADDRESS)) {
+ goto done;
+ }
+ if (i2c_master_write(0x40)) {
+ // Data mode
+ goto done;
+ }
+
+ for (uint8_t row = 0; row < MatrixRows; ++row) {
+ for (uint8_t col = 0; col < MatrixCols; ++col) {
+ const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth);
+
+ for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) {
+ uint8_t colBits = pgm_read_byte(glyph + glyphCol);
+ i2c_master_write(colBits);
+ }
+
+ // 1 column of space between chars (it's not included in the glyph)
+ //i2c_master_write(0);
+ }
+ }
+
+ matrix->dirty = false;
+
+done:
+ i2c_master_stop();
+#if DEBUG_TO_SCREEN
+ --displaying;
+#endif
+}
+
+void iota_gfx_flush(void) {
+ matrix_render(&display);
+}
+
+__attribute__ ((weak))
+void iota_gfx_task_user(void) {
+}
+
+void iota_gfx_task(void) {
+ iota_gfx_task_user();
+
+ if (display.dirty|| force_dirty) {
+ iota_gfx_flush();
+ force_dirty = false;
+ }
+
+ /*
+ if (timer_elapsed(last_flush) > ScreenOffInterval) {
+ iota_gfx_off();
+ }
+ */
+}
+
+bool process_record_gfx(uint16_t keycode, keyrecord_t *record) {
+ force_dirty = true;
+ return true;
+}
+
+#endif
diff --git a/keyboards/claw44/ssd1306.h b/keyboards/claw44/ssd1306.h
new file mode 100644
index 000000000..ea8c92328
--- /dev/null
+++ b/keyboards/claw44/ssd1306.h
@@ -0,0 +1,91 @@
+#pragma once
+
+#include <stdbool.h>
+#include <stdio.h>
+#include "pincontrol.h"
+#include "action.h"
+
+enum ssd1306_cmds {
+ DisplayOff = 0xAE,
+ DisplayOn = 0xAF,
+
+ SetContrast = 0x81,
+ DisplayAllOnResume = 0xA4,
+
+ DisplayAllOn = 0xA5,
+ NormalDisplay = 0xA6,
+ InvertDisplay = 0xA7,
+ SetDisplayOffset = 0xD3,
+ SetComPins = 0xda,
+ SetVComDetect = 0xdb,
+ SetDisplayClockDiv = 0xD5,
+ SetPreCharge = 0xd9,
+ SetMultiPlex = 0xa8,
+ SetLowColumn = 0x00,
+ SetHighColumn = 0x10,
+ SetStartLine = 0x40,
+
+ SetMemoryMode = 0x20,
+ ColumnAddr = 0x21,
+ PageAddr = 0x22,
+
+ ComScanInc = 0xc0,
+ ComScanDec = 0xc8,
+ SegRemap = 0xa0,
+ SetChargePump = 0x8d,
+ ExternalVcc = 0x01,
+ SwitchCapVcc = 0x02,
+
+ ActivateScroll = 0x2f,
+ DeActivateScroll = 0x2e,
+ SetVerticalScrollArea = 0xa3,
+ RightHorizontalScroll = 0x26,
+ LeftHorizontalScroll = 0x27,
+ VerticalAndRightHorizontalScroll = 0x29,
+ VerticalAndLeftHorizontalScroll = 0x2a,
+};
+
+// Controls the SSD1306 128x32 OLED display via i2c
+
+#ifndef SSD1306_ADDRESS
+#define SSD1306_ADDRESS 0x3C
+#endif
+
+#define DisplayHeight 32
+#define DisplayWidth 128
+
+#define FontHeight 8
+#define FontWidth 6
+
+#define MatrixRows (DisplayHeight / FontHeight)
+#define MatrixCols (DisplayWidth / FontWidth)
+
+struct CharacterMatrix {
+ uint8_t display[MatrixRows][MatrixCols];
+ uint8_t *cursor;
+ bool dirty;
+};
+
+struct CharacterMatrix display;
+
+bool iota_gfx_init(bool rotate);
+void iota_gfx_task(void);
+bool iota_gfx_off(void);
+bool iota_gfx_on(void);
+void iota_gfx_flush(void);
+void iota_gfx_write_char(uint8_t c);
+void iota_gfx_write(const char *data);
+void iota_gfx_write_P(const char *data);
+void iota_gfx_clear_screen(void);
+
+void iota_gfx_task_user(void);
+
+void matrix_clear(struct CharacterMatrix *matrix);
+void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c);
+void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c);
+void matrix_write(struct CharacterMatrix *matrix, const char *data);
+void matrix_write_ln(struct CharacterMatrix *matrix, const char *data);
+void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
+void matrix_render(struct CharacterMatrix *matrix);
+
+bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file
diff --git a/keyboards/clueboard/2x1800/keymaps/default/config.h b/keyboards/clueboard/2x1800/keymaps/default/config.h
index 152e2f148..dd48c69e3 100644
--- a/keyboards/clueboard/2x1800/keymaps/default/config.h
+++ b/keyboards/clueboard/2x1800/keymaps/default/config.h
@@ -16,6 +16,4 @@
#pragma once
-#include "config_common.h"
-
// place overrides here
diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h
index 6b0cfb60b..795adecd5 100644
--- a/keyboards/clueboard/66_hotswap/gen1/config.h
+++ b/keyboards/clueboard/66_hotswap/gen1/config.h
@@ -80,11 +80,6 @@
*/
//#define FORCE_NKRO
-/* key combination for magic key command */
-#define IS_COMMAND() ( \
- keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/comet46/keymaps/default/config.h b/keyboards/comet46/keymaps/default/config.h
index 7873cf5a7..ee02a94b7 100644
--- a/keyboards/comet46/keymaps/default/config.h
+++ b/keyboards/comet46/keymaps/default/config.h
@@ -18,14 +18,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
+
+// place overrides here
-// #include "../../config.h"
/* Use I2C or Serial */
#define USE_I2C
#define SSD1306OLED
-
-#endif
diff --git a/keyboards/contra/keymaps/default/config.h b/keyboards/contra/keymaps/default/config.h
index a1635f2ba..d61ee2938 100644
--- a/keyboards/contra/keymaps/default/config.h
+++ b/keyboards/contra/keymaps/default/config.h
@@ -1,7 +1,5 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "config_common.h"
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
@@ -25,7 +23,7 @@
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
-
+
#define MIDI_BASIC
/* enable advanced MIDI features:
@@ -38,5 +36,3 @@
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
-
-#endif \ No newline at end of file
diff --git a/keyboards/contra/keymaps/msiu/config.h b/keyboards/contra/keymaps/msiu/config.h
new file mode 100644
index 000000000..8757eb70d
--- /dev/null
+++ b/keyboards/contra/keymaps/msiu/config.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/keyboards/contra/keymaps/msiu/keymap.c b/keyboards/contra/keymaps/msiu/keymap.c
new file mode 100644
index 000000000..c68c2c7bb
--- /dev/null
+++ b/keyboards/contra/keymaps/msiu/keymap.c
@@ -0,0 +1,175 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+ _QWERTY,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _NUMB,
+ _FUNC,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ QWERTY = SAFE_RANGE,
+ DVORAK,
+ LOWER,
+ RAISE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Qwerty
+ * ,------------------------------------------------------------------------------------------.
+ * | Tab / Numb | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |-------------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc / Ctrl | A | S | D | F | G | H | J | K | L | ; | ' |
+ * |-------------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |-------------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl |Hyper | Alt | GUI |Lower | Func |Space |Raise | Left | Down | Up |Right |
+ * `------------------------------------------------------------------------------------------'
+ */
+ [_QWERTY] = LAYOUT_ortho_4x12(
+ LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+
+ /* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_DVORAK] = LAYOUT_ortho_4x12(
+ _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
+ _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_LOWER] = LAYOUT_ortho_4x12(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE,
+ _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
+
+ /* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_RAISE] = LAYOUT_ortho_4x12(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE,
+ _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
+
+ /* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+ [_ADJUST] = LAYOUT_ortho_4x12(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
+ ),
+
+ [_FUNC] = LAYOUT_ortho_4x12(
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_NUMB] = LAYOUT_ortho_4x12(
+ _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC,
+ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______
+ )
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ // print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/contra/keymaps/msiu/readme.md b/keyboards/contra/keymaps/msiu/readme.md
new file mode 100644
index 000000000..80aba1095
--- /dev/null
+++ b/keyboards/contra/keymaps/msiu/readme.md
@@ -0,0 +1,2 @@
+# The Default Contra Layout
+
diff --git a/keyboards/converter/usb_usb/keymaps/default/config.h b/keyboards/converter/usb_usb/keymaps/default/config.h
index 7fa3bf328..271f48d00 100644
--- a/keyboards/converter/usb_usb/keymaps/default/config.h
+++ b/keyboards/converter/usb_usb/keymaps/default/config.h
@@ -1,6 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
-
-#endif
+// place overrides here
diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/cospad/keymaps/default/keymap.c
index f782349b0..345e96996 100644
--- a/keyboards/cospad/keymaps/default/keymap.c
+++ b/keyboards/cospad/keymaps/default/keymap.c
@@ -1,10 +1,6 @@
#include QMK_KEYBOARD_H
#include "led.h"
-#ifdef RGBLIGHT_ENABLE
-#include "rgblight.h"
-#endif
-
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c
index 0a9ff24ff..91f0ebfa2 100644
--- a/keyboards/crkbd/keymaps/drashna/keymap.c
+++ b/keyboards/crkbd/keymaps/drashna/keymap.c
@@ -187,10 +187,10 @@ const char* read_modifier_state(void) {
uint8_t one_shot = get_oneshot_mods();
snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s",
- (modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) ? "CTL" : " ",
- (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK) ? "GUI" : " ",
- (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) ? "ALT" : " ",
- (modifiers & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) ? "SFT" : " "
+ (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) ? "CTL" : " ",
+ (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI) ? "GUI" : " ",
+ (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) ? "ALT" : " ",
+ (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? "SFT" : " "
);
return modifier_state_str;
@@ -252,7 +252,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) {
// matrix_write_ln(matrix, read_keylog());
matrix_write_ln(matrix, read_keylogs());
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
- matrix_write(matrix, read_host_led_state());
+ // matrix_write(matrix, read_host_led_state());
//matrix_write_ln(matrix, read_timelog());
} else {
matrix_write(matrix, read_logo());
diff --git a/keyboards/crkbd/keymaps/drashna/rules.mk b/keyboards/crkbd/keymaps/drashna/rules.mk
index 4b70f66f7..540534978 100644
--- a/keyboards/crkbd/keymaps/drashna/rules.mk
+++ b/keyboards/crkbd/keymaps/drashna/rules.mk
@@ -24,8 +24,8 @@ BOOTLOADER = qmk-dfu
# If you want to change the display of OLED, you need to change here
SRC += ./lib/glcdfont.c \
- ./lib/rgb_state_reader.c \
./lib/logo_reader.c \
+ # ./lib/rgb_state_reader.c \
# ./lib/keylogger.c \
# ./lib/host_led_state_reader.c \
# ./lib/mode_icon_reader.c \
diff --git a/keyboards/crkbd/keymaps/jarred/config.h b/keyboards/crkbd/keymaps/jarred/config.h
new file mode 100644
index 000000000..ac4c1cc88
--- /dev/null
+++ b/keyboards/crkbd/keymaps/jarred/config.h
@@ -0,0 +1,44 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+#define SSD1306OLED
+
+#define USE_SERIAL_PD2
+
+//#define TAPPING_FORCE_HOLD
+//#define TAPPING_TERM 100
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 27
+#define RGBLIGHT_LIMIT_VAL 120
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
diff --git a/keyboards/crkbd/keymaps/jarred/keymap.c b/keyboards/crkbd/keymaps/jarred/keymap.c
new file mode 100644
index 000000000..f00a735bf
--- /dev/null
+++ b/keyboards/crkbd/keymaps/jarred/keymap.c
@@ -0,0 +1,182 @@
+#include QMK_KEYBOARD_H
+#include "jarred.h"
+
+#ifdef PROTOCOL_LUFA
+ #include "lufa.h"
+ #include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+extern keymap_config_t keymap_config;
+extern uint8_t is_master;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+#define LAYOUT_crkbd_base( \
+ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \
+ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
+ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K31, K32, K33, K34, K35, K36 \
+ )
+
+#define LAYOUT_crkbd_wrapper(...) LAYOUT(__VA_ARGS__)
+
+#define QWERTY_4_CRKBD KC_LCTL, MO(_LW), KC_SPC, KC_ENT, MO(_LW), KC_RALT
+
+#define BLANK_4_CRKBD KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = LAYOUT_crkbd_wrapper(
+ QWERTY_1_12,
+ QWERTY_2_12,
+ QWERTY_3_12,
+ QWERTY_4_DOX
+ ),
+
+ [_LW] = LAYOUT_crkbd_wrapper(
+ LOWER_1_12,
+ LOWER_2_12,
+ LOWER_3_12,
+ LOWER_4_DOX
+ ),
+
+ [_NV] = LAYOUT_crkbd_wrapper(
+ NAV_1_12,
+ NAV_2_12,
+ NAV_3_12,
+ NAV_4_DOX
+ ),
+
+ [_NP] = LAYOUT_crkbd_wrapper(
+ NUMPAD_1_12,
+ NUMPAD_2_12,
+ NUMPAD_3_12,
+ NUMPAD_4_DOX
+ ),
+
+ [_MS] = LAYOUT_crkbd_wrapper(
+ MOUSE_1_12,
+ MOUSE_2_12,
+ MOUSE_3_12,
+ MOUSE_4_DOX
+ )
+};
+
+void matrix_init_user(void) {
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+// When add source files to SRC in rules.mk, you can use functions.
+const char *read_logo(void);
+void set_keylog(uint16_t keycode, keyrecord_t *record);
+const char *read_keylog(void);
+const char *read_keylogs(void);
+
+char matrix_line_str[24];
+
+const char *read_layer_state(void) {
+ uint8_t layer = biton32(layer_state);
+
+ strcpy(matrix_line_str, "Layer: ");
+
+ switch (layer)
+ {
+ case _QW:
+ strcat(matrix_line_str, "Default");
+ break;
+ case _LW:
+ strcat(matrix_line_str, "Lower");
+ break;
+ case _NV:
+ strcat(matrix_line_str, "Navigation");
+ break;
+ case _NP:
+ strcat(matrix_line_str, "Adjust");
+ break;
+ case _MS:
+ strcat(matrix_line_str, "Mouse");
+ break;
+ default:
+ sprintf(matrix_line_str + strlen(matrix_line_str), "Unknown (%d)", layer);
+ }
+
+ return matrix_line_str;
+}
+
+const char *read_usb_state(void) {
+
+ strcpy(matrix_line_str, "USB : ");
+
+ switch (USB_DeviceState) {
+ case DEVICE_STATE_Unattached:
+ strcat(matrix_line_str, "Unattached");
+ break;
+ case DEVICE_STATE_Suspended:
+ strcat(matrix_line_str, "Suspended");
+ break;
+ case DEVICE_STATE_Configured:
+ strcat(matrix_line_str, "Connected");
+ break;
+ case DEVICE_STATE_Powered:
+ strcat(matrix_line_str, "Powered");
+ break;
+ case DEVICE_STATE_Default:
+ strcat(matrix_line_str, "Default");
+ break;
+ case DEVICE_STATE_Addressed:
+ strcat(matrix_line_str, "Addressed");
+ break;
+ default:
+ strcat(matrix_line_str, "Invalid");
+ }
+
+ return matrix_line_str;
+}
+
+void matrix_scan_user(void) {
+ iota_gfx_task();
+}
+
+void matrix_render_user(struct CharacterMatrix *matrix) {
+ if (is_master) {
+ matrix_write_ln(matrix, read_layer_state());
+ matrix_write_ln(matrix, read_usb_state());
+ matrix_write_ln(matrix, read_keylogs());
+ } else {
+ matrix_write(matrix, read_logo());
+ }
+}
+
+void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+ matrix_clear(&matrix);
+ matrix_render_user(&matrix);
+ matrix_update(&display, &matrix);
+}
+#endif//SSD1306OLED
+
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ if (record->event.pressed) {
+ set_keylog(keycode, record);
+ }
+
+ return true;
+}
diff --git a/keyboards/crkbd/keymaps/jarred/readme.md b/keyboards/crkbd/keymaps/jarred/readme.md
new file mode 100644
index 000000000..15e355bbc
--- /dev/null
+++ b/keyboards/crkbd/keymaps/jarred/readme.md
@@ -0,0 +1,9 @@
+# Jarred's CRKBD Layout
+
+Check out [user space readme](../../../../users/jarred/readme.md) for more info
+
+# Build
+
+```
+make crkbd:jarred:avrdude
+```
diff --git a/keyboards/crkbd/keymaps/jarred/rules.mk b/keyboards/crkbd/keymaps/jarred/rules.mk
new file mode 100644
index 000000000..ab6329f0e
--- /dev/null
+++ b/keyboards/crkbd/keymaps/jarred/rules.mk
@@ -0,0 +1,31 @@
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./lib/glcdfont.c \
+ ./lib/rgb_state_reader.c \
+ ./lib/logo_reader.c \
+ ./lib/keylogger.c \
+ #./lib/layer_state_reader.c \
+ # ./lib/mode_icon_reader.c \
+ # ./lib/host_led_state_reader.c \
+ # ./lib/timelogger.c \
diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c
index 73427ee8a..bbec2907a 100644
--- a/keyboards/cu24/keymaps/default/keymap.c
+++ b/keyboards/cu24/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "cu24.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_grid( /* Base */
diff --git a/keyboards/cu75/keymaps/default/config.h b/keyboards/cu75/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/cu75/keymaps/default/config.h
+++ b/keyboards/cu75/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c
index cbe3b3f3d..a3db220e4 100644
--- a/keyboards/dc01/left/matrix.c
+++ b/keyboards/dc01/left/matrix.c
@@ -455,10 +455,10 @@ i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset)
matrix[MATRIX_ROWS - 1] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
} else {
- i2c_stop(10);
+ i2c_stop();
return 1;
}
- i2c_stop(10);
+ i2c_stop();
return 0;
} \ No newline at end of file
diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h
index f14678a22..307531da6 100644
--- a/keyboards/deltasplit75/keymaps/default/config.h
+++ b/keyboards/deltasplit75/keymaps/default/config.h
@@ -16,16 +16,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
#define USE_SERIAL
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
-
-
-#ifdef SUBPROJECT_v2
- #include "../../v2/config.h"
-#endif
-#ifdef SUBPROJECT_protosplit
- #include "../../protosplit/config.h"
-#endif
diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c
index 3f0341757..b8c7ef427 100755
--- a/keyboards/dichotomy/keymaps/default/keymap.c
+++ b/keyboards/dichotomy/keymaps/default/keymap.c
@@ -1,7 +1,7 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
-#include "dichotomy.h"
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
diff --git a/keyboards/diverge3/keymaps/default/config.h b/keyboards/diverge3/keymaps/default/config.h
index 87ce06b3b..fc375f081 100644
--- a/keyboards/diverge3/keymaps/default/config.h
+++ b/keyboards/diverge3/keymaps/default/config.h
@@ -14,14 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
#define MASTER_RIGHT
#define PERMISSIVE_HOLD
#define TAPPING_TERM 150
-
-#endif
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c
index 93aeb33b4..8b9dc547d 100644
--- a/keyboards/dk60/dk60.c
+++ b/keyboards/dk60/dk60.c
@@ -1,5 +1,15 @@
#include "dk60.h"
+extern inline void dk60_caps_led_on(void);
+extern inline void dk60_esc_led_on(void);
+
+extern inline void dk60_caps_led_off(void);
+extern inline void dk60_esc_led_off(void);
+
+extern inline void dk60_led_all_on(void);
+extern inline void dk60_led_all_off(void);
+
+
void dk60_blink_all_leds(void)
{
dk60_led_all_off();
diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c
index 75afb7a34..f8e4a5e92 100644
--- a/keyboards/do60/keymaps/default/keymap.c
+++ b/keyboards/do60/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c
new file mode 100644
index 000000000..7831a91f5
--- /dev/null
+++ b/keyboards/donutcables/budget96/budget96.c
@@ -0,0 +1,80 @@
+/* Copyright 2019 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "budget96.h"
+
+#ifdef BACKLIGHT_ENABLE
+#include "backlight.h"
+#endif
+#ifdef RGBLIGHT_ENABLE
+#include "rgblight.h"
+#endif
+
+#include <avr/pgmspace.h>
+
+#include "action_layer.h"
+#include "i2c_master.h"
+#include "quantum.h"
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ }
+ }
+
+ i2c_init();
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+}
+#endif
+
+void backlight_init_ports(void) {
+ // initialize pins D0, D1, D4 and D6 as output
+ setPinOutput(D0);
+ setPinOutput(D1);
+ setPinOutput(D4);
+ setPinOutput(D6);
+
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+}
+
+ void backlight_set(uint8_t level) {
+ if (level == 0) {
+ // turn RGB LEDs off
+ writePinLow(D0);
+ writePinLow(D1);
+ writePinLow(D4);
+ writePinLow(D6);
+ } else {
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+ }
+ }
diff --git a/keyboards/donutcables/budget96/budget96.h b/keyboards/donutcables/budget96/budget96.h
new file mode 100644
index 000000000..561d0cbfa
--- /dev/null
+++ b/keyboards/donutcables/budget96/budget96.h
@@ -0,0 +1,56 @@
+/* Copyright 2019 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_all( \
+ k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \
+ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k46, k47, k48, k49, \
+ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \
+ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k26, k27, k28, k29, \
+ k10, k03, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, k19, \
+ k00, k01, k02, k65, k75, k0A, k0B, k66, k67, k69, k06, k08, k09 \
+) \
+{ \
+ { k00, k01, k02, k03, KC_NO, KC_NO, k06, KC_NO, k08, k09, k0A, k0B, KC_NO, k0D, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, KC_NO, k1D, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \
+ { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \
+ { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \
+ { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \
+}
+
+#define LAYOUT_96_ansi( \
+ k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \
+ k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \
+ k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \
+ k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \
+ k10, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, \
+ k00, k01, k02, k65, k75, k0B, k66, k67, k69, k06, k08, k09 \
+) \
+{ \
+ { k00, k01, k02, KC_NO, KC_NO, KC_NO, k06, KC_NO, k08, k09, KC_NO, k0B, KC_NO, k0D, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, KC_NO, k1A, k1B, KC_NO, k1D, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \
+ { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \
+ { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \
+ { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \
+}
diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h
new file mode 100644
index 000000000..74661d828
--- /dev/null
+++ b/keyboards/donutcables/budget96/config.h
@@ -0,0 +1,41 @@
+/*
+Copyright 2017 Luiz Ribeiro <luizribeiro@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 "config_common.h"
+
+#define VENDOR_ID 0x20A0
+#define PRODUCT_ID 0x422D
+#define MANUFACTURER DonutCables
+#define PRODUCT budget96
+
+#define RGBLED_NUM 16
+
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 15
+
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
+#define UNUSED_PINS
+
+#define DIODE_DIRECTION COL2ROW
+#define DEBOUNCING_DELAY 5
+
+#define NO_BACKLIGHT_CLOCK
+#define BACKLIGHT_LEVELS 1
+#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/donutcables/budget96/info.json b/keyboards/donutcables/budget96/info.json
new file mode 100644
index 000000000..40a942127
--- /dev/null
+++ b/keyboards/donutcables/budget96/info.json
@@ -0,0 +1,16 @@
+{
+ "keyboard_name": "budget96",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 19,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3, "w":1.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":18, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":5}]
+ },
+
+ "LAYOUT_96_ansi": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1, "w":2}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5, "w":1.5}, {"x":11.5, "y":5, "w":1.5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":4, "h":2}]
+ }
+ }
+}
diff --git a/keyboards/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/budget96/keymaps/default/config.h
index 2c852d181..a3ed4f762 100644
--- a/keyboards/scrabblepad/keymaps/default/config.h
+++ b/keyboards/donutcables/budget96/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/donutcables/budget96/keymaps/default/keymap.c b/keyboards/donutcables/budget96/keymaps/default/keymap.c
new file mode 100644
index 000000000..dcb79780e
--- /dev/null
+++ b/keyboards/donutcables/budget96/keymaps/default/keymap.c
@@ -0,0 +1,35 @@
+/* Copyright 2018 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_96_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_NLCK, KC_INS, KC_HOME, KC_PGUP, KC_PSLS, \
+ 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_END, KC_PGDN, KC_PSLS, KC_PAST, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT, KC_PENT), \
+
+[1] = LAYOUT_96_ansi(\
+ RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ 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/donutcables/budget96/keymaps/default/readme.md b/keyboards/donutcables/budget96/keymaps/default/readme.md
new file mode 100644
index 000000000..acbac7b4e
--- /dev/null
+++ b/keyboards/donutcables/budget96/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for budget96
diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md
new file mode 100644
index 000000000..70e4d3afb
--- /dev/null
+++ b/keyboards/donutcables/budget96/readme.md
@@ -0,0 +1,44 @@
+# budget96
+
+96 key atmega32a keyboard.
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: Budget96 PCB
+Hardware Availability: [DonutCables](https://donutcables.com/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make donutcables/budget96:default
+
+Flashing
+
+**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard.
+
+ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
+
+Windows:
+1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
+2. Place your keyboard into reset.
+3. Press the `Find Device` button and ensure that your keyboard is found.
+4. Press the `Open .hex File` button and locate the `.hex` file you created.
+5. Press the `Flash Device` button and wait for the process to complete.
+
+macOS:
+1. Install homebrew by typing the following:
+ ```
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+ ```
+2. Install `crosspack-avr`.
+ ```
+ brew cask install crosspack-avr
+ ```
+3. Install the following packages:
+ ```
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+
+4. Place your keyboard into reset.
+5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
+
+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/donutcables/budget96/rules.mk b/keyboards/donutcables/budget96/rules.mk
new file mode 100644
index 000000000..67697ac73
--- /dev/null
+++ b/keyboards/donutcables/budget96/rules.mk
@@ -0,0 +1,49 @@
+# Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
+
+# MCU name
+MCU = atmega32a
+PROTOCOL = VUSB
+
+# unsupported features for now
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+
+# processor frequency
+F_CPU = 12000000
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
+# build options
+BOOTMAGIC_ENABLE = no
+MOUSEKEY_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = yes
+COMMAND_ENABLE = yes
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+RGBLIGHT_CUSTOM_DRIVER = yes
+
+OPT_DEFS = -DDEBUG_LEVEL=0
+
+# custom matrix setup
+SRC = i2c_master.c
+
+# programming options
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/donutcables/budget96/usbconfig.h b/keyboards/donutcables/budget96/usbconfig.h
new file mode 100644
index 000000000..223b69bb9
--- /dev/null
+++ b/keyboards/donutcables/budget96/usbconfig.h
@@ -0,0 +1,394 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#pragma once
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT 3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT 2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC 0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT 4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER 3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT 0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE 0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL 1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED 0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+#define USB_CFG_MAX_BUS_POWER 500
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE 1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ 0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL 0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE 0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS 0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF 1
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ * in YL, TCNT0
+ * sts timer0Snapshot, YL
+ * endm
+ * #endif
+ * #define USB_SOF_HOOK myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING 0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC 0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION 0x00, 0x02
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME 'D', 'o', 'n', 'u', 't', 'C', 'a', 'b', 'l', 'e', 's'
+#define USB_CFG_VENDOR_NAME_LEN 11
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME 'b', 'u', 'd', 'g', 'e', 't', '9', '6'
+#define USB_CFG_DEVICE_NAME_LEN 8
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
+/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS 0
+#define USB_CFG_DEVICE_SUBCLASS 0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS 3 /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
+ * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ * in static memory is in RAM, not in flash memory.
+ * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ * the driver must know the descriptor's length. The descriptor itself is
+ * found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ * char usbDescriptorDevice[];
+ * char usbDescriptorConfiguration[];
+ * char usbDescriptorHidReport[];
+ * char usbDescriptorString0[];
+ * int usbDescriptorStringVendor[];
+ * int usbDescriptorStringDevice[];
+ * int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ * USB_CFG_DESCR_PROPS_DEVICE
+ * USB_CFG_DESCR_PROPS_CONFIGURATION
+ * USB_CFG_DESCR_PROPS_STRINGS
+ * USB_CFG_DESCR_PROPS_STRING_0
+ * USB_CFG_DESCR_PROPS_STRING_VENDOR
+ * USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ * USB_CFG_DESCR_PROPS_HID
+ * USB_CFG_DESCR_PROPS_HID_REPORT
+ * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE 0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
+#define USB_CFG_DESCR_PROPS_STRINGS 0
+#define USB_CFG_DESCR_PROPS_STRING_0 0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
+#define USB_CFG_DESCR_PROPS_UNKNOWN 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG MCUCR */
+/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE GIMSK */
+/* #define USB_INTR_ENABLE_BIT INT0 */
+/* #define USB_INTR_PENDING GIFR */
+/* #define USB_INTR_PENDING_BIT INTF0 */
+/* #define USB_INTR_VECTOR INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE EIMSK */
+#define USB_INTR_ENABLE_BIT INT1
+/* #define USB_INTR_PENDING EIFR */
+#define USB_INTR_PENDING_BIT INTF1
+#define USB_INTR_VECTOR INT1_vect
+
diff --git a/keyboards/donutcables/readme.md b/keyboards/donutcables/readme.md
new file mode 100644
index 000000000..d68b6a743
--- /dev/null
+++ b/keyboards/donutcables/readme.md
@@ -0,0 +1,12 @@
+# Donut Cables
+
+Donut Cables LLC is located in North Carolina, USA.
+
+Website: https://donutcables.com/
+
+**Contact Donut Cables at the following:**
+
+Email: contact@donutcables.com
+Reddit: /u/donutcat_cables
+Geekhack/DeskThority: donutcat
+Discord: @donutcat on the #mechkeys Discord \ No newline at end of file
diff --git a/keyboards/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h
index 8c23ccdab..bf3d3db72 100644
--- a/keyboards/scrabblepad/config.h
+++ b/keyboards/donutcables/scrabblepad/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -49,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
-// #define BACKLIGHT_PIN
+// #define BACKLIGHT_PIN
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
@@ -188,5 +187,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
-
-#endif
diff --git a/keyboards/scrabblepad/info.json b/keyboards/donutcables/scrabblepad/info.json
index 1368abd4b..1368abd4b 100644
--- a/keyboards/scrabblepad/info.json
+++ b/keyboards/donutcables/scrabblepad/info.json
diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/scrabblepad/keymaps/default/config.h
new file mode 100644
index 000000000..a3ed4f762
--- /dev/null
+++ b/keyboards/donutcables/scrabblepad/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/scrabblepad/keymaps/default/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c
index 8d110dbd5..6f97d87e1 100644
--- a/keyboards/scrabblepad/keymaps/default/keymap.c
+++ b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "scrabblepad.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */
diff --git a/keyboards/scrabblepad/keymaps/default/readme.md b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md
index 4123e7667..4123e7667 100644
--- a/keyboards/scrabblepad/keymaps/default/readme.md
+++ b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md
diff --git a/keyboards/scrabblepad/keymaps/random/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c
index 8e7825966..8e7825966 100644
--- a/keyboards/scrabblepad/keymaps/random/keymap.c
+++ b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c
diff --git a/keyboards/scrabblepad/keymaps/random/readme.md b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md
index e719adaeb..e719adaeb 100644
--- a/keyboards/scrabblepad/keymaps/random/readme.md
+++ b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md
diff --git a/keyboards/scrabblepad/readme.md b/keyboards/donutcables/scrabblepad/readme.md
index 0227b988f..f0b05cbce 100644
--- a/keyboards/scrabblepad/readme.md
+++ b/keyboards/donutcables/scrabblepad/readme.md
@@ -12,6 +12,6 @@ Hardware Availability: [Donut Cables](https://donutcables.com/)
Make example for this keyboard (after setting up your build environment):
- make scrabblepad:default
+ make donutcables/scrabblepad:default
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk
index 20f532af4..20f532af4 100644
--- a/keyboards/scrabblepad/rules.mk
+++ b/keyboards/donutcables/scrabblepad/rules.mk
diff --git a/keyboards/scrabblepad/scrabblepad.c b/keyboards/donutcables/scrabblepad/scrabblepad.c
index e97cbd46c..e97cbd46c 100644
--- a/keyboards/scrabblepad/scrabblepad.c
+++ b/keyboards/donutcables/scrabblepad/scrabblepad.c
diff --git a/keyboards/scrabblepad/scrabblepad.h b/keyboards/donutcables/scrabblepad/scrabblepad.h
index fbe0dfc72..b4ac8b2c4 100644
--- a/keyboards/scrabblepad/scrabblepad.h
+++ b/keyboards/donutcables/scrabblepad/scrabblepad.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef SCRABBLEPAD_H
-#define SCRABBLEPAD_H
+#pragma once
#include "quantum.h"
@@ -53,5 +52,3 @@
{ kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, }, \
{ kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE } \
}
-
-#endif
diff --git a/keyboards/doro67/multi/config.h b/keyboards/doro67/multi/config.h
new file mode 100644
index 000000000..4a15063cc
--- /dev/null
+++ b/keyboards/doro67/multi/config.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xD070
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Backprop Studio
+#define PRODUCT Doro67 Multi PCB
+#define DESCRIPTION 65% custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 }
+
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN B7
+#define BACKLIGHT_LEVELS 7
diff --git a/keyboards/doro67/multi/info.json b/keyboards/doro67/multi/info.json
new file mode 100644
index 000000000..03252140d
--- /dev/null
+++ b/keyboards/doro67/multi/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Doro67 Multi PCB",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_ansi": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}]
+ },
+ "LAYOUT_iso": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Ins", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Del", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}]
+ },
+ "LAYOUT_multi": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Back", "x":13, "y":0}, {"label":"F2", "x":14, "y":0}, {"label":"Ins", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"F1", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"MO(1)", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/doro67/multi/keymaps/default/keymap.c b/keyboards/doro67/multi/keymaps/default/keymap.c
new file mode 100644
index 000000000..dd40a6c3f
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2019 ShadeDream
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ansi(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_ansi(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
+ BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/doro67/multi/keymaps/default/readme.md b/keyboards/doro67/multi/keymaps/default/readme.md
new file mode 100644
index 000000000..6e63cde3a
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default/readme.md
@@ -0,0 +1,36 @@
+# Default Doro67 ANSI layout.
+
+This is the default ANSI layout that comes flashed on the Doro67 multi PCB with
+the exception of adding backtick as it was not mapped.
+
+Default Layer:
+
+```
+,---------------------------------------------------------------.
+|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins|
+|---------------------------------------------------------------|
+|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del|
+|---------------------------------------------------------------|
+|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp|
+|---------------------------------------------------------------|
+|Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn|
+|---------------------------------------------------------------|
+|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt|
+`---------------------------------------------------------------'
+```
+
+FN Layer:
+
+```
+,---------------------------------------------------------------.
+|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
+|---------------------------------------------------------------|
+|BLTog|Stp|Dec|Inc| | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | |
+`---------------------------------------------------------------'
+```
diff --git a/keyboards/doro67/multi/keymaps/default_iso/keymap.c b/keyboards/doro67/multi/keymaps/default_iso/keymap.c
new file mode 100644
index 000000000..2e8d83982
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_iso/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2019 ShadeDream
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_iso(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_ENT, 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_NUHS, KC_PGUP,
+ 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_LSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_iso(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
+ BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/doro67/multi/keymaps/default_iso/readme.md b/keyboards/doro67/multi/keymaps/default_iso/readme.md
new file mode 100644
index 000000000..d375f0cc5
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_iso/readme.md
@@ -0,0 +1,36 @@
+# Default Doro67 ISO layout.
+
+This is the default ISO layout that comes flashed on the Doro67 multi PCB with
+the exception of adding backtick and UK ISO specific keycodes as they were not mapped.
+
+Default Layer:
+
+```
+,---------------------------------------------------------------.
+|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins|
+|---------------------------------------------------------------|
+|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del|
+|------------------------------------------------------|Entr|---|
+|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| #| |PUp|
+|---------------------------------------------------------------|
+|Shft| \| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn|
+|---------------------------------------------------------------|
+|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt|
+`---------------------------------------------------------------'
+```
+
+FN Layer:
+
+```
+,---------------------------------------------------------------.
+|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
+|---------------------------------------------------------------|
+|BLTog|Stp|Dec|Inc| | | | | | | | | | | |
+|------------------------------------------------------| |---|
+| | | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | |
+`---------------------------------------------------------------'
+```
diff --git a/keyboards/doro67/multi/keymaps/default_multi/keymap.c b/keyboards/doro67/multi/keymaps/default_multi/keymap.c
new file mode 100644
index 000000000..e57dce1ea
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_multi/keymap.c
@@ -0,0 +1,36 @@
+/* Copyright 2019 ShadeDream
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_multi(
+ 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_F2, 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_F1, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_multi(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL_TOGG, BL_STEP, BL_DEC, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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/doro67/multi/keymaps/default_multi/readme.md b/keyboards/doro67/multi/keymaps/default_multi/readme.md
new file mode 100644
index 000000000..e32f820c2
--- /dev/null
+++ b/keyboards/doro67/multi/keymaps/default_multi/readme.md
@@ -0,0 +1,39 @@
+# Default Doro67 Multi layout.
+
+This is the default Multi layout that comes flashed on the Doro67 multi PCB with
+the exception of adding backtick as it was not mapped.
+
+This layout supports both the blocker and non-blocker layouts (2 & 4) with the
+difference that the blocker layout lacks the right control key.
+
+Default Layer:
+
+```
+,---------------------------------------------------------------.
+|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS| F2|Ins|
+|---------------------------------------------------------------|
+|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del|
+|---------------------------------------------------------------|
+|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp|
+|---------------------------------------------------------------|
+|Shft| F1| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn|
+|---------------------------------------------------------------|
+|Ctrl |GUI |Alt | Space |Space| Space |Alt|MO1|Ctl|Lft|Dwn|Rgt|
+`---------------------------------------------------------------'
+```
+
+FN Layer:
+
+```
+,---------------------------------------------------------------.
+|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |
+|---------------------------------------------------------------|
+|BLTog|Stp|Dec|Inc| | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | | | | |
+|---------------------------------------------------------------|
+| | | | | | | | | | | | |
+`---------------------------------------------------------------'
+```
diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c
new file mode 100644
index 000000000..477ab245c
--- /dev/null
+++ b/keyboards/doro67/multi/multi.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 ShadeDream
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 "multi.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/doro67/multi/multi.h b/keyboards/doro67/multi/multi.h
new file mode 100644
index 000000000..0b68aed42
--- /dev/null
+++ b/keyboards/doro67/multi/multi.h
@@ -0,0 +1,59 @@
+/* Copyright 2019 ShadeDream
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
+ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \
+}
+
+#define LAYOUT_iso( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \
+}
+
+#define LAYOUT_multi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K48, K0E, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+ K40, K41, K42, K43, K44, K45, K49, K4A, K4B, K4C, K4D, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \
+}
diff --git a/keyboards/doro67/multi/readme.md b/keyboards/doro67/multi/readme.md
new file mode 100644
index 000000000..ac1484cd7
--- /dev/null
+++ b/keyboards/doro67/multi/readme.md
@@ -0,0 +1,16 @@
+Doro67 Multi PCB
+===
+
+A custom 65% keyboard with multiple layout support.
+
+Do not flash RGB firmware for this board.
+
+Keyboard Maintainer: [ShadeDream](https://github.com/shadedream)
+Hardware Supported: Doro67 Multi PCB
+Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make doro67/multi: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/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk
new file mode 100644
index 000000000..387ce7482
--- /dev/null
+++ b/keyboards/doro67/multi/rules.mk
@@ -0,0 +1,47 @@
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h
index 3c409350d..6b0f8525a 100644
--- a/keyboards/dozen0/config.h
+++ b/keyboards/dozen0/config.h
@@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-/* key combination for magic key command */
-/*#define IS_COMMAND() ( \
- keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)*/
-
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
diff --git a/keyboards/duck/duck_led/duck_led.c b/keyboards/duck/duck_led/duck_led.c
new file mode 100644
index 000000000..2fa920e4b
--- /dev/null
+++ b/keyboards/duck/duck_led/duck_led.c
@@ -0,0 +1,7 @@
+#include <avr/io.h>
+#include "duck_led.h"
+#include "quantum.h"
+
+void show(void) {
+ wait_us((RES / 1000UL) + 1);
+}
diff --git a/keyboards/duck/duck_led/duck_led.h b/keyboards/duck/duck_led/duck_led.h
new file mode 100644
index 000000000..2546366d0
--- /dev/null
+++ b/keyboards/duck/duck_led/duck_led.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#define RES 6000
+
+#define NS_PER_SEC (1000000000L)
+#define CYCLES_PER_SEC (F_CPU)
+#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
+#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+
+enum Device {
+ Device_PCBRGB,
+ Device_STATUSLED
+};
+
+void show(void);
+
diff --git a/keyboards/duck/eagle_viper/readme.md b/keyboards/duck/eagle_viper/readme.md
index 14fb16669..3fec11bc0 100644
--- a/keyboards/duck/eagle_viper/readme.md
+++ b/keyboards/duck/eagle_viper/readme.md
@@ -9,4 +9,3 @@ Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127)
Make example for this keyboard (after setting up your build environment):
make duck/eagle_viper/v2:default
-
diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h
index f454b2e0e..a0ce866cc 100644
--- a/keyboards/duck/eagle_viper/v2/config.h
+++ b/keyboards/duck/eagle_viper/v2/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 4
+#define BOOTMAGIC_LITE_COLUMN 10
+
#define TAPPING_TERM 200
-#endif
diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.c b/keyboards/duck/eagle_viper/v2/indicator_leds.c
index 03a93197d..fc90ed3fb 100644
--- a/keyboards/duck/eagle_viper/v2/indicator_leds.c
+++ b/keyboards/duck/eagle_viper/v2/indicator_leds.c
@@ -19,19 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#include <util/delay.h>
#include "indicator_leds.h"
-
-#define RES 6000
+#include "duck_led/duck_led.h"
#define LED_T1H 600
#define LED_T1L 650
#define LED_T0H 250
#define LED_T0L 1000
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
-
void send_bit_d4(bool bitVal) {
if(bitVal) {
asm volatile (
@@ -66,14 +60,12 @@ void send_bit_d4(bool bitVal) {
}
}
-void show(void) {
- _delay_us((RES / 1000UL) + 1);
-}
-
-void send_value(uint8_t byte) {
+void send_value(uint8_t byte, enum Device device) {
for(uint8_t b = 0; b < 8; b++) {
- send_bit_d4(byte & 0b10000000);
- byte <<= 1;
+ if(device == Device_STATUSLED) {
+ send_bit_d4(byte & 0b10000000);
+ byte <<= 1;
+ }
}
}
@@ -83,7 +75,8 @@ void indicator_leds_set(bool leds[8]) {
cli();
for(led_cnt = 0; led_cnt < 8; led_cnt++)
- send_value(leds[led_cnt] ? 255 : 0);
+ send_value(leds[led_cnt] ? 255 : 0, Device_STATUSLED);
sei();
show();
}
+
diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.h b/keyboards/duck/eagle_viper/v2/indicator_leds.h
index c174fa404..fe66eef6b 100644
--- a/keyboards/duck/eagle_viper/v2/indicator_leds.h
+++ b/keyboards/duck/eagle_viper/v2/indicator_leds.h
@@ -1,2 +1 @@
void indicator_leds_set(bool leds[8]);
-void show(void);
diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c
index 7003a7ae0..a6bc56342 100644
--- a/keyboards/duck/eagle_viper/v2/matrix.c
+++ b/keyboards/duck/eagle_viper/v2/matrix.c
@@ -89,6 +89,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
+ if (debouncing) {
+ dprint("bounce!: "); dprintf("%02X", debouncing); dprintln();
+ }
debouncing = DEBOUNCING_DELAY;
}
}
diff --git a/keyboards/duck/eagle_viper/v2/readme.md b/keyboards/duck/eagle_viper/v2/readme.md
index 32ad8453c..31f70b93b 100644
--- a/keyboards/duck/eagle_viper/v2/readme.md
+++ b/keyboards/duck/eagle_viper/v2/readme.md
@@ -11,6 +11,8 @@ Make example for this keyboard (after setting up your build environment):
make eagle_viper/v2:default
+**Reset Key:** To put the Eagle/Viper V2 into reset, hold caps lock key (`K2A`) while plugging in.
+
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
## Hardware Notes
diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk
index 64d839fcb..1abd7d941 100644
--- a/keyboards/duck/eagle_viper/v2/rules.mk
+++ b/keyboards/duck/eagle_viper/v2/rules.mk
@@ -50,23 +50,23 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= yes # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = yes
SRC += indicator_leds.c \
- matrix.c
+ matrix.c duck_led/duck_led.c
diff --git a/keyboards/duck/eagle_viper/v2/v2.h b/keyboards/duck/eagle_viper/v2/v2.h
index d149471ba..7fefcf770 100644
--- a/keyboards/duck/eagle_viper/v2/v2.h
+++ b/keyboards/duck/eagle_viper/v2/v2.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef V2_H
-#define V2_H
+#pragma once
#include "quantum.h"
@@ -78,4 +77,3 @@
#define LAYOUT_eagle LAYOUT_60_ansi
-#endif
diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h
index 4bc535b19..774e28491 100644
--- a/keyboards/duck/jetfire/config.h
+++ b/keyboards/duck/jetfire/config.h
@@ -48,6 +48,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
+
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
diff --git a/keyboards/duck/jetfire/backlight_led.c b/keyboards/duck/jetfire/indicator_leds.c
index 7e9dca6e9..7dbdb1ff7 100644
--- a/keyboards/duck/jetfire/backlight_led.c
+++ b/keyboards/duck/jetfire/indicator_leds.c
@@ -17,21 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#include <util/delay.h>
#include <stdint.h>
-#include "backlight_led.h"
+#include "indicator_leds.h"
#include "quantum.h"
-// #include "led.h"
-
-#define T1H 900
-#define T1L 600
-#define T0H 400
-#define T0L 900
-#define RES 6000
-
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+#define LED_T1H 900
+#define LED_T1L 600
+#define LED_T0H 400
+#define LED_T0L 900
void send_bit_d4(bool bitVal)
{
@@ -48,8 +40,8 @@ void send_bit_d4(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -63,8 +55,8 @@ void send_bit_d4(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
@@ -83,8 +75,8 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -98,20 +90,15 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
-void show(void)
-{
- _delay_us((RES / 1000UL) + 1);
-}
-
void send_value(uint8_t byte, enum Device device)
{
for(uint8_t b = 0; b < 8; b++) {
- if(device == Device_STATELED) {
+ if(device == Device_STATUSLED) {
send_bit_d4(byte & 0b10000000);
}
if(device == Device_PCBRGB) {
@@ -123,7 +110,7 @@ void send_value(uint8_t byte, enum Device device)
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device)
{
- send_value(g, device);
send_value(r, device);
+ send_value(g, device);
send_value(b, device);
}
diff --git a/keyboards/duck/jetfire/backlight_led.h b/keyboards/duck/jetfire/indicator_leds.h
index 36d8d9aa9..695e1db6d 100644
--- a/keyboards/duck/jetfire/backlight_led.h
+++ b/keyboards/duck/jetfire/indicator_leds.h
@@ -1,10 +1,6 @@
-#ifndef BACKLIGHT_LED_H
-#define BACKLIGHT_LED_H
+#pragma once
-enum Device {
- Device_PCBRGB,
- Device_STATELED
-};
+#include "duck_led/duck_led.h"
void backlight_init_ports(void);
void backlight_set_state(bool cfg[7]);
@@ -13,6 +9,3 @@ void backlight_toggle_rgb(bool enabled);
void backlight_set_rgb(uint8_t cfg[17][3]);
void backlight_set(uint8_t level);
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device);
-void show(void);
-
-#endif
diff --git a/keyboards/duck/jetfire/jetfire.c b/keyboards/duck/jetfire/jetfire.c
index 81bdb95ba..0662489c6 100644
--- a/keyboards/duck/jetfire/jetfire.c
+++ b/keyboards/duck/jetfire/jetfire.c
@@ -14,9 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "jetfire.h"
-#include "backlight_led.h"
+#include "indicator_leds.h"
-enum backlight_level {
+enum BACKLIGHT_AREAS {
BACKLIGHT_ALPHA = 0b0000001,
BACKLIGHT_MOD = 0b0000010,
BACKLIGHT_FROW = 0b0000100,
@@ -137,15 +137,15 @@ void backlight_update_state()
send_color(backlight_state_led & (1<<STATE_LED_SCROLL_LOCK) ? 255 : 0,
backlight_state_led & (1<<STATE_LED_CAPS_LOCK) ? 255 : 0,
backlight_state_led & (1<<STATE_LED_NUM_LOCK) ? 255 : 0,
- Device_STATELED);
+ Device_STATUSLED);
send_color(backlight_state_led & (1<<STATE_LED_LAYER_1) ? 255 : 0,
backlight_state_led & (1<<STATE_LED_LAYER_2) ? 255 : 0,
backlight_state_led & (1<<STATE_LED_LAYER_0) ? 255 : 0,
- Device_STATELED);
+ Device_STATUSLED);
send_color(backlight_state_led & (1<<STATE_LED_LAYER_4) ? 255 : 0,
backlight_state_led & (1<<STATE_LED_LAYER_3) ? 255 : 0,
0,
- Device_STATELED);
+ Device_STATUSLED);
sei();
show();
}
diff --git a/keyboards/duck/jetfire/jetfire.h b/keyboards/duck/jetfire/jetfire.h
index 9ce1406f0..3c4834bce 100644
--- a/keyboards/duck/jetfire/jetfire.h
+++ b/keyboards/duck/jetfire/jetfire.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef JETFIRE_H
-#define JETFIRE_H
+#pragma once
#include "quantum.h"
@@ -57,4 +56,3 @@
{ K0A, K0B, K0C, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, K0I, KC_NO,KC_NO,KC_NO, K0M, K0N, K0O, K0P, K0Q, K0R, K0S, KC_NO } \
}
-#endif
diff --git a/keyboards/duck/jetfire/readme.md b/keyboards/duck/jetfire/readme.md
index 34b351a72..8de2f5ced 100644
--- a/keyboards/duck/jetfire/readme.md
+++ b/keyboards/duck/jetfire/readme.md
@@ -9,7 +9,7 @@ Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: Duck Jetfire PCB
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=92708.0)
-To get into bootloader mode, hold the top top most key above the 2 navigation keys while connecting the USB cable.
+**Reset Key:** To put the Jetfire into reset, hold top most key above the 2 navigation keys (`K5P`) while plugging in.
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk
index 8e05516df..c70859329 100644
--- a/keyboards/duck/jetfire/rules.mk
+++ b/keyboards/duck/jetfire/rules.mk
@@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
@@ -70,5 +70,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
CUSTOM_MATRIX = yes
-SRC += backlight_led.c \
- matrix.c
+SRC += indicator_leds.c \
+ matrix.c duck_led/duck_led.c
diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h
index 9e3a08fbd..d302fb395 100644
--- a/keyboards/duck/lightsaver/config.h
+++ b/keyboards/duck/lightsaver/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
+
#define TAPPING_TERM 200
-#endif
diff --git a/keyboards/duck/lightsaver/indicator_leds.c b/keyboards/duck/lightsaver/indicator_leds.c
index 0a54e151e..5d2e1ad9f 100644
--- a/keyboards/duck/lightsaver/indicator_leds.c
+++ b/keyboards/duck/lightsaver/indicator_leds.c
@@ -18,17 +18,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <avr/io.h>
#include <stdbool.h>
#include <util/delay.h>
+#include "duck_led/duck_led.h"
-#define T1H 900
-#define T1L 600
-#define T0H 400
-#define T0L 900
-#define RES 6000
-
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+#define LED_T1H 900
+#define LED_T1L 600
+#define LED_T0H 400
+#define LED_T0L 900
void send_bit_d4(bool bitVal) {
if(bitVal) {
@@ -44,8 +39,8 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -59,33 +54,31 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
-void show(void) {
- _delay_us((RES / 1000UL) + 1);
-}
-
-void send_value(uint8_t byte) {
+void send_value(uint8_t byte, enum Device device) {
for(uint8_t b = 0; b < 8; b++) {
- send_bit_d4(byte & 0b10000000);
- byte <<= 1;
+ if(device == Device_STATUSLED) {
+ send_bit_d4(byte & 0b10000000);
+ byte <<= 1;
+ }
}
}
-void send_color(uint8_t r, uint8_t g, uint8_t b) {
- send_value(g);
- send_value(r);
- send_value(b);
+void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) {
+ send_value(r, device);
+ send_value(g, device);
+ send_value(b, device);
}
void indicator_leds_set(bool leds[8]) {
cli();
- send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0);
- send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0);
- send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0);
+ send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0, Device_STATUSLED);
+ send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0, Device_STATUSLED);
+ send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0, Device_STATUSLED);
sei();
show();
}
diff --git a/keyboards/duck/lightsaver/lightsaver.h b/keyboards/duck/lightsaver/lightsaver.h
index 19fcf36ba..1e1185713 100644
--- a/keyboards/duck/lightsaver/lightsaver.h
+++ b/keyboards/duck/lightsaver/lightsaver.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef LIGHTSAVER_H
-#define LIGHTSAVER_H
+#pragma once
#include "quantum.h"
@@ -37,4 +36,3 @@
/* 5 */ { K0A, K0B, K0C, NO, NO, NO, NO, NO, K0I, NO, K0K, NO, K0M, K0N, K0O, K0P, K0Q, K0R } \
}
-#endif
diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c
index a07cdd0d1..543205c0b 100644
--- a/keyboards/duck/lightsaver/matrix.c
+++ b/keyboards/duck/lightsaver/matrix.c
@@ -87,6 +87,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
+ if (debouncing) {
+ dprint("bounce!: "); dprintf("%02X", debouncing); dprintln();
+ }
debouncing = DEBOUNCING_DELAY;
}
}
diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk
index d95dbd960..bc7b901b4 100644
--- a/keyboards/duck/lightsaver/rules.mk
+++ b/keyboards/duck/lightsaver/rules.mk
@@ -50,23 +50,23 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= no # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= yes # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = yes
SRC += indicator_leds.c \
- matrix.c
+ matrix.c duck_led/duck_led.c
diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h
index 5400c53ef..d818cb622 100644
--- a/keyboards/duck/octagon/v1/config.h
+++ b/keyboards/duck/octagon/v1/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
-#define TAPPING_TERM 200
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
-#endif
+#define TAPPING_TERM 200
diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c
index 855534994..233404ed3 100644
--- a/keyboards/duck/octagon/v1/matrix.c
+++ b/keyboards/duck/octagon/v1/matrix.c
@@ -84,6 +84,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
+ if (debouncing) {
+ dprint("bounce!: "); dprintf("%02X", debouncing); dprintln();
+ }
debouncing = DEBOUNCING_DELAY;
}
}
diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk
index a08695b50..66d2c8def 100644
--- a/keyboards/duck/octagon/v1/rules.mk
+++ b/keyboards/duck/octagon/v1/rules.mk
@@ -50,21 +50,21 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= no # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= yes # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = yes
diff --git a/keyboards/duck/octagon/v1/v1.h b/keyboards/duck/octagon/v1/v1.h
index d89188f22..471a91a33 100644
--- a/keyboards/duck/octagon/v1/v1.h
+++ b/keyboards/duck/octagon/v1/v1.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef V1_H
-#define V1_H
+#pragma once
#include "quantum.h"
@@ -49,4 +48,3 @@
{ K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \
{ K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \
}
-#endif
diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h
index 78d18d3bb..4aab587f6 100644
--- a/keyboards/duck/octagon/v2/config.h
+++ b/keyboards/duck/octagon/v2/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -44,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D6
#define RGBLED_NUM 17
+/* Set to top left most key */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 10
+
#define TAPPING_TERM 200
-#endif
diff --git a/keyboards/duck/octagon/v2/indicator_leds.c b/keyboards/duck/octagon/v2/indicator_leds.c
index c24509f51..116306fb7 100644
--- a/keyboards/duck/octagon/v2/indicator_leds.c
+++ b/keyboards/duck/octagon/v2/indicator_leds.c
@@ -20,16 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <util/delay.h>
#include "indicator_leds.h"
-#define T1H 900
-#define T1L 600
-#define T0H 400
-#define T0L 900
-#define RES 6000
-
-#define NS_PER_SEC (1000000000L)
-#define CYCLES_PER_SEC (F_CPU)
-#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
-#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
+#define LED_T1H 900
+#define LED_T1L 600
+#define LED_T0H 400
+#define LED_T0L 900
void send_bit_d4(bool bitVal) {
if(bitVal) {
@@ -45,8 +39,8 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -60,8 +54,8 @@ void send_bit_d4(bool bitVal) {
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (4),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
@@ -80,8 +74,8 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T1H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T1L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2));
} else {
asm volatile (
"sbi %[port], %[bit] \n\t"
@@ -95,15 +89,11 @@ void send_bit_d6(bool bitVal)
::
[port] "I" (_SFR_IO_ADDR(PORTD)),
[bit] "I" (6),
- [onCycles] "I" (NS_TO_CYCLES(T0H) - 2),
- [offCycles] "I" (NS_TO_CYCLES(T0L) - 2));
+ [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2),
+ [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2));
}
}
-void show(void) {
- _delay_us((RES / 1000UL) + 1);
-}
-
void send_value(uint8_t byte, enum Device device) {
for(uint8_t b = 0; b < 8; b++) {
if(device == Device_STATUSLED) {
@@ -117,8 +107,8 @@ void send_value(uint8_t byte, enum Device device) {
}
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) {
- send_value(g, device);
send_value(r, device);
+ send_value(g, device);
send_value(b, device);
}
diff --git a/keyboards/duck/octagon/v2/indicator_leds.h b/keyboards/duck/octagon/v2/indicator_leds.h
index 9bb2c8ced..ad3ec54f5 100644
--- a/keyboards/duck/octagon/v2/indicator_leds.h
+++ b/keyboards/duck/octagon/v2/indicator_leds.h
@@ -1,11 +1,7 @@
-enum Device {
- Device_PCBRGB,
- Device_STATUSLED
-};
+#include "duck_led/duck_led.h"
void indicator_leds_set(bool leds[8]);
void backlight_toggle_rgb(bool enabled);
void backlight_set_rgb(uint8_t cfg[17][3]);
void backlight_init_ports(void);
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device);
-void show(void); \ No newline at end of file
diff --git a/keyboards/duck/octagon/v2/matrix.c b/keyboards/duck/octagon/v2/matrix.c
index a63a37640..e6e7046b4 100644
--- a/keyboards/duck/octagon/v2/matrix.c
+++ b/keyboards/duck/octagon/v2/matrix.c
@@ -89,6 +89,9 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
+ if (debouncing) {
+ dprint("bounce!: "); dprintf("%02X", debouncing); dprintln();
+ }
debouncing = DEBOUNCING_DELAY;
}
}
diff --git a/keyboards/duck/octagon/v2/readme.md b/keyboards/duck/octagon/v2/readme.md
index b409454fc..cc9474fc9 100644
--- a/keyboards/duck/octagon/v2/readme.md
+++ b/keyboards/duck/octagon/v2/readme.md
@@ -11,6 +11,8 @@ Make example for this keyboard (after setting up your build environment):
make octagon/v2:default
+**Reset Key:** To put the Octagon V2 into reset, hold the top right most key (`K5Q`) while plugging in.
+
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
## Hardware Notes
diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk
index 37f3938d9..c40324707 100644
--- a/keyboards/duck/octagon/v2/rules.mk
+++ b/keyboards/duck/octagon/v2/rules.mk
@@ -50,25 +50,25 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= no # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= yes # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = yes
SRC += indicator_leds.c \
- matrix.c
+ matrix.c duck_led/duck_led.c
LAYOUTS = 75_ansi
diff --git a/keyboards/duck/octagon/v2/v2.h b/keyboards/duck/octagon/v2/v2.h
index 1487b3640..d60631009 100644
--- a/keyboards/duck/octagon/v2/v2.h
+++ b/keyboards/duck/octagon/v2/v2.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef V2_H
-#define V2_H
+#pragma once
#include "quantum.h"
@@ -49,4 +48,3 @@
{ K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, K1P, KC_NO }, \
{ K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O, K0P, KC_NO } \
}
-#endif
diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h
index 2ac7fbdc8..0d6c4ae39 100644
--- a/keyboards/dztech/dz40rgb/config.h
+++ b/keyboards/dztech/dz40rgb/config.h
@@ -22,7 +22,6 @@
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-#define RGB_MATRIX_SKIP_FRAMES 0
#define RGB_MATRIX_KEYPRESSES
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
@@ -31,4 +30,3 @@
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2
-
diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h
index a1b3a19d9..f43b39810 100644
--- a/keyboards/dztech/dz60rgb/config.h
+++ b/keyboards/dztech/dz60rgb/config.h
@@ -23,8 +23,9 @@
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-#define RGB_MATRIX_SKIP_FRAMES 0
#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 4
+#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c
index 2c667ef42..0eff4ca8a 100644
--- a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c
@@ -10,7 +10,7 @@ extern bool g_suspend_state;
#define _LAYER7 7
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAYER0] = LAYOUT( /* Base */
- RESET, RGB_MOD, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\
@@ -60,92 +60,90 @@ void rgb_matrix_indicators_user(void) {
if (!g_suspend_state) {
switch (biton32(layer_state)) {
case _LAYER1:
- rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
+ rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false);
+ break;
case _LAYER2:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false);
+ break;
+ case _LAYER3:
+ if ( this_led & (1<<USB_LED_NUM_LOCK)) {
+ rgb_matrix_set_color(13, 0xFF, 0x00, 0x00);
+ } else {
+ rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
+ }
+ rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(2, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(3, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(4, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(5, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(6, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(7, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(8, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(14, 0x00, 0x00, 0xFF);
+ rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(17, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(18, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(19, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(20, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(21, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(22, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(23, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(27, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(28, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(29, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(30, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(31, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(32, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(33, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(34, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(35, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(36, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(40, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(41, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(42, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(43, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(44, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(45, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(46, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(47, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(48, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(49, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(53, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(54, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(55, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(56, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(57, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(58, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(59, 0xFF, 0x00, 0x00);
+ rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
+ break;
case _LAYER4:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
- }
- }
- if ( this_led & (1<<USB_LED_CAPS_LOCK)) {
- rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
- }
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false);
+ break;
+ }
+ }
+ if ( this_led & (1<<USB_LED_CAPS_LOCK)) {
+ rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
+ }
- switch (biton32(layer_state)) {
- case _LAYER3:
- if ( this_led & (1<<USB_LED_NUM_LOCK))
- {
- rgb_matrix_set_color(13, 0xFF, 0x00, 0x00);
- }
- else
- {
- rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
- }
- rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(2, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(3, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(4, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(5, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(6, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(7, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(8, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(14, 0x00, 0x00, 0xFF);
- rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(17, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(18, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(19, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(20, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(21, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(22, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(23, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(27, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(28, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(29, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(30, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(31, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(32, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(33, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(34, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(35, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(36, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(40, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(41, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(42, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(43, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(44, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(45, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(46, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(47, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(48, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(49, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(53, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(54, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(55, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(56, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(57, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(58, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(59, 0xFF, 0x00, 0x00);
- rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
- break;
- }
}
diff --git a/keyboards/emptystring/NQG/NQG.c b/keyboards/emptystring/NQG/NQG.c
new file mode 100644
index 000000000..eedf25e88
--- /dev/null
+++ b/keyboards/emptystring/NQG/NQG.c
@@ -0,0 +1 @@
+#include "NQG.h"
diff --git a/keyboards/emptystring/NQG/NQG.h b/keyboards/emptystring/NQG/NQG.h
new file mode 100644
index 000000000..943ea6ab1
--- /dev/null
+++ b/keyboards/emptystring/NQG/NQG.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, \
+ L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, \
+ L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, \
+ L30, L32, L33, L34, L35, L36, L37 \
+ ) { \
+ {L00, L01, L02, L03, L04, L05, L06, L07, L08, L09}, \
+ {L10, L11, L12, L13, L14, L15, L16, L17, L18, L19}, \
+ {L20, L21, L22, L23, L24, L25, L26, L27, L28, L29}, \
+ {L30, KC_NO, L32, L33, L34, L35, L36, L37, KC_NO, KC_NO} \
+ }
diff --git a/keyboards/emptystring/NQG/config.h b/keyboards/emptystring/NQG/config.h
new file mode 100644
index 000000000..3f52ba3ea
--- /dev/null
+++ b/keyboards/emptystring/NQG/config.h
@@ -0,0 +1,42 @@
+/*
+Copyright 2019 Bernard Shih (twitter: @SA_EndlessGame)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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 "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x0076
+#define PRODUCT_ID 0x0037
+#define DEVICE_VER 0x0100
+#define MANUFACTURER emptystring
+#define PRODUCT NQG
+#define DESCRIPTION 30% ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 10
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS {B6, B2, B3, B1}
+#define MATRIX_COL_PINS {F7, F6, B5, B4, E6, D7, C6, D4, D0, D1}
+
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+#define TAPPING_TERM 200
diff --git a/keyboards/emptystring/NQG/keymaps/default/keymap.c b/keyboards/emptystring/NQG/keymaps/default/keymap.c
new file mode 100644
index 000000000..cd465519b
--- /dev/null
+++ b/keyboards/emptystring/NQG/keymaps/default/keymap.c
@@ -0,0 +1,61 @@
+#include QMK_KEYBOARD_H
+
+#define _BASE 0
+#define _LOWER 1
+#define _RAISE 2
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_ENSL,
+ TD_N0BS,
+ TD_RPPI,
+};
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_ENSL TD(TD_ENSL)
+#define KC_N0BS TD(TD_N0BS)
+#define KC_RPPI TD(TD_RPPI)
+
+#define KC_BSCT LCTL_T(KC_BSPC)
+#define KC_ALEN LALT(KC_ENT)
+#define KC_CTEN LCTL(KC_ENT)
+#define KC_STAB LSFT_T(KC_TAB)
+#define KC_WLNG LALT(KC_LSFT)
+#define KC_LOCK LGUI(KC_L)
+#define KC_ULCK LCTL(LALT(KC_DEL))
+#define KC_DSTP LGUI(KC_D)
+#define KC_ESLO LT(_LOWER, KC_ESC)
+
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_ENSL] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ENT),
+ [TD_N0BS] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_BSLS),
+ [TD_RPPI] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_PIPE),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
+ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, \
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENSL,\
+ KC_STAB, KC_ESLO, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, MO(_RAISE)
+ ),
+
+ [_LOWER] = LAYOUT(
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPPI, \
+ _______, _______, KC_DSTP, _______, KC_WLNG, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \
+ _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_HOME, KC_END,\
+ KC_CTEN, _______, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, KC_ULCK
+ ),
+
+ [_RAISE] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_N0BS, \
+ _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \
+ _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,\
+ KC_ALEN, KC_LOCK, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, _______
+ ),
+
+
+};
diff --git a/keyboards/emptystring/NQG/keymaps/default/rules.mk b/keyboards/emptystring/NQG/keymaps/default/rules.mk
new file mode 100644
index 000000000..e5ddcae8d
--- /dev/null
+++ b/keyboards/emptystring/NQG/keymaps/default/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/emptystring/NQG/readme.md b/keyboards/emptystring/NQG/readme.md
new file mode 100644
index 000000000..a8c899863
--- /dev/null
+++ b/keyboards/emptystring/NQG/readme.md
@@ -0,0 +1,15 @@
+# NQG: Not Quite Gherkin
+
+![NQG](https://github.com/culturalsnow/NQG/blob/master/images/NQGLayout.jpg)
+
+NQG (Not Quite Gherkin) is a 30% ortholinear keyboard with a macro key and dedicated row for thumb keys, made by emptystring studio.
+
+Keyboard Maintainer: [Culturalsnow](http://github.com/culturalsnow)
+Hardware Supported: NQG PCB, Pro Micro
+Hardware Availability: Kits are available from [SA_EndlessGame](http://twitter.com/SA_EndlessGame)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make emptystring/NQG: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/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk
new file mode 100644
index 000000000..9a46bb854
--- /dev/null
+++ b/keyboards/emptystring/NQG/rules.mk
@@ -0,0 +1,64 @@
+# MCU name
+
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
diff --git a/keyboards/ergodash/rev1/keymaps/default/config.h b/keyboards/ergodash/rev1/keymaps/default/config.h
index 7e7fe4f69..dc00328dc 100644
--- a/keyboards/ergodash/rev1/keymaps/default/config.h
+++ b/keyboards/ergodash/rev1/keymaps/default/config.h
@@ -18,10 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
/* Use I2C or Serial, not both */
@@ -34,8 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
// #define EE_HANDS
-#endif
-
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 24
diff --git a/keyboards/ergodash/rev1/keymaps/default/keymap.c b/keyboards/ergodash/rev1/keymaps/default/keymap.c
index 6f20908bc..a1bfb2267 100644
--- a/keyboards/ergodash/rev1/keymaps/default/keymap.c
+++ b/keyboards/ergodash/rev1/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H
-#include "action_layer.h"
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
diff --git a/keyboards/ergodash/rev2/keymaps/default/config.h b/keyboards/ergodash/rev2/keymaps/default/config.h
index 7e7fe4f69..90a364811 100644
--- a/keyboards/ergodash/rev2/keymaps/default/config.h
+++ b/keyboards/ergodash/rev2/keymaps/default/config.h
@@ -18,10 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
/* Use I2C or Serial, not both */
@@ -34,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
// #define EE_HANDS
-#endif
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/ergodash/rev2/keymaps/default/keymap.c b/keyboards/ergodash/rev2/keymaps/default/keymap.c
index b709ab7e9..5412eb0c0 100644
--- a/keyboards/ergodash/rev2/keymaps/default/keymap.c
+++ b/keyboards/ergodash/rev2/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H
-#include "action_layer.h"
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h
new file mode 100644
index 000000000..8ace28f24
--- /dev/null
+++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h
@@ -0,0 +1,41 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 24
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json
new file mode 100644
index 000000000..8f8d30855
--- /dev/null
+++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keyboard-layout-editor.json
@@ -0,0 +1,460 @@
+[
+ {
+ "name": "gsm-ErgoDash",
+ "notes": "Front Legend = \"Adust\" layer (both lower and Raise)\n\n\nLayout Positions are an aproximation and not exact"
+ },
+ [
+ {
+ "x": 3,
+ "t": "#0000ff\n#ff0000"
+ },
+ "\nF3\n\n\n\n\n\n\n\n3 #",
+ {
+ "x": 11
+ },
+ "\nF8\n\n\n\n\n\n\n\n8 *"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2
+ },
+ "\nF2\n\n\n\n\n\n\n\n2 @",
+ {
+ "x": 1
+ },
+ "\nF4\n\n\n\n\n\n\n\n4 $",
+ {
+ "x": 9
+ },
+ "\nF7\n\n\n\n\n\n\n\n7 &",
+ {
+ "x": 1
+ },
+ "\nF9\n\n\n\n\n\n\n\n9 ("
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5
+ },
+ "\nF5\n\n\n\n\n\n\n\n5 %",
+ {
+ "x": 7
+ },
+ "\nF6\n\n\n\n\n\n\n\n6 &"
+ ],
+ [
+ {
+ "y": -0.875,
+ "t": "#000000",
+ "a": 3
+ },
+ "Esc\n\n\n\nreset",
+ {
+ "t": "#0000ff\n#ff0000",
+ "a": 4
+ },
+ "\nF1\n\n\n\n\n\n\n\n1 !",
+ {
+ "x": 15
+ },
+ "\nF10\n\n\n\n\n\n\n\n0 )",
+ {
+ "t": "#000000",
+ "a": 7,
+ "fa": [
+ 2
+ ]
+ },
+ "Bksp"
+ ],
+ [
+ {
+ "y": -0.625,
+ "x": 6,
+ "f": 3
+ },
+ "= +",
+ {
+ "x": 5,
+ "f": 3
+ },
+ "- _"
+ ],
+ [
+ {
+ "y": -0.75,
+ "x": 3,
+ "f": 3
+ },
+ "E",
+ {
+ "x": 11,
+ "f": 3
+ },
+ "I"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2,
+ "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000",
+ "a": 4,
+ "f": 3
+ },
+ "PgUP\nUP\n\n\n\n\n\n\n\nW",
+ {
+ "x": 1,
+ "t": "#000000",
+ "a": 3,
+ "f": 3
+ },
+ "R\n\n\n\nrgb_tog",
+ {
+ "x": 9,
+ "a": 7,
+ "f": 3
+ },
+ "U",
+ {
+ "x": 1,
+ "f": 3
+ },
+ "O"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5,
+ "a": 3,
+ "f": 3
+ },
+ "T\n\n\n\nbl_tog",
+ {
+ "x": 7,
+ "a": 7,
+ "f": 3
+ },
+ "Y"
+ ],
+ [
+ {
+ "y": -0.875,
+ "f": 3
+ },
+ "Tab",
+ {
+ "f": 3
+ },
+ "Q",
+ {
+ "x": 15,
+ "f": 3
+ },
+ "P",
+ {
+ "f": 3
+ },
+ "] }"
+ ],
+ [
+ {
+ "y": -0.625,
+ "x": 6
+ },
+ "",
+ {
+ "x": 5,
+ "f": 3
+ },
+ "[ {"
+ ],
+ [
+ {
+ "y": -0.75,
+ "x": 3,
+ "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000",
+ "a": 0,
+ "f": 3
+ },
+ "End\nRIGHT\n\n\nrgb_sai\n\n\n\n\nD",
+ {
+ "x": 11,
+ "t": "#000000",
+ "a": 7,
+ "f": 3
+ },
+ "K"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2,
+ "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000",
+ "a": 0,
+ "f": 3
+ },
+ "PgDwn\nDOWN\n\n\nrgb_hai\n\n\n\n\nS",
+ {
+ "x": 1,
+ "t": "#000000",
+ "a": 3,
+ "f": 3
+ },
+ "F\n\n\n\nrgb_val",
+ {
+ "x": 9,
+ "a": 7,
+ "f": 3
+ },
+ "J",
+ {
+ "x": 1,
+ "f": 3
+ },
+ "L"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5,
+ "a": 3,
+ "f": 3
+ },
+ "G\n\n\n\nbl_inc",
+ {
+ "x": 7,
+ "a": 7,
+ "f": 3
+ },
+ "H"
+ ],
+ [
+ {
+ "y": -0.875,
+ "c": "#0000ff",
+ "t": "#ffffffff",
+ "f": 3
+ },
+ "Raise",
+ {
+ "c": "#cccccc",
+ "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000",
+ "a": 4,
+ "f": 3
+ },
+ "Home\nLEFT\n\n\n\n\n\n\n\nA",
+ {
+ "x": 15,
+ "t": "#000000",
+ "a": 7,
+ "f": 3
+ },
+ ": ;",
+ {
+ "f": 3
+ },
+ "' \""
+ ],
+ [
+ {
+ "y": -0.625,
+ "x": 6
+ },
+ "",
+ {
+ "x": 5
+ },
+ ""
+ ],
+ [
+ {
+ "y": -0.75,
+ "x": 3,
+ "a": 3,
+ "f": 3
+ },
+ "C\n\n\n\nrgb_sad",
+ {
+ "x": 11,
+ "a": 7,
+ "f": 3
+ },
+ ", <"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2,
+ "a": 3,
+ "f": 3
+ },
+ "X\n\n\n\nrgb_sad",
+ {
+ "x": 1,
+ "f": 3
+ },
+ "V\n\n\n\nrgb_vad",
+ {
+ "x": 9,
+ "a": 7,
+ "f": 3
+ },
+ "M",
+ {
+ "x": 1,
+ "f": 3
+ },
+ ". >"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5,
+ "a": 3,
+ "f": 3
+ },
+ "B\n\n\n\nbl_dec",
+ {
+ "x": 7,
+ "a": 7,
+ "f": 3
+ },
+ "N"
+ ],
+ [
+ {
+ "y": -0.875,
+ "a": 3,
+ "f": 3
+ },
+ "Shift\n\n\n\neep_rst",
+ {
+ "a": 7,
+ "f": 3
+ },
+ "Z",
+ {
+ "x": 15,
+ "f": 3
+ },
+ "/ ?",
+ {
+ "f": 3
+ },
+ "Shift"
+ ],
+ [
+ {
+ "y": -0.25,
+ "x": 2,
+ "f": 3
+ },
+ "Alt",
+ {
+ "x": 13,
+ "f": 3
+ },
+ "DOWN"
+ ],
+ [
+ {
+ "y": -0.9749999999999996,
+ "x": 3.5,
+ "f": 3
+ },
+ "Ctrl",
+ {
+ "x": 10.15,
+ "f": 3
+ },
+ "LEFT"
+ ],
+ [
+ {
+ "y": -0.7750000000000004,
+ "f": 3
+ },
+ "`~",
+ {
+ "f": 3
+ },
+ "\\|",
+ {
+ "x": 15,
+ "f": 3
+ },
+ "UP",
+ {
+ "f": 3
+ },
+ "RIGHT"
+ ],
+ [
+ {
+ "r": 30,
+ "rx": 6.5,
+ "ry": 4.25,
+ "y": -0.25,
+ "x": -0.2999999999999998,
+ "c": "#eb7c15",
+ "f": 3,
+ "h": 2
+ },
+ "Space",
+ {
+ "c": "#cccccc",
+ "f": 3
+ },
+ "Del"
+ ],
+ [
+ {
+ "x": -1.2999999999999998,
+ "c": "#ff0000",
+ "f": 3
+ },
+ "Lower",
+ {
+ "x": 1,
+ "c": "#cccccc",
+ "t": "#0000ff\n#ff0000",
+ "a": 4
+ },
+ "\nApp\n\n\n\n\n\n\n\nOS"
+ ],
+ [
+ {
+ "r": -30,
+ "rx": 13,
+ "y": -0.5,
+ "x": -2,
+ "t": "#000000",
+ "a": 7,
+ "f": 3
+ },
+ "PrtScr",
+ {
+ "c": "#eb7c15",
+ "f": 3,
+ "h": 2
+ },
+ "Space"
+ ],
+ [
+ {
+ "x": -2,
+ "c": "#cccccc",
+ "f": 3
+ },
+ "Enter",
+ {
+ "x": 1,
+ "c": "#0000ff",
+ "t": "#ffffff",
+ "f": 3
+ },
+ "Raise"
+ ]
+] \ No newline at end of file
diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c
new file mode 100644
index 000000000..7a7985f75
--- /dev/null
+++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c
@@ -0,0 +1,136 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Qwerty
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | = | | - | 6 | 7 | 8 | 9 | 0 |Backsp|
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | Raise| A | S | D | F | G | | | | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B |||||||| Del | | |||||||| N | M | , | . | / | Shift|
+ * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
+ * | ` | \ | ALt | Ctrl |||||||| Lower| Space| LGui|||||||| Enter| Space| Raise|||||||| Left | Down | Up | Right|
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ */
+ [_QWERTY] = LAYOUT( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \
+ RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ ),
+
+ /* Lower
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | | | Up | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | Raise| Left | Down | Rght | | | | | | | | | | | |
+ * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
+ * | Shift| | | | | |||||||| | | |||||||| | | | | | Shift|
+ * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
+ * | | | | |||||||| Lower| Space| |||||||| | Space| Raise|||||||| | | | |
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ */
+ [_LOWER] = LAYOUT(
+ XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \
+ XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \
+ XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+ ),
+
+ /* Raise
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | | | PgUp | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | Raise| Home | PgDwn| End | | | | | | | | | | | |
+ * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
+ * | Shift| | | | | |||||||| | | |||||||| | | | | | Shift|
+ * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
+ * | | | | |||||||| Lower| Space| |||||||| |Space | Raise|||||||| | | | |
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ */
+ [_RAISE] = LAYOUT(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \
+ XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+ ),
+
+ /* Adjust (Both Raise and Lower Together)
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ * | Reset| | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | | | | |rgbtog|bl_tog| | | | | | | | | |
+ * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
+ * | Raise| |rgbhui|rgbsai|rgbvai|bl_inc| | | | | | | | | |
+ * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
+ *|EEP_RST| |rgbhud|rgbdec|rgbvad|bl_dec|||||||| | | |||||||| | | | | | Shift|
+ * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
+ * | | | | |||||||| Lower| Space| |||||||| | Space| Raise|||||||| | | | |
+ * ,----------------------------------------------------------------------------------------------------------------------.
+ */
+ [_ADJUST] = LAYOUT(
+ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \
+ XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk
new file mode 100644
index 000000000..11b62b9bf
--- /dev/null
+++ b/keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk
@@ -0,0 +1,3 @@
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+AUDIO_ENABLE = no
diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c
index 92c140f26..7f13f3d67 100644
--- a/keyboards/ergodone/keymaps/default/keymap.c
+++ b/keyboards/ergodone/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H
-#include "debug.h"
-#include "action_layer.h"
#include "version.h"
#define BASE 0 // default layer
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index 096368f7a..a75edd415 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -109,7 +109,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DRIVER_1_LED_TOTAL 24
#define DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
-#define RGB_MATRIX_SKIP_FRAMES 10
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c
index 3b2c94350..6f4ae9fed 100644
--- a/keyboards/ergodox_ez/ergodox_ez.c
+++ b/keyboards/ergodox_ez/ergodox_ez.c
@@ -128,7 +128,7 @@ uint8_t init_mcp23018(void) {
mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
// set pull-up
// - unused : on : 1
@@ -140,7 +140,7 @@ uint8_t init_mcp23018(void) {
mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
#ifdef LEFT_LEDS
if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
@@ -179,7 +179,7 @@ uint8_t ergodox_left_leds_update(void) {
if (mcp23018_status) goto out;
out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
return mcp23018_status;
}
#endif
@@ -269,69 +269,68 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
};
-__attribute__ ((weak))
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/*{row | col << 4}
| {x=0..224, y=0..64}
| | modifier
| | | */
- {{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right
- {{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2
- {{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3
- {{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4
- {{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5
-
- {{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6
- {{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7
- {{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8
- {{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9
- {{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10
-
- {{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11
- {{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12
- {{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13
- {{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14
- {{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15
-
- {{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16
- {{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17
- {{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18
- {{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19
- {{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20
-
- {{4|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 21
- {{4|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 22
- {{4|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 23
- {{4|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 24
-
- {{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left
- {{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2
- {{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3
- {{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4
- {{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5
-
- {{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6
- {{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7
- {{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8
- {{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9
- {{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10
-
- {{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11
- {{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12
- {{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13
- {{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14
- {{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15
-
- {{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16
- {{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17
- {{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18
- {{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19
- {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20
-
- {{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21
- {{4|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 22
- {{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23
- {{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24
+ {{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 0}, // LED 1 on right > Key 6
+ {{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 0}, // LED 2 > Key 7
+ {{10|(0<<4)}, {17.2*10, 12.8*0}, 0}, // LED 3 > Key 8
+ {{11|(0<<4)}, {17.2*11, 12.8*0}, 0}, // LED 4 > Key 9
+ {{12|(0<<4)}, {17.2*12, 12.8*0}, 0}, // LED 5 > Key 0
+
+ {{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 0}, // LED 6
+ {{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 0}, // LED 7
+ {{10|(1<<4)}, {17.2*10, 12.8*1}, 0}, // LED 8
+ {{11|(1<<4)}, {17.2*11, 12.8*1}, 0}, // LED 9
+ {{12|(1<<4)}, {17.2*12, 12.8*1}, 0}, // LED 10
+
+ {{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 0}, // LED 11
+ {{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 0}, // LED 12
+ {{10|(2<<4)}, {17.2*10, 12.8*2}, 0}, // LED 13
+ {{11|(2<<4)}, {17.2*11, 12.8*2}, 0}, // LED 14
+ {{12|(2<<4)}, {17.2*12, 12.8*2}, 0}, // LED 15
+
+ {{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 0}, // LED 16
+ {{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 0}, // LED 17
+ {{10|(3<<4)}, {17.2*10, 12.8*3}, 0}, // LED 18
+ {{11|(3<<4)}, {17.2*11, 12.8*3}, 0}, // LED 19
+ {{12|(3<<4)}, {17.2*12, 12.8*3}, 0}, // LED 20
+
+ {{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21
+ {{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22
+ {{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23
+ {{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24
+
+ {{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 0}, // LED 1 on left > Key 5
+ {{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 0}, // LED 2 > Key 4
+ {{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 0}, // LED 3 > Key 3
+ {{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 0}, // LED 4 > Key 2
+ {{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 0}, // LED 5 > Key 1
+
+ {{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 0}, // LED 6
+ {{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 0}, // LED 7
+ {{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 0}, // LED 8
+ {{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 0}, // LED 9
+ {{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 0}, // LED 10
+
+ {{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 0}, // LED 11
+ {{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 0}, // LED 12
+ {{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 0}, // LED 13
+ {{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 0}, // LED 14
+ {{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 0}, // LED 15
+
+ {{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 0}, // LED 16
+ {{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 0}, // LED 17
+ {{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 0}, // LED 18
+ {{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 0}, // LED 19
+ {{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 0}, // LED 20
+
+ {{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21
+ {{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22
+ {{ 2|(4<<4)}, {17.2* 2, 12.8*4}, 1}, // LED 23
+ {{ 1|(4<<4)}, {17.2* 1, 12.8*4}, 1}, // LED 24 > Key Hack
};
#endif
diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
index 0d48711ed..c342b9076 100644
--- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c
@@ -55,14 +55,16 @@ enum custom_keycodes {
};
-#define BASE 0 // base dvorak layer
-#define KEYNAV 1 // arrow navigation (right hand)
-#define KEYSEL 2 // arrow navigation + shift (allow text selection)
-#define SHELL_NAV 3 // bash shortcuts
-#define SHELL_SCREEN 4 // linux screen shortcuts
-#define SCREEN_NAV 5 // navigate between linux screen tabs
-#define BROWSER_CONTROL 6 // control browser and mouse
-#define COMBINED 7 // combined numbers and symbols layer
+#define BASE 0 // base dvorak layer
+#define BASE_ALTERNATE 1 // base dvorak layer, with different layer toggling
+#define KEYNAV 2 // arrow navigation (right hand)
+#define KEYSEL 3 // arrow navigation + shift (allow text selection)
+#define SHELL_NAV 4 // bash shortcuts
+#define SHELL_SCREEN 5 // linux screen shortcuts
+#define SCREEN_NAV 6 // navigate between linux screen tabs
+#define BROWSER_CONTROL 7 // control browser and mouse
+#define COMBINED 8 // combined numbers and symbols layer
+#define ANDROID_STUDIO 9
// macros
@@ -94,7 +96,17 @@ enum custom_keycodes {
#define SCREEN_PASTEREG_3 30
#define DEL_TO_HOME 36
-
+// Android Studio shortcuts
+#define AS_TABLEFT LALT(KC_LEFT)
+#define AS_TABRIGHT LALT(KC_RIGHT)
+#define AS_SYMBOL LCTL(LALT(KC_N))
+#define AS_CLASS LCTL(KC_N)
+#define AS_FINDUSAGE LALT(KC_F7)
+#define AS_BACK LCTL(LALT(KC_LEFT))
+#define AS_GO_DECLARATION LCTL(KC_B)
+#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B))
+#define AS_CLOSETAB LCTL(KC_F4)
+#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4))
#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
@@ -164,6 +176,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE
),
+
+ // alternate base layout
+ [BASE_ALTERNATE] = LAYOUT_ergodox(
+ // left hand
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ OSL(ANDROID_STUDIO),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ // bottom row
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+ // thumb cluster
+ KC_TRNS,KC_TRNS,
+ KC_TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,
+ // right hand
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ // bottom row
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ // thumb cluster
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS
+ ),
[KEYNAV] = LAYOUT_ergodox(
// left hand
@@ -195,7 +233,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P),
KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS,
// bottom row
- RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+ RESET,DF(BASE),DF(BASE_ALTERNATE),KC_TRNS,KC_TRNS,
// thumb cluster
KC_TRNS,KC_TRNS,
KC_TRNS,
@@ -294,7 +332,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
-
+ // android studio shortcuts
+ [ANDROID_STUDIO] = LAYOUT_ergodox(
+ // left hand
+ KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ // bottom row
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+ // thumb cluster
+ KC_TRNS,KC_TRNS,
+ KC_TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,
+ // right hand
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS,
+ KC_TRNS, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETAB, AS_CLOSETOOLWINDOW, KC_TRNS,
+ // bottom row
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ // thumb cluster
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS
+ ),
[COMBINED] = LAYOUT_ergodox(
diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c
index 22837d312..97f764113 100644
--- a/keyboards/ergodox_ez/matrix.c
+++ b/keyboards/ergodox_ez/matrix.c
@@ -33,14 +33,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "util.h"
#include "matrix.h"
+#include "debounce.h"
#include QMK_KEYBOARD_H
#ifdef DEBUG_MATRIX_SCAN_RATE
-#include "timer.h"
+# include "timer.h"
#endif
/*
- * This constant define not debouncing time in msecs, but amount of matrix
- * scan loops which should be made to get stable debounced results.
+ * This constant define not debouncing time in msecs, assuming eager_pr.
*
* On Ergodox matrix scan rate is relatively low, because of slow I2C.
* Now it's only 317 scans/second, or about 3.15 msec/scan.
@@ -52,26 +52,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEBOUNCE
-# define DEBOUNCE 5
+# define DEBOUNCE 5
#endif
/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-/*
- * matrix state(1:on, 0:off)
- * contains the raw values without debounce filtering of the last read cycle.
- */
-static matrix_row_t raw_matrix[MATRIX_ROWS];
-
-// Debouncing: store for each key the number of scans until it's eligible to
-// change. When scanning the matrix, ignore any changes in keys that have
-// already changed in the last DEBOUNCE scans.
-static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
+static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
+static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
static matrix_row_t read_cols(uint8_t row);
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
static uint8_t mcp23018_reset_loop;
// static uint16_t mcp23018_reset_loop;
@@ -81,197 +72,137 @@ uint32_t matrix_timer;
uint32_t matrix_scan_count;
#endif
+__attribute__((weak)) void matrix_init_user(void) {}
-__attribute__ ((weak))
-void matrix_init_user(void) {}
+__attribute__((weak)) void matrix_scan_user(void) {}
-__attribute__ ((weak))
-void matrix_scan_user(void) {}
+__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
+__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
+inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
+inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
-void matrix_init(void)
-{
- // initialize row and col
+void matrix_init(void) {
+ // initialize row and col
- mcp23018_status = init_mcp23018();
+ mcp23018_status = init_mcp23018();
+ unselect_rows();
+ init_cols();
- unselect_rows();
- init_cols();
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- raw_matrix[i] = 0;
- for (uint8_t j=0; j < MATRIX_COLS; ++j) {
- debounce_matrix[i * MATRIX_COLS + j] = 0;
- }
- }
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ raw_matrix[i] = 0;
+ }
#ifdef DEBUG_MATRIX_SCAN_RATE
- matrix_timer = timer_read32();
- matrix_scan_count = 0;
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
#endif
-
- matrix_init_quantum();
-
+ debounce_init(MATRIX_ROWS);
+ matrix_init_quantum();
}
void matrix_power_up(void) {
- mcp23018_status = init_mcp23018();
+ mcp23018_status = init_mcp23018();
- unselect_rows();
- init_cols();
+ unselect_rows();
+ init_cols();
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- }
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
#ifdef DEBUG_MATRIX_SCAN_RATE
- matrix_timer = timer_read32();
- matrix_scan_count = 0;
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
#endif
}
-// Returns a matrix_row_t whose bits are set if the corresponding key should be
-// eligible to change in this scan.
-matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) {
- matrix_row_t result = 0;
- matrix_row_t change = rawcols ^ raw_matrix[row];
- raw_matrix[row] = rawcols;
- for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
- if (debounce_matrix[row * MATRIX_COLS + i]) {
- --debounce_matrix[row * MATRIX_COLS + i];
- } else {
- result |= (1 << i);
- }
- if (change & (1 << i)) {
- debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
+uint8_t matrix_scan(void) {
+ if (mcp23018_status) { // if there was an error
+ if (++mcp23018_reset_loop == 0) {
+ // if (++mcp23018_reset_loop >= 1300) {
+ // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
+ // this will be approx bit more frequent than once per second
+ print("trying to reset mcp23018\n");
+ mcp23018_status = init_mcp23018();
+ if (mcp23018_status) {
+ print("left side not responding\n");
+ } else {
+ print("left side attached\n");
+ ergodox_blink_all_leds();
+ }
}
}
- return result;
-}
-
-matrix_row_t debounce_read_cols(uint8_t row) {
- // Read the row without debouncing filtering and store it for later usage.
- matrix_row_t cols = read_cols(row);
- // Get the Debounce mask.
- matrix_row_t mask = debounce_mask(cols, row);
- // debounce the row and return the result.
- return (cols & mask) | (matrix[row] & ~mask);;
-}
-
-uint8_t matrix_scan(void)
-{
- if (mcp23018_status) { // if there was an error
- if (++mcp23018_reset_loop == 0) {
- // if (++mcp23018_reset_loop >= 1300) {
- // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
- // this will be approx bit more frequent than once per second
- print("trying to reset mcp23018\n");
- mcp23018_status = init_mcp23018();
- if (mcp23018_status) {
- print("left side not responding\n");
- } else {
- print("left side attached\n");
- ergodox_blink_all_leds();
- }
- }
- }
#ifdef DEBUG_MATRIX_SCAN_RATE
- matrix_scan_count++;
+ matrix_scan_count++;
- uint32_t timer_now = timer_read32();
- if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
- print("matrix scan frequency: ");
- pdec(matrix_scan_count);
- print("\n");
+ uint32_t timer_now = timer_read32();
+ if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) {
+ print("matrix scan frequency: ");
+ pdec(matrix_scan_count);
+ print("\n");
- matrix_timer = timer_now;
- matrix_scan_count = 0;
- }
+ matrix_timer = timer_now;
+ matrix_scan_count = 0;
+ }
#endif
#ifdef LEFT_LEDS
- mcp23018_status = ergodox_left_leds_update();
-#endif // LEFT_LEDS
- for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
- select_row(i);
- // and select on left hand
- select_row(i + MATRIX_ROWS_PER_SIDE);
- // we don't need a 30us delay anymore, because selecting a
- // left-hand row requires more than 30us for i2c.
-
- // grab cols from left hand
- matrix[i] = debounce_read_cols(i);
- // grab cols from right hand
- matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
-
- unselect_rows();
- }
-
- matrix_scan_quantum();
+ mcp23018_status = ergodox_left_leds_update();
+#endif // LEFT_LEDS
+ for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
+ // select rows from left and right hands
+ select_row(i);
+ select_row(i + MATRIX_ROWS_PER_SIDE);
+
+ // we don't need a 30us delay anymore, because selecting a
+ // left-hand row requires more than 30us for i2c.
+
+ // grab left + right cols.
+ raw_matrix[i] = read_cols(i);
+ raw_matrix[i+MATRIX_ROWS_PER_SIDE] = read_cols(i+MATRIX_ROWS_PER_SIDE);
+
+ unselect_rows();
+ }
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, true);
+ matrix_scan_quantum();
- return 1;
+ return 1;
}
-bool matrix_is_modified(void) // deprecated and evidently not called.
+bool matrix_is_modified(void) // deprecated and evidently not called.
{
- return true;
+ return true;
}
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<<col));
-}
+inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
-inline
-matrix_row_t matrix_get_row(uint8_t row)
-{
- return matrix[row];
-}
+inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
-void matrix_print(void)
-{
- print("\nr/c 0123456789ABCDEF\n");
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- phex(row); print(": ");
- pbin_reverse16(matrix_get_row(row));
- print("\n");
- }
+void matrix_print(void) {
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row);
+ print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
}
-uint8_t matrix_key_count(void)
-{
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- count += bitpop16(matrix[i]);
- }
- return count;
+uint8_t matrix_key_count(void) {
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
}
/* Column pin configuration
@@ -284,43 +215,45 @@ uint8_t matrix_key_count(void)
* col: 0 1 2 3 4 5
* pin: B5 B4 B3 B2 B1 B0
*/
-static void init_cols(void)
-{
- // init on mcp23018
- // not needed, already done as part of init_mcp23018()
-
- // init on teensy
- // Input with pull-up(DDR:0, PORT:1)
- DDRF &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
- PORTF |= (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
+static void init_cols(void) {
+ // init on mcp23018
+ // not needed, already done as part of init_mcp23018()
+
+ // init on teensy
+ // Input with pull-up(DDR:0, PORT:1)
+ DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0);
+ PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0);
}
-static matrix_row_t read_cols(uint8_t row)
-{
- if (row < 7) {
- if (mcp23018_status) { // if there was an error
- return 0;
- } else {
- uint8_t data = 0;
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
- data = ~((uint8_t)mcp23018_status);
- mcp23018_status = I2C_STATUS_SUCCESS;
- out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
- return data;
- }
+static matrix_row_t read_cols(uint8_t row) {
+ if (row < 7) {
+ if (mcp23018_status) { // if there was an error
+ return 0;
} else {
- /* read from teensy
- * bitmask is 0b11110011, but we want those all
- * in the lower six bits.
- * we'll return 1s for the top two, but that's harmless.
- */
-
- return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2));
+ uint8_t data = 0;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status < 0) goto out;
+ data = ~((uint8_t)mcp23018_status);
+ mcp23018_status = I2C_STATUS_SUCCESS;
+ out:
+ i2c_stop();
+ return data;
}
+ } else {
+ /* read from teensy
+ * bitmask is 0b11110011, but we want those all
+ * in the lower six bits.
+ * we'll return 1s for the top two, but that's harmless.
+ */
+
+ return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2));
+ }
}
/* Row pin configuration
@@ -333,69 +266,70 @@ static matrix_row_t read_cols(uint8_t row)
* row: 0 1 2 3 4 5 6
* pin: A0 A1 A2 A3 A4 A5 A6
*/
-static void unselect_rows(void)
-{
- // no need to unselect on mcp23018, because the select step sets all
- // the other row bits high, and it's not changing to a different
- // direction
-
- // unselect on teensy
- // Hi-Z(DDR:0, PORT:0) to unselect
- DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
- PORTB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
- DDRD &= ~(1<<2 | 1<<3);
- PORTD &= ~(1<<2 | 1<<3);
- DDRC &= ~(1<<6);
- PORTC &= ~(1<<6);
+static void unselect_rows(void) {
+ // no need to unselect on mcp23018, because the select step sets all
+ // the other row bits high, and it's not changing to a different
+ // direction
+
+ // unselect on teensy
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
+ PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
+ DDRD &= ~(1 << 2 | 1 << 3);
+ PORTD &= ~(1 << 2 | 1 << 3);
+ DDRC &= ~(1 << 6);
+ PORTC &= ~(1 << 6);
}
-static void select_row(uint8_t row)
-{
- if (row < 7) {
- // select on mcp23018
- if (mcp23018_status) { // if there was an error
- // do nothing
- } else {
- // set active row low : 0
- // set other rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0xFF & ~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
- }
+static void select_row(uint8_t row) {
+ if (row < 7) {
+ // select on mcp23018
+ if (mcp23018_status) { // if there was an error
+ // do nothing
} else {
- // select on teensy
- // Output low(DDR:1, PORT:0) to select
- switch (row) {
- case 7:
- DDRB |= (1<<0);
- PORTB &= ~(1<<0);
- break;
- case 8:
- DDRB |= (1<<1);
- PORTB &= ~(1<<1);
- break;
- case 9:
- DDRB |= (1<<2);
- PORTB &= ~(1<<2);
- break;
- case 10:
- DDRB |= (1<<3);
- PORTB &= ~(1<<3);
- break;
- case 11:
- DDRD |= (1<<2);
- PORTD &= ~(1<<2);
- break;
- case 12:
- DDRD |= (1<<3);
- PORTD &= ~(1<<3);
- break;
- case 13:
- DDRC |= (1<<6);
- PORTC &= ~(1<<6);
- break;
- }
+ // set active row low : 0
+ // set other rows hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT);
+ if (mcp23018_status) goto out;
+ out:
+ i2c_stop();
+ }
+ } else {
+ // select on teensy
+ // Output low(DDR:1, PORT:0) to select
+ switch (row) {
+ case 7:
+ DDRB |= (1 << 0);
+ PORTB &= ~(1 << 0);
+ break;
+ case 8:
+ DDRB |= (1 << 1);
+ PORTB &= ~(1 << 1);
+ break;
+ case 9:
+ DDRB |= (1 << 2);
+ PORTB &= ~(1 << 2);
+ break;
+ case 10:
+ DDRB |= (1 << 3);
+ PORTB &= ~(1 << 3);
+ break;
+ case 11:
+ DDRD |= (1 << 2);
+ PORTD &= ~(1 << 2);
+ break;
+ case 12:
+ DDRD |= (1 << 3);
+ PORTD &= ~(1 << 3);
+ break;
+ case 13:
+ DDRC |= (1 << 6);
+ PORTC &= ~(1 << 6);
+ break;
}
+ }
}
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index 446ba3e21..e96cd2082 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -83,6 +83,7 @@ SLEEP_LED_ENABLE = no
API_SYSEX_ENABLE = no
RGBLIGHT_ENABLE = yes
RGB_MATRIX_ENABLE = no # enable later
+DEBOUNCE_TYPE = eager_pr
ifeq ($(strip $(RGB_MATRIX_ENABLE)), no)
SRC += i2c_master.c
diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c
index 92c140f26..7f13f3d67 100644
--- a/keyboards/ergodox_infinity/keymaps/default/keymap.c
+++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H
-#include "debug.h"
-#include "action_layer.h"
#include "version.h"
#define BASE 0 // default layer
diff --git a/keyboards/ergotaco/config.h b/keyboards/ergotaco/config.h
new file mode 100644
index 000000000..4dbe0573b
--- /dev/null
+++ b/keyboards/ergotaco/config.h
@@ -0,0 +1,61 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2013 Oleg Kostyuk <cub.uanic@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/>.
+*/
+
+// Copy and worked on with love from the EZ team
+
+#pragma once
+#include "config_common.h"
+
+#define VERBOSE
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0001
+#define MANUFACTURER g Heavy Industries
+#define PRODUCT ErgoTaco
+#define DESCRIPTION QMK keyboard firmware for ErgoTaco
+
+/* key matrix size */
+#define MATRIX_ROWS 12
+#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
+#define MATRIX_COLS 1
+
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 60
+#define MOUSEKEY_MAX_SPEED 7
+#define MOUSEKEY_WHEEL_DELAY 0
+#define TAPPING_TOGGLE 1
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+#define TAPPING_TERM 200
+#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() (get_mods() == MOD_MASK_CTRL || get_mods() == MOD_MASK_SHIFT)
+
+#define DEBOUNCE 5
+#define USB_MAX_POWER_CONSUMPTION 500
diff --git a/keyboards/ergotaco/ergotaco.c b/keyboards/ergotaco/ergotaco.c
new file mode 100644
index 000000000..ecab74b3a
--- /dev/null
+++ b/keyboards/ergotaco/ergotaco.c
@@ -0,0 +1,72 @@
+#include QMK_KEYBOARD_H
+
+bool i2c_initialized = 0;
+i2c_status_t mcp23018_status = 0x20;
+
+void matrix_init_kb(void) {
+ // (tied to Vcc for hardware convenience)
+ //DDRB &= ~(1<<4); // set B(4) as input
+ //PORTB &= ~(1<<4); // set B(4) internal pull-up disabled
+
+ // unused pins
+ // set as input with internal pull-up enabled
+ DDRB &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
+ PORTB |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
+
+ DDRC &= ~(1<<7 | 1<<6);
+ PORTC |= (1<<7 | 1<<6);
+
+ DDRD &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
+ PORTD |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
+
+ DDRE &= ~(1<<6);
+ PORTE |= (1<<6);
+
+ DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7);
+ PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7);
+
+ matrix_init_user();
+}
+
+
+uint8_t init_mcp23018(void) {
+ print("starting init");
+ mcp23018_status = 0x20;
+
+ // I2C subsystem
+
+ // uint8_t sreg_prev;
+ // sreg_prev=SREG;
+ // cli();
+
+ if (i2c_initialized == 0) {
+ i2c_init(); // on pins D(1,0)
+ i2c_initialized = true;
+ _delay_ms(1000);
+ }
+
+ // set pin direction
+ // - unused : input : 1
+ // - input : input : 1
+ // - driving : output : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ i2c_stop();
+
+ // set pull-up
+ // - unused : on : 1
+ // - input : on : 1
+ // - driving : off : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+
+out:
+ i2c_stop();
+ // SREG=sreg_prev;
+ //uprintf("Init %x\n", mcp23018_status);
+ return mcp23018_status;
+}
diff --git a/keyboards/ergotaco/ergotaco.h b/keyboards/ergotaco/ergotaco.h
new file mode 100644
index 000000000..6bc5ce36f
--- /dev/null
+++ b/keyboards/ergotaco/ergotaco.h
@@ -0,0 +1,50 @@
+#pragma once
+#include <util/delay.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "quantum.h"
+#include "i2c_master.h"
+#include "matrix.h"
+
+
+extern i2c_status_t mcp23018_status;
+#define ERGODOX_EZ_I2C_TIMEOUT 1000
+#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+#define CPU_16MHz 0x00
+
+// I2C aliases and register addresses (see "mcp23018.md")
+//#define I2C_ADDR 0b0100000
+#define I2C_ADDR 0x20
+#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
+#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
+#define IODIRA 0x00 // i/o direction register
+#define IODIRB 0x01
+#define GPPUA 0x0C // GPIO pull-up resistor register
+#define GPPUB 0x0D
+#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
+#define GPIOB 0x13
+#define OLATA 0x14 // output latch register
+#define OLATB 0x15
+
+void init_ergodox(void);
+uint8_t init_mcp23018(void);
+
+/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
+#define LAYOUT( \
+ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05) \
+ \
+ /* matrix positions */ \
+ { \
+ {R00}, \
+ {R01}, \
+ {R02}, \
+ {R03}, \
+ {R04}, \
+ {R05}, \
+ {L05}, \
+ {L04}, \
+ {L03}, \
+ {L02}, \
+ {L01}, \
+ {L00}, \
+}
diff --git a/keyboards/ergotaco/info.json b/keyboards/ergotaco/info.json
new file mode 100644
index 000000000..cf6b810fe
--- /dev/null
+++ b/keyboards/ergotaco/info.json
@@ -0,0 +1,61 @@
+{
+ "keyboard_name": "ErgoTaco",
+ "url": "http://gboards.ca",
+ "maintainer": "germ",
+ "width": 13,
+ "height": 2.75,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {
+ "x": 0,
+ "y": 1.25
+ },
+ {
+ "x": 1,
+ "y": 0.75
+ },
+ {
+ "x": 2,
+ "y": 0.5
+ },
+ {
+ "x": 3,
+ "y": 0.25
+ },
+ {
+ "x": 4,
+ "y": 1
+ },
+ {
+ "x": 5,
+ "y": 1.75
+ },
+ {
+ "x": 7,
+ "y": 1.75
+ },
+ {
+ "x": 8,
+ "y": 1
+ },
+ {
+ "x": 9,
+ "y": 0.25
+ },
+ {
+ "x": 10,
+ "y": 0.5
+ },
+ {
+ "x": 11,
+ "y": 0.75
+ },
+ {
+ "x": 12,
+ "y": 1.25
+ }
+ ]
+ }
+ }
+}
diff --git a/keyboards/ergotaco/keymaps/default/keymap.c b/keyboards/ergotaco/keymaps/default/keymap.c
new file mode 100644
index 000000000..be1267ef0
--- /dev/null
+++ b/keyboards/ergotaco/keymaps/default/keymap.c
@@ -0,0 +1,42 @@
+/* Good on you for modifying your layout! if you don't have
+ * time to read the QMK docs, a list of keycodes can be found at
+ *
+ * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
+ *
+ * There's also a template for adding new layers at the bottom of this file!
+ */
+
+#include QMK_KEYBOARD_H
+
+#define FIESTA 0 // default layer
+#define TACOTIME 1 // symbols
+
+// Blank template at the bottom
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap template
+ *
+ * ,-------------------------------------------------. ,--------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------' */
+[FIESTA] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H
+),
+};
+
+/* Keymap template
+ *
+ * ,-------------------------------------------------. ,--------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------'
+[FIESTA] = 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
+),
+ */
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
diff --git a/keyboards/ergotaco/keymaps/default/readme.md b/keyboards/ergotaco/keymaps/default/readme.md
new file mode 100644
index 000000000..653f3774e
--- /dev/null
+++ b/keyboards/ergotaco/keymaps/default/readme.md
@@ -0,0 +1,6 @@
+This is the default keymap for the ErgoTaco, Make it your own!
+
+## Settings
+To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/ergotaco/keymaps/default/rules.mk
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
diff --git a/keyboards/ergotaco/keymaps/default/rules.mk b/keyboards/ergotaco/keymaps/default/rules.mk
new file mode 100644
index 000000000..e394fbf1e
--- /dev/null
+++ b/keyboards/ergotaco/keymaps/default/rules.mk
@@ -0,0 +1,10 @@
+#----------------------------------------------------------------------------
+# make ergotaco:default:dfu
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+# Firmware options
+
+#Debug options
+VERBOSE = yes
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = yes
diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c
new file mode 100644
index 000000000..e4fd6902f
--- /dev/null
+++ b/keyboards/ergotaco/matrix.c
@@ -0,0 +1,366 @@
+/*
+Note for ErgoDox EZ customizers: Here be dragons!
+This is not a file you want to be messing with.
+All of the interesting stuff for you is under keymaps/ :)
+Love, Erez
+
+Copyright 2013 Oleg Kostyuk <cub.uanic@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 "matrix.h"
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include "wait.h"
+#include "action_layer.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include QMK_KEYBOARD_H
+#ifdef DEBUG_MATRIX_SCAN_RATE
+#include "timer.h"
+#endif
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+// ATmega pin defs
+#define ROW1 (1<<5)
+#define COL6 (1<<0)
+#define COL7 (1<<1)
+#define COL8 (1<<2)
+#define COL9 (1<<3)
+#define COL10 (1<<2)
+#define COL11 (1<<3)
+
+
+// bit masks
+#define BMASK (COL7 | COL8 | COL9 | COL6)
+#define DMASK (COL10 | COL11)
+#define FMASK (ROW1)
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+/*
+ * matrix state(1:on, 0:off)
+ * contains the raw values without debounce filtering of the last read cycle.
+ */
+static matrix_row_t raw_matrix[MATRIX_ROWS];
+
+// Debouncing: store for each key the number of scans until it's eligible to
+// change. When scanning the matrix, ignore any changes in keys that have
+// already changed in the last DEBOUNCE scans.
+static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
+
+static matrix_row_t read_cols(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+static uint8_t mcp23018_reset_loop;
+// static uint16_t mcp23018_reset_loop;
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+uint32_t matrix_timer;
+uint32_t matrix_scan_count;
+#endif
+
+
+__attribute__ ((weak))
+void matrix_init_user(void) {}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+
+void matrix_init(void)
+{
+ // initialize row and col
+ mcp23018_status = init_mcp23018();
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ raw_matrix[i] = 0;
+ for (uint8_t j=0; j < MATRIX_COLS; ++j) {
+ debounce_matrix[i * MATRIX_COLS + j] = 0;
+ }
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+ matrix_init_quantum();
+}
+
+void matrix_power_up(void) {
+ mcp23018_status = init_mcp23018();
+
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+
+}
+
+// Returns a matrix_row_t whose bits are set if the corresponding key should be
+// eligible to change in this scan.
+matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) {
+ matrix_row_t result = 0;
+ matrix_row_t change = rawcols ^ raw_matrix[row];
+ raw_matrix[row] = rawcols;
+ for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
+ if (debounce_matrix[row * MATRIX_COLS + i]) {
+ --debounce_matrix[row * MATRIX_COLS + i];
+ } else {
+ result |= (1 << i);
+ }
+ if (change & (1 << i)) {
+ debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
+ }
+ }
+ return result;
+}
+
+matrix_row_t debounce_read_cols(uint8_t row) {
+ // Read the row without debouncing filtering and store it for later usage.
+ matrix_row_t cols = read_cols(row);
+ // Get the Debounce mask.
+ matrix_row_t mask = debounce_mask(cols, row);
+ // debounce the row and return the result.
+ return (cols & mask) | (matrix[row] & ~mask);;
+}
+
+uint8_t matrix_scan(void)
+{
+ // Then the keyboard
+ if (mcp23018_status) { // if there was an error
+ if (++mcp23018_reset_loop == 0) {
+ // if (++mcp23018_reset_loop >= 1300) {
+ // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
+ // this will be approx bit more frequent than once per second
+ print("trying to reset mcp23018\n");
+ mcp23018_status = init_mcp23018();
+ if (mcp23018_status) {
+ print("left side not responding\n");
+ } else {
+ print("left side attached\n");
+ }
+ }
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_scan_count++;
+ uint32_t timer_now = timer_read32();
+ if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
+ print("matrix scan frequency: ");
+ pdec(matrix_scan_count);
+ print("\n");
+
+ matrix_timer = timer_now;
+ matrix_scan_count = 0;
+ }
+#endif
+ for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
+ select_row(i);
+ // and select on left hand
+ select_row(i + MATRIX_ROWS_PER_SIDE);
+ // we don't need a 30us delay anymore, because selecting a
+ // left-hand row requires more than 30us for i2c.
+
+ // grab cols from left hand
+ matrix[i] = debounce_read_cols(i);
+ // grab cols from right hand
+ matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
+
+ unselect_rows();
+ }
+
+ matrix_scan_quantum();
+
+#ifdef DEBUG_MATRIX
+ for (uint8_t c = 0; c < MATRIX_COLS; c++)
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++)
+ if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
+#endif
+
+ return 1;
+}
+
+bool matrix_is_modified(void) // deprecated and evidently not called.
+{
+ return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+// Remember this means ROWS
+static void init_cols(void)
+{
+ // init on mcp23018
+ // not needed, already done as part of init_mcp23018()
+
+ // Input with pull-up(DDR:0, PORT:1)
+ DDRF &= ~FMASK;
+ PORTF |= FMASK;
+}
+
+static matrix_row_t read_cols(uint8_t row)
+{
+ if (row < 6) {
+ if (mcp23018_status) { // if there was an error
+ return 0;
+ } else {
+ uint8_t data = 0;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
+ data = (~((uint8_t)mcp23018_status) >> 2) & 0x01 ;
+ mcp23018_status = I2C_STATUS_SUCCESS;
+ out:
+ i2c_stop();
+
+#ifdef DEBUG_MATRIX
+ if (data != 0x00) xprintf("I2C: %d\n", data);
+#endif
+ return data;
+ }
+ } else {
+ // Read using bitmask
+ return ~((((PINF & ROW1) >> 5)) & 0x1);
+ }
+}
+
+// Row pin configuration
+static void unselect_rows(void)
+{
+ // no need to unselect on mcp23018, because the select step sets all
+ // the other row bits high, and it's not changing to a different
+ // direction
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ DDRB &= ~BMASK;
+ PORTB &= ~BMASK;
+ DDRD &= ~DMASK;
+ PORTD &= ~DMASK;
+}
+
+static void select_row(uint8_t row)
+{
+ if (row < 6) {
+ // select on mcp23018
+ if (mcp23018_status) { // do nothing on error
+ // Read using bitmask
+ } else { // set active row low : 0 // set other rows hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ out:
+ i2c_stop();
+ }
+ } else {
+ // Output low(DDR:1, PORT:0) to select
+ switch (row) {
+ case 6:
+ DDRB |= COL6;
+ PORTB &= ~COL6;
+ break;
+ case 7:
+ DDRB |= COL7;
+ PORTB &= ~COL7;
+ break;
+ case 8:
+ DDRB |= COL8;
+ PORTB &= ~COL8;
+ break;
+ case 9:
+ DDRB |= COL9;
+ PORTB &= ~COL9;
+ break;
+ case 10:
+ DDRD |= COL10;
+ PORTD &= ~COL10;
+ break;
+ case 11:
+ DDRD |= COL11;
+ PORTD &= ~COL11;
+ break;
+ }
+ }
+}
diff --git a/keyboards/ergotaco/readme.md b/keyboards/ergotaco/readme.md
new file mode 100644
index 000000000..3021168db
--- /dev/null
+++ b/keyboards/ergotaco/readme.md
@@ -0,0 +1,24 @@
+# Gergo
+
+![ErgoTaco](https://i.redd.it/dbcu5i21m3i21.jpg)
+
+It's a Taco with a side of HASL. A 12 key fiesta of a board.
+
+Keyboard Maintainer: [Jeremy Bernhardt](https://github.com/germ)
+Hardware Supported: ErgoTaco
+Hardware Availability: [gboards.ca](http://gboards.ca)
+
+## Firmware building
+Clone the QMK Repo and install dfu-programmer, flash with:
+
+ make ergotaco:default:dfu
+
+And reset your keyboard!
+
+To just test if your build system is sane, try compiling the default keymap using:
+
+ make ergotaco: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).
+
+## Have an idea? [Reach out to me!](mailto:bernhardtjeremy@gmail.com)
diff --git a/keyboards/ergotaco/rules.mk b/keyboards/ergotaco/rules.mk
new file mode 100644
index 000000000..0af3e3474
--- /dev/null
+++ b/keyboards/ergotaco/rules.mk
@@ -0,0 +1,26 @@
+#----------------------------------------------------------------------------
+# make ergotaco:default:dfu
+# Make sure you have dfu-programmer installed!
+# Do not edit this file! Make a copy of keymaps/default and modify that!
+#----------------------------------------------------------------------------
+
+# Hardware info
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+BOOTLOADER = atmel-dfu
+F_USB = $(F_CPU)
+
+CUSTOM_MATRIX = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = yes
+COMMAND_ENABLE = yes
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+SRC += matrix.c i2c_master.c
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
diff --git a/quantum/template/ps2avrgb/i2c.h b/keyboards/ergotravel/keymaps/jarred/config.h
index 7ce50cdb5..d64187b59 100644
--- a/quantum/template/ps2avrgb/i2c.h
+++ b/keyboards/ergotravel/keymaps/jarred/config.h
@@ -1,5 +1,5 @@
/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+Copyright 2017 Pierre Constantineau <jpconstantineau@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
@@ -15,13 +15,15 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Please do not modify this file
+#pragma once
-#ifndef __I2C_H__
-#define __I2C_H__
+/* Use I2C or Serial, not both */
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
+// #define USE_SERIAL
+#define USE_I2C
-#endif
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
diff --git a/keyboards/ergotravel/keymaps/jarred/keymap.c b/keyboards/ergotravel/keymaps/jarred/keymap.c
new file mode 100644
index 000000000..33031f931
--- /dev/null
+++ b/keyboards/ergotravel/keymaps/jarred/keymap.c
@@ -0,0 +1,50 @@
+/* Copyright 2018 Jarred Steenvoorden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 "jarred.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = LAYOUT_ergotravel_grid_wrapper(
+ QWERTY_L1, KC_NO, KC_NO, QWERTY_R1,
+ QWERTY_L2, KC_NO, KC_NO, QWERTY_R2,
+ QWERTY_L3, KC_NO, KC_NO, QWERTY_R3,
+ QWERTY_4_12),
+
+ [_LW] = LAYOUT_ergotravel_grid_wrapper(
+ LOWER_L1, KC_NO, KC_NO, LOWER_R1,
+ LOWER_L2, KC_NO, KC_NO, LOWER_R2,
+ LOWER_L3, KC_NO, KC_NO, LOWER_R3,
+ LOWER_4_12),
+
+ [_NV] = LAYOUT_ergotravel_grid_wrapper(
+ NAV_L1, KC_NO, KC_NO, NAV_R1,
+ NAV_L2, KC_NO, KC_NO, NAV_R2,
+ NAV_L3, KC_NO, KC_NO, NAV_R3,
+ NAV_4_12),
+
+ [_NP] = LAYOUT_ergotravel_grid_wrapper(
+ NUMPAD_L1, KC_NO, KC_NO, NUMPAD_R1,
+ NUMPAD_L2, KC_NO, KC_NO, NUMPAD_R2,
+ NUMPAD_L3, KC_NO, KC_NO, NUMPAD_R3,
+ NUMPAD_4_12),
+
+ [_MS] = LAYOUT_ergotravel_grid_wrapper(
+ MOUSE_L1, KC_NO, KC_NO, MOUSE_R1,
+ MOUSE_L2, KC_NO, KC_NO, MOUSE_R2,
+ MOUSE_L3, KC_NO, KC_NO, MOUSE_R3,
+ MOUSE_4_12)
+};
diff --git a/keyboards/exclusive/e6v2/bmc/bmc.c b/keyboards/exclusive/e6v2/bmc/bmc.c
new file mode 100644
index 000000000..257b68b8b
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/bmc.c
@@ -0,0 +1,96 @@
+/* Copyright 2019 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "bmc.h"
+#include "rgblight.h"
+#include "i2c_master.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+ }
+ }
+
+ i2c_init();
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+}
+#endif
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+void backlight_init_ports(void) {
+ // initialize pins D0, D1, D4 and D6 as output
+ setPinOutput(D0);
+ setPinOutput(D1);
+ setPinOutput(D4);
+ setPinOutput(D6);
+
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+}
+
+void backlight_set(uint8_t level) {
+ if (level == 0) {
+ // turn RGB LEDs off
+ writePinLow(D0);
+ writePinLow(D1);
+ writePinLow(D4);
+ writePinLow(D6);
+ } else {
+ // turn RGB LEDs on
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+ }
+}
diff --git a/keyboards/exclusive/e6v2/bmc/bmc.h b/keyboards/exclusive/e6v2/bmc/bmc.h
new file mode 100644
index 000000000..06d23fbe6
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/bmc.h
@@ -0,0 +1,101 @@
+/* Copyright 2019 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+
+// LAYOUT_all ignores the key often coded as ~# to the left of Enter on ISO layouts.
+// This is done as it shares the same row AND col as the pipe key.
+#define LAYOUT_all( \
+ k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \
+ k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \
+ k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \
+ k10, k53, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \
+ k00, k01, k02, k75, k04, k08, k09, k05 \
+) \
+{ \
+ { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \
+ { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \
+ { k50, KC_NO, k52, k53, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \
+ { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \
+}
+
+#define LAYOUT_60_ansi( \
+ k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k4A, \
+ k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \
+ k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \
+ k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, \
+ k00, k01, k02, k75, k04, k08, k09, k05 \
+) \
+{ \
+ { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \
+ { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \
+ { k50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \
+ { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \
+}
+
+#define LAYOUT_60_hhkb( \
+ k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \
+ k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \
+ k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \
+ k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \
+ k01, k02, k75, k08, k09 \
+) \
+{ \
+ { KC_NO, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \
+ { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \
+ { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \
+ { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \
+}
+
+#define LAYOUT_60_tsangan( \
+ k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \
+ k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \
+ k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \
+ k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \
+ k00, k01, k02, k75, k08, k09, k05 \
+) \
+{ \
+ { k00, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \
+ { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \
+ { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \
+ { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \
+ { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \
+ { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \
+}
diff --git a/keyboards/exclusive/e6v2/bmc/config.h b/keyboards/exclusive/e6v2/bmc/config.h
new file mode 100644
index 000000000..7c6fcccdb
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/config.h
@@ -0,0 +1,49 @@
+/*
+Copyright 2019 MechMerlin
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER exclusive
+#define PRODUCT e6v2 bmc
+#define DESCRIPTION A custom 60% keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 11
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+
+// 0 1 2 3 4 5 6 7 8 9 A
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
+#define DIODE_DIRECTION COL2ROW
+
+#define RGBLED_NUM 6
+#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/exclusive/e6v2/bmc/info.json b/keyboards/exclusive/e6v2/bmc/info.json
new file mode 100644
index 000000000..aa6d171ba
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/info.json
@@ -0,0 +1,24 @@
+{
+ "keyboard_name": "",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.26}, {"x":10.0, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_60_ansi": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}]
+ },
+
+ "LAYOUT_60_hhkb": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}]
+ },
+
+ "LAYOUT_60_tsangan": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h
new file mode 100644
index 000000000..26c6d6ade
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c
new file mode 100644
index 000000000..730041917
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c
@@ -0,0 +1,74 @@
+/* Copyright 2019 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_60_ansi(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(1)
+ ),
+
+[1] = LAYOUT_60_ansi(
+ 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, \
+ BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md
new file mode 100644
index 000000000..4a1b6efa6
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for bmc
diff --git a/keyboards/exclusive/e6v2/bmc/readme.md b/keyboards/exclusive/e6v2/bmc/readme.md
new file mode 100644
index 000000000..b69ac792c
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/readme.md
@@ -0,0 +1,44 @@
+# E6-V2 Bootmapper Client (ps2avrgb)
+
+These docs are for the BMC version of the E6-V2 PCB which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2.
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller
+Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make exclusive/e6v2/bmc:default
+
+Flashing
+
+ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
+
+**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard.
+
+Windows:
+1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
+2. Place your keyboard into reset.
+3. Press the `Find Device` button and ensure that your keyboard is found.
+4. Press the `Open .hex File` button and locate the `.hex` file you created.
+5. Press the `Flash Device` button and wait for the process to complete.
+
+macOS:
+1. Install homebrew by typing the following:
+ ```
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+ ```
+2. Install `crosspack-avr`.
+ ```
+ brew cask install crosspack-avr
+ ```
+3. Install the following packages:
+ ```
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+
+4. Place your keyboard into reset.
+5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
+
+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/exclusive/e6v2/bmc/rules.mk b/keyboards/exclusive/e6v2/bmc/rules.mk
new file mode 100644
index 000000000..885bce245
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/rules.mk
@@ -0,0 +1,90 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32a
+PROTOCOL = VUSB
+
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 12000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+# ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+# F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS = -DDEBUG_LEVEL=0
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = bootloadHID
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_CUSTOM_DRIVER = yes
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+SRC += i2c_master.c
+
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/exclusive/e6v2/bmc/usbconfig.h b/keyboards/exclusive/e6v2/bmc/usbconfig.h
new file mode 100644
index 000000000..f22f2b631
--- /dev/null
+++ b/keyboards/exclusive/e6v2/bmc/usbconfig.h
@@ -0,0 +1,393 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#pragma once
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT 3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT 2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC 0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT 4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER 3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT 0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE 0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL 1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED 0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+#define USB_CFG_MAX_BUS_POWER 500
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE 1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ 0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL 0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE 0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS 0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF 1
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ * in YL, TCNT0
+ * sts timer0Snapshot, YL
+ * endm
+ * #endif
+ * #define USB_SOF_HOOK myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING 0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC 0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION 0x00, 0x02
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e'
+#define USB_CFG_VENDOR_NAME_LEN 9
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME 'E', '6', 'V', '2'
+#define USB_CFG_DEVICE_NAME_LEN 4
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
+/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS 0
+#define USB_CFG_DEVICE_SUBCLASS 0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS 3 /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
+ * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ * in static memory is in RAM, not in flash memory.
+ * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ * the driver must know the descriptor's length. The descriptor itself is
+ * found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ * char usbDescriptorDevice[];
+ * char usbDescriptorConfiguration[];
+ * char usbDescriptorHidReport[];
+ * char usbDescriptorString0[];
+ * int usbDescriptorStringVendor[];
+ * int usbDescriptorStringDevice[];
+ * int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ * USB_CFG_DESCR_PROPS_DEVICE
+ * USB_CFG_DESCR_PROPS_CONFIGURATION
+ * USB_CFG_DESCR_PROPS_STRINGS
+ * USB_CFG_DESCR_PROPS_STRING_0
+ * USB_CFG_DESCR_PROPS_STRING_VENDOR
+ * USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ * USB_CFG_DESCR_PROPS_HID
+ * USB_CFG_DESCR_PROPS_HID_REPORT
+ * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE 0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
+#define USB_CFG_DESCR_PROPS_STRINGS 0
+#define USB_CFG_DESCR_PROPS_STRING_0 0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
+#define USB_CFG_DESCR_PROPS_UNKNOWN 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG MCUCR */
+/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE GIMSK */
+/* #define USB_INTR_ENABLE_BIT INT0 */
+/* #define USB_INTR_PENDING GIFR */
+/* #define USB_INTR_PENDING_BIT INTF0 */
+/* #define USB_INTR_VECTOR INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE EIMSK */
+#define USB_INTR_ENABLE_BIT INT1
+/* #define USB_INTR_PENDING EIFR */
+#define USB_INTR_PENDING_BIT INTF1
+#define USB_INTR_VECTOR INT1_vect
diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h
index c952ca737..b4fb0d4cd 100644
--- a/keyboards/facew/config.h
+++ b/keyboards/facew/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef FACEW_CONFIG_H
-#define FACEW_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -40,7 +39,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-
-#endif
diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c
index 9c255c68f..7ec56548b 100644
--- a/keyboards/facew/facew.c
+++ b/keyboards/facew/facew.c
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <avr/pgmspace.h>
#include "action_layer.h"
-#include "i2c.h"
+#include "i2c_master.h"
#include "quantum.h"
#ifdef RGBLIGHT_ENABLE
@@ -42,7 +42,7 @@ void rgblight_set(void) {
}
i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif
diff --git a/keyboards/facew/facew.h b/keyboards/facew/facew.h
index 7d949de98..b3356f262 100644
--- a/keyboards/facew/facew.h
+++ b/keyboards/facew/facew.h
@@ -15,15 +15,14 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef FACEW_H
-#define FACEW_H
+#pragma once
#include "quantum.h"
#define LAYOUT_all( \
K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\
K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \
- K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \
+ K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K48, K40, \
K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\
K09, K00, K39, K30, K59, K69, K57, K29\
){ \
@@ -31,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \
{ KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \
{ KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \
- { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \
+ { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K40}, \
{ KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \
{ KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \
{ KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \
@@ -53,5 +52,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \
{ KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \
}
-
-#endif
diff --git a/keyboards/facew/i2c.c b/keyboards/facew/i2c.c
deleted file mode 100644
index a4f952135..000000000
--- a/keyboards/facew/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@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/>.
-*/
-
-// Please do not modify this file
-
-#include <avr/io.h>
-#include <util/twi.h>
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the start condition was successfully transmitted
- if ((TWSR & 0xF8) != TW_START) {
- return 1;
- }
-
- // transmit address and wait
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
- return 1;
- }
-
- return 0;
-}
-
-void i2c_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-}
-
-uint8_t i2c_write(uint8_t data) {
- TWDR = data;
-
- // transmit data and wait
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
-
- return 0;
-}
-
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
- if (i2c_start(address)) {
- return 1;
- }
-
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i])) {
- return 1;
- }
- }
-
- i2c_stop();
-
- return 0;
-}
diff --git a/keyboards/facew/info.json b/keyboards/facew/info.json
index 3f94985b2..b7b6acca7 100644
--- a/keyboards/facew/info.json
+++ b/keyboards/facew/info.json
@@ -6,7 +6,7 @@
"height": 5,
"layouts": {
"LAYOUT_all": {
- "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
},
"LAYOUT_60_ansi": {
diff --git a/keyboards/facew/keymaps/default/keymap.c b/keyboards/facew/keymaps/default/keymap.c
index a237f8489..6e91fba23 100644
--- a/keyboards/facew/keymaps/default/keymap.c
+++ b/keyboards/facew/keymaps/default/keymap.c
@@ -21,21 +21,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
- MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL
),
[1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL,
- MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS,
+ MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
diff --git a/keyboards/facew/keymaps/mechmerlin/keymap.c b/keyboards/facew/keymaps/mechmerlin/keymap.c
deleted file mode 100644
index 35b59e6a4..000000000
--- a/keyboards/facew/keymaps/mechmerlin/keymap.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_all(
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2),
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL
- ),
- [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_NO, KC_DEL,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
- [2] = LAYOUT_all(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT
- ),
-
- [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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- ),
-};
-
diff --git a/keyboards/facew/keymaps/mechmerlin/readme.md b/keyboards/facew/keymaps/mechmerlin/readme.md
deleted file mode 100644
index eeb83b0a1..000000000
--- a/keyboards/facew/keymaps/mechmerlin/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-MechMerlin's FaceW Sprit Edition Layout
-======================
-
-This is the preferred 60% layout used by u/merlin36, host of the [MechMerlin YouTube channel](www.youtube.com/mechmerlin).
-
-## Keyboard Notes
-- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com)
-- Uses ps2avru instead of ps2avrgb
-- To put in reset mode hold `q` while inserting the USB cable
-- Use flashing instructions from ps2avrgb QMK port
-
-## Keymap Notes
-- Does not support any form of inswitch lighting as Merlin hates them.
-- Arrow toggle switch to the right of right shift
-- Reset is FN + Left Shift + R
-
-### Build
-To build this keymap, simply run `make facew:mechmerlin` from the qmk_firmware directory.
diff --git a/keyboards/facew/matrix.c b/keyboards/facew/matrix.c
deleted file mode 100644
index 57aa36b5f..000000000
--- a/keyboards/facew/matrix.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@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 <avr/io.h>
-#include <util/delay.h>
-
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-#define DEBOUNCE 5
-#endif
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_init(void) {
- // all outputs for rows high
- DDRB = 0xFF;
- PORTB = 0xFF;
- // all inputs for columns
- DDRA = 0x00;
- DDRC &= ~(0x111111<<2);
- DDRD &= ~(1<<PIND7);
- // all columns are pulled-up
- PORTA = 0xFF;
- PORTC |= (0b111111<<2);
- PORTD |= (1<<PIND7);
-
- // initialize matrix state: all keys off
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- matrix[row] = 0x00;
- matrix_debouncing[row] = 0x00;
- }
-}
-
-void matrix_set_row_status(uint8_t row) {
- DDRB = (1 << row);
- PORTB = ~(1 << row);
-}
-
-uint8_t bit_reverse(uint8_t x) {
- x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
- return x;
-}
-
-uint8_t matrix_scan(void) {
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- matrix_set_row_status(row);
- _delay_us(5);
-
- matrix_row_t cols = (
- // cols 0..7, PORTA 0 -> 7
- (~PINA) & 0xFF
- ) | (
- // cols 8..13, PORTC 7 -> 0
- bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
- );
-
- if (matrix_debouncing[row] != cols) {
- matrix_debouncing[row] = cols;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_user();
-
- return 1;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md
index 578dcf888..b749d18d2 100644
--- a/keyboards/facew/readme.md
+++ b/keyboards/facew/readme.md
@@ -2,20 +2,12 @@
A 60% no frills keyboard.
-The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs
-but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It
-is designed and manufactured in Korea. It originally uses BootMapperClient for programming but
-can now also use QMK.
+The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It is designed and manufactured in Korea.
Keyboard Maintainer: [MechMerlin](www.github.com/mechmerlin)
Hardware Supported: FaceW Sprit Edition PCB
Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1352
-## Keyboard Notes
-- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com)
-- Uses ps2avru instead of ps2avrgb
-- To put in reset mode hold `q` while inserting the USB cable
-
Make example for this keyboard (after setting up your build environment):
make facew:default
@@ -24,6 +16,8 @@ Flashing
ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
+**Reset Key:** To put the FaceW into reset, hold `q` (`K01`) while plugging in.
+
Windows:
1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
2. Place your keyboard into reset.
@@ -42,12 +36,12 @@ macOS:
```
3. Install the following packages:
```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk
index 77d29b332..b939b0fd2 100644
--- a/keyboards/facew/rules.mk
+++ b/keyboards/facew/rules.mk
@@ -31,20 +31,19 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = yes
+BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
-BACKLIGHT_ENABLE = no
-RGBLIGHT_ENABLE = no
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h
index d2d848fcd..f3d663f8a 100644
--- a/keyboards/facew/usbconfig.h
+++ b/keyboards/facew/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -241,8 +240,8 @@ section at the end of this file).
#define USB_CFG_DEVICE_VERSION 0x00, 0x02
/* Version number of the device: Minor number first, then major number.
*/
-#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r'
-#define USB_CFG_VENDOR_NAME_LEN 13
+#define USB_CFG_VENDOR_NAME 'S', 'p', 'r', 'i', 't'
+#define USB_CFG_VENDOR_NAME_LEN 5
/* These two values define the vendor name returned by the USB device. The name
* must be given as a list of characters under single quotes. The characters
* are interpreted as Unicode (UTF-16) entities.
@@ -251,8 +250,8 @@ section at the end of this file).
* obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
* details.
*/
-#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B'
-#define USB_CFG_DEVICE_NAME_LEN 8
+#define USB_CFG_DEVICE_NAME 'F', 'a', 'c', 'e', 'W'
+#define USB_CFG_DEVICE_NAME_LEN 5
/* Same as above for the device name. If you don't want a device name, undefine
* the macros. See the file USB-IDs-for-free.txt before you assign a name if
* you use a shared VID/PID.
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/fc660c/keymaps/default/config.h b/keyboards/fc660c/keymaps/default/config.h
index 596198be1..b89b05009 100644
--- a/keyboards/fc660c/keymaps/default/config.h
+++ b/keyboards/fc660c/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/fc980c/README.md b/keyboards/fc980c/README.md
index 768d7d3a3..61dcf6ee9 100644
--- a/keyboards/fc980c/README.md
+++ b/keyboards/fc980c/README.md
@@ -155,7 +155,7 @@ Datasheets
- AD5258: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf
- JST S5B-PH-SM4: http://www.jst-mfg.com/product/pdf/eng/ePH.pdf
- Hirose UX60SC-MB-5S8: https://www.hirose.com/product/en/products/UX/UX60SC-MB-5S8%2880%29/
-- Tr(E42) for LED?: http://cj-elec.com/txUpfile/2013614923661845.pdf
+- Tr(E42) for LED?: http://www.bklighting.com/cimages/specs-758.pdf
- TYU TU1252WNR-05S: http://php2.twinner.com.tw/files/goodjob/TY1252series.pdf
diff --git a/keyboards/fc980c/keymaps/default/config.h b/keyboards/fc980c/keymaps/default/config.h
index 596198be1..20fd51147 100644
--- a/keyboards/fc980c/keymaps/default/config.h
+++ b/keyboards/fc980c/keymaps/default/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
+#pragma once
-#include "config_common.h"
// place overrides here
-
-#endif
diff --git a/keyboards/fortitude60/keymaps/default/config.h b/keyboards/fortitude60/keymaps/default/config.h
index 174837348..b6c6273d9 100644
--- a/keyboards/fortitude60/keymaps/default/config.h
+++ b/keyboards/fortitude60/keymaps/default/config.h
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
#define USE_SERIAL
@@ -34,5 +31,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* #define RGBLIGHT_HUE_STEP 8 */
/* #define RGBLIGHT_SAT_STEP 8 */
/* #define RGBLIGHT_VAL_STEP 8 */
-
-#endif
diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c
index 5c3508b3d..d20ca40fb 100644
--- a/keyboards/fortitude60/keymaps/default/keymap.c
+++ b/keyboards/fortitude60/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
diff --git a/keyboards/four_banger/keymaps/default/keymap.c b/keyboards/four_banger/keymaps/default/keymap.c
index 3fea0afd4..fc04e0fb1 100644
--- a/keyboards/four_banger/keymaps/default/keymap.c
+++ b/keyboards/four_banger/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "four_banger.h"
+#include QMK_KEYBOARD_H
enum custom_keycodes {
UP_URL = SAFE_RANGE
diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h
new file mode 100644
index 000000000..b35762fbc
--- /dev/null
+++ b/keyboards/georgi/config.h
@@ -0,0 +1,74 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2013 Oleg Kostyuk <cub.uanic@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/>.
+*/
+
+// Copy and worked on with love from the EZ team
+
+#pragma once
+#include "config_common.h"
+
+/* Defaults */
+
+#define VERSION "Alpha 01: Ted "
+#define VERBOSE
+
+#define FORCE_NKRO
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
+#define NO_DEBUG
+#define NO_ACTION_ONESHOT
+#define NO_ACTION_FUNCTION
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0001
+#define MANUFACTURER g Heavy Industries
+#define PRODUCT Georgi
+#define DESCRIPTION QMK keyboard firmware for Georgi
+
+/* key matrix size */
+#define MATRIX_ROWS 14
+#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
+#define MATRIX_COLS 4
+
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 60
+#define MOUSEKEY_MAX_SPEED 7
+#define MOUSEKEY_WHEEL_DELAY 0
+#define TAPPING_TOGGLE 2
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+#define TAPPING_TERM 200
+#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
+ get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
+)
+
+#define DEBOUNCE 5
+#define USB_MAX_POWER_CONSUMPTION 500
diff --git a/keyboards/georgi/georgi.c b/keyboards/georgi/georgi.c
new file mode 100644
index 000000000..8866886ce
--- /dev/null
+++ b/keyboards/georgi/georgi.c
@@ -0,0 +1,68 @@
+#include QMK_KEYBOARD_H
+
+bool i2c_initialized = 0;
+i2c_status_t mcp23018_status = 0x20;
+
+void matrix_init_kb(void) {
+ steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
+
+ // (tied to Vcc for hardware convenience)
+ //DDRB &= ~(1<<4); // set B(4) as input
+ //PORTB &= ~(1<<4); // set B(4) internal pull-up disabled
+
+ // unused pins - C7, D4, D5, D7, E6
+ // set as input with internal pull-up enabled
+ DDRC &= ~(1<<7);
+ DDRD &= ~(1<<5 | 1<<4 | 1<<6 | 1<<7);
+ DDRE &= ~(1<<6);
+ PORTC |= (1<<7);
+ PORTD |= (1<<5 | 1<<4 | 1<<6 | 1<<7);
+ PORTE |= (1<<6);
+
+ matrix_init_user();
+}
+
+
+uint8_t init_mcp23018(void) {
+ print("starting init");
+ mcp23018_status = 0x20;
+
+ // I2C subsystem
+
+ // uint8_t sreg_prev;
+ // sreg_prev=SREG;
+ // cli();
+
+ if (i2c_initialized == 0) {
+ i2c_init(); // on pins D(1,0)
+ i2c_initialized = true;
+ _delay_ms(1000);
+ }
+ // i2c_init(); // on pins D(1,0)
+ // _delay_ms(1000);
+
+ // set pin direction
+ // - unused : input : 1
+ // - input : input : 1
+ // - driving : output : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ i2c_stop();
+
+ // set pull-up
+ // - unused : on : 1
+ // - input : on : 1
+ // - driving : off : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+
+out:
+ i2c_stop();
+ // SREG=sreg_prev;
+ //uprintf("Init %x\n", mcp23018_status);
+ return mcp23018_status;
+}
diff --git a/keyboards/georgi/georgi.h b/keyboards/georgi/georgi.h
new file mode 100644
index 000000000..df6bb6ea9
--- /dev/null
+++ b/keyboards/georgi/georgi.h
@@ -0,0 +1,82 @@
+#pragma once
+#include <util/delay.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "quantum.h"
+#include "i2c_master.h"
+#include "matrix.h"
+
+
+extern i2c_status_t mcp23018_status;
+#define ERGODOX_EZ_I2C_TIMEOUT 1000
+#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+#define CPU_16MHz 0x00
+
+// I2C aliases and register addresses (see "mcp23018.md")
+//#define I2C_ADDR 0b0100000
+#define I2C_ADDR 0x20
+#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
+#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
+#define IODIRA 0x00 // i/o direction register
+#define IODIRB 0x01
+#define GPPUA 0x0C // GPIO pull-up resistor register
+#define GPPUB 0x0D
+#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
+#define GPIOB 0x13
+#define OLATA 0x14 // output latch register
+#define OLATB 0x15
+
+void init_ergodox(void);
+uint8_t init_mcp23018(void);
+
+/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
+#define LAYOUT_georgi( \
+ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \
+ L10,L11,L12,L13,L14,L15, R10,R11,R12,R13,R14,R15, \
+ L20,L21,L22, R20,R21,R22) \
+ \
+ { \
+ { KC_NO, R00, R10, R21}, \
+ { KC_NO, R01, R11, R20}, \
+ { KC_NO, R02, R12, R22}, \
+ { KC_NO, R03, R13, KC_NO}, \
+ { KC_NO, R04, R14, KC_NO}, \
+ { KC_NO, R05, R15, KC_NO}, \
+ { KC_NO, KC_NO, KC_NO, KC_NO}, \
+ \
+ { KC_NO, L05, L15, L22}, \
+ { KC_NO, L04, L14, L21}, \
+ { KC_NO, L03, L13, L20}, \
+ { KC_NO, L02, L12, KC_NO}, \
+ { KC_NO, L01, L11, KC_NO}, \
+ { KC_NO, L00, L10, KC_NO}, \
+ { KC_NO, KC_NO, KC_NO, KC_NO}, \
+ \
+}
+
+/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ----------
+#define LAYOUT_GERGO( \
+ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \
+ L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
+ L20,L21,L22,L23,L24,L25,L26, R20,R21,R22,R23,R24,R25,R26, \
+ L31,L32, R33,R34, \
+ L30, R30, \
+ L33,L34, R31,R32) \
+ \
+ { \
+ { KC_NO, L16, L26, L30}, \
+ { L05, L15, L25, L34}, \
+ { L04, L14, L24, L33}, \
+ { L03, L13, L23, L32}, \
+ { L02, L12, L22, L31}, \
+ { L01, L11, L21, KC_NO}, \
+ { L00, L10, L20, KC_NO}, \
+ \
+ { KC_NO, R10, R20, R30}, \
+ { R00, R11, R21, R31}, \
+ { R01, R12, R22, R32}, \
+ { R02, R13, R23, R33}, \
+ { R03, R14, R24, R34}, \
+ { R04, R15, R25, KC_NO}, \
+ { R05, R16, R26, KC_NO}, \
+} */
diff --git a/keyboards/georgi/info.json b/keyboards/georgi/info.json
new file mode 100644
index 000000000..d0752e2cd
--- /dev/null
+++ b/keyboards/georgi/info.json
@@ -0,0 +1,133 @@
+{
+ "keyboard_name": "Georgi",
+ "url": "http://gboards.ca",
+ "maintainer": "germ",
+ "width": 13.2,
+ "height": 3.68,
+ "layouts": {
+ "LAYOUT_georgi": {
+ "layout": [
+ {
+ "x": 0.05,
+ "y": 0.54
+ },
+ {
+ "x": 1.06,
+ "y": 0.55
+ },
+ {
+ "x": 2.06,
+ "y": 0.29
+ },
+ {
+ "x": 3.05,
+ "y": 0.16
+ },
+ {
+ "x": 4.06,
+ "y": 0.41
+ },
+ {
+ "x": 5.06,
+ "y": 0.54
+ },
+ {
+ "x": 7.1899999999999995,
+ "y": 0.41
+ },
+ {
+ "x": 8.2,
+ "y": 0.3
+ },
+ {
+ "x": 9.2,
+ "y": 0.05
+ },
+ {
+ "x": 10.2,
+ "y": 0.29
+ },
+ {
+ "x": 11.2,
+ "y": 0.43
+ },
+ {
+ "x": 12.2,
+ "y": 0.42
+ },
+ {
+ "x": 0.05,
+ "y": 1.54
+ },
+ {
+ "x": 1.06,
+ "y": 1.54
+ },
+ {
+ "x": 2.06,
+ "y": 1.28
+ },
+ {
+ "x": 3.05,
+ "y": 1.16
+ },
+ {
+ "x": 4.06,
+ "y": 1.4
+ },
+ {
+ "x": 5.06,
+ "y": 1.54
+ },
+ {
+ "x": 7.1899999999999995,
+ "y": 1.4
+ },
+ {
+ "x": 8.2,
+ "y": 1.28
+ },
+ {
+ "x": 9.2,
+ "y": 1.04
+ },
+ {
+ "x": 10.2,
+ "y": 1.28
+ },
+ {
+ "x": 11.2,
+ "y": 1.42
+ },
+ {
+ "x": 12.2,
+ "y": 1.42
+ },
+ {
+ "x": 3.05,
+ "y": 2.67
+ },
+ {
+ "x": 4.06,
+ "y": 2.68
+ },
+ {
+ "x": 5.06,
+ "y": 2.68
+ },
+ {
+ "x": 7.19,
+ "y": 2.67
+ },
+ {
+ "x": 8.2,
+ "y": 2.67
+ },
+ {
+ "x": 9.2,
+ "y": 2.66
+ }
+ ]
+ }
+ }
+}
diff --git a/keyboards/georgi/keymaps/default/keymap.c b/keyboards/georgi/keymaps/default/keymap.c
new file mode 100644
index 000000000..c3d69eb8a
--- /dev/null
+++ b/keyboards/georgi/keymaps/default/keymap.c
@@ -0,0 +1,229 @@
+/*
+ * Good on you for modifying your layout, this is the most nonQMK layout you will come across
+ * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer
+ *
+ * Don't modify the steno layer directly, instead add chords using the keycodes and macros
+ * from sten.h to the layout you want to modify.
+ *
+ * Observe the comment above processQWERTY!
+ *
+ * http://docs.gboards.ca
+ */
+
+#include QMK_KEYBOARD_H
+#include "sten.h"
+#include "keymap_steno.h"
+#define IGNORE_MOD_TAP_INTERRUPT
+
+int getKeymapCount(void);
+
+// Proper Layers
+#define FUNCT (LSD | LK | LP | LH)
+#define MEDIA (LSD | LK | LW | LR)
+#define MOVE (ST1 | ST2)
+
+/* Keyboard Layout
+ * ,---------------------------------. ,------------------------------.
+ * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD |
+ * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----|
+ * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RG | RB | RS | RZ |
+ * `---------------------------------' `------------------------------'
+ * ,---------------, .---------------.
+ * | NUM | LA | LO | | RE | RU | NUM |
+ * `---------------' `---------------'
+ */
+
+// YOU MUST ORDER THIS!
+// P Will return from processing on the first match it finds. Therefore
+// PJ Will run the requested action, remove the matched chord and continue
+//
+// First any chords that would conflict with PJs need to be checked, then PJs, lastly Ps.
+// For all chords should be ordered by length in their section!
+//
+// http://docs.gboards.ca
+bool processQwerty(void) {
+ // Place P's that would be trashed by PJ's here
+ P( RT | RS | RD | RZ | NUM, SEND_STRING(VERSION); SEND_STRING(__DATE__));
+ P( NUM | LA | LO | RE | RU, SEND(KC_MPLY));
+ P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC));
+
+ // Thumb Chords
+ P( LA | LO | RE | RU, SEND(KC_CAPS));
+ P( LA | RU, SEND(KC_ESC));
+ PJ( LO | RE, SEND(KC_LCTL));
+ PJ( NUM | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
+ PJ( NUM | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
+
+ // Mods
+ PJ( RT | RD | RS | RZ, SEND(KC_LGUI));
+ PJ( RT | RD, SEND(KC_LCTL));
+ PJ( RS | RZ, SEND(KC_LALT));
+ PJ( LA | NUM, SEND(KC_LCTL));
+ PJ( LA | LO, SEND(KC_LALT));
+ PJ( LO, SEND(KC_LSFT));
+
+ // Function Layer
+ P( FUNCT | RF | RR, SEND(KC_F5));
+ P( FUNCT | RP | RB, SEND(KC_F6));
+ P( FUNCT | RL | RG, SEND(KC_F7));
+ P( FUNCT | RT | RS, SEND(KC_F8));
+ P( FUNCT | RF, SEND(KC_F1));
+ P( FUNCT | RP, SEND(KC_F2));
+ P( FUNCT | RL, SEND(KC_F3));
+ P( FUNCT | RT, SEND(KC_F4));
+ P( FUNCT | RR, SEND(KC_F9));
+ P( FUNCT | RG, SEND(KC_F10));
+ P( FUNCT | RB, SEND(KC_F11));
+ P( FUNCT | RS, SEND(KC_F12));
+
+ // Movement Layer
+ P( MOVE | RF, SEND(KC_LEFT));
+ P( MOVE | RP, SEND(KC_DOWN));
+ P( MOVE | RL, SEND(KC_UP));
+ P( MOVE | RT, SEND(KC_RIGHT));
+ P( MOVE | ST3, SEND(KC_PGUP));
+ P( MOVE | ST4, SEND(KC_PGDN));
+
+ // Media Layer
+ P( MEDIA | RF, SEND(KC_MPRV));
+ P( MEDIA | RP, SEND(KC_MPLY));
+ P( MEDIA | RL, SEND(KC_MPLY));
+ P( MEDIA | RT, SEND(KC_MNXT));
+ P( MEDIA | RD, SEND(KC_VOLU));
+ P( MEDIA | RZ, SEND(KC_VOLD));
+ P( MEDIA | RS, SEND(KC_MUTE));
+
+ // Mouse Keys
+ P( LP | LH, clickMouse(KC_MS_BTN1));
+ P( LW | LR, clickMouse(KC_MS_BTN2));
+
+ // Number Row
+ P( NUM | LSU, SEND(KC_1));
+ P( NUM | LFT, SEND(KC_2));
+ P( NUM | LP, SEND(KC_3));
+ P( NUM | LH, SEND(KC_4));
+ P( NUM | ST1, SEND(KC_5));
+ P( NUM | ST3, SEND(KC_6));
+ P( NUM | RF, SEND(KC_7));
+ P( NUM | RP, SEND(KC_8));
+ P( NUM | RL, SEND(KC_9));
+ P( NUM | RT, SEND(KC_0));
+ P( NUM | LA, SEND(KC_5));
+ P( NUM | RT, SEND(KC_0));
+
+ // Specials
+ P( LA | NUM, SEND(KC_ESC));
+ P( RU | NUM, SEND(KC_TAB));
+ P( RE | RU, SEND(KC_BSPC));
+ P( RD | RZ, SEND(KC_ENT));
+ P( RE, SEND(KC_ENT));
+ P( RD, SEND(KC_BSPC));
+ P( NUM, SEND(KC_BSPC));
+ P( LA, SEND(KC_SPC));
+ P( RU, SEND(KC_SPC));
+ P( RZ, SEND(KC_ESC));
+
+ // Letters
+ P( LSU | LSD, SEND(KC_A));
+ P( LFT | LK, SEND(KC_S));
+ P( LP | LW, SEND(KC_D));
+ P( LH | LR, SEND(KC_F));
+ P( ST1 | ST2, SEND(KC_G));
+ P( ST3 | ST4, SEND(KC_H));
+ P( RF | RR, SEND(KC_J));
+ P( RT | RS, SEND(KC_SCLN))
+ P( RG | RL, SEND(KC_L));
+ P( RP | RB, SEND(KC_K));
+ P( LSU, SEND(KC_Q));
+ P( LSD, SEND(KC_Z));
+ P( LFT, SEND(KC_W));
+ P( LK, SEND(KC_X));
+ P( LP, SEND(KC_E));
+ P( LW, SEND(KC_C));
+ P( LH, SEND(KC_R));
+ P( LR, SEND(KC_V));
+ P( ST1, SEND(KC_T));
+ P( ST2, SEND(KC_B));
+ P( ST3, SEND(KC_Y));
+ P( ST4, SEND(KC_N));
+ P( RF, SEND(KC_U));
+ P( RR, SEND(KC_M));
+ P( RP, SEND(KC_I));
+ P( RB, SEND(KC_COMM));
+ P( RL, SEND(KC_O));
+ P( RG, SEND(KC_DOT));
+ P( RT, SEND(KC_P));
+ P( RS, SEND(KC_SLSH));
+
+ // Symbols and Numbers
+ P( PWR | RE | RU, SEND(KC_ENT));
+ P( PWR | LA | LO, SEND(KC_SPC));
+ P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
+ P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
+ P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
+ P( PWR | RD | RZ, SEND(KC_ESC));
+ P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
+ P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
+ P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
+ P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
+ P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
+ P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
+ P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
+ P( PWR | LW, SEND(KC_LBRC));
+ P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
+ P( PWR | LR, SEND(KC_RBRC));
+ P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
+ P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
+ P( PWR | ST3, SEND(KC_QUOT));
+ P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
+ P( PWR | RF, SEND(KC_KP_PLUS));
+ P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
+ P( PWR | RP, SEND(KC_MINS));
+ P( PWR | RB, SEND(KC_EQL));
+ P( PWR | RL, SEND(KC_SLSH));
+ P( PWR | RG, SEND(KC_COMM));
+ P( PWR | RT, SEND(KC_PAST));
+ P( PWR | RS, SEND(KC_DOT));
+ P( PWR | RD, SEND(KC_TAB));
+ P( PWR | LA, SEND(KC_SCLN));
+ P( PWR | LO, SEND(KC_SLSH));
+ P( PWR | RE, SEND(KC_SCLN));
+ P( PWR | RU, SEND(KC_SLSH));
+
+
+ // If we make here, send as a steno chord
+ // If plover is running we can hook that host side
+ return false;
+}
+
+#define STENO_LAYER 0
+#define GAMING 1
+#define GAMING_2 2
+
+// "Layers"
+// Steno layer should be first in your map.
+// When PWR | FN | RR | RG | RB | RS is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
+// If you have only a single layer, you must set SINGLELAYER = yes in your rules.mk, otherwise you may experince undefined behaviour
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+// Main layer, everything goes through here
+[STENO_LAYER] = LAYOUT_georgi(
+STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N1)
+,
+// Gaming layer with Numpad, Very limited
+[GAMING] = LAYOUT_georgi(
+KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
+KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO,
+KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER)),
+
+[GAMING_2] = LAYOUT_georgi(
+KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT,
+ KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER))
+};
+
+int getKeymapCount(void) {
+ return sizeof(keymaps)/sizeof(keymaps[0]);
+}
diff --git a/keyboards/georgi/keymaps/default/readme.md b/keyboards/georgi/keymaps/default/readme.md
new file mode 100644
index 000000000..f9da34b02
--- /dev/null
+++ b/keyboards/georgi/keymaps/default/readme.md
@@ -0,0 +1,11 @@
+# Georgi QWERTY/Steno firmware
+
+This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout.
+It is both a ergonomic and programmer friendly keymap.
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
+
+## Space issues
+If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save
+you about 4k for entries!
+Get a free 1k by deleting the Gaming layers from the keymap!
diff --git a/keyboards/georgi/keymaps/default/rules.mk b/keyboards/georgi/keymaps/default/rules.mk
new file mode 100644
index 000000000..2973c4591
--- /dev/null
+++ b/keyboards/georgi/keymaps/default/rules.mk
@@ -0,0 +1,27 @@
+#----------------------------------------------------------------------------
+# make georgi:extrakey:dfu
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+
+#Debug options
+VERBOSE = yes
+CONSOLE_ENABLE = yes
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = no
+KEYBOARD_SHARED_EP = yes
+CUSTOM_MATRIX = yes
+MOUSEKEY_ENABLE = yes
+SINGLE_LAYER = no
+
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+SRC += matrix.c i2c_master.c
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
+ifeq ($(strip $(SINGLE_LAYER)), yes)
+ OPT_DEFS += -DSINGLE_LAYER
+endif
diff --git a/keyboards/georgi/keymaps/template/keymap.c b/keyboards/georgi/keymaps/template/keymap.c
new file mode 100644
index 000000000..b17d7ed9f
--- /dev/null
+++ b/keyboards/georgi/keymaps/template/keymap.c
@@ -0,0 +1,216 @@
+/*
+ * Good on you for modifying your layout, this is the most nonQMK layout you will come across
+ * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer
+ *
+ * Don't modify the steno layer directly, instead add chords using the keycodes and macros
+ * from sten.h to the layout you want to modify.
+ *
+ * Observe the comment above processQWERTY!
+ *
+ * http://docs.gboards.ca
+ */
+
+#include QMK_KEYBOARD_H
+#include "sten.h"
+#include "keymap_steno.h"
+#define IGNORE_MOD_TAP_INTERRUPT
+
+int getKeymapCount(void);
+
+// Proper Layers
+#define FUNCT (LSD | LK | LP | LH)
+#define MEDIA (LSD | LK | LW | LR)
+#define MOVE (ST1 | ST2)
+
+/* Keyboard Layout
+ * ,---------------------------------. ,------------------------------.
+ * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD |
+ * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----|
+ * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RG | RB | RS | RZ |
+ * `---------------------------------' `------------------------------'
+ * ,---------------, .---------------.
+ * | NUM | LA | LO | | RE | RU | NUM |
+ * `---------------' `---------------'
+ */
+
+// YOU MUST ORDER THIS!
+// P Will return from processing on the first match it finds. Therefore
+// PJ Will run the requested action, remove the matched chord and continue
+//
+// First any chords that would conflict with PJs need to be checked, then PJs, lastly Ps.
+// For all chords should be ordered by length in their section!
+//
+// http://docs.gboards.ca
+bool processQwerty(void) {
+ // Place P's that would be trashed by PJ's here
+ P( RT | RS | RD | RZ | NUM, SEND_STRING(VERSION); SEND_STRING(__DATE__));
+ P( NUM | LA | LO | RE | RU, SEND(KC_MPLY));
+ P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC));
+
+ // Thumb Chords
+ P( LA | LO | RE | RU, SEND(KC_CAPS));
+ P( LA | RU, SEND(KC_ESC));
+ PJ( LO | RE, SEND(KC_LCTL));
+ PJ( NUM | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT));
+ PJ( NUM | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT));
+
+ // Mods
+ PJ( RT | RD | RS | RZ, SEND(KC_LGUI));
+ PJ( RT | RD, SEND(KC_LCTL));
+ PJ( RS | RZ, SEND(KC_LALT));
+ PJ( LA | NUM, SEND(KC_LCTL));
+ PJ( LA | LO, SEND(KC_LALT));
+ PJ( LO, SEND(KC_LSFT));
+
+ // Function Layer
+ P( FUNCT | RF | RR, SEND(KC_F5));
+ P( FUNCT | RP | RB, SEND(KC_F6));
+ P( FUNCT | RL | RG, SEND(KC_F7));
+ P( FUNCT | RT | RS, SEND(KC_F8));
+ P( FUNCT | RF, SEND(KC_F1));
+ P( FUNCT | RP, SEND(KC_F2));
+ P( FUNCT | RL, SEND(KC_F3));
+ P( FUNCT | RT, SEND(KC_F4));
+ P( FUNCT | RR, SEND(KC_F9));
+ P( FUNCT | RG, SEND(KC_F10));
+ P( FUNCT | RB, SEND(KC_F11));
+ P( FUNCT | RS, SEND(KC_F12));
+
+ // Movement Layer
+ P( MOVE | RF, SEND(KC_LEFT));
+ P( MOVE | RP, SEND(KC_DOWN));
+ P( MOVE | RL, SEND(KC_UP));
+ P( MOVE | RT, SEND(KC_RIGHT));
+ P( MOVE | ST3, SEND(KC_PGUP));
+ P( MOVE | ST4, SEND(KC_PGDN));
+
+ // Media Layer
+ P( MEDIA | RF, SEND(KC_MPRV));
+ P( MEDIA | RP, SEND(KC_MPLY));
+ P( MEDIA | RL, SEND(KC_MPLY));
+ P( MEDIA | RT, SEND(KC_MNXT));
+ P( MEDIA | RD, SEND(KC_VOLU));
+ P( MEDIA | RZ, SEND(KC_VOLD));
+ P( MEDIA | RS, SEND(KC_MUTE));
+
+ // Mouse Keys
+ P( LP | LH, clickMouse(KC_MS_BTN1));
+ P( LW | LR, clickMouse(KC_MS_BTN2));
+
+ // Number Row
+ P( NUM | LSU, SEND(KC_1));
+ P( NUM | LFT, SEND(KC_2));
+ P( NUM | LP, SEND(KC_3));
+ P( NUM | LH, SEND(KC_4));
+ P( NUM | ST1, SEND(KC_5));
+ P( NUM | ST3, SEND(KC_6));
+ P( NUM | RF, SEND(KC_7));
+ P( NUM | RP, SEND(KC_8));
+ P( NUM | RL, SEND(KC_9));
+ P( NUM | RT, SEND(KC_0));
+ P( NUM | LA, SEND(KC_5));
+ P( NUM | RT, SEND(KC_0));
+
+ // Specials
+ P( LA | NUM, SEND(KC_ESC));
+ P( RU | NUM, SEND(KC_TAB));
+ P( RE | RU, SEND(KC_BSPC));
+ P( RD | RZ, SEND(KC_ENT));
+ P( RE, SEND(KC_ENT));
+ P( RD, SEND(KC_BSPC));
+ P( NUM, SEND(KC_BSPC));
+ P( LA, SEND(KC_SPC));
+ P( RU, SEND(KC_SPC));
+ P( RZ, SEND(KC_ESC));
+
+ // Letters
+ P( LSU | LSD, SEND(KC_A));
+ P( LFT | LK, SEND(KC_S));
+ P( LP | LW, SEND(KC_D));
+ P( LH | LR, SEND(KC_F));
+ P( ST1 | ST2, SEND(KC_G));
+ P( ST3 | ST4, SEND(KC_H));
+ P( RF | RR, SEND(KC_J));
+ P( RT | RS, SEND(KC_SCLN))
+ P( RG | RL, SEND(KC_L));
+ P( RP | RB, SEND(KC_K));
+ P( LSU, SEND(KC_Q));
+ P( LSD, SEND(KC_Z));
+ P( LFT, SEND(KC_W));
+ P( LK, SEND(KC_X));
+ P( LP, SEND(KC_E));
+ P( LW, SEND(KC_C));
+ P( LH, SEND(KC_R));
+ P( LR, SEND(KC_V));
+ P( ST1, SEND(KC_T));
+ P( ST2, SEND(KC_B));
+ P( ST3, SEND(KC_Y));
+ P( ST4, SEND(KC_N));
+ P( RF, SEND(KC_U));
+ P( RR, SEND(KC_M));
+ P( RP, SEND(KC_I));
+ P( RB, SEND(KC_COMM));
+ P( RL, SEND(KC_O));
+ P( RG, SEND(KC_DOT));
+ P( RT, SEND(KC_P));
+ P( RS, SEND(KC_SLSH));
+
+ // Symbols and Numbers
+ P( PWR | RE | RU, SEND(KC_ENT));
+ P( PWR | LA | LO, SEND(KC_SPC));
+ P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
+ P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
+ P( PWR | ST1 | ST2, SEND(KC_GRV)); // `
+ P( PWR | RD | RZ, SEND(KC_ESC));
+ P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // #
+ P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
+ P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
+ P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
+ P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
+ P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
+ P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
+ P( PWR | LW, SEND(KC_LBRC));
+ P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
+ P( PWR | LR, SEND(KC_RBRC));
+ P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
+ P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
+ P( PWR | ST3, SEND(KC_QUOT));
+ P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // "
+ P( PWR | RF, SEND(KC_KP_PLUS));
+ P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // &
+ P( PWR | RP, SEND(KC_MINS));
+ P( PWR | RB, SEND(KC_EQL));
+ P( PWR | RL, SEND(KC_SLSH));
+ P( PWR | RG, SEND(KC_COMM));
+ P( PWR | RT, SEND(KC_PAST));
+ P( PWR | RS, SEND(KC_DOT));
+ P( PWR | RD, SEND(KC_TAB));
+ P( PWR | LA, SEND(KC_SCLN));
+ P( PWR | LO, SEND(KC_SLSH));
+ P( PWR | RE, SEND(KC_SCLN));
+ P( PWR | RU, SEND(KC_SLSH));
+
+
+ // If we make here, send as a steno chord
+ // If plover is running we can hook that host side
+ return false;
+}
+
+#define STENO_LAYER 0
+
+// "Layers"
+// Steno layer should be first in your map.
+// When PWR | FN | RR | RG | RB | RS is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end.
+// If you have only a single layer, you must set SINGLELAYER = yes in your rules.mk, otherwise you may experince undefined behaviour
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+// Main layer, everything goes through here
+[STENO_LAYER] = LAYOUT_georgi(
+STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
+ STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N1)
+};
+
+int getKeymapCount(void) {
+ return sizeof(keymaps)/sizeof(keymaps[0]);
+}
diff --git a/keyboards/georgi/keymaps/template/readme.md b/keyboards/georgi/keymaps/template/readme.md
new file mode 100644
index 000000000..7c6fc3512
--- /dev/null
+++ b/keyboards/georgi/keymaps/template/readme.md
@@ -0,0 +1,6 @@
+# Georgi QWERTY/Steno firmware
+
+This is a blank template configured with 5K of free space for your onboard dictionary!
+Read the docs over at [gBoards](http://docs.gboards.ca)
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
diff --git a/keyboards/georgi/keymaps/template/rules.mk b/keyboards/georgi/keymaps/template/rules.mk
new file mode 100644
index 000000000..1178fd80d
--- /dev/null
+++ b/keyboards/georgi/keymaps/template/rules.mk
@@ -0,0 +1,27 @@
+#----------------------------------------------------------------------------
+# make georgi:extrakey:dfu
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+
+#Debug options
+VERBOSE = yes
+CONSOLE_ENABLE = yes
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = no
+KEYBOARD_SHARED_EP = yes
+CUSTOM_MATRIX = yes
+MOUSEKEY_ENABLE = no
+SINGLE_LAYER = no
+
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+SRC += matrix.c i2c_master.c
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
+ifeq ($(strip $(SINGLE_LAYER)), yes)
+ OPT_DEFS += -DSINGLE_LAYER
+endif
diff --git a/keyboards/georgi/matrix.c b/keyboards/georgi/matrix.c
new file mode 100644
index 000000000..22079ac61
--- /dev/null
+++ b/keyboards/georgi/matrix.c
@@ -0,0 +1,402 @@
+/*
+Note for ErgoDox EZ customizers: Here be dragons!
+This is not a file you want to be messing with.
+All of the interesting stuff for you is under keymaps/ :)
+Love, Erez
+
+Copyright 2013 Oleg Kostyuk <cub.uanic@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 "matrix.h"
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include "wait.h"
+#include "action_layer.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "keymap_steno.h"
+#include QMK_KEYBOARD_H
+#ifdef DEBUG_MATRIX_SCAN_RATE
+#include "timer.h"
+#endif
+
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+// MCP Pin Defs
+#define RROW1 (1<<3)
+#define RROW2 (1<<2)
+#define RROW3 (1<<1)
+#define RROW4 (1<<0)
+#define COL0 (1<<0)
+#define COL1 (1<<1)
+#define COL2 (1<<2)
+#define COL3 (1<<3)
+#define COL4 (1<<4)
+#define COL5 (1<<5)
+#define COL6 (1<<6)
+
+// ATmega pin defs
+#define ROW1 (1<<6)
+#define ROW2 (1<<5)
+#define ROW3 (1<<4)
+#define ROW4 (1<<1)
+#define COL7 (1<<0)
+#define COL8 (1<<1)
+#define COL9 (1<<2)
+#define COL10 (1<<3)
+#define COL11 (1<<2)
+#define COL12 (1<<3)
+#define COL13 (1<<6)
+
+
+// bit masks
+#define BMASK (COL7 | COL8 | COL9 | COL10)
+#define CMASK (COL13)
+#define DMASK (COL11 | COL12)
+#define FMASK (ROW1 | ROW2 | ROW3 | ROW4)
+#define RROWMASK (RROW1 | RROW2 | RROW3 | RROW4)
+#define MCPMASK (COL0 | COL1 | COL2 | COL3 | COL4 | COL5 | COL6)
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+/*
+ * matrix state(1:on, 0:off)
+ * contains the raw values without debounce filtering of the last read cycle.
+ */
+static matrix_row_t raw_matrix[MATRIX_ROWS];
+
+// Debouncing: store for each key the number of scans until it's eligible to
+// change. When scanning the matrix, ignore any changes in keys that have
+// already changed in the last DEBOUNCE scans.
+static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
+
+static matrix_row_t read_cols(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+static uint8_t mcp23018_reset_loop;
+// static uint16_t mcp23018_reset_loop;
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+uint32_t matrix_timer;
+uint32_t matrix_scan_count;
+#endif
+
+
+__attribute__ ((weak))
+void matrix_init_user(void) {}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+
+void matrix_init(void)
+{
+ // initialize row and col
+ mcp23018_status = init_mcp23018();
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ raw_matrix[i] = 0;
+ for (uint8_t j=0; j < MATRIX_COLS; ++j) {
+ debounce_matrix[i * MATRIX_COLS + j] = 0;
+ }
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+ matrix_init_quantum();
+}
+
+void matrix_power_up(void) {
+ mcp23018_status = init_mcp23018();
+
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+
+}
+
+// Returns a matrix_row_t whose bits are set if the corresponding key should be
+// eligible to change in this scan.
+matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) {
+ matrix_row_t result = 0;
+ matrix_row_t change = rawcols ^ raw_matrix[row];
+ raw_matrix[row] = rawcols;
+ for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
+ if (debounce_matrix[row * MATRIX_COLS + i]) {
+ --debounce_matrix[row * MATRIX_COLS + i];
+ } else {
+ result |= (1 << i);
+ }
+ if (change & (1 << i)) {
+ debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
+ }
+ }
+ return result;
+}
+
+matrix_row_t debounce_read_cols(uint8_t row) {
+ // Read the row without debouncing filtering and store it for later usage.
+ matrix_row_t cols = read_cols(row);
+ // Get the Debounce mask.
+ matrix_row_t mask = debounce_mask(cols, row);
+ // debounce the row and return the result.
+ return (cols & mask) | (matrix[row] & ~mask);;
+}
+
+uint8_t matrix_scan(void)
+{
+ // Then the keyboard
+ if (mcp23018_status) { // if there was an error
+ if (++mcp23018_reset_loop == 0) {
+ // if (++mcp23018_reset_loop >= 1300) {
+ // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
+ // this will be approx bit more frequent than once per second
+ print("trying to reset mcp23018\n");
+ mcp23018_status = init_mcp23018();
+ if (mcp23018_status) {
+ print("left side not responding\n");
+ } else {
+ print("left side attached\n");
+ }
+ }
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_scan_count++;
+ uint32_t timer_now = timer_read32();
+ if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
+ print("matrix scan frequency: ");
+ pdec(matrix_scan_count);
+ print("\n");
+
+ matrix_timer = timer_now;
+ matrix_scan_count = 0;
+ }
+#endif
+ for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
+ select_row(i);
+ // and select on left hand
+ select_row(i + MATRIX_ROWS_PER_SIDE);
+ // we don't need a 30us delay anymore, because selecting a
+ // left-hand row requires more than 30us for i2c.
+
+ // grab cols from left hand
+ matrix[i] = debounce_read_cols(i);
+ // grab cols from right hand
+ matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
+
+ unselect_rows();
+ }
+
+ matrix_scan_quantum();
+
+#ifdef DEBUG_MATRIX
+ for (uint8_t c = 0; c < MATRIX_COLS; c++)
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++)
+ if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
+#endif
+
+ return 1;
+}
+
+bool matrix_is_modified(void) // deprecated and evidently not called.
+{
+ return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+// Remember this means ROWS
+static void init_cols(void)
+{
+ // init on mcp23018
+ // not needed, already done as part of init_mcp23018()
+
+ // Input with pull-up(DDR:0, PORT:1)
+ DDRF &= ~FMASK;
+ PORTF |= FMASK;
+}
+
+static matrix_row_t read_cols(uint8_t row)
+{
+ if (row < 7) {
+ if (mcp23018_status) { // if there was an error
+ return 0;
+ } else {
+ uint8_t data = 0;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
+ data = ~((uint8_t)mcp23018_status);
+ mcp23018_status = I2C_STATUS_SUCCESS;
+ out:
+ i2c_stop();
+
+#ifdef DEBUG_MATRIX
+ if (data != 0x00) xprintf("I2C: %d\n", data);
+#endif
+ return data;
+ }
+ } else {
+ /* read from teensy
+ * bitmask is 0b0111001, but we want the lower four
+ * we'll return 1s for the top two, but that's harmless.
+ */
+ // So I need to confuckulate all this
+ //return ~(((PIND & DMASK) >> 1 | ((PINC & CMASK) >> 6) | (PIN)));
+ //return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2));
+ return ~(
+ (((PINF & ROW4) >> 1)
+ | ((PINF & (ROW1 | ROW2 | ROW3)) >> 3))
+ & 0xF);
+ }
+}
+
+// Row pin configuration
+static void unselect_rows(void)
+{
+ // no need to unselect on mcp23018, because the select step sets all
+ // the other row bits high, and it's not changing to a different
+ // direction
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ DDRB &= ~(BMASK);
+ PORTB &= ~(BMASK);
+ DDRC &= ~CMASK;
+ PORTC &= ~CMASK;
+ DDRD &= ~DMASK;
+ PORTD &= ~DMASK;
+}
+
+static void select_row(uint8_t row)
+{
+ if (row < 7) {
+ // select on mcp23018
+ if (mcp23018_status) { // do nothing on error
+ } else { // set active row low : 0 // set other rows hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0xFF & ~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ out:
+ i2c_stop();
+ }
+ } else {
+ // Output low(DDR:1, PORT:0) to select
+ switch (row) {
+ case 7:
+ DDRB |= COL7;
+ PORTB &= ~COL7;
+ break;
+ case 8:
+ DDRB |= COL8;
+ PORTB &= ~COL8;
+ break;
+ case 9:
+ DDRB |= COL9;
+ PORTB &= ~COL9;
+ break;
+ case 10:
+ DDRB |= COL10;
+ PORTB &= ~COL10;
+ break;
+ case 11:
+ DDRD |= COL11;
+ PORTD &= ~COL11;
+ break;
+ case 12:
+ DDRD |= COL12;
+ PORTD &= ~COL12;
+ break;
+ case 13:
+ DDRC |= COL13;
+ PORTC &= ~COL13;
+ break;
+ }
+ }
+}
diff --git a/keyboards/georgi/readme.md b/keyboards/georgi/readme.md
new file mode 100644
index 000000000..03e2e3d83
--- /dev/null
+++ b/keyboards/georgi/readme.md
@@ -0,0 +1,29 @@
+# Georgi
+
+![Georgi](https://i.imgur.com/3kUpRrj.jpg)
+
+A compact 20% (12x2) Split Keyboard for steno and QWERTY.
+
+[More info on qmk.fm](http://qmk.fm/georgi/)
+
+Keyboard Maintainer: [Jeremy Bernhardt](https://github.com/germ)
+Hardware Supported: Georgi
+Hardware Availability: [gboards.ca](http://gboards.ca)
+
+## Firmware building
+After cloning the QMK repo and installing dfu-programmer build and flash with. Be sure to reset your keyboard!
+
+ make georgi:default:dfu
+
+To just test your build with the default keymap
+
+ make georgi:default
+
+Build options can be enabled/disabled in keyboards/georgi/keymaps/default/rules.mk . Copy the default directory and make any changes to your layout, if you think they're worth sharing submit a PR!
+
+# Space
+The stock firmware uses nearly all of the flash avalible. For custom dictionary modifications, disable mousekeys in your keymaps rules.mk (4K of space) and remove the Gaming layers. I've done this already in the provided keymap 'template'.
+
+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).
+
+## Have an idea? [Reach out to me!](mailto:bernhardtjeremy@gmail.com)
diff --git a/keyboards/georgi/rules.mk b/keyboards/georgi/rules.mk
new file mode 100644
index 000000000..0f730f3b7
--- /dev/null
+++ b/keyboards/georgi/rules.mk
@@ -0,0 +1,22 @@
+#----------------------------------------------------------------------------
+# make georgi:default:dfu
+# Make sure you have dfu-programmer installed!
+# Do not edit this file! Make a copy of keymaps/default and modify that!
+#----------------------------------------------------------------------------
+# Source includes
+SRC += matrix.c i2c_master.c
+
+# Hardware info
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+BOOTLOADER = atmel-dfu
+F_USB = $(F_CPU)
+EXTRAFLAGS += -flto
+
+CUSTOM_MATRIX = yes
+STENO_ENABLE = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = no
+NKRO_ENABLE = yes
diff --git a/keyboards/georgi/sten.c b/keyboards/georgi/sten.c
new file mode 100644
index 000000000..3b33b11d6
--- /dev/null
+++ b/keyboards/georgi/sten.c
@@ -0,0 +1,2 @@
+#include "sten.h"
+
diff --git a/keyboards/georgi/sten.h b/keyboards/georgi/sten.h
new file mode 100644
index 000000000..fee05deca
--- /dev/null
+++ b/keyboards/georgi/sten.h
@@ -0,0 +1,290 @@
+// 2019, g Heavy Industries
+
+#include QMK_KEYBOARD_H
+#include "mousekey.h"
+#include "keymap.h"
+#include "keymap_steno.h"
+
+// Bitfield representing the current chord
+uint32_t cChord = 0;
+
+// See if a given chord is pressed.
+// P will return
+// PJ will continue processing, removing the found chord
+#define P(chord, act) if (cChord == (chord)) { act; return true; }
+#define PJ(chord, act) if ((cChord & (chord)) == (chord)) { cChord ^= chord; act; }
+
+// All Steno Codes
+// Shift to internal representation
+#define STN(n) (1L<<n)
+
+//i.e) S(teno)R(ight)F
+enum ORDER {
+ SFN = 0, SPWR, SST1, SST2, SST3, SST4, SNUM,
+ SLSU, SLSD, SLT, SLK, SLP, SLW, SLH, SLR, SLA, SLO,
+ SRE, SRU, SRF, SRR, SRP, SRB, SRL, SRG, SRT, SRS, SRD, SRZ
+};
+
+// Break it all out
+#define FN STN(SFN)
+#define PWR STN(SPWR)
+#define ST1 STN(SST1)
+#define ST2 STN(SST2)
+#define ST3 STN(SST3)
+#define ST4 STN(SST4)
+#define NUM STN(SNUM) // No distinction between left and right
+
+#define LSU STN(SLSU)
+#define LSD STN(SLSD)
+#define LFT STN(SLT) // (L)e(F)t (T), preprocessor conflict
+#define LK STN(SLK)
+#define LP STN(SLP)
+#define LW STN(SLW)
+#define LH STN(SLH)
+#define LR STN(SLR)
+#define LA STN(SLA)
+#define LO STN(SLO)
+
+#define RE STN(SRE)
+#define RU STN(SRU)
+#define RF STN(SRF)
+#define RR STN(SRR)
+#define RP STN(SRP)
+#define RB STN(SRB)
+#define RL STN(SRL)
+#define RG STN(SRG)
+#define RT STN(SRT)
+#define RS STN(SRS)
+#define RD STN(SRD)
+#define RZ STN(SRZ)
+
+bool processQwerty(void);
+bool processFakeSteno(void);
+void clickMouse(uint8_t kc);
+void SEND(uint8_t kc);
+extern int getKeymapCount(void);
+
+// Mode state
+enum MODE { STENO = 0, QWERTY, COMMAND };
+enum MODE cMode = STENO;
+enum MODE pMode;
+bool QWERSTENO = false;
+
+// Command State
+#define MAX_CMD_BUF 20
+uint8_t CMDBUF[MAX_CMD_BUF];
+uint8_t CMDLEN = 0;
+
+// Key Repeat state
+bool inChord = false;
+uint16_t repTimer = 0;
+#define REP_DELAY 300
+
+// Mousekeys state
+bool inMouse = false;
+int8_t mousePress;
+
+// All processing done at chordUp goes through here
+bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
+ // Check for mousekeys, this is release
+#ifdef MOUSEKEY_ENABLE
+ if (inMouse) {
+ inMouse = false;
+ mousekey_off(mousePress);
+ mousekey_send();
+ }
+#endif
+
+ // Toggle Serial/QWERTY steno
+ if (cChord == (PWR | FN | ST1 | ST2)) {
+ uprintf("Fallback Toggle\n");
+ QWERSTENO = !QWERSTENO;
+
+ goto out;
+ }
+
+ // handle command mode
+ if (cChord == (PWR | FN | RD | RZ)) {
+ uprintf("COMMAND Toggle\n");
+ if (cMode != COMMAND) { // Entering Command Mode
+ CMDLEN = 0;
+ pMode = cMode;
+ cMode = COMMAND;
+ } else { // Exiting Command Mode
+ cMode = pMode;
+
+ // Press all and release all
+ for (int i = 0; i < CMDLEN; i++) {
+ register_code(CMDBUF[i]);
+ }
+ clear_keyboard();
+ }
+
+ goto out;
+ }
+
+ // Handle Gaming Toggle,
+ if (cChord == (PWR | FN | ST2 | ST3) && getKeymapCount() > 1) {
+ uprintf("Switching to QMK\n");
+ layer_on(1);
+ goto out;
+ }
+
+ // Lone FN press, toggle QWERTY
+ if (cChord == FN) {
+ (cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO);
+ goto out;
+ }
+
+ // Check for Plover momentary
+ if (cMode == QWERTY && (cChord & FN)) {
+ cChord ^= FN;
+ goto steno;
+ }
+
+ // Do QWERTY and Momentary QWERTY
+ if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) {
+ if (cChord & FN) cChord ^= FN;
+ processQwerty();
+ goto out;
+ }
+
+ // Fallback NKRO Steno
+ if (cMode == STENO && QWERSTENO) {
+ processFakeSteno();
+ goto out;
+ }
+
+steno:
+ // Hey that's a steno chord!
+ inChord = false;
+ cChord = 0;
+ return true;
+
+out:
+ inChord = false;
+ clear_keyboard();
+ cChord = 0;
+ return false;
+}
+
+// Update Chord State
+bool process_steno_user(uint16_t keycode, keyrecord_t *record) {
+ // Everything happens in here when steno keys come in.
+ // Bail on keyup
+ if (!record->event.pressed) return true;
+
+ // Update key repeat timers
+ repTimer = timer_read();
+ inChord = true;
+
+ // Switch on the press adding to chord
+ bool pr = record->event.pressed;
+ switch (keycode) {
+ // Mods and stuff
+ case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break;
+ case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break;
+ case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break;
+ case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break;
+ case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break;
+ case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break;
+ case STN_N1...STN_N6:
+ case STN_N7...STN_NC: pr ? (cChord |= (NUM)): (cChord &= ~(NUM)); break;
+
+ // All the letter keys
+ case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break;
+ case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break;
+ case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break;
+ case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break;
+ case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break;
+ case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break;
+ case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break;
+ case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break;
+ case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break;
+ case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break;
+ case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break;
+ case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break;
+ case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break;
+ case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break;
+ case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break;
+ case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break;
+ case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break;
+ case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break;
+ case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break;
+ case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break;
+ case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break;
+ case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break;
+ }
+
+ // Check for key repeat in QWERTY mode
+ return true;
+}
+void matrix_scan_user(void) {
+ // We abuse this for early sending of key
+ // Key repeat only on QWER/SYMB layers
+ if (cMode != QWERTY) return;
+
+ // Check timers
+ if (timer_elapsed(repTimer) > REP_DELAY) {
+ // Process Key for report
+ processQwerty();
+
+ // Send report to host
+ send_keyboard_report();
+ repTimer = timer_read();
+ }
+};
+
+// Helpers
+bool processFakeSteno(void) {
+ PJ( LSU, SEND(KC_Q););
+ PJ( LSD, SEND(KC_A););
+ PJ( LFT, SEND(KC_W););
+ PJ( LP, SEND(KC_E););
+ PJ( LH, SEND(KC_R););
+ PJ( LK, SEND(KC_S););
+ PJ( LW, SEND(KC_D););
+ PJ( LR, SEND(KC_F););
+ PJ( ST1, SEND(KC_T););
+ PJ( ST2, SEND(KC_G););
+ PJ( LA, SEND(KC_C););
+ PJ( LO, SEND(KC_V););
+ PJ( RE, SEND(KC_N););
+ PJ( RU, SEND(KC_M););
+ PJ( ST3, SEND(KC_Y););
+ PJ( ST4, SEND(KC_H););
+ PJ( RF, SEND(KC_U););
+ PJ( RP, SEND(KC_I););
+ PJ( RL, SEND(KC_O););
+ PJ( RT, SEND(KC_P););
+ PJ( RD, SEND(KC_LBRC););
+ PJ( RR, SEND(KC_J););
+ PJ( RB, SEND(KC_K););
+ PJ( RG, SEND(KC_L););
+ PJ( RS, SEND(KC_SCLN););
+ PJ( RZ, SEND(KC_COMM););
+ PJ( NUM, SEND(KC_1););
+
+ return false;
+}
+void clickMouse(uint8_t kc) {
+#ifdef MOUSEKEY_ENABLE
+ mousekey_on(kc);
+ mousekey_send();
+
+ // Store state for later use
+ inMouse = true;
+ mousePress = kc;
+#endif
+}
+void SEND(uint8_t kc) {
+ // Send Keycode, Does not work for Quantum Codes
+ if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) {
+ uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF);
+ CMDBUF[CMDLEN] = kc;
+ CMDLEN++;
+ }
+
+ if (cMode != COMMAND) register_code(kc);
+ return;
+}
diff --git a/keyboards/gergo/gergo.c b/keyboards/gergo/gergo.c
index d32792e2a..cc0bef391 100644
--- a/keyboards/gergo/gergo.c
+++ b/keyboards/gergo/gergo.c
@@ -47,7 +47,7 @@ uint8_t init_mcp23018(void) {
mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
// set pull-up
// - unused : on : 1
@@ -59,7 +59,7 @@ uint8_t init_mcp23018(void) {
mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
// SREG=sreg_prev;
//uprintf("Init %x\n", mcp23018_status);
return mcp23018_status;
diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c
index 29fe48ccb..9886ecf15 100644
--- a/keyboards/gergo/matrix.c
+++ b/keyboards/gergo/matrix.c
@@ -72,14 +72,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//Trackball pin defs
#define TRKUP (1<<4)
#define TRKDN (1<<5)
-#define TRKLT (1<<6)
+#define TRKLT (1<<6)
#define TRKRT (1<<7)
#define TRKBTN (1<<6)
// Multiple for mouse moves
#ifndef TRKSTEP
-#define TRKSTEP 20
+#define TRKSTEP 20
#endif
// multiple for mouse scroll
@@ -98,13 +98,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Trackball interrupts accumulate over here. Processed on scan
// Stores prev state of mouse, high bits store direction
-uint8_t trkState = 0;
-uint8_t trkBtnState = 0;
+uint8_t trkState = 0;
+uint8_t trkBtnState = 0;
-volatile uint8_t tbUpCnt = 0;
-volatile uint8_t tbDnCnt = 0;
-volatile uint8_t tbLtCnt = 0;
-volatile uint8_t tbRtCnt = 0;
+volatile uint8_t tbUpCnt = 0;
+volatile uint8_t tbDnCnt = 0;
+volatile uint8_t tbLtCnt = 0;
+volatile uint8_t tbRtCnt = 0;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
@@ -240,14 +240,14 @@ uint8_t matrix_scan(void)
// First we handle the mouse inputs
#ifdef BALLER
uint8_t pBtn = PINE & TRKBTN;
-
+
#ifdef DEBUG_BALLER
- // Compare to previous, mod report
+ // Compare to previous, mod report
if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0)
xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6));
#endif
- // Modify the report
+ // Modify the report
report_mouse_t pRprt = pointing_device_get_report();
// Scroll by default, move on layer
@@ -264,7 +264,7 @@ uint8_t matrix_scan(void)
}
#ifdef DEBUG_BALLER
- if (pRprt.x != 0 || pRprt.y != 0)
+ if (pRprt.x != 0 || pRprt.y != 0)
xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y);
#endif
@@ -272,7 +272,7 @@ uint8_t matrix_scan(void)
if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1;
// Save state, push update
- if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn))
+ if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn))
pointing_device_set_report(pRprt);
trkBtnState = pBtn;
@@ -325,8 +325,8 @@ uint8_t matrix_scan(void)
enableInterrupts();
#ifdef DEBUG_MATRIX
- for (uint8_t c = 0; c < MATRIX_COLS; c++)
- for (uint8_t r = 0; r < MATRIX_ROWS; r++)
+ for (uint8_t c = 0; c < MATRIX_COLS; c++)
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++)
if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
#endif
@@ -394,7 +394,7 @@ static matrix_row_t read_cols(uint8_t row)
data = ~((uint8_t)mcp23018_status);
mcp23018_status = I2C_STATUS_SUCCESS;
out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
#ifdef DEBUG_MATRIX
if (data != 0x00) xprintf("I2C: %d\n", data);
@@ -439,12 +439,12 @@ static void select_row(uint8_t row)
if (row < 7) {
// select on mcp23018
if (mcp23018_status) { // do nothing on error
- } else { // set active row low : 0 // set other rows hi-Z : 1
+ } else { // set active row low : 0 // set other rows hi-Z : 1
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0xFF & ~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
out:
- i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ i2c_stop();
}
} else {
// Output low(DDR:1, PORT:0) to select
diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h
index d68860d20..da230f7e8 100644
--- a/keyboards/gray_studio/hb85/config.h
+++ b/keyboards/gray_studio/hb85/config.h
@@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422F
-// TODO: share these strings with usbconfig.h
-// Edit usbconfig.h to change these.
#define MANUFACTURER Gray Studio
#define PRODUCT HB85
@@ -34,6 +32,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLED_NUM 5
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c
index 1bc022237..3e4202358 100644
--- a/keyboards/gray_studio/hb85/hb85.c
+++ b/keyboards/gray_studio/hb85/hb85.c
@@ -1,5 +1,6 @@
/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>,
+ 2019 fcoury <felipe.coury@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
@@ -19,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rgblight.h"
-#include "i2c.h"
+#include "i2c_master.h"
#include "quantum.h"
#ifdef RGBLIGHT_ENABLE
@@ -35,7 +36,7 @@ void rgblight_set(void) {
}
i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif
diff --git a/keyboards/gray_studio/hb85/hb85.h b/keyboards/gray_studio/hb85/hb85.h
index a505705b4..48808105f 100644
--- a/keyboards/gray_studio/hb85/hb85.h
+++ b/keyboards/gray_studio/hb85/hb85.h
@@ -1,5 +1,5 @@
/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Copyright 2019 fcoury <felipe.coury@gmail.com>, MechMerlin <mechmerlin@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
@@ -19,30 +19,82 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
-#define LAYOUT( \
- K12, K11, K10, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K13, \
- K28, K27, K26, K25, K24, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K77, K76, K75, \
- K43, K42, K41, K40, K39, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K74, K73, \
- K57, K56, K55, K54, K53, K44, K45, K46, K47, K48, K49, K50, K51, K52, K88, K87, \
- K72, K71, K70, K69, K68, K58, K59, K60, K61, K62, K63, K66, K64, K65, K67, K90, K89, \
- K86, K85, K78, K79, K80, K81, K82, K83, K84, K91 \
+// Generic layout enabling splits, and all positions available in STT, Basic, and AOP.
+
+#define LAYOUT_all( \
+ K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \
+ K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K59, K58, K57, \
+ K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \
+ K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \
+ K4E, K4D, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K48, K46, K47, K49, K78, K77, \
+ K6D, K6C, K61, K64, K65, K66, K67, K68, K69, K79 \
) \
{ \
- { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , KC_NO, K13 }, \
- { K14 , K15 , K16 , K17 , K18 , K19 , K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 }, \
- { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , K42 , K43 }, \
- { K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , KC_NO, K52 , K53 , K54 , K55 , K56 , K57 }, \
- { K58 , K59 , K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 , K68 , K69 , K70 , K71 , K72 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K73 , K74 , K75 , K76 , K77 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { KC_NO, K78 , KC_NO, KC_NO, K79 , K80 , K81 , K82 , K83 , K84 , KC_NO, KC_NO, K85 , K86 , KC_NO }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87 , K88 , K89 , K90 , K91 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
}
-// F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F2 F1 ESC FN
-// 5 6 7 8 9 0 - = BS BS 4 3 2 1 ~
-// T Y U I O P [ ] | PAD7 R E W Q Tab
-// G H J K L ; ' ENTR PAD4 F D S A CAPS
-// V B N M , . RSFT UP / PAD1 C X Z EUR2 LSFT
-// PAD9 PAD8 PAD- PAD* PAD/
-// SPC RALT RCTL LEFT DOWN RGHT PAD0 LALT LGUI
-// PAD6 PAD5 PAD3 PAD2 PAD.
+// Layout with blocker
+
+#define LAYOUT_stt( \
+ K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \
+ K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \
+ K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \
+ K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \
+ K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K78, K77, \
+ K6D, K6C, K61, K64, K65, K67, K68, K69, K79 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, K61, KC_NO, KC_NO, K64, K65, KC_NO, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+}
+
+#define LAYOUT_basic( \
+ K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \
+ K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \
+ K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \
+ K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \
+ K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K49, K77, \
+ K6D, K6C, K61, K64, K65 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K4A, K4B, K4C, KC_NO, K4E }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, K61, KC_NO, KC_NO, K64, K65, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K6C, K6D, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+}
+
+#define LAYOUT_aop( \
+ K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \
+ K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \
+ K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \
+ K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \
+ K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K78, K77, \
+ K6D, K6C, K61, K64, K65, K66, K67, K68, K69, K79 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, K1C, K1D, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+}
diff --git a/keyboards/gray_studio/hb85/i2c.c b/keyboards/gray_studio/hb85/i2c.c
deleted file mode 100644
index a4f952135..000000000
--- a/keyboards/gray_studio/hb85/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@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/>.
-*/
-
-// Please do not modify this file
-
-#include <avr/io.h>
-#include <util/twi.h>
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the start condition was successfully transmitted
- if ((TWSR & 0xF8) != TW_START) {
- return 1;
- }
-
- // transmit address and wait
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
- return 1;
- }
-
- return 0;
-}
-
-void i2c_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-}
-
-uint8_t i2c_write(uint8_t data) {
- TWDR = data;
-
- // transmit data and wait
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
-
- return 0;
-}
-
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
- if (i2c_start(address)) {
- return 1;
- }
-
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i])) {
- return 1;
- }
- }
-
- i2c_stop();
-
- return 0;
-}
diff --git a/keyboards/gray_studio/hb85/info.json b/keyboards/gray_studio/hb85/info.json
new file mode 100644
index 000000000..3c7ac9c43
--- /dev/null
+++ b/keyboards/gray_studio/hb85/info.json
@@ -0,0 +1,24 @@
+{
+ "keyboard_name": "Gray Studio HB85",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 18,
+ "height": 6.25,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "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, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "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":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}]
+ },
+
+ "LAYOUT_stt": {
+ "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "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, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.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":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}]
+ },
+
+ "LAYOUT_basic": {
+ "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "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, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "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":15, "y":4.25, "w":2}, {"x":17, "y":4.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}]
+ },
+
+ "LAYOUT_aop": {
+ "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "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, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/gray_studio/hb85/keymaps/default/keymap.c b/keyboards/gray_studio/hb85/keymaps/default/keymap.c
index f2409ea13..be89cbbf6 100644
--- a/keyboards/gray_studio/hb85/keymaps/default/keymap.c
+++ b/keyboards/gray_studio/hb85/keymaps/default/keymap.c
@@ -1,5 +1,5 @@
/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Copyright 2019 Felipe Coury <felipe.coury@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
@@ -26,7 +26,7 @@ enum layers {
#define KC_TGCT MO(_CTRL) // Toggles CTRL layer
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT(
+ [_BASE] = LAYOUT_all(
KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TGCT, \
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_PSLS, KC_PAST, KC_PMNS, \
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_P7 , KC_P8 , KC_P9 , \
@@ -35,7 +35,7 @@ KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M ,
KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT \
),
- [_CTRL] = LAYOUT(
+ [_CTRL] = LAYOUT_all(
RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/gray_studio/hb85/keymaps/stt/keymap.c b/keyboards/gray_studio/hb85/keymaps/stt/keymap.c
new file mode 100644
index 000000000..5665e2f0e
--- /dev/null
+++ b/keyboards/gray_studio/hb85/keymaps/stt/keymap.c
@@ -0,0 +1,38 @@
+/*
+Copyright 2019 MechMerlin <mechmerlin@gmail.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_stt(
+ 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, MO(1), \
+ 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_PSLS, KC_PAST, KC_PMNS, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, \
+ KC_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_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 \
+ ),
+
+ [1] = LAYOUT_stt(
+ RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ BL_TOGG, BL_STEP, BL_INC, BL_DEC, BL_BRTG, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md
index 4e93607df..c0c2fdf37 100644
--- a/keyboards/gray_studio/hb85/readme.md
+++ b/keyboards/gray_studio/hb85/readme.md
@@ -2,59 +2,47 @@
![Gray Studio HB85](https://i.imgur.com/Sk3cupR.jpg)
-A HitBit MSX Computer inspired Keyboard.
+A Sony HitBit MSX Computer inspired Keyboard.
Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
Hardware Supported: Gray Studio HB85
-Hardware Availability: Group buy finished
+Hardware Availability: [Group buy](https://en.zfrontier.com/products/gray-hb85) finished
Make example for this keyboard (after setting up your build environment):
- make hb85:default
+ make gray_studio/hb85:default
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+Flashing
+ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-ps2avrGB keyboard firmware
-==========================
+**Reset Key:** Hold down the key located at `K00`, commonly programmed as F3 while plugging in the keyboard.
-This keyboard uses the port of the QMK firmware for boards that are based on the
-ps2avrGB firmware.
+Windows:
+1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
+2. Place your keyboard into reset.
+3. Press the `Find Device` button and ensure that your keyboard is found.
+4. Press the `Open .hex File` button and locate the `.hex` file you created.
+5. Press the `Flash Device` button and wait for the process to complete.
-Note that this is a complete replacement for the firmware, so you won't be
-using Bootmapper Client to change any keyboard settings, since not all the
-USB report options are supported.
+macOS:
+1. Install homebrew by typing the following:
+ ```
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+ ```
+2. Install `crosspack-avr`.
+ ```
+ brew cask install crosspack-avr
+ ```
+3. Install the following packages:
+ ```
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
-## Installing
+4. Place your keyboard into reset.
+5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-First, install the requirements. These commands are for OSX, but all you
-need is the AVR toolchain and `bootloadHID` for flashing:
+**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work.
-```
-$ brew cask install crosspack-avr
-$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
-$ pip install pyusb
-```
-
-Then, with the keyboard plugged in, simply run this command from the
-`qmk_firmware` directory:
-
-```
-$ make hb85
-$ bootloadHID -r hb85_default.hex
-```
-
-## Setting the board to bootloader mode
-
-Hold the F3 key while plugging the USB cable.
-
-## Troubleshooting
-
-From my experience, it's really hard to brick these boards. But these
-tricks have been useful when it got stuck in a weird scenario.
-
-1. Try plugging the board in while holding the bootloader key. This will force
- it to boot only the bootloader without loading the firmware. Once this is
- done, just reflash the board with the original firmware.
-2. Sometimes USB hubs can act weird, so try connecting the board directly
- to your computer or plugging/unplugging the USB hub.
+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/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk
index f90610576..c3e17e493 100644
--- a/keyboards/gray_studio/hb85/rules.mk
+++ b/keyboards/gray_studio/hb85/rules.mk
@@ -1,4 +1,4 @@
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+# Copyright 2019 fcoury <felipe.coury@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
@@ -31,7 +31,7 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = full
+BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
@@ -42,7 +42,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-SRC += i2c.c
+SRC += i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/gray_studio/hb85/usbconfig.h b/keyboards/gray_studio/hb85/usbconfig.h
index 3d5aaa770..c52c90ce8 100644
--- a/keyboards/gray_studio/hb85/usbconfig.h
+++ b/keyboards/gray_studio/hb85/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c
index 9b50abd40..9d96abd8d 100644
--- a/keyboards/hadron/ver2/keymaps/default/keymap.c
+++ b/keyboards/hadron/ver2/keymaps/default/keymap.c
@@ -1,7 +1,4 @@
#include QMK_KEYBOARD_H
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
#ifdef USE_I2C
#include "i2c.h"
#endif
diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h
index 682c7a868..6b0ddbfe8 100644
--- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h
+++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include "../../config.h"
-
/* Use I2C or Serial, not both */
#define USE_SERIAL
diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c
index 24c02215e..2e5cfd7ce 100644
--- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c
+++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
-#include "dactyl_manuform.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -126,4 +124,3 @@ void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
-
diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
index 3d0f1fbfb..506383a1b 100644
--- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c
+++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c
@@ -394,5 +394,3 @@ void led_set_user(uint8_t usb_led) {
}
return ;
}
-
-
diff --git a/keyboards/handwired/frenchdev/readme.md b/keyboards/handwired/frenchdev/readme.md
index 9d7c59e71..96825bb79 100644
--- a/keyboards/handwired/frenchdev/readme.md
+++ b/keyboards/handwired/frenchdev/readme.md
@@ -19,7 +19,6 @@ with the added possibility to connect up to 6 external switches like pedals,
## Laser-cuttable file
There is intentionnaly no hole for the TRRS connector, you are supposed to use a drill for it.
This way if you don't want to use the pedals you don't have a useless hole. Plus it's cleaner.
-http://qmk.fm/frenchdev/frenchdev_v1_lasercut_template.svg
## Side stickers
You can find my original file here : http://qmk.fm/frenchdev/example_printable_stickers.svg
diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h
new file mode 100644
index 000000000..59300e0d2
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/config.h
@@ -0,0 +1,249 @@
+/*
+Copyright 2019 Vladislav Opara <Deckweiss75@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 "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0690
+#define DEVICE_VER 0x0001
+#define MANUFACTURER MMO_Corp
+#define PRODUCT hacked_motospeed
+#define DESCRIPTION Motospeed Numpads wired to Teensy++2.0
+
+/* key matrix size */
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 12
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+
+// WR XR YR ZR VR ZL YL XL WL VL
+#define MATRIX_ROW_PINS { B3, B5, F1, B4, B6, D5, D4, D6, D7, C4}
+
+// ER DR CR BR AR FR FL AL BL CL DL EL
+#define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+//#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.c b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c
new file mode 100644
index 000000000..21643895d
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 Vladislav Opara <Deckweiss75@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 "hacked_motospeed.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+} \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.h b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h
new file mode 100644
index 000000000..1063fd2e6
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h
@@ -0,0 +1,46 @@
+/* Copyright 2019 Vladislav Opara <Deckweiss75@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 "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ EWR, DWR, CWR, BWR, AWR, FXR, FYL, AZL, BZL, CZL, DZL, \
+ DXR, CXR, BXR, AXR, FZR, DVL, AYL, BYL, CYL, DYL, EZL, \
+ EZR, DYR, CYR, BYR, AYR, DVR, FZL, AXL, BXL, CXL, DXL, \
+ DZR, CZR, BZR, AZR, FYR, FXL, AWL, BWL, CWL, DWL, EWL \
+) \
+{ \
+ { EWR, DWR, CWR, BWR, AWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, DXR, CXR, BXR, AXR, FXR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, DYR, CYR, BYR, AYR, FYR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { EZR, DZR, CZR, AZR, BZR, FZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, DVR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FZL, BZL, AZL, CZL, DZL, EZL }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FYL, AYL, BYL, CYL, DYL, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FXL, AXL, BXL, CXL, DXL, KC_NO }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, AWL, BWL, CWL, DWL, EWL }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, DVL, KC_NO } \
+}
diff --git a/keyboards/handwired/hacked_motospeed/info.json b/keyboards/handwired/hacked_motospeed/info.json
new file mode 100644
index 000000000..7ca92785e
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Hacked Motospeed",
+ "url": "",
+ "maintainer": "Deckweiss",
+ "width": 13,
+ "height": 4,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"ESC", "x":0, "y":0, "h":2}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Z", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0, "w":2}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":"(", "x":11, "y":1}, {"label":")", "x":12, "y":1}, {"label":"=", "x":0, "y":2}, {"label":"Y", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":",", "x":9, "y":2}, {"label":".", "x":10, "y":2}, {"label":"?", "x":11, "y":2}, {"label":"Fn", "x":0, "y":3, "w":2}, {"label":"Num", "x":2, "y":3}, {"label":"Bksp", "x":3, "y":3}, {"label":"Enter", "x":4, "y":3}, {"label":"Spc", "x":5, "y":3}, {"label":"LShift", "x":7, "y":3}, {"label":"LCtrl", "x":8, "y":3}, {"label":"LAlt", "x":9, "y":3}, {"label":"RAlt", "x":10, "y":3}, {"label":"Meta", "x":11, "y":3}, {"label":"Fn", "x":12, "y":2, "h":2}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/config.h b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h
new file mode 100644
index 000000000..72de214ba
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 Vladislav Opara <Deckweiss75@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
+
+// place overrides here \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c
new file mode 100644
index 000000000..bdec8f246
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c
@@ -0,0 +1,65 @@
+/* Copyright 2019 Vladislav Opara <Deckweiss75@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ KC_ESC, 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_LPRN, KC_RPRN, \
+ KC_PEQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUES, \
+ XXXXXXX, XXXXXXX, KC_BSPC, KC_ENT, KC_SPC, KC_LSFT, KC_LCTRL, KC_LALT, KC_ALGR, KC_LWIN, XXXXXXX \
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+} \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md
new file mode 100644
index 000000000..4c740bd9a
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for hacked_motospeed \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/readme.md b/keyboards/handwired/hacked_motospeed/readme.md
new file mode 100644
index 000000000..ac2d4afc2
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/readme.md
@@ -0,0 +1,23 @@
+# hacked_motospeed
+
+This is a
+ - tiny (44key),
+ - budget (~50€ total expense),
+ - portable (HID bluetooth & 5aH battery)
+ - easy to diy (little wiring & soldering needed),
+
+mechanical keyboard.
+It is made by wiring two Motospeed K22 numpads to a Teensy++ 2.0, while reusing as much of the original PCB as possible.
+The numpads come with Outemu red linear switches.
+(A detailed guide will be posted and linked later)
+
+
+Keyboard Maintainer: [Deckweiss](https://github.com/Deckweiss)
+Hardware Supported: Motospeed K22 numpads wired to Teensy++ 2.0 according to my guide (upcoming).
+Hardware Availability: Ebay, AliExpress
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/hacked_motospeed: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). \ No newline at end of file
diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk
new file mode 100644
index 000000000..1dc955718
--- /dev/null
+++ b/keyboards/handwired/hacked_motospeed/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+MCU = at90usb1286
+#MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = halfkay
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=1024
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file
diff --git a/keyboards/handwired/hexon38/keymaps/default/keymap.c b/keyboards/handwired/hexon38/keymaps/default/keymap.c
index c3805991f..65dfb4ca0 100644
--- a/keyboards/handwired/hexon38/keymaps/default/keymap.c
+++ b/keyboards/handwired/hexon38/keymaps/default/keymap.c
@@ -1,6 +1,6 @@
// see https://github.com/pepaslabs/hexon38
-#include "hexon38.h"
+#include QMK_KEYBOARD_H
#define A_ KC_A
#define B_ KC_B
diff --git a/keyboards/handwired/jot50/config.h b/keyboards/handwired/jot50/config.h
new file mode 100644
index 000000000..2dfcfd2d2
--- /dev/null
+++ b/keyboards/handwired/jot50/config.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Jotix
+#define PRODUCT Jot50
+#define DESCRIPTION A 5x12 compact ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 12
+
+/* pro_micro pin-out */
+#define MATRIX_ROW_PINS { D7, E6, B4, B6, B2 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 }
+#define UNUSED_PINS
+
+/* leds */
+#define BACKLIGHT_LEVELS 3
+#define BACKLIGHT_PIN B5
+#define BACKLIGHT_BREATHING
+#define BREATHING_PERIOD 5
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/handwired/jot50/jot50.c b/keyboards/handwired/jot50/jot50.c
new file mode 100644
index 000000000..a1d2258a5
--- /dev/null
+++ b/keyboards/handwired/jot50/jot50.c
@@ -0,0 +1,6 @@
+#include "jot50.h"
+
+void matrix_init_kb(void) {
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/jot50/jot50.h b/keyboards/handwired/jot50/jot50.h
new file mode 100644
index 000000000..b7e67ae61
--- /dev/null
+++ b/keyboards/handwired/jot50/jot50.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "quantum.h"
+
+
+#define LAYOUT_ortho_5x12( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
+}
diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c
new file mode 100644
index 000000000..4ec535c31
--- /dev/null
+++ b/keyboards/handwired/jot50/keymaps/default/keymap.c
@@ -0,0 +1,84 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 3
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+/* Funct
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | caps | F11 | F12 | | | | | - | = | [ | ] | \ |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | vol- | mute | vol+ | | | | _ | + | { | } | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | prev | play | next | | | | | | | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | | | | | | | | home | pgdn | pgup | end |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+#define _FUNCT LAYOUT_ortho_5x12 (\
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\
+ KC_CAPS, KC_F11, KC_F12, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\
+ _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,\
+ _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\
+)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | bspc |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | ` | Q | W | E | R | T | Y | U | I | O | P | del |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | tab | A | S | D | F | G | H | J | K | L | ; | ' |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+[_QWERTY] = LAYOUT_ortho_5x12 (
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[_LOWER] = _FUNCT,
+
+[_RAISE] = _FUNCT,
+
+[_ADJUST] = LAYOUT_ortho_5x12 (
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+void matrix_init_user(void) {
+}
+
diff --git a/keyboards/handwired/jot50/readme.md b/keyboards/handwired/jot50/readme.md
new file mode 100644
index 000000000..4c22b953d
--- /dev/null
+++ b/keyboards/handwired/jot50/readme.md
@@ -0,0 +1,35 @@
+# Jot50
+
+A compact 50% (12x5) ortholinear keyboard kit inspired in the Preonic made by jotix.
+
+Keyboard Maintainer: [jotix](https://github.com/jotix)
+Hardware Supported: Arduino Pro Micro
+
+### Arduino Pro Micro Pinout
+
+| Rows | 0 | 1 | 2 | 3 | 4 |
+|-------------|----|----|----|----|----|
+| Arduino pin | 6 | 7 | 8 | 10 | 16 |
+| QMK pin | D7 | E6 | B4 | B6 | B2 |
+
+| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
+|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----|
+| Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 |
+| QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 |
+
+| | Backlight |
+|-------------|-----------|
+| Arduino pin | 9 |
+| QMK pin | B5 |
+
+### Compiling the Firmware
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/jot50:default
+
+### The Defaukt Keymap
+
+![Default Keymap](https://i.imgur.com/g85V8K6.png)
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk
new file mode 100644
index 000000000..36a100c96
--- /dev/null
+++ b/keyboards/handwired/jot50/rules.mk
@@ -0,0 +1,66 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+API_SYSEX_ENABLE = no
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+LAYOUTS = ortho_5x12
diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h
index d7707d48f..38b77586e 100644
--- a/keyboards/handwired/jotanck/config.h
+++ b/keyboards/handwired/jotanck/config.h
@@ -23,6 +23,8 @@
#define QMK_LED B4
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_PIN B5
+#define BACKLIGHT_BREATHING
+#define BREATHING_PERIOD 5
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/handwired/jotanck/jotanck.h b/keyboards/handwired/jotanck/jotanck.h
index e8dd93eda..e253940dd 100644
--- a/keyboards/handwired/jotanck/jotanck.h
+++ b/keyboards/handwired/jotanck/jotanck.h
@@ -13,5 +13,5 @@
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
- { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c
index 77c144890..2e9f4a39f 100644
--- a/keyboards/handwired/jotanck/keymaps/default/keymap.c
+++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c
@@ -15,10 +15,6 @@ extern keymap_config_t keymap_config;
#define _RAISE 2
#define _ADJUST 3
-enum planck_keycodes {
- BACKLIT = SAFE_RANGE
-};
-
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
@@ -32,21 +28,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * |backlit | lctrl | lgui | lalt | lower | space | space | raise | left | down | up | right |
+ * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
*/
[_QWERTY] = LAYOUT_ortho_4x12 (
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- BACKLIT, KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
@@ -55,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LOWER] = LAYOUT_ortho_4x12 (
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
- _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
@@ -78,12 +74,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
+/* Adjust */
[_ADJUST] = LAYOUT_ortho_4x12 (
- _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
-),
+),
};
uint32_t layer_state_set_user(uint32_t state) {
@@ -93,23 +90,3 @@ uint32_t layer_state_set_user(uint32_t state) {
void matrix_init_user(void) {
}
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
-
- case BACKLIT:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- #ifdef BACKLIGHT_ENABLE
- backlight_step();
- #endif
- } else {
- unregister_code(KC_RSFT);
- }
- return false;
- break;
-
- default:
- return true;
-
- }
-}
diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md
index e06cce8cf..28bbab86b 100644
--- a/keyboards/handwired/jotanck/readme.md
+++ b/keyboards/handwired/jotanck/readme.md
@@ -33,6 +33,6 @@ Make example for this keyboard (after setting up your build environment):
### The Defaukt Keymap
-![Default Keymap](https://i.imgur.com/Fh7g1AQ.jpg)
+![Default Keymap](https://i.imgur.com/xh7Dmd7.png)
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk
index 6c3263446..6b39b7cc1 100644
--- a/keyboards/handwired/jotanck/rules.mk
+++ b/keyboards/handwired/jotanck/rules.mk
@@ -48,7 +48,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
diff --git a/keyboards/handwired/lovelive9/config.h b/keyboards/handwired/lovelive9/config.h
new file mode 100644
index 000000000..c11a25df6
--- /dev/null
+++ b/keyboards/handwired/lovelive9/config.h
@@ -0,0 +1,39 @@
+
+
+#pragma once
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0007
+#define DEVICE_VER 0x0001
+#define MANUFACTURER numazu Keyboards
+#define PRODUCT lovelive9
+#define DESCRIPTION lovelive sunshine Keyboards 9Key
+
+/* key matrix size */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 9
+
+/* default pin-out */
+#define MATRIX_ROW_PINS { NO_PIN }
+#define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 }
+
+#define UNUSED_PINS
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+
+#define RGBLED_NUM 9 // Number of LEDs
+
+#define RGBLIGHT_ANIMATIONS
+#define BACKLIGHT_LEVELS 5
+#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
+#define BREATHING_PERIOD 2
+#define RGBLIGHT_LIMIT_VAL 255
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17
+#define USB_MAX_POWER_CONSUMPTION 400
+
+#define TAPPING_TERM 200
diff --git a/keyboards/handwired/lovelive9/info.json b/keyboards/handwired/lovelive9/info.json
new file mode 100644
index 000000000..4f81d321d
--- /dev/null
+++ b/keyboards/handwired/lovelive9/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "lovelive9",
+ "url": "https://github.com/ginjake",
+ "maintainer": "ginjake",
+ "width": 9,
+ "height": 1,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}]
+ }
+ }
+}
diff --git a/keyboards/handwired/lovelive9/keymaps/default/keymap.c b/keyboards/handwired/lovelive9/keymaps/default/keymap.c
new file mode 100644
index 000000000..605f722f4
--- /dev/null
+++ b/keyboards/handwired/lovelive9/keymaps/default/keymap.c
@@ -0,0 +1,338 @@
+#include QMK_KEYBOARD_H
+
+//#include "v1.h"
+
+//Following line allows macro to read current RGB settings
+
+rgblight_config_t RGB_current_config;
+
+#define KC_KANJI KC_GRV
+
+
+enum Layer
+{
+ _QWERTY,
+ _DIA,
+ _YOU,
+ _CHIKA,
+ _ZURA,
+ _RUBY,
+ _YOHANE,
+ _RIKO,
+ _MARI,
+ _KANAN,
+ _RUBY_SUB1,
+ _RUBY_SUB2,
+ _RUBY_SUB3,
+ _SCHOOL_IDOL_FESTIVAL
+};
+
+#define SEND_DIA 100
+#define SEND_YOU 101
+#define SEND_CHIKA 102
+#define SEND_ZURA 103
+#define SEND_RUBY 104
+#define SEND_YOHANE 105
+#define SEND_RIKO 106
+#define SEND_MARI 107
+#define SEND_KANAN 108
+
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ DIA,
+ YOU,
+ CHIKA,
+ ZURA,
+ RUBY,
+ RUBY_SUB1,
+ RUBY_SUB2,
+ RUBY_SUB3,
+ YOHANE,
+ RIKO,
+ MARI,
+ KANAN,
+ TO_SCHOOL_IDOL_FESTIVAL,
+ RETURN_SCHOOL_IDOL_FESTIVAL
+};
+
+
+int long_tap_timer;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT(
+ DIA, YOU, CHIKA, ZURA, RUBY, YOHANE, RIKO, MARI, KANAN
+ ),
+ [_DIA] = LAYOUT(
+ DIA, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_LSFT
+ ),
+
+ [_YOU] = LAYOUT(
+ KC_H, YOU, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_LSFT
+ ),
+
+ [_CHIKA] = LAYOUT(
+ KC_O, KC_P, CHIKA, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_LSFT
+ ),
+
+ [_ZURA] = LAYOUT(
+ KC_V, KC_W, KC_X, ZURA, KC_Y, KC_Z, KC_M, KC_N, KC_LSFT
+ ),
+
+ //推しをたくさん押せるようにルビーちゃんには複数のレイヤー設定
+ [_RUBY] = LAYOUT(
+ KC_CIRC, KC_LPRN, KC_QUOT, RUBY_SUB1, RUBY, RUBY_SUB2, KC_LCBR, KC_EXLM, KC_LSFT
+ ),
+ [_RUBY_SUB1] = LAYOUT(
+ KC_RCBR, KC_AT, KC_PIPE, RUBY_SUB1, RUBY, RUBY_SUB2, KC_HASH, KC_EQL, KC_LSFT
+ ),
+ [_RUBY_SUB2] = LAYOUT(
+ KC_TILD, KC_DLR, KC_LBRC, RUBY_SUB1, RUBY, RUBY_SUB2, KC_PERC, KC_RBRC, KC_LSFT
+ ),
+ [_RUBY_SUB3] = LAYOUT(
+ TO_SCHOOL_IDOL_FESTIVAL, KC_DLR, KC_LBRC, RUBY_SUB1, RUBY, RUBY_SUB2, KC_PERC, KC_RBRC, RETURN_SCHOOL_IDOL_FESTIVAL
+ ),
+
+ [_YOHANE] = LAYOUT(
+ KC_0, KC_1, KC_2, KC_3, KC_4, YOHANE, KC_5, KC_6, KC_LSFT
+ ),
+
+ [_RIKO] = LAYOUT(
+ KC_7, KC_8, KC_9, KC_PLUS, KC_MINS, KC_ASTR, RIKO, KC_SLSH, KC_LSFT
+ ),
+
+ [_MARI] = LAYOUT(
+ KC_TAB, KC_DEL, KC_COMM, KC_SPC, KC_ENT, KC_BSPC, KC_DOT, MARI, KC_LSFT
+ ),
+
+ [_KANAN] = LAYOUT(
+ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, KC_BSPC, KC_AMPR, KC_KANJI, KANAN
+ ),
+ [_SCHOOL_IDOL_FESTIVAL] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9
+ ),
+};
+
+void check_tap_and_send_key(int MEMBER) {
+ if (long_tap_timer < 500) {
+ switch (MEMBER) {
+ case SEND_DIA:
+ SEND_STRING("KUROSAWA DIA");
+ break;
+ case SEND_YOU:
+ SEND_STRING("WATANABE YOU");
+ break;
+ case SEND_CHIKA:
+ SEND_STRING("TAKAMI CHIKA");
+ break;
+ case SEND_ZURA:
+ SEND_STRING("KUNIKIDA HANAMARU");
+ break;
+ case SEND_RUBY:
+ SEND_STRING("KUROSAWA RUBY");
+ break;
+ case SEND_YOHANE:
+ SEND_STRING("TSUSHIMA YOSHIKO");
+ break;
+ case SEND_RIKO:
+ SEND_STRING("SAKURAUCHI RIKO");
+ break;
+ case SEND_MARI:
+ SEND_STRING("OHARA MARI");
+ break;
+ case SEND_KANAN:
+ SEND_STRING("MATSUURA KANAN");
+ break;
+ }
+ }
+ long_tap_timer = 0;
+}
+
+int aqours_color_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322};
+int aqours_color_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255};
+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]);
+
+ rgblight_set();
+
+}
+
+
+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]);
+ }
+ rgblight_set();
+}
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ switch (keycode) {
+
+ case DIA:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_DIA);
+ LED_layer_set(3);
+ } else {
+ check_tap_and_send_key(SEND_DIA);
+ layer_off(_DIA);
+ LED_default_set();
+ }
+ break;
+
+ case YOU:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_YOU);
+ LED_layer_set(4);
+ } else {
+ check_tap_and_send_key(SEND_YOU);
+ layer_off(_YOU);
+ LED_default_set();
+ }
+ break;
+
+ case CHIKA:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_CHIKA);
+ LED_layer_set(0);
+ } else {
+ check_tap_and_send_key(SEND_CHIKA);
+ layer_off(_CHIKA);
+ LED_default_set();
+ }
+ break;
+
+ case ZURA:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_ZURA);
+ LED_layer_set(6);
+ } else {
+ check_tap_and_send_key(SEND_ZURA);
+ layer_off(_ZURA);
+ LED_default_set();
+ }
+ break;
+
+ case RUBY:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_RUBY);
+ LED_layer_set(8);
+ } else {
+ check_tap_and_send_key(SEND_RUBY);
+ layer_off(_RUBY);
+ LED_default_set();
+ }
+ break;
+ case RUBY_SUB1:
+ if (record->event.pressed) {
+ layer_on(_RUBY_SUB1);
+ if (IS_LAYER_ON(_RUBY_SUB1) && IS_LAYER_ON(_RUBY_SUB2)) {
+ layer_on(_RUBY_SUB3);
+ } else {
+ layer_off(_RUBY_SUB3);
+ }
+ } else {
+ layer_off(_RUBY_SUB1);
+ }
+ break;
+ case RUBY_SUB2:
+ if (record->event.pressed) {
+ layer_on(_RUBY_SUB2);
+ if (IS_LAYER_ON(_RUBY_SUB1) && IS_LAYER_ON(_RUBY_SUB2)) {
+ layer_on(_RUBY_SUB3);
+ } else {
+ layer_off(_RUBY_SUB3);
+ }
+ } else {
+ layer_off(_RUBY_SUB2);
+ }
+ break;
+
+ case YOHANE:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_YOHANE);
+ LED_layer_set(5);
+ } else {
+ check_tap_and_send_key(SEND_YOHANE);
+ layer_off(_YOHANE);
+ LED_default_set();
+ }
+ break;
+
+ case RIKO:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_RIKO);
+ LED_layer_set(1);
+ } else {
+ check_tap_and_send_key(SEND_RIKO);
+ layer_off(_RIKO);
+ LED_default_set();
+ }
+ break;
+
+ case MARI:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_MARI);
+ LED_layer_set(7);
+ } else {
+ check_tap_and_send_key(SEND_MARI);
+ layer_off(_MARI);
+ LED_default_set();
+ }
+ break;
+
+ case KANAN:
+ if (record->event.pressed) {
+ long_tap_timer = 1;
+ layer_on(_KANAN);
+ LED_layer_set(2);
+ } else {
+ check_tap_and_send_key(SEND_KANAN);
+ layer_off(_KANAN);
+ LED_default_set();
+ }
+ break;
+
+ case TO_SCHOOL_IDOL_FESTIVAL:
+ if (record->event.pressed) {
+ LED_default_set();
+ layer_on(_SCHOOL_IDOL_FESTIVAL);
+ }
+ break;
+ case RETURN_SCHOOL_IDOL_FESTIVAL:
+ if (record->event.pressed) {
+ layer_off(_SCHOOL_IDOL_FESTIVAL);
+ }
+ break;
+ }
+
+ return true;
+}
+
+
+void matrix_scan_user(void) {
+
+ if (long_tap_timer > 0) {
+ long_tap_timer++;
+ }
+}
diff --git a/keyboards/handwired/lovelive9/lovelive9.c b/keyboards/handwired/lovelive9/lovelive9.c
new file mode 100644
index 000000000..1ec8ae052
--- /dev/null
+++ b/keyboards/handwired/lovelive9/lovelive9.c
@@ -0,0 +1,7 @@
+#include "lovelive9.h"
+
+
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/lovelive9/lovelive9.h b/keyboards/handwired/lovelive9/lovelive9.h
new file mode 100644
index 000000000..f6fb1f94c
--- /dev/null
+++ b/keyboards/handwired/lovelive9/lovelive9.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include "quantum.h"
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08 } \
+}
diff --git a/keyboards/handwired/lovelive9/readme.md b/keyboards/handwired/lovelive9/readme.md
new file mode 100644
index 000000000..204647277
--- /dev/null
+++ b/keyboards/handwired/lovelive9/readme.md
@@ -0,0 +1,14 @@
+# lovelive9
+
+lovelive9 is 9keys keyboard.
+
+![lovelive9](https://user-images.githubusercontent.com/16838187/53496102-a6fc0700-3ae4-11e9-85e4-1e6cd981b410.jpg)
+
+Keyboard Maintainer: [ginjake](https://github.com/ginjake) [Twitter:@sirojake](https://twitter.com/sirojake)
+Hardware Supported: Pro Micro, handwired (LED used [CherryMXLEDBitBoard](https://github.com/swanmatch/MxLEDBitPCB) with handwired)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/lovelive9: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/#/n
diff --git a/keyboards/handwired/lovelive9/rules.mk b/keyboards/handwired/lovelive9/rules.mk
new file mode 100644
index 000000000..99a531a63
--- /dev/null
+++ b/keyboards/handwired/lovelive9/rules.mk
@@ -0,0 +1,67 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+BOOTLOADER = caterina
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/handwired/maartenwut/keymaps/default/keymap.c b/keyboards/handwired/maartenwut/keymaps/default/keymap.c
index d318b0423..54276d4b2 100755
--- a/keyboards/handwired/maartenwut/keymaps/default/keymap.c
+++ b/keyboards/handwired/maartenwut/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "maartenwut.h"
+#include QMK_KEYBOARD_H
#define _MA 0
#define _NU 1
diff --git a/keyboards/handwired/magicforce61/README.md b/keyboards/handwired/magicforce61/README.md
deleted file mode 100644
index cc8673262..000000000
--- a/keyboards/handwired/magicforce61/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-Magicforce "61" Handwired
-=======================
-
-Basically I cut 7 keys off the magicforce68 and handwired everything to a
-teensy++ 2.0 to make it a ~60% board.
-
-## Wiring Layout
-
-![Wiring Layout](https://imgur.com/gallery/RxYyA)
-
-## Pinout
-
-The following pins are used:
-
- ```
- #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 }
- #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 }
- ```
-
-## Compiling and loading the firmware
-
-To build the firmware, run `make handwired/magicforce61`.
-
-Flash the firmware using the teensy loader or avrdude.
diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h
index c6c689ab6..3dc74f83e 100644
--- a/keyboards/handwired/magicforce61/config.h
+++ b/keyboards/handwired/magicforce61/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -43,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 }
-#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 }
+#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
@@ -152,5 +151,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/handwired/magicforce61/info.json b/keyboards/handwired/magicforce61/info.json
new file mode 100644
index 000000000..22ffccd3c
--- /dev/null
+++ b/keyboards/handwired/magicforce61/info.json
@@ -0,0 +1,74 @@
+{
+ "keyboard_name": "Magicforce \"61\"",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"`", "x":0, "y":0},
+ {"label":"1", "x":1, "y":0},
+ {"label":"2", "x":2, "y":0},
+ {"label":"3", "x":3, "y":0},
+ {"label":"4", "x":4, "y":0},
+ {"label":"5", "x":5, "y":0},
+ {"label":"6", "x":6, "y":0},
+ {"label":"7", "x":7, "y":0},
+ {"label":"8", "x":8, "y":0},
+ {"label":"9", "x":9, "y":0},
+ {"label":"0", "x":10, "y":0},
+ {"label":"-", "x":11, "y":0},
+ {"label":"=", "x":12, "y":0},
+ {"label":"Backspace", "x":13, "y":0, "w":2},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"[", "x":11.5, "y":1},
+ {"label":"]", "x":12.5, "y":1},
+ {"label":"\\", "x":13.5, "y":1, "w":1.5},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":";", "x":10.75, "y":2},
+ {"label":"'", "x":11.75, "y":2},
+ {"label":"Enter", "x":12.75, "y":2, "w":2.25},
+ {"label":"Shift", "x":0, "y":3, "w":2.25},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":",", "x":9.25, "y":3},
+ {"label":".", "x":10.25, "y":3},
+ {"label":"/", "x":11.25, "y":3},
+ {"label":"Shift", "x":12.25, "y":3, "w":2.75},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.25},
+ {"label":"GUI", "x":1.25, "y":4, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.25},
+ {"label":"Space", "x":3.75, "y":4, "w":6.25},
+ {"label":"Alt", "x":10, "y":4, "w":1.25},
+ {"label":"GUI", "x":11.25, "y":4, "w":1.25},
+ {"label":"Menu", "x":12.5, "y":4, "w":1.25},
+ {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c
index 9559be5d2..12252c978 100644
--- a/keyboards/handwired/magicforce61/keymaps/default/keymap.c
+++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c
@@ -1,69 +1,54 @@
-#include "magicforce61.h"
+#include QMK_KEYBOARD_H
#define _QWERTY 0
#define _FN1 1
#define _FN2 2
-#define KC_ KC_TRNS
+
#define KC_X0 LT(_FN2, KC_GRV)
#define KC_X1 MO(_FN1)
-#define KC_NAV_ESC LT(_FN1, KC_ESC)
+#define NAV_ESC LT(_FN1, KC_ESC)
#define KC_GUI MAGIC_UNNO_GUI
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = KEYMAP(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC ,
- /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| */
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS ,
- /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| */
- NAV_ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
- /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| */
- LSPO , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSPC ,
- /*|---------`----`----`----`----`----`----`----`----`----`----`-------------. */
- LCTL , RGUI ,LALT , SPACE , X1 ,RALT ,RCTL , X1
- /*`-----+-----+-----+------------------------------+------+-----+-----' ANY */
+ [_QWERTY] = LAYOUT(
+ /*,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. */
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */
+ 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, \
+ /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */
+ NAV_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \
+ /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */
+ KC_LCTL, KC_RGUI, KC_LALT, KC_SPC, KC_X1, KC_RALT, KC_RCTL, KC_X1 \
+ /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */
),
- [_FN1] = KEYMAP(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC ,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */
- , , UP , , , , , ,INS ,PSCR, , , , ,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */
- ,LEFT,DOWN,RGHT, , , , PGDN , PGUP , , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */
- , , , , , ,VOLD,VOLU,MUTE, , , ,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */
- , , , , , , , MPLY
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */
+ [_FN1] = LAYOUT(
+ /*,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. */
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \
+ /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */
+ _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, _______, _______, _______, _______, \
+ /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, \
+ /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */
+ _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, \
+ /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */
+ _______, _______, _______, _______, _______, _______, _______, KC_MPLY \
+ /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */
),
- [_FN2] = KEYMAP(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC ,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */
- , , , , , , , 7 , 8 , 9 , , , , ,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */
- , , , , , , , 4 , 5 , 6 , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */
- , , , , , , 0 , 1 , 2 , 3 , , ,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */
- , , , , , , ,
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */
+ [_FN2] = 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_BSPC, \
+ /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */
+ _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, \
+ /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */
+ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \
+ /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */
+ _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, \
+ /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */
+ _______, _______, _______, _______, _______, _______, _______, _______ \
+ /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */
)
};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
- switch(id) {
- case 0:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- } else {
- unregister_code(KC_RSFT);
- }
- break;
- }
- return MACRO_NONE;
-};
diff --git a/keyboards/handwired/magicforce61/magicforce61.h b/keyboards/handwired/magicforce61/magicforce61.h
index 784f2b2c8..37a32ed78 100644
--- a/keyboards/handwired/magicforce61/magicforce61.h
+++ b/keyboards/handwired/magicforce61/magicforce61.h
@@ -1,20 +1,17 @@
-#ifndef MAGICFORCE61_H
-#define MAGICFORCE61_H
+#pragma once
#include "quantum.h"
-#define KEYMAP( \
+#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \
K40, K41, K42, K45, K49, K4A, K4C, K4D \
) { \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_NO, KC_##K3D }, \
- { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_NO, KC_##K4C, KC_##K4D }, \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \
+ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \
}
-
-#endif
diff --git a/keyboards/handwired/magicforce61/readme.md b/keyboards/handwired/magicforce61/readme.md
new file mode 100644
index 000000000..081992aa8
--- /dev/null
+++ b/keyboards/handwired/magicforce61/readme.md
@@ -0,0 +1,31 @@
+# Magicforce "61" Handwired
+
+Basically I cut 7 keys off the magicforce68 and handwired everything to a teensy++ 2.0 to make it a ~60% board.
+
+Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
+Hardware Supported: magicforce61, teensy++ 2.0
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/magicforce61:default
+
+Flash the firmware using the teensy loader or avrdude.
+
+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).
+
+## Wiring Layout / Pinout
+
+| | B5 | B4 | B3 | B2 | B1 | B0 | E7 | E6 | F0 | F1 | F2 | F3 | F4 | F5 |
+| -----: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |
+| **D0** | Esc | 1! | 2@ | 3# | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | -_ | =+ | Bspc |
+| **D1** | Tab | Q | W | E | R | T | Y | U | I | O | P | [{ | ]} | \\\| |
+| **D2** | Caps | A | S | D | F | G | H | J | K | L | ;: | '" | | Ent |
+| **D3** | LSft | Z | X | C | V | B | N | M | , | . | / | | | RSft |
+| **D4** | LCtl | LGUI | LAlt | | | Spc | | | | RAlt | RGUI | | App | RCtl |
+
+The following pins are used:
+
+```
+#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 }
+#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 }
+```
diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h
new file mode 100644
index 000000000..01a0bdd90
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/config.h
@@ -0,0 +1,245 @@
+/*
+Copyright 2019 Yiancar
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x8968
+#define PRODUCT_ID 0x0001
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Yiancar
+#define PRODUCT Mechboards Micropad
+#define DESCRIPTION Enjoy your freebie!
+
+/* key matrix size */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B6 }
+#define MATRIX_COL_PINS { B2, B3, B1, F7 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/handwired/mechboards_micropad/info.json b/keyboards/handwired/mechboards_micropad/info.json
new file mode 100644
index 000000000..f8908d9fc
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Mechboards Micropad",
+ "url": "",
+ "maintainer": "yiancar",
+ "width": 4,
+ "height": 1,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c
new file mode 100644
index 000000000..41784c520
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c
@@ -0,0 +1,84 @@
+/* Copyright 2019 Yiancar
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+uint8_t led_state = 1;
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ MECHBOARDURL = SAFE_RANGE,
+ QMKURL,
+ MKUK,
+ LEDCHANGE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ MECHBOARDURL, QMKURL, MKUK, LEDCHANGE \
+ ),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MECHBOARDURL:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("https://mechboards.co.uk/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ case MKUK:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("MKUK4 was amazing!");
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ case LEDCHANGE:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ led_state = !led_state;
+ writePin(F6, led_state);
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+ setPinOutput(F6);
+ writePinLow(F6);
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md b/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md
new file mode 100644
index 000000000..92d37ad8b
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md
@@ -0,0 +1,4 @@
+# The default keymap for mechboards_micropad
+
+This is a 4 key micropad freebie from Mechboards and Yiancar-Designs.
+Press the keys to find out the secrets:) \ No newline at end of file
diff --git a/keyboards/handwired/mechboards_micropad/mechboards_micropad.c b/keyboards/handwired/mechboards_micropad/mechboards_micropad.c
new file mode 100644
index 000000000..d4c8fa9b9
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/mechboards_micropad.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 Yiancar
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "mechboards_micropad.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/handwired/mechboards_micropad/mechboards_micropad.h b/keyboards/handwired/mechboards_micropad/mechboards_micropad.h
new file mode 100644
index 000000000..983908486
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/mechboards_micropad.h
@@ -0,0 +1,33 @@
+/* Copyright 2019 Yiancar
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ k00, k01, k02, k03 \
+) \
+{ \
+ { k00, k01, k02, k03 } \
+}
diff --git a/keyboards/handwired/mechboards_micropad/readme.md b/keyboards/handwired/mechboards_micropad/readme.md
new file mode 100644
index 000000000..36230b128
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/readme.md
@@ -0,0 +1,14 @@
+Mechboards Micropad
+===================
+
+This was a freebie, use me and find out more about me :)
+
+Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
+Hardware Supported: ATMega32u4
+Hardware Availability: Random mechboards.co.uk order and UK meetups!
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/mechboards_micropad:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk
new file mode 100644
index 000000000..8ac2297e4
--- /dev/null
+++ b/keyboards/handwired/mechboards_micropad/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = caterina
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h
index bf40376c1..c19ad7372 100644
--- a/keyboards/handwired/minorca/keymaps/default/config.h
+++ b/keyboards/handwired/minorca/keymaps/default/config.h
@@ -1,12 +1,10 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
+
+// place overrides here
-#include "../../config.h"
/* bootmagic salt key */
#define BOOTMAGIC_KEY_SALT KC_ESC
/* skip bootmagic and eeconfig */
#define BOOTMAGIC_KEY_SKIP KC_SPACE
-
-#endif
diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c
index 815090bd1..1dac7825e 100644
--- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c
+++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c
@@ -113,20 +113,20 @@ void matrix_scan_user(void) {
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- writePinLow(B6);
- } else {
writePinHigh(B6);
+ } else {
+ writePinLow(B6);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- writePinLow(B5);
- } else {
writePinHigh(B5);
+ } else {
+ writePinLow(B5);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- writePinLow(C6);
- } else {
writePinHigh(C6);
+ } else {
+ writePinLow(C6);
}
*/
}
@@ -135,9 +135,9 @@ void led_set_user(uint8_t usb_led) {
uint32_t layer_state_set_user(uint32_t state)
{
if (biton32(state) == 2) {
- writePinLow(C6);
+ writePinHigh(C6);
} else {
- writePinHigh(C6);
+ writePinLow(C6);
}
return state;
}
diff --git a/keyboards/handwired/prime_exl/keymaps/via/keymap.c b/keyboards/handwired/prime_exl/keymaps/via/keymap.c
index 4a2631c36..c01c247c8 100644
--- a/keyboards/handwired/prime_exl/keymaps/via/keymap.c
+++ b/keyboards/handwired/prime_exl/keymaps/via/keymap.c
@@ -71,20 +71,20 @@ void matrix_scan_user(void) {
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- writePinLow(B6);
- } else {
writePinHigh(B6);
+ } else {
+ writePinLow(B6);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- writePinLow(B5);
- } else {
writePinHigh(B5);
+ } else {
+ writePinLow(B5);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- writePinLow(C6);
- } else {
writePinHigh(C6);
+ } else {
+ writePinLow(C6);
}
*/
}
@@ -93,9 +93,9 @@ void led_set_user(uint8_t usb_led) {
uint32_t layer_state_set_user(uint32_t state)
{
if (biton32(state) == 2) {
- writePinLow(C6);
+ writePinHigh(C6);
} else {
- writePinHigh(C6);
+ writePinLow(C6);
}
return state;
}
diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h
new file mode 100644
index 000000000..9e4fb38ca
--- /dev/null
+++ b/keyboards/handwired/splittest/config.h
@@ -0,0 +1,75 @@
+/*
+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/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xCB10
+#define PRODUCT_ID 0x1111
+#define DEVICE_VER 0x0100
+#define MANUFACTURER Keebio
+#define PRODUCT Split Tester
+#define DESCRIPTION Split keyboard testing unit
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 1
+
+// wiring of each half
+#define MATRIX_ROW_PINS { B3 }
+#define MATRIX_COL_PINS { B6 }
+#define SPLIT_HAND_PIN F6
+#define SOFT_SERIAL_PIN D1
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+#define RGBLED_SPLIT { 6, 6 }
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/keyboards/panc60/i2c.h b/keyboards/handwired/splittest/keymaps/default/config.h
index 7ce50cdb5..ecebd3658 100644
--- a/keyboards/panc60/i2c.h
+++ b/keyboards/handwired/splittest/keymaps/default/config.h
@@ -1,5 +1,8 @@
/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+This is the c configuration file for the keymap
+
+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
@@ -15,13 +18,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/>.
*/
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
+#pragma once
-#endif
+#define USE_I2C
diff --git a/keyboards/handwired/splittest/keymaps/default/keymap.c b/keyboards/handwired/splittest/keymaps/default/keymap.c
new file mode 100644
index 000000000..1c15f6f1d
--- /dev/null
+++ b/keyboards/handwired/splittest/keymaps/default/keymap.c
@@ -0,0 +1,5 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(RGB_MOD, RESET)
+};
diff --git a/keyboards/handwired/splittest/readme.md b/keyboards/handwired/splittest/readme.md
new file mode 100644
index 000000000..3dbff32ed
--- /dev/null
+++ b/keyboards/handwired/splittest/readme.md
@@ -0,0 +1,26 @@
+Split Tester
+============
+
+A two-switch tester built using two Pro Micros, mainly intended to test RGB on split keyboards. Seen here: https://www.instagram.com/p/BvCPNzynwrV/
+
+Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges)
+Hardware Supported: Pro Micro
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/splittest:default
+
+Example of flashing this keyboard:
+
+ make handwired/splittest:default:avrdude
+
+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).
+
+Wiring
+------
+- Add switches to both Pro Micros across B3 and B6 pins
+- Add pull-up resistor to left side between VCC and F6
+- Add pull-down resistors to right side between GND and F6
+- Connect the following pins on both sides together: D0, D1, GND, VCC
+- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC
+- Wire Di of RGB strip for each half to D2
diff --git a/keyboards/handwired/splittest/rules.mk b/keyboards/handwired/splittest/rules.mk
new file mode 100644
index 000000000..9512c0f64
--- /dev/null
+++ b/keyboards/handwired/splittest/rules.mk
@@ -0,0 +1,65 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/handwired/splittest/splittest.c b/keyboards/handwired/splittest/splittest.c
new file mode 100644
index 000000000..3c919a565
--- /dev/null
+++ b/keyboards/handwired/splittest/splittest.c
@@ -0,0 +1 @@
+#include "splittest.h"
diff --git a/keyboards/handwired/splittest/splittest.h b/keyboards/handwired/splittest/splittest.h
new file mode 100644
index 000000000..17b7081a0
--- /dev/null
+++ b/keyboards/handwired/splittest/splittest.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT(L1, R1) {{L1}, {R1}}
diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h
new file mode 100644
index 000000000..b50886cdc
--- /dev/null
+++ b/keyboards/handwired/tennie/config.h
@@ -0,0 +1,240 @@
+/*
+Copyright 2018 Jack Hildebrandt
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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 "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x1EEE
+#define PRODUCT_ID 0x1313
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Jsck
+#define PRODUCT Tennie
+#define DESCRIPTION Ten key macropad
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 4
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { C6, D4, D0}
+#define MATRIX_COL_PINS { D7, E6, B4, B5 }
+#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7 D1}
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+#define RGBW
+#define RGB_DI_PIN D1
+#ifdef RGB_DI_PIN
+ #define RGBLED_NUM 1
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 8
+ #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+ #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+#endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+//#define BOOTMAGIC_LITE_ROW 0
+//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/handwired/tennie/info.json b/keyboards/handwired/tennie/info.json
new file mode 100644
index 000000000..c03699792
--- /dev/null
+++ b/keyboards/handwired/tennie/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Tennie",
+ "url": "https://github.com/StoutIEEE/macropad-workshop",
+ "maintainer": "UW Stout IEEE, Jack Hildebrandt (onemorebyte)",
+ "width": 4,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}]
+ }
+ }
+}
diff --git a/keyboards/handwired/tennie/keymaps/default/config.h b/keyboards/handwired/tennie/keymaps/default/config.h
new file mode 100644
index 000000000..4496c5910
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 REPLACE_WITH_YOUR_NAME
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/handwired/tennie/keymaps/default/keymap.c b/keyboards/handwired/tennie/keymaps/default/keymap.c
new file mode 100644
index 000000000..3736841cb
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/default/keymap.c
@@ -0,0 +1,95 @@
+/* Copyright 2018 Jack H.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+#define TAPPING_TOGGLE 2
+
+
+// Layer names
+#define base 0
+#define shrek 1
+#define ogre 2
+#define tcp 3
+
+// Layer Switches
+#define KC_SHRK TT(shrek)
+#define KC_OGRE TT(ogre)
+#define KC_TCP TT(tcp)
+
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [base] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_DEL, KC_SPC, KC_ENT,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_LEFT, KC_DOWN, KC_UP , KC_RGHT,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_SHRK, KC_OGRE, KC_TCP
+
+ // └────────┴────────┴────────┘
+ ),
+ [shrek] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_MPRV, KC_MPLY, KC_MNXT,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+ // └────────┴────────┴────────┘
+ ),
+ [ogre] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ RGB_MOD, RGB_TOG, RGB_RMOD,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_F13, KC_F14, KC_F15, KC_F16,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+ // └────────┴────────┴────────┘
+ ),
+ [tcp] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_WBAK, KC_WREF, KC_WFWD,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+ // └────────┴────────┴────────┘
+ ),
+};
diff --git a/keyboards/handwired/tennie/keymaps/default/readme.md b/keyboards/handwired/tennie/keymaps/default/readme.md
new file mode 100644
index 000000000..1fbaa7f46
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/default/readme.md
@@ -0,0 +1,68 @@
+# Default keymap
+
+This keymap is to serve as an example of how you could make a multi-layer keymap.
+
+#### keymap
+
+```
+[base] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ DEL , SPC , ENT ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ LEFT , DOWN , UP , RGHT ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ SHRK , OGRE , TCP
+
+// └────────┴────────┴────────┘
+),
+[shrek] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ MPRV , MPLY , MNXT ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ BRID , VOLD , VOLU , BRIU ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+// └────────┴────────┴────────┘
+),
+[ogre] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ RGB_MOD, RGB_TOG, RGB_RMOD
+
+// ├────────┼────────┼────────┼────────┼
+
+ F13 , F14 , F15 , F16 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+// └────────┴────────┴────────┘
+),
+[tcp] = LAYOUT_kc(
+// ┌────────┬────────┬────────┐
+
+ WBAK , WREF , WFWD ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ XXXXXXX , PGDN , PGUP , XXXXXXX ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ _______, _______, _______
+
+// └────────┴────────┴────────┘
+),
+```
diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h
new file mode 100644
index 000000000..a3c309bb2
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// place overrides here
diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c
new file mode 100644
index 000000000..7cf29b118
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// Layer names
+#define base 0
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [base] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_1 , KC_2 , KC_3 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_4 , KC_5 , KC_6 , KC_7 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_8 , KC_9 , KC_0
+
+ // └────────┴────────┴────────┘
+ ),
+};
diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md
new file mode 100644
index 000000000..0b3f30750
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md
@@ -0,0 +1,18 @@
+# Simple numberpad keymap
+
+This keymap is to test the soldering work of workshop participants. It can also be used as a simple base for a macropad keymap.
+```
+// ┌────────┬────────┬────────┐
+
+ 1 , 2 , 3 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ 4 , 5 , 6 , 7 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ 8 , 9 , 0
+
+// └────────┴────────┴────────┘
+```
diff --git a/keyboards/handwired/tennie/keymaps/soundboard/config.h b/keyboards/handwired/tennie/keymaps/soundboard/config.h
new file mode 100644
index 000000000..5a1cba7b4
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/soundboard/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2018 Jacob Hillebrand
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// place overrides here
diff --git a/keyboards/handwired/tennie/keymaps/soundboard/keymap.c b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c
new file mode 100644
index 000000000..3bceb1fea
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jacob Hillebrand
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+// Layer names
+#define base 0
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [base] = LAYOUT(
+ // ┌────────┬────────┬────────┐
+
+ KC_F13 , KC_F14 , KC_F15 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_F16 , KC_F17 , KC_F18 , KC_F19 ,
+
+ // ├────────┼────────┼────────┼────────┼
+
+ KC_F20, KC_F21 , KC_F22
+
+ // └────────┴────────┴────────┘
+ ),
+};
diff --git a/keyboards/handwired/tennie/keymaps/soundboard/readme.md b/keyboards/handwired/tennie/keymaps/soundboard/readme.md
new file mode 100644
index 000000000..d05b7117c
--- /dev/null
+++ b/keyboards/handwired/tennie/keymaps/soundboard/readme.md
@@ -0,0 +1,19 @@
+# Soundboard keymap
+
+This keymap binds all keys to function keys 13-22 for something like a
+soundboard (ie:[Resanance](https://www.reddit.com/r/discordapp/comments/44ldc1/soundboard_for_discord/))
+```
+// ┌────────┬────────┬────────┐
+
+ F13 , F14 , F15 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ F16 , F17 , F18 , F19 ,
+
+// ├────────┼────────┼────────┼────────┼
+
+ F20 , F21 , F22
+
+// └────────┴────────┴────────┘
+```
diff --git a/keyboards/handwired/tennie/readme.md b/keyboards/handwired/tennie/readme.md
new file mode 100644
index 000000000..bbdbc2b60
--- /dev/null
+++ b/keyboards/handwired/tennie/readme.md
@@ -0,0 +1,15 @@
+# Tennie
+
+![tennie](https://raw.githubusercontent.com/StoutIEEE/macropad-workshop/master/images/macropad.jpg)
+
+A ten key macropad for a club workshop! More information, and build instructions can be found [here](https://github.com/StoutIEEE/macropad-workshop)
+
+Keyboard Maintainer: [Jack Hildebrandt](https://github.com/onemorebyte), [UW Stout IEEE](https://github.com/StoutIEEE)
+
+Hardware Supported: ProMicro
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/tennie:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk
new file mode 100644
index 000000000..0119dc6fb
--- /dev/null
+++ b/keyboards/handwired/tennie/rules.mk
@@ -0,0 +1,80 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = caterina
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/handwired/tennie/tennie.c b/keyboards/handwired/tennie/tennie.c
new file mode 100644
index 000000000..e1ceaf153
--- /dev/null
+++ b/keyboards/handwired/tennie/tennie.c
@@ -0,0 +1,45 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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 "tennie.h"
+
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+void matrix_post_init(void) {
+ rgblight_enable_noeeprom();
+ keyboard_post_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+//void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+// led_set_user(usb_led);
+//}
diff --git a/keyboards/handwired/tennie/tennie.h b/keyboards/handwired/tennie/tennie.h
new file mode 100644
index 000000000..8ab0d04c5
--- /dev/null
+++ b/keyboards/handwired/tennie/tennie.h
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jack Hildebrandt
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ K00, K01, K02, \
+ K10, K11, K12, K13, \
+ K20, K21, K22 \
+) \
+{ \
+ { K00, K01, K02, KC_NO }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, KC_NO }, \
+}
diff --git a/keyboards/handwired/terminus_mini/keymaps/default/config.h b/keyboards/handwired/terminus_mini/keymaps/default/config.h
index 34ef67207..4817be252 100644
--- a/keyboards/handwired/terminus_mini/keymaps/default/config.h
+++ b/keyboards/handwired/terminus_mini/keymaps/default/config.h
@@ -14,13 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define TAPPING_TERM 150 //reduce time required to register a held key
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-#endif
+#define TAPPING_TERM 150 //reduce time required to register a held key
diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c
index 1b1038fd7..44f65f4b8 100644
--- a/keyboards/handwired/traveller/keymaps/default/keymap.c
+++ b/keyboards/handwired/traveller/keymaps/default/keymap.c
@@ -1,6 +1,5 @@
-#include "traveller.h"
+#include QMK_KEYBOARD_H
#include "mousekey.h"
-#include "action_layer.h"
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@@ -9,7 +8,7 @@
#define _HI 2
#define _NAV 4
#define _CUR 5
-#define _FKEYS 6
+#define _FKEYS 6
#define _TRNS 8
// We do the same trick for functions
@@ -20,7 +19,7 @@
#define MDL 4
#define MDR 5
#define MUR 6
-#define MUL 3
+#define MUL 3
@@ -35,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift |
* `------------------------------------------------------------------------------------------'
- *
+ *
*/
-[_QW] = KEYMAP(
+[_QW] = KEYMAP(
TG(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL,
KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS,
CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT,
@@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
/* LOW - numbers, missing or awkward programming keys
- Doubled 1 key allows lazy reach with ring finger.
+ Doubled 1 key allows lazy reach with ring finger.
* ,-----------------------------------------. .-----------------------------------------.
* | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del|
* |------+------+------+------+------+------| +------+------+------+------+------+------|
@@ -55,18 +54,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | Shift| | | | Low | |/ | | Hi | | | |Shift |
* `------------------------------------------------------------------------------------------'
- *
+ *
*/
-[_LW] = KEYMAP(
+[_LW] = KEYMAP(
TG(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) ,
KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO,
KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
-/* HI - Punctuation, shell and
-url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$
+/* HI - Punctuation, shell and
+url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$
Right hand nav keys work pretty well chorded with the Right hand Hi Key
* ,-----------------------------------------. .-----------------------------------------.
* |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + |
@@ -77,19 +76,19 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right |
* `------------------------------------------------------------------------------------------'
- *
+ *
*/
-[_HI] = KEYMAP(
+[_HI] = KEYMAP(
TG(_FKEYS),KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS,
- KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO,
KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END,
- KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT
-),
+ KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT
+),
/* NAV - mouse & navigation
//gui left and right are line home/end, or fore & back in browser
-// Mouse buttons are reversed for comfort - bigger stretch is to the right button.
+// Mouse buttons are reversed for comfort - bigger stretch is to the right button.
* ,-----------------------------------------. .-----------------------------------------.
* | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm|
@@ -102,7 +101,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
* `------------------------------------------------------------------------------------------'
*/
-[_NAV] = KEYMAP(
+[_NAV] = KEYMAP(
TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2,
KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1,
KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0,
@@ -111,7 +110,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
/* FKEYS - Funtion keys & mac stuff
* ,-----------------------------------------. .-----------------------------------------.
- * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl |
+ * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt |
* |------+------+------+------+------+------|------+------+------+------+------+------+------|
@@ -120,9 +119,9 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
* | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | |
* `------------------------------------------------------------------------------------------'
*
- */
-
-[_FKEYS] = KEYMAP(
+ */
+
+[_FKEYS] = KEYMAP(
TG(_FKEYS),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT ,
TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
@@ -140,7 +139,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key
* |------+------+------+------+------+------+ // +------+------+------+------+------+------|
* | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT |
* `------------------------------------------------------------------------------------------'
- *
+ *
*/
[_TRNS] = {
@@ -226,12 +225,12 @@ void LayerLEDSet(uint8_t layr) {
break;
case _LW:
// deep purple
- rgblight_setrgb(20,0,35);
- break;
+ rgblight_setrgb(20,0,35);
+ break;
case _HI:
// light blue
- rgblight_setrgb(0,20,20);
- break;
+ rgblight_setrgb(0,20,20);
+ break;
case _NAV:
// Yellowy orange
rgblight_setrgb(25,20,0); // brighter
@@ -239,14 +238,14 @@ void LayerLEDSet(uint8_t layr) {
case _FKEYS:
// RED
rgblight_setrgb(20,0,0); // brighter
- break;
+ break;
default:
rgblight_setrgb(20,2,20);//error
break;
}
-
+
return;
-
+
}
void matrix_init_user(void) {
@@ -271,5 +270,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void led_set_user(uint8_t usb_led) {
}
-
-
diff --git a/keyboards/handwired/woodpad/keymaps/default/config.h b/keyboards/handwired/woodpad/keymaps/default/config.h
index f52a97bbc..a72596783 100644
--- a/keyboards/handwired/woodpad/keymaps/default/config.h
+++ b/keyboards/handwired/woodpad/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/handwired/woodpad/keymaps/default/keymap.c b/keyboards/handwired/woodpad/keymaps/default/keymap.c
index 724230e45..838c14ead 100644
--- a/keyboards/handwired/woodpad/keymaps/default/keymap.c
+++ b/keyboards/handwired/woodpad/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "woodpad.h"
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_ADJUST);
}
numlock_down = false;
- }
+ }
return false;
break;
case KC_LALT:
diff --git a/keyboards/handwired/xealous/config.h b/keyboards/handwired/xealous/config.h
index 7bce502c1..251e85d4c 100644
--- a/keyboards/handwired/xealous/config.h
+++ b/keyboards/handwired/xealous/config.h
@@ -20,20 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* Use I2C or Serial, not both */
-
#define USE_I2C
-#define SCL_CLOCK 400000UL
-
-// #define USE_SERIAL
-/* serial.c configuration for split keyboard */
-// #define SOFT_SERIAL_PIN D0
+#define SCL_CLOCK 800000UL
/* Select hand configuration */
-
#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
//#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate.
#define FORCE_NKRO
@@ -41,6 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define QMK_KEYS_PER_SCAN 4 //if we press four keys simultaneously, lets process them simultaneously...
#define DIODE_DIRECTION COL2ROW
+
#ifdef AUDIO_ENABLE
#define C6_AUDIO
#define STARTUP_SONG SONG(STARTUP_SOUND)
diff --git a/keyboards/handwired/xealous/debounce.c b/keyboards/handwired/xealous/debounce.c
deleted file mode 100644
index 65a99f27f..000000000
--- a/keyboards/handwired/xealous/debounce.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <string.h>
-#include "config.h"
-#include "matrix.h"
-#include "timer.h"
-#include "quantum.h"
-
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
-#endif
-
-//Debouncing counters
-typedef uint8_t debounce_counter_t;
-#define DEBOUNCE_COUNTER_MODULO 250
-#define DEBOUNCE_COUNTER_INACTIVE 251
-
-static debounce_counter_t *debounce_counters;
-
-void debounce_init(uint8_t num_rows)
-{
- debounce_counters = malloc(num_rows*MATRIX_COLS);
- memset(debounce_counters, DEBOUNCE_COUNTER_INACTIVE, num_rows*MATRIX_COLS);
-}
-
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
-{
- for (uint8_t row = 0; row < num_rows; row++)
- {
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- if (debounce_counters[row*MATRIX_COLS + col] != DEBOUNCE_COUNTER_INACTIVE)
- {
- if (TIMER_DIFF(current_time, debounce_counters[row*MATRIX_COLS + col], DEBOUNCE_COUNTER_MODULO) >= DEBOUNCING_DELAY) {
- debounce_counters[row*MATRIX_COLS + col] = DEBOUNCE_COUNTER_INACTIVE;
- }
- }
- }
- }
-}
-
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time)
-{
- for (uint8_t row = 0; row < num_rows; row++)
- {
- matrix_row_t delta = raw[row] ^ cooked[row];
-
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- if (debounce_counters[row*MATRIX_COLS + col] == DEBOUNCE_COUNTER_INACTIVE && (delta & (1<<col)))
- {
- debounce_counters[row*MATRIX_COLS + col] = current_time;
- cooked[row] ^= (1 << col);
- }
- }
- }
-}
-
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed)
-{
- uint8_t current_time = timer_read() % DEBOUNCE_COUNTER_MODULO;
-
- update_debounce_counters(num_rows, current_time);
- transfer_matrix_values(raw, cooked, num_rows, current_time);
-} \ No newline at end of file
diff --git a/keyboards/handwired/xealous/matrix.c b/keyboards/handwired/xealous/matrix.c
index 27fad0008..e2d219939 100644
--- a/keyboards/handwired/xealous/matrix.c
+++ b/keyboards/handwired/xealous/matrix.c
@@ -34,311 +34,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "matrix_scanrate.h"
#endif
-
-
-#ifdef USE_I2C
-# include "i2c.h"
-#else // USE_SERIAL
-# error "only i2c supported"
-#endif
-
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
-#endif
-
-
-#if (MATRIX_COLS <= 8)
-# define print_matrix_header() print("\nr/c 01234567\n")
-# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
-# define matrix_bitpop(i) bitpop(matrix[i])
-# define ROW_SHIFTER ((uint8_t)1)
-#else
-# error "Currently only supports 8 COLS"
-#endif
-
-#define ERROR_DISCONNECT_COUNT 5
-
-#define ROWS_PER_HAND (MATRIX_ROWS/2)
-
-static uint8_t error_count = 0;
-
-static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
-static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-static matrix_row_t* debouncing_matrix_hand_offsetted; //pointer to matrix_debouncing for our hand
-static matrix_row_t* matrix_hand_offsetted; // pointer to matrix for our hand
-
-//Debouncing counters
-typedef uint8_t debounce_counter_t;
-#define DEBOUNCE_COUNTER_MODULO 250
-#define DEBOUNCE_COUNTER_INACTIVE 251
-static debounce_counter_t debounce_counters[MATRIX_ROWS * MATRIX_COLS];
-static debounce_counter_t *debounce_counters_hand_offsetted;
-
-
-#if (DIODE_DIRECTION == ROW2COL)
- error "Only Col2Row supported";
-#endif
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
-static void unselect_row(uint8_t row);
-static matrix_row_t optimized_col_reader(void);
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_slave_scan_user(void) {
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-#ifdef DISABLE_JTAG
- // JTAG disable for PORT F. write JTD bit twice within four cycles.
- MCUCR |= (1<<JTD);
- MCUCR |= (1<<JTD);
-#endif
-
- debug_enable = true;
- debug_matrix = false;
- debug_mouse = false;
- // initialize row and col
- unselect_rows();
- init_cols();
-
- TX_RX_LED_INIT;
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- }
- int my_hand_offset = isLeftHand ? 0 : (ROWS_PER_HAND);
- debouncing_matrix_hand_offsetted = matrix_debouncing + my_hand_offset;
- matrix_hand_offsetted = matrix + my_hand_offset;
- debounce_counters_hand_offsetted = debounce_counters + my_hand_offset;
-
- for (uint8_t i = 0; i < MATRIX_ROWS * MATRIX_COLS; i++) {
- debounce_counters[i] = DEBOUNCE_COUNTER_INACTIVE;
- }
-
- matrix_init_quantum();
-
-}
-
-//#define TIMER_DIFF(a, b, max) ((a) >= (b) ? (a) - (b) : (max) - (b) + (a))
-void update_debounce_counters(uint8_t current_time)
-{
- debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted;
- for (uint8_t row = 0; row < ROWS_PER_HAND; row++)
- {
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- if (*debounce_pointer != DEBOUNCE_COUNTER_INACTIVE)
- {
- if (TIMER_DIFF(current_time, *debounce_pointer, DEBOUNCE_COUNTER_MODULO) >=
- DEBOUNCING_DELAY) {
- *debounce_pointer = DEBOUNCE_COUNTER_INACTIVE;
- }
- }
- debounce_pointer++;
- }
- }
-}
-
-void transfer_matrix_values(uint8_t current_time)
-{
- //upload from debounce_matrix to final matrix;
- debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted;
- for (uint8_t row = 0; row < ROWS_PER_HAND; row++)
- {
- matrix_row_t row_value = matrix_hand_offsetted[row];
- matrix_row_t debounce_value = debouncing_matrix_hand_offsetted[row];
-
- for (uint8_t col = 0; col < MATRIX_COLS; col++)
- {
- bool final_value = debounce_value & (1 << col);
- bool current_value = row_value & (1 << col);
- if (*debounce_pointer == DEBOUNCE_COUNTER_INACTIVE
- && (current_value != final_value))
- {
- *debounce_pointer = current_time;
- row_value ^= (1 << col);
- }
- debounce_pointer++;
- }
- matrix_hand_offsetted[row] = row_value;
- }
-}
-
-uint8_t _matrix_scan(void)
-{
- uint8_t current_time = timer_read() % DEBOUNCE_COUNTER_MODULO;
-
- // Set row, read cols
- for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
- select_row(current_row);
- asm volatile ("nop"); asm volatile("nop");
-
- debouncing_matrix_hand_offsetted[current_row] = optimized_col_reader();
- // Unselect row
- unselect_row(current_row);
- }
-
- update_debounce_counters(current_time);
- transfer_matrix_values(current_time);
-
- return 1;
-}
-
-
-// Get rows from other half over i2c
-int i2c_transaction(void) {
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
-
- int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
- if (err) goto i2c_error;
-
- // start of matrix stored at 0x00
- err = i2c_master_write(I2C_KEYMAP_START);
- if (err) goto i2c_error;
-
- // Start read
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
- if (err) goto i2c_error;
-
- if (!err) {
- int i;
- for (i = 0; i < ROWS_PER_HAND-1; ++i) {
- matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
- }
- matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- } else {
-i2c_error: // the cable is disconnceted, or something else went wrong
- i2c_reset_state();
- return err;
- }
-
- return 0;
-}
-
-uint8_t matrix_scan(void)
+void matrix_scan_user(void)
{
#ifdef DEBUG_MATRIX_SCAN_RATE
matrix_check_scan_rate();
matrix_time_between_scans();
#endif
- uint8_t ret = _matrix_scan();
-
- if( i2c_transaction() ) {
- // turn on the indicator led when halves are disconnected
- TXLED1;
-
- error_count++;
-
- if (error_count > ERROR_DISCONNECT_COUNT) {
- // reset other half if disconnected
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[slaveOffset+i] = 0;
- }
- }
- } else {
- // turn off the indicator led on no error
- TXLED0;
- error_count = 0;
- }
- matrix_scan_quantum();
- return ret;
-}
-
-void matrix_slave_scan(void) {
- _matrix_scan();
-
- int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
-
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i];
- }
-
- matrix_slave_scan_user();
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<<col));
-}
-
-
-inline
-matrix_row_t matrix_get_row(uint8_t row)
-{
- return matrix[row];
-}
-
-void matrix_print(void)
-{
- print("\nr/c 0123456789ABCDEF\n");
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- phex(row); print(": ");
- pbin_reverse16(matrix_get_row(row));
- print("\n");
- }
-}
-
-uint8_t matrix_key_count(void)
-{
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- count += bitpop16(matrix[i]);
- }
- return count;
-}
-
-static void init_cols(void)
-{
- for(uint8_t x = 0; x < MATRIX_COLS; x++) {
- uint8_t pin = col_pins[x];
- _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
- _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
- }
+
}
-inline
-static matrix_row_t optimized_col_reader(void) {
+// Copy this code to split_common/matrix.c,
+// and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920
+// Also remove the sleep_us(30), not necessary for this keyboard.
+// In usb_descriptor.c, set .PollingIntervalMS = 0x01
+#define ROW_SHIFTER ((uint8_t)1)
+inline static matrix_row_t optimized_col_reader(void) {
//MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
return (PINB & (1 << 6) ? 0 : (ROW_SHIFTER << 0)) |
(PINB & (1 << 2) ? 0 : (ROW_SHIFTER << 1)) |
@@ -351,26 +61,3 @@ static matrix_row_t optimized_col_reader(void) {
}
-static void select_row(uint8_t row)
-{
- uint8_t pin = row_pins[row];
- _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
- _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
-}
-
-static void unselect_row(uint8_t row)
-{
- uint8_t pin = row_pins[row];
- _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
- _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
-}
-
-static void unselect_rows(void)
-{
- for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
- uint8_t pin = row_pins[x];
- _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
- _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
- }
-}
-
diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk
index 7d07c9aa5..ef3357982 100644
--- a/keyboards/handwired/xealous/rules.mk
+++ b/keyboards/handwired/xealous/rules.mk
@@ -1,5 +1,4 @@
-#SRC += matrix_scanrate.c matrix.c
-SRC += debounce.c
+SRC += matrix_scanrate.c matrix.c
# MCU name
MCU = atmega32u4
@@ -67,8 +66,7 @@ SUBPROJECT_rev1 = yes
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-CUSTOM_MATRIX = no
-DEBOUNCE_TYPE = custom
+DEBOUNCE_TYPE = eager_pk
LAYOUTS = split60
diff --git a/keyboards/hecomi/keymaps/default/keymap.c b/keyboards/hecomi/keymaps/default/keymap.c
index 299d9037a..25bddb7df 100644
--- a/keyboards/hecomi/keymaps/default/keymap.c
+++ b/keyboards/hecomi/keymaps/default/keymap.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "hecomi.h"
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
diff --git a/keyboards/helix/pico/keymaps/default/config.h b/keyboards/helix/pico/keymaps/default/config.h
index 20dfc9f98..765318519 100644
--- a/keyboards/helix/pico/keymaps/default/config.h
+++ b/keyboards/helix/pico/keymaps/default/config.h
@@ -18,8 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
// place overrides here
@@ -42,5 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
-
-#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev1/keymaps/default/config.h b/keyboards/helix/rev1/keymaps/default/config.h
index d95925d4e..0f81f5f7b 100644
--- a/keyboards/helix/rev1/keymaps/default/config.h
+++ b/keyboards/helix/rev1/keymaps/default/config.h
@@ -18,8 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
+
+// place overrides here
/* Use I2C or Serial, not both */
@@ -31,5 +32,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MASTER_LEFT
// #define _MASTER_RIGHT
// #define EE_HANDS
-
-#endif
diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h
index ed3767579..b8c1041cd 100644
--- a/keyboards/helix/rev2/keymaps/default/config.h
+++ b/keyboards/helix/rev2/keymaps/default/config.h
@@ -18,8 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
// place overrides here
@@ -37,5 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
-
-#endif /* CONFIG_USER_H */
diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c
index 67d57d062..8140edc00 100755
--- a/keyboards/hid_liber/keymaps/default/keymap.c
+++ b/keyboards/hid_liber/keymaps/default/keymap.c
@@ -14,7 +14,7 @@
* 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 "hid_liber.h"
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
diff --git a/keyboards/hifumi/config.h b/keyboards/hifumi/config.h
new file mode 100644
index 000000000..dccb0352d
--- /dev/null
+++ b/keyboards/hifumi/config.h
@@ -0,0 +1,56 @@
+/*
+Copyright 2019 zk-phi
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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 "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x3060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER riconken
+#define PRODUCT hifumi
+#define DESCRIPTION A macropad with 6 keys
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 3
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D4, C6 }
+#define MATRIX_COL_PINS { F4, F5, F6 }
+#define UNUSED_PINS
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLED_NUM 6
+#define RGBLIGHT_LIMIT_VAL 255
+#define RGBLIGHT_HUE_STEP 5
+#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/hifumi/hifumi.h b/keyboards/hifumi/hifumi.h
new file mode 100644
index 000000000..389ce206e
--- /dev/null
+++ b/keyboards/hifumi/hifumi.h
@@ -0,0 +1,31 @@
+/* Copyright 2019 zk-phi
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguments
+// The second converts the arguments into a two-dimensional array
+#define LAYOUT( \
+ k00, k01, k02, \
+ k10, k11, k12 \
+) \
+{ \
+ { k00, k01, k02 }, \
+ { k10, k11, k12 } \
+}
diff --git a/keyboards/hifumi/info.json b/keyboards/hifumi/info.json
new file mode 100644
index 000000000..2466838a0
--- /dev/null
+++ b/keyboards/hifumi/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "hifumi",
+ "url": "https://github.com/zk-phi/1x2x3-keyboard",
+ "maintainer": "riconken",
+ "width": 3,
+ "height": 2,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"F5", "x":0, "y":0}, {"label":"Up", "x":1, "y":0}, {"label":"PrSc", "x":2, "y":0}, {"label":"Left", "x":0, "y":1}, {"label":"Down", "x":1, "y":1}, {"label":"Right", "x":2, "y":1}]
+ }
+ }
+}
diff --git a/keyboards/hifumi/keymaps/default/keymap.c b/keyboards/hifumi/keymaps/default/keymap.c
new file mode 100644
index 000000000..9a4330398
--- /dev/null
+++ b/keyboards/hifumi/keymaps/default/keymap.c
@@ -0,0 +1,47 @@
+/* Copyright 2019 zk-phi
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+enum layers {
+ DEFAULT,
+ RAISE,
+ LOWER,
+ ADJUST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [DEFAULT] = LAYOUT(
+ LT(RAISE, KC_F5), KC_UP, LT(LOWER, KC_PSCR),
+ KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+ [RAISE] = LAYOUT(
+ _______, KC_PGUP, MO(ADJUST),
+ KC_HOME, KC_PGDN, KC_END
+ ),
+ [LOWER] = LAYOUT(
+ MO(ADJUST), _______, _______,
+ _______, _______, _______
+ ),
+ [ADJUST] = LAYOUT(
+ _______, RGB_TOG, _______,
+ RGB_MODE_SNAKE, RGB_MODE_PLAIN, RGB_HUI
+ )
+};
diff --git a/keyboards/hifumi/keymaps/test/keymap.c b/keyboards/hifumi/keymaps/test/keymap.c
new file mode 100644
index 000000000..7aec009eb
--- /dev/null
+++ b/keyboards/hifumi/keymaps/test/keymap.c
@@ -0,0 +1,32 @@
+/* Copyright 2019 zk-phi
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+enum layers {
+ DEFAULT
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [DEFAULT] = LAYOUT(
+ KC_1, KC_2, KC_3,
+ KC_A, KC_B, KC_C
+ )
+};
diff --git a/keyboards/hifumi/readme.md b/keyboards/hifumi/readme.md
new file mode 100644
index 000000000..2911c1244
--- /dev/null
+++ b/keyboards/hifumi/readme.md
@@ -0,0 +1,13 @@
+# hifumi
+
+A macro pad with 6 keys.
+
+Keyboard Maintainer: riconken, [zk-phi](https://github.com/zk-phi)
+Hardware Supported: hifumi PCB, Pro Micro
+Hardware Availability: [PCB & Case Data](https://github.com/zk-phi/1x2x3-keyboard)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make hifumi: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/hifumi/rules.mk b/keyboards/hifumi/rules.mk
new file mode 100644
index 000000000..98560f058
--- /dev/null
+++ b/keyboards/hifumi/rules.mk
@@ -0,0 +1,62 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h
new file mode 100644
index 000000000..ed15f4bb4
--- /dev/null
+++ b/keyboards/hotdox/config.h
@@ -0,0 +1,78 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xE11D
+
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Z.P.Z.O.
+#define PRODUCT HotDox
+#define DESCRIPTION QMK keyboard firmware for HotDox
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 14
+
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 60
+#define MOUSEKEY_MAX_SPEED 7
+#define MOUSEKEY_WHEEL_DELAY 0
+
+#define TAPPING_TOGGLE 1
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+#define TAPPING_TERM 200
+#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#ifndef IS_COMMAND
+#define IS_COMMAND() ( \
+ get_mods() == MOD_MASK_CTRL || \
+ get_mods() == MOD_MASK_SHIFT \
+)
+#endif
+
+#define BACKLIGHT_PIN B7
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+#define LED_BRIGHTNESS_LO 15
+#define LED_BRIGHTNESS_HI 255
+
+/* fix space cadet rollover issue */
+#define DISABLE_SPACE_CADET_ROLLOVER
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+#define USB_MAX_POWER_CONSUMPTION 500
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+//#define DEBUG_MATRIX_SCAN_RATE
+
diff --git a/keyboards/hotdox/hotdox.c b/keyboards/hotdox/hotdox.c
new file mode 100644
index 000000000..00af9efb1
--- /dev/null
+++ b/keyboards/hotdox/hotdox.c
@@ -0,0 +1,44 @@
+#include "hotdox.h"
+#include "backlight.h"
+#include "quantum.h"
+
+extern inline void ergodox_board_led_on(void);
+extern inline void ergodox_right_led_1_on(void);
+extern inline void ergodox_right_led_2_on(void);
+extern inline void ergodox_right_led_3_on(void);
+
+extern inline void ergodox_board_led_off(void);
+extern inline void ergodox_right_led_1_off(void);
+extern inline void ergodox_right_led_2_off(void);
+extern inline void ergodox_right_led_3_off(void);
+
+extern inline void ergodox_led_all_on(void);
+extern inline void ergodox_led_all_off(void);
+
+void ergodox_led_init(void);
+void ergodox_blink_all_leds(void);
+
+void matrix_init_kb(void) {
+ ergodox_blink_all_leds();
+ matrix_init_user();
+}
+
+void ergodox_blink_all_leds(void)
+{
+ ergodox_led_all_off();
+ ergodox_led_all_set(LED_BRIGHTNESS_HI);
+ ergodox_right_led_1_on();
+ _delay_ms(50);
+ ergodox_right_led_2_on();
+ _delay_ms(50);
+ ergodox_right_led_3_on();
+ _delay_ms(50);
+ ergodox_right_led_1_off();
+ _delay_ms(50);
+ ergodox_right_led_2_off();
+ _delay_ms(50);
+ ergodox_right_led_3_off();
+ ergodox_led_all_on();
+ _delay_ms(333);
+ ergodox_led_all_off();
+}
diff --git a/keyboards/hotdox/hotdox.h b/keyboards/hotdox/hotdox.h
new file mode 100644
index 000000000..0eef4ea79
--- /dev/null
+++ b/keyboards/hotdox/hotdox.h
@@ -0,0 +1,187 @@
+#pragma once
+
+#include "quantum.h"
+#include <stdint.h>
+#include <stdbool.h>
+
+#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+#define CPU_16MHz 0x00
+
+void init_ergodox(void);
+
+inline void ergodox_board_led_on(void) { DDRB |= (1<<PB7); PORTB |= (1<<PB7); }
+inline void ergodox_right_led_1_on(void) { DDRB |= (1<<PB5); PORTB &= ~(1<<PB5); }
+inline void ergodox_right_led_2_on(void) { DDRB |= (1<<PB6); PORTB &= ~(1<<PB6); }
+inline void ergodox_right_led_3_on(void) { DDRB |= (1<<PB4); PORTB &= ~(1<<PB4); }
+
+inline void ergodox_board_led_off(void) { DDRB |= (1<<PB7); PORTB &= ~(1<<PB7); }
+inline void ergodox_right_led_1_off(void) { DDRB |= (1<<PB5); PORTB |= (1<<PB5); }
+inline void ergodox_right_led_2_off(void) { DDRB |= (1<<PB6); PORTB |= (1<<PB6); }
+inline void ergodox_right_led_3_off(void) { DDRB |= (1<<PB4); PORTB |= (1<<PB4); }
+
+inline void ergodox_right_led_on(uint8_t l) {
+ switch (l) {
+ case 1:
+ ergodox_right_led_1_on();
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ break;
+ case 3:
+ ergodox_right_led_3_on();
+ break;
+ default:
+ break;
+ }
+}
+
+inline void ergodox_right_led_off(uint8_t l) {
+ switch (l) {
+ case 1:
+ ergodox_right_led_1_off();
+ break;
+ case 2:
+ ergodox_right_led_2_off();
+ break;
+ case 3:
+ ergodox_right_led_3_off();
+ break;
+ default:
+ break;
+ }
+}
+
+inline void ergodox_led_all_on(void) {
+ ergodox_board_led_on();
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+}
+
+inline void ergodox_led_all_off(void) {
+ ergodox_board_led_off();
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+}
+
+inline void ergodox_right_led_1_set(uint8_t n) {}
+inline void ergodox_right_led_2_set(uint8_t n) {}
+inline void ergodox_right_led_3_set(uint8_t n) {}
+inline void ergodox_right_led_set(uint8_t l, uint8_t n) {}
+inline void ergodox_led_all_set(uint8_t n) {}
+
+void ergodox_blink_all_leds(void);
+
+/*
+ * LEFT HAND: LINES 76-83
+ * RIGHT HAND: LINES 85-92
+ */
+#define LAYOUT_ergodox( \
+ \
+ k00,k01,k02,k03,k04,k05,k06, \
+ k10,k11,k12,k13,k14,k15,k16, \
+ k20,k21,k22,k23,k24,k25, \
+ k30,k31,k32,k33,k34,k35,k36, \
+ k40,k41,k42,k43,k44, \
+ k55,k56, \
+ k54, \
+ k51,k52,k53, \
+ \
+ k07,k08,k09,k0A,k0B,k0C,k0D, \
+ k17,k18,k19,k1A,k1B,k1C,k1D, \
+ k28,k29,k2A,k2B,k2C,k2D, \
+ k37,k38,k39,k3A,k3B,k3C,k3D, \
+ k49,k4A,k4B,k4C,k4D, \
+ k57,k58, \
+ k59, \
+ k5A,k5B,k5C ) \
+ \
+ /* matrix positions */ \
+ { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
+ { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
+ { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \
+ { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \
+ }
+
+/*
+ * LEFT HAND: LINES 110-117
+ * RIGHT HAND: LINES 119-126
+ */
+#define LAYOUT_ergodox_80( \
+ \
+ k00,k01,k02,k03,k04,k05,k06, \
+ k10,k11,k12,k13,k14,k15,k16, \
+ k20,k21,k22,k23,k24,k25, \
+ k30,k31,k32,k33,k34,k35,k36, \
+ k40,k41,k42,k43,k44, \
+ k55,k56, \
+ k45,k46,k54, \
+ k53,k52,k51, \
+ \
+ k07,k08,k09,k0A,k0B,k0C,k0D, \
+ k17,k18,k19,k1A,k1B,k1C,k1D, \
+ k28,k29,k2A,k2B,k2C,k2D, \
+ k37,k38,k39,k3A,k3B,k3C,k3D, \
+ k49,k4A,k4B,k4C,k4D, \
+ k57,k58, \
+ k59,k47,k48, \
+ k5A,k5B,k5C ) \
+ \
+ /* matrix positions */ \
+ { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
+ { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
+ { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4A, k4B, k4C, k4D }, \
+ { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \
+ }
+
+/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
+#define LAYOUT_ergodox_pretty( \
+ \
+ L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
+ L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
+ L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
+ L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
+ L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
+ L55,L56, R50,R51, \
+ L54, R52, \
+ L51,L52,L53, R53,R54,R55 ) \
+ \
+ /* matrix positions */ \
+ { \
+ { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \
+ { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \
+ { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \
+ { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \
+ { L40,L41,L42,L43,L44,KC_NO,KC_NO, KC_NO,KC_NO,R42,R43,R44,R45,R46 }, \
+ { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \
+ }
+
+/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
+#define LAYOUT_ergodox_pretty_80( \
+ \
+ L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \
+ L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
+ L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \
+ L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \
+ L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \
+ L55,L56, R50,R51, \
+ L45,L46,L54, R52,R40,R41, \
+ L51,L52,L53, R53,R54,R55 ) \
+ \
+ /* matrix positions */ \
+ { \
+ { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \
+ { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \
+ { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \
+ { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \
+ { L40,L41,L42,L43,L44,L45,L46, R40,R41,R42,R43,R44,R45,R46 }, \
+ { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \
+ }
+
diff --git a/keyboards/hotdox/info.json b/keyboards/hotdox/info.json
new file mode 100644
index 000000000..cdfcd990c
--- /dev/null
+++ b/keyboards/hotdox/info.json
@@ -0,0 +1,107 @@
+{
+ "keyboard_name": "HotDox",
+ "maintainer": "layne001365",
+ "width": 19.5,
+ "height": 9.375,
+
+ "layouts": {
+ "LAYOUT_ergodox": {
+
+ "layout": [
+ {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
+ {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
+ {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
+ {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
+ {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
+
+ {"x":6, "y":5}, {"x":7, "y":5},
+ {"x":7, "y":6},
+ {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7},
+
+
+ {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
+ {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
+ {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
+ {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
+ {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
+
+
+ {"x":9, "y":5}, {"x":10, "y":5},
+ {"x":9, "y":6},
+ {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
+ ]
+ },
+ "LAYOUT_ergodox_pretty": {
+ "layout": [
+ {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
+ {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
+
+ {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
+ {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
+
+ {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
+ {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
+
+ {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
+ {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
+
+ {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
+ {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
+
+ {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
+ {"x":7, "y":6}, {"x":9, "y":6},
+ {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
+ ]
+ },
+ "LAYOUT_ergodox_80": {
+
+ "layout": [
+ {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
+ {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
+ {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
+ {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
+ {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
+
+ {"x":6, "y":5}, {"x":7, "y":5},
+
+ {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6},
+ {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7},
+
+
+ {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
+ {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
+ {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
+ {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
+ {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
+
+
+ {"x":9, "y":5}, {"x":10, "y":5},
+ {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
+ {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
+ ]
+ },
+ "LAYOUT_ergodox_pretty_80": {
+
+ "layout": [
+ {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
+ {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
+
+ {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
+ {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
+
+ {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
+ {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
+
+ {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
+ {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
+
+ {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
+ {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
+
+ {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
+ {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6},
+ {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}
+ ]
+ }
+ }
+}
diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c
new file mode 100644
index 000000000..0ec7b352c
--- /dev/null
+++ b/keyboards/hotdox/keymaps/default/keymap.c
@@ -0,0 +1,189 @@
+#include QMK_KEYBOARD_H
+#include "version.h"
+
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define MDIA 2 // media keys
+
+enum custom_keycodes {
+ VRSN = SAFE_RANGE,
+ RGB_SLD
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
+ * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
+ * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | App | LGui | | Alt |Ctrl/Esc|
+ * ,------|------|------| |------+--------+------.
+ * | | | Home | | PgUp | | |
+ * | Space|Backsp|------| |------| Tab |Enter |
+ * | |ace | End | | PgDn | | |
+ * `--------------------' `----------------------'
+ */
+// If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[BASE] = LAYOUT_ergodox( // layer 0 : default
+ // left hand
+ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
+ KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
+ KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G,
+ KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
+ LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT,
+ ALT_T(KC_APP), KC_LGUI,
+ KC_HOME,
+ KC_SPC,KC_BSPC,KC_END,
+ // right hand
+ KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
+ MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
+ KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
+ KC_LALT, CTL_T(KC_ESC),
+ KC_PGUP,
+ KC_PGDN,KC_TAB,KC_ENT
+ ),
+/* Keymap 1: Symbol Layer
+ *
+ * ,---------------------------------------------------. ,--------------------------------------------------.
+ * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
+ * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
+ * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
+ * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
+ * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
+ * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | EEP_RST | | | | | | | . | 0 | = | |
+ * `-----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * |Animat| | |Toggle|Solid |
+ * ,------|------|------| |------+------+------.
+ * |Bright|Bright| | | |Hue- |Hue+ |
+ * |ness- |ness+ |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+// SYMBOLS
+[SYMB] = LAYOUT_ergodox(
+ // left hand
+ VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
+ KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
+ KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
+ KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
+ EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+ RGB_MOD,KC_TRNS,
+ KC_TRNS,
+ RGB_VAD,RGB_VAI,KC_TRNS,
+ // right hand
+ KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
+ KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
+ KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
+ KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
+ RGB_TOG, RGB_SLD,
+ KC_TRNS,
+ KC_TRNS, RGB_HUD, RGB_HUI
+),
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | | | | MsUp | | | | | | | | | | | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | | | | | | | | | | | Prev | Next | | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | | | | | |
+ * ,------|------|------| |------+------+------.
+ * | | | | | | |Brwser|
+ * | | |------| |------| |Back |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = LAYOUT_ergodox(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+ // right hand
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
+ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_WBAK
+),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // dynamically generate these.
+ case VRSN:
+ if (record->event.pressed) {
+ SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+ }
+ return false;
+ break;
+ case RGB_SLD:
+ if (record->event.pressed) {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(1);
+ #endif
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+
+ uint8_t layer = biton32(layer_state);
+
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+ switch (layer) {
+ // TODO: Make this relevant to the ErgoDox EZ.
+ case 1:
+ ergodox_right_led_1_on();
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ break;
+ default:
+ // none
+ break;
+ }
+};
diff --git a/keyboards/hotdox/keymaps/eozaki/keymap.c b/keyboards/hotdox/keymaps/eozaki/keymap.c
new file mode 100644
index 000000000..dc80e7a34
--- /dev/null
+++ b/keyboards/hotdox/keymaps/eozaki/keymap.c
@@ -0,0 +1,192 @@
+#include QMK_KEYBOARD_H
+#include "version.h"
+
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define MDIA 2 // media keys
+
+enum custom_keycodes {
+ PLACEHOLDER = SAFE_RANGE, // can always be here
+ VRSN,
+ RGB_SLD
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | ' | 6 | 7 | 8 | 9 | 0 | = |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | Del | Q | W | E | R | T | ~ | | " | Y | U | I | O | P | - |
+ * |--------+------+------+------+------+------| ` | | |------+------+------+------+------+--------|
+ * | Ctrl | A | S | D | F | G |------| |------| H | J | K | L | ; | \ |
+ * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
+ * | LAlt | Z | X | C | V | B | [ | | ] | N | M | , | . | / | LShift |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | LT-1 | F4 | F5 | F6 | F11 | | Left | Down | Up | Right| RAlt |
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | L1 | Prev | | Vol+ | L2 |
+ * ,------|------|------| |------+--------+------.
+ * | | | Play | | Vol- | | |
+ * | Space|Backsp|------| |------| Tab |Enter |
+ * | |ace | Next | | Mute | | |
+ * `--------------------' `----------------------'
+ */
+// If it accepts an argument (i.e, is a function), it doesn't need KC_.
+// Otherwise, it needs KC_*
+[BASE] = LAYOUT_ergodox( // layer 0 : default
+ // left hand
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV),
+ KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
+ KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC,
+ LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11,
+ TG(SYMB), KC_MPRV,
+ KC_MPLY,
+ KC_SPC,KC_BSPC,KC_MNXT,
+ // right hand
+ KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
+ LSFT(KC_QUOT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
+ KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS,
+ KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_LSFT,
+ KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_RALT,
+ KC_VOLU, TG(MDIA),
+ KC_VOLD,
+ KC_MUTE,KC_TAB, KC_ENT
+ ),
+/* Keymap 1: Symbol Layer
+ *
+ * ,---------------------------------------------------. ,--------------------------------------------------.
+ * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
+ * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
+ * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
+ * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
+ * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
+ * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | EEP_RST | | | | | | | . | 0 | = | |
+ * `-----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * |Animat| | |Toggle|Solid |
+ * ,------|------|------| |------+------+------.
+ * |Bright|Bright| | | |Hue- |Hue+ |
+ * |ness- |ness+ |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+// SYMBOLS
+[SYMB] = LAYOUT_ergodox(
+ // left hand
+ VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
+ KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
+ KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
+ KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
+ EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
+ RGB_MOD,KC_TRNS,
+ KC_TRNS,
+ RGB_VAD,RGB_VAI,KC_TRNS,
+ // right hand
+ KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
+ KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
+ KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
+ KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
+ RGB_TOG, RGB_SLD,
+ KC_TRNS,
+ KC_TRNS, RGB_HUD, RGB_HUI
+),
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | | | | MsUp | | | | | | | | | | | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | | | | | | | | | | | Prev | Next | | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | | | | | |
+ * ,------|------|------| |------+------+------.
+ * | | | | | | |Brwser|
+ * | | |------| |------| |Back |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+// MEDIA AND MOUSE
+[MDIA] = LAYOUT_ergodox(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS,
+ // right hand
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
+ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_WBAK
+),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // dynamically generate these.
+ case VRSN:
+ if (record->event.pressed) {
+ SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+ }
+ return false;
+ break;
+ case RGB_SLD:
+ if (record->event.pressed) {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(1);
+ #endif
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+
+ uint8_t layer = biton32(layer_state);
+
+ ergodox_board_led_off();
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+ switch (layer) {
+ // TODO: Make this relevant to the ErgoDox EZ.
+ case 1:
+ ergodox_right_led_1_on();
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ break;
+ default:
+ // none
+ break;
+ }
+
+};
diff --git a/keyboards/hotdox/keymaps/kloki/keymap.c b/keyboards/hotdox/keymaps/kloki/keymap.c
new file mode 100644
index 000000000..f858effd5
--- /dev/null
+++ b/keyboards/hotdox/keymaps/kloki/keymap.c
@@ -0,0 +1,210 @@
+#include QMK_KEYBOARD_H
+#include "version.h"
+
+#define BASE 0 // default layer
+#define QW 1 // qwerty
+#define SYMB 2 // symbols
+#define NUM 3 // media keys
+
+enum custom_keycodes {
+ PLACEHOLDER = SAFE_RANGE, // can always be here
+ VRSN,
+ RGB_SLD
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | SHIFT| | SYM | 6 | 7 | 8 | 9 | 0 | Bck |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | Tab | Q | D | R | W | B | `~ | | "' | J | F | U | P | : | \ | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | Ctr/Es | A | S | H | T | G |------| |------| Y | N | E | O | I | Enter |
+ * |--------+------+------+------+------+------| = + | | -_ |------+------+------+------+------+--------|
+ * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | RShift |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * |MEH | Gui |AltShf| Left | Right| | DOWN | UP | [ | ] | ~SYM |
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | ESC |Home | | PgUp | QW |
+ * ,------|------|------| |------+--------+------.
+ * | | ENT | End | | PgDn | | |
+ * | Space| WIN |------| |------| Tab |Back |
+ * | SYM | | SCTR | | SALT | SYM | |
+ * `--------------------' `----------------------'
+ */
+
+[BASE] = LAYOUT_ergodox( // layer 0 : default
+ // left hand
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSFT,
+ KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_GRV,
+ CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G,
+ KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_EQL,
+ KC_MEH, KC_LGUI, KC_LALT, KC_LEFT,KC_RGHT,
+ KC_ESC, KC_HOME,
+ KC_END,
+ LT(SYMB, KC_SPC), LGUI_T(KC_ENT), S(KC_LGUI),
+ // right hand
+ TG(NUM), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_QUOT, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
+ KC_Y, KC_N, KC_E, KC_O, KC_I , KC_ENT,
+ KC_MINS, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
+ KC_DOWN,KC_UP, KC_LBRC,KC_RBRC, MO(SYMB),
+ KC_PGUP, TG(QW),
+ KC_PGDN,
+ S(KC_LALT),LT(SYMB, KC_TAB), KC_BSPC
+ ),
+
+[QW] = LAYOUT_ergodox(
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______,
+ _______, KC_A, KC_S, KC_D, KC_F, KC_G,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ _______, _______, _______,
+ // right hand
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_Y, KC_U, KC_I , KC_O, KC_P, _______,
+ KC_H, KC_J, KC_K , KC_L, KC_SCLN, _______,
+ _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ _______, _______, _______
+),
+/* Keymap 1: Symbol Layer
+ *
+ * ,---------------------------------------------------. ,--------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL |
+ * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
+ * | | ! | @ | { | } | * | | | | < | H | U | PU | * | |
+ * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | # | $ | ( | ) | ` |------| |------| > | L | D | R | + | |
+ * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | % | ^ | [ | ] | ~ | | | | & | E | D | PD | \ | |
+ * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | | | | | | | | | | | |
+ * `-----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | | | | | |
+ * ,------|------|------| |------+------+------.
+ * | | | | | | | |
+ * | | |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+// SYMBOLS
+[SYMB] = LAYOUT_ergodox(
+ // left hand
+ _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
+ _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_ASTR,_______,
+ _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
+ _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______,
+ _______,_______,_______,_______,_______,
+ _______,_______,
+ _______,
+ _______,_______,_______,
+ // right hand
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
+ _______, KC_LABK, KC_HOME, KC_UP, KC_PGUP, KC_ASTR, _______,
+ KC_RABK, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PLUS, _______,
+ _______, KC_AMPR, KC_END, KC_DOWN, KC_PGDN, KC_BSLS, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ _______, _______, _______
+),
+/* Keymap 2: Media and mouse keys
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | | | L | MsUp | R | | | | | | 4 | 5 | 6 | | TAB |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | |MsLeft|MsDown|MsRght| |------| |------| | 1 | 2 | 3 | | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | | | | | | | | | | | 0 | 0 | | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * | | | | | | | | | | | |
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | | | | | |
+ * ,------|------|------| |------+------+------.
+ * | | | | | | | |
+ * | | |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+[NUM] = LAYOUT_ergodox(
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,
+ _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ _______, _______, _______,
+ // right hand
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_4, KC_5 , KC_6, _______, KC_TAB,
+ _______, KC_1, KC_2 , KC_3, _______, _______,
+ _______, _______, _______, KC_0, KC_0, _______, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ _______, _______, _______
+),
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // dynamically generate these.
+ case VRSN:
+ if (record->event.pressed) {
+ SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
+ }
+ return false;
+ break;
+ case RGB_SLD:
+ if (record->event.pressed) {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(1);
+ #endif
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+
+ uint8_t layer = biton32(layer_state);
+
+ ergodox_board_led_off();
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+ switch (layer) {
+ case 1:
+ ergodox_board_led_on();
+ break;
+ case 3:
+ ergodox_board_led_on();
+ break;
+ default:
+ // none
+ break;
+ }
+
+};
diff --git a/keyboards/hotdox/left.c b/keyboards/hotdox/left.c
new file mode 100644
index 000000000..970d36f1b
--- /dev/null
+++ b/keyboards/hotdox/left.c
@@ -0,0 +1,130 @@
+#include "action.h"
+#include "left.h"
+#include "wait.h"
+
+bool i2c_initialized = false;
+
+void left_config(void);
+uint8_t left_write(uint8_t reg, uint8_t data);
+uint8_t left_read(uint8_t reg, uint8_t *data);
+
+uint8_t init_mcp23017(void)
+{
+ i2c_initialized = false;
+
+ if (i2c_initialized == 0)
+ {
+ i2c_init(); // on pins D(1,0)
+ _delay_ms(1000);
+ }
+
+ return 0;
+}
+void left_init(void)
+{
+ init_mcp23017();
+ left_scan();
+#if 0
+ while (1)
+ {
+ print("wait\n");
+ wait_us(1000000);
+ }
+#endif
+}
+
+void left_scan(void)
+{
+ uint8_t ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT);
+
+ if (ret == 0)
+ {
+ i2c_stop();
+
+ if (!i2c_initialized)
+ {
+ i2c_initialized = true;
+ left_config();
+ clear_keyboard();
+ print("mcp23017 attached!!!\n");
+ }
+ }
+ else
+ {
+ if (i2c_initialized)
+ {
+ i2c_initialized = false;
+ clear_keyboard();
+ print("mcp23017 deattached!!!\n");
+ }
+ }
+
+ return;
+}
+
+uint8_t left_read_cols(void)
+{
+ uint8_t data = 0;
+
+ left_read(MCP23017_B0_GPIOA, &data);
+
+ return data;
+}
+
+void left_unselect_rows(void)
+{
+ left_write(MCP23017_B0_IODIRB, 0x3F);
+}
+
+void left_select_row(uint8_t row)
+{
+ left_write(MCP23017_B0_IODIRB, ~(1 << row));
+}
+
+void left_config(void)
+{
+ left_write(MCP23017_B0_IODIRA, 0x7F);
+ left_write(MCP23017_B0_IPOLA, 0x7F);
+ left_write(MCP23017_B0_GPPUA, 0x7F);
+
+ left_write(MCP23017_B0_IODIRB, 0xFF);
+ left_write(MCP23017_B0_GPIOB, 0xC0);
+}
+
+uint8_t left_write(uint8_t reg, uint8_t data)
+{
+ if (!i2c_initialized)
+ {
+ return 0;
+ }
+
+ uint8_t ret;
+
+ ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
+ ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
+ ret = i2c_write(data, HOTDOX_I2C_TIMEOUT);
+
+out:
+ i2c_stop();
+ return ret;
+}
+
+uint8_t left_read(uint8_t reg, uint8_t *data)
+{
+ if (!i2c_initialized)
+ {
+ return 0;
+ }
+
+ uint8_t ret = 0;
+
+ ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
+ ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
+ ret = i2c_start(I2C_ADDR_READ, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
+
+ *data = i2c_read_nack(HOTDOX_I2C_TIMEOUT);
+
+out:
+ i2c_stop();
+ return ret;
+}
diff --git a/keyboards/hotdox/left.h b/keyboards/hotdox/left.h
new file mode 100644
index 000000000..3d8b5a6ea
--- /dev/null
+++ b/keyboards/hotdox/left.h
@@ -0,0 +1,57 @@
+#pragma once
+
+#include "quantum.h"
+#include <stdint.h>
+#include "i2c_master.h"
+#include <util/delay.h>
+
+#define MCP23017
+#define MCP23017_A0 0
+#define MCP23017_A1 0
+#define MCP23017_A2 0
+
+#define I2C_ADDR (0x20)
+#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
+#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
+
+
+#define MCP23017_B0_IODIRA 0x00
+#define MCP23017_B0_IODIRB 0x01
+#define MCP23017_B0_IPOLA 0x02
+#define MCP23017_B0_IPOLB 0x03
+#define MCP23017_B0_GPINTENA 0x04
+#define MCP23017_B0_GPINTENB 0x05
+#define MCP23017_B0_DEFVALA 0x06
+#define MCP23017_B0_DEFVALB 0x07
+#define MCP23017_B0_INTCONA 0x08
+#define MCP23017_B0_INTCONB 0x09
+#define MCP23017_B0_IOCONA 0x0A
+#define MCP23017_B0_IOCONB 0x0B
+#define MCP23017_B0_GPPUA 0x0C
+#define MCP23017_B0_GPPUB 0x0D
+#define MCP23017_B0_INTFA 0x0E
+#define MCP23017_B0_INTFB 0x0F
+#define MCP23017_B0_INTCAPA 0x10
+#define MCP23017_B0_INTCAPB 0x11
+#define MCP23017_B0_GPIOA 0x12
+#define MCP23017_B0_GPIOB 0x13
+#define MCP23017_B0_OLATA 0x14
+#define MCP23017_B0_OLATB 0x15
+
+#define HOTDOX_I2C_TIMEOUT 100
+
+typedef int16_t i2c_status_t;
+
+void left_init(void);
+void left_scan(void);
+
+uint8_t left_read_cols(void);
+uint8_t left_get_col(uint8_t col);
+
+matrix_row_t left_read_row(void);
+
+void left_unselect_rows(void);
+void left_select_row(uint8_t row);
+
+uint8_t init_mcp23017(void);
+
diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c
new file mode 100644
index 000000000..9d3a98db2
--- /dev/null
+++ b/keyboards/hotdox/matrix.c
@@ -0,0 +1,283 @@
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include "wait.h"
+#include "action_layer.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "hotdox.h"
+#include "left.h"
+#ifdef DEBUG_MATRIX_SCAN_RATE
+#include "timer.h"
+#endif
+
+/*
+ * This constant define not debouncing time in msecs, but amount of matrix
+ * scan loops which should be made to get stable debounced results.
+ *
+ * On Ergodox matrix scan rate is relatively low, because of slow I2C.
+ * Now it's only 317 scans/second, or about 3.15 msec/scan.
+ * According to Cherry specs, debouncing time is 5 msec.
+ *
+ * And so, there is no sense to have DEBOUNCE higher than 2.
+ */
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+
+// Debouncing: store for each key the number of scans until it's eligible to
+// change. When scanning the matrix, ignore any changes in keys that have
+// already changed in the last DEBOUNCE scans.
+static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
+
+static matrix_row_t read_cols(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+uint32_t matrix_timer;
+uint32_t matrix_scan_count;
+#endif
+
+
+__attribute__ ((weak))
+void matrix_init_user(void) {}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+void matrix_init(void)
+{
+ // disable JTAG
+ MCUCR = (1<<JTD);
+ MCUCR = (1<<JTD);
+
+ unselect_rows();
+ init_cols();
+
+ //eeprom_update_word(EECONFIG_MAGIC, 0x0000);
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ for (uint8_t j=0; j < MATRIX_COLS; ++j) {
+ debounce_matrix[i * MATRIX_COLS + j] = 0;
+ }
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+
+ matrix_init_quantum();
+
+}
+
+void matrix_power_up(void) {
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_timer = timer_read32();
+ matrix_scan_count = 0;
+#endif
+}
+
+// Returns a matrix_row_t whose bits are set if the corresponding key should be
+// eligible to change in this scan.
+matrix_row_t debounce_mask(uint8_t row) {
+ matrix_row_t result = 0;
+ for (uint8_t j=0; j < MATRIX_COLS; ++j) {
+ if (debounce_matrix[row * MATRIX_COLS + j]) {
+ --debounce_matrix[row * MATRIX_COLS + j];
+ } else {
+ result |= (1 << j);
+ }
+ }
+ return result;
+}
+
+// Report changed keys in the given row. Resets the debounce countdowns
+// corresponding to each set bit in 'change' to DEBOUNCE.
+void debounce_report(matrix_row_t change, uint8_t row) {
+ for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
+ if (change & (1 << i)) {
+ debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
+ }
+ }
+}
+
+uint8_t matrix_scan(void)
+{
+ left_scan();
+
+#ifdef DEBUG_MATRIX_SCAN_RATE
+ matrix_scan_count++;
+
+ uint32_t timer_now = timer_read32();
+ if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
+ print("matrix scan frequency: ");
+ pdec(matrix_scan_count);
+ print("\n");
+ matrix_print();
+
+ matrix_timer = timer_now;
+ matrix_scan_count = 0;
+ }
+#endif
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ select_row(i);
+ wait_us(30); // without this wait read unstable value.
+ matrix_row_t mask = debounce_mask(i);
+ matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask);
+ debounce_report(cols ^ matrix[i], i);
+ matrix[i] = cols;
+
+ unselect_rows();
+ }
+
+ matrix_scan_quantum();
+
+ return 1;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+static void init_cols(void)
+{
+ // Pro Micro
+ DDRB &= ~(1<<PB0 | 1<<PB1 | 1<<PB2 | 1<<PB3);
+ PORTB |= (1<<PB0 | 1<<PB1 | 1<<PB2 | 1<<PB3);
+
+ DDRD &= ~(1<<PD2 | 1<<PD3);
+ PORTD |= (1<<PD2 | 1<<PD3);
+
+ DDRC &= ~(1<<PC6);
+ PORTC |= (1<<PC6);
+
+ left_init();
+}
+
+static matrix_row_t read_cols(uint8_t row)
+{
+ matrix_row_t cols0 = 0x00, cols1 = 0x00;
+
+ cols0 = left_read_cols();
+
+ cols1 = (PINC&(1<<PC6) ? 0 : (1<<(0+7))) |
+ (PIND&(1<<PD3) ? 0 : (1<<(1+7))) |
+ (PIND&(1<<PD2) ? 0 : (1<<(2+7))) |
+ (PINB&(1<<PB3) ? 0 : (1<<(3+7))) |
+ (PINB&(1<<PB2) ? 0 : (1<<(4+7))) |
+ (PINB&(1<<PB1) ? 0 : (1<<(5+7))) |
+ (PINB&(1<<PB0) ? 0 : (1<<(6+7))) ;
+
+ return (cols0 | cols1);
+}
+
+static void unselect_rows(void)
+{
+ // Pro Micro
+ DDRF &= ~(1<<PF7 | 1<< PF6 | 1<<PF5 | 1<<PF4 | 1<<PF1 | 1<<PF0);
+ PORTF &= ~(1<<PF7 | 1<< PF6 | 1<<PF5 | 1<<PF4 | 1<<PF1 | 1<<PF0);
+
+ left_unselect_rows();
+}
+
+static void select_row(uint8_t row)
+{
+ // Pro Micro
+ switch (row) {
+ case 5:
+ DDRF |= (1<<PF0);
+ PORTF &= ~(1<<PF0);
+ break;
+ case 4:
+ DDRF |= (1<<PF1);
+ PORTF &= ~(1<<PF1);
+ break;
+ case 3:
+ DDRF |= (1<<PF4);
+ PORTF &= ~(1<<PF4);
+ break;
+ case 2:
+ DDRF |= (1<<PF5);
+ PORTF &= ~(1<<PF5);
+ break;
+ case 1:
+ DDRF |= (1<<PF6);
+ PORTF &= ~(1<<PF6);
+ break;
+ case 0:
+ DDRF |= (1<<PF7);
+ PORTF &= ~(1<<PF7);
+ break;
+ }
+
+ left_select_row(row);
+}
+
diff --git a/keyboards/hotdox/readme.md b/keyboards/hotdox/readme.md
new file mode 100644
index 000000000..c8062b038
--- /dev/null
+++ b/keyboards/hotdox/readme.md
@@ -0,0 +1,23 @@
+HotDox
+========
+
+![HotDox](https://cdn.shopify.com/s/files/1/1994/3097/products/Sunset_Ergodox.jpg?v=1540495379)
+
+The HotDox is a modified version of the ErgoDox & ErgoDone(made by K.T.E.C.).
+
+
+- Keyboard maintainer: [Layne](https://github.com/layne001365/qmk_firmware)
+
+# Building the firmware
+
+[Install the build tools.](https://docs.qmk.fm/#/getting_started_build_tools)
+
+In the root directory of the repository, build the firmware with a command like:
+
+ make hotdox:default
+
+For more information on the layout option and other ones, see the [`make` guide](https://docs.qmk.fm/#/getting_started_make_guide).
+
+# Flashing the firmware onto the keyboard
+ https://docs.qmk.fm/#/newbs_flashing
+
diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk
new file mode 100644
index 000000000..f785cdd06
--- /dev/null
+++ b/keyboards/hotdox/rules.mk
@@ -0,0 +1,82 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make = Make software.
+#
+# make clean = Clean out built project files.
+#
+# That's pretty much all you need. To compile, always go make clean,
+# followed by make.
+#
+# For advanced users only:
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+# (must have teensy_loader_cli installed).
+#
+#----------------------------------------------------------------------------
+
+# # project specific files
+SRC = matrix.c \
+ i2c_master.c \
+ left.c
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Boot Section
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# comment out to disable the options.
+#
+CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone
+UNICODE_ENABLE = yes # Unicode
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
+USB_6KRO_ENABLE = no # USB 6key Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor
+SWAP_HANDS_ENABLE = no # Disable Onehand
+RGBLIGHT_ENABLE = no
+MIDI_ENABLE = no
+
+LAYOUTS = ergodox
diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h
index 7581e54b6..528f08bb9 100644
--- a/keyboards/hs60/v1/config.h
+++ b/keyboards/hs60/v1/config.h
@@ -120,7 +120,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-#define RGB_MATRIX_SKIP_FRAMES 0
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215
#define DRIVER_ADDR_1 0b1110100
diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h
index b0c56adf8..05255d133 100644
--- a/keyboards/hs60/v2/config.h
+++ b/keyboards/hs60/v2/config.h
@@ -102,9 +102,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
#define DRIVER_COUNT 2
#define DRIVER_LED_TOTAL 64
@@ -119,6 +129,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#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 }
+
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
#define EEPROM_MAGIC_ADDR 32
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/config.h b/keyboards/hs60/v2/keymaps/goatmaster/config.h
new file mode 100644
index 000000000..f63c90355
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/config.h
@@ -0,0 +1,37 @@
+/*
+Copyright 2018 Yiancar
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+#pragma once
+
+/* Include overwrites for specific keymap */
+
+#define HS60_HHKB
+#undef PRODUCT_ID
+#define PRODUCT_ID 0x4855
+
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3
+#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111
+
+#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 255 }, .index = 3-1 } //red
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/keymap.c b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c
new file mode 100644
index 000000000..6273dbc64
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c
@@ -0,0 +1,71 @@
+/* Copyright 2018 Yiancar
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+//This is the HHKB version of the PCB
+
+enum macro_keys {
+ KC_EML = SAFE_RANGE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = LAYOUT_60_hhkb( /* Base */
+ 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_GRV, KC_BSLS,\
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ),
+
+[1] = LAYOUT_60_hhkb( /* FN */
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,\
+ KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, \
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \
+ KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+
+[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_60_hhkb( /* Empty for dynamic keymaps */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
+};
+
+void matrix_init_user(void) {
+ //user initialization
+}
+
+void matrix_scan_user(void) {
+ //user matrix
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_EML: //use "KC_EML" as keycode in layers above to call macro
+ if (!record->event.pressed) {
+ send_string_with_delay_P(PSTR("example@email.com"), 10); //change email value here
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/readme.md b/keyboards/hs60/v2/keymaps/goatmaster/readme.md
new file mode 100644
index 000000000..ea9803cc0
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/readme.md
@@ -0,0 +1,6 @@
+The default keymap for HHKB HS60 V2. VIA support enabled.
+=========================================================
+
+![Layout image](https://imgur.com/usbrQWL.png)
+
+Default layer is normal HHKB with 7U space. Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
new file mode 100644
index 000000000..a2850a830
--- /dev/null
+++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk
@@ -0,0 +1,66 @@
+# project specific files
+SRC = keyboards/zeal60/zeal60.c \
+ keyboards/zeal60/rgb_backlight.c \
+ drivers/issi/is31fl3733.c \
+ quantum/color.c \
+ drivers/arm/i2c_master.c
+
+## chip/board settings
+# the next two should match the directories in
+# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+MCU_FAMILY = STM32
+MCU_SERIES = STM32F3xx
+
+# Linker script to use
+# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+# or <this_dir>/ld/
+MCU_LDSCRIPT = STM32F303xC
+
+# Startup code to use
+# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = stm32f3xx
+
+# Board: it should exist either in <chibios>/os/hal/boards/
+# or <this_dir>/boards
+BOARD = GENERIC_STM32_F303XC
+
+# Cortex version
+MCU = cortex-m4
+
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 7
+
+USE_FPU = yes
+
+# Vector table for application
+# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
+# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
+# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
+OPT_DEFS =
+
+# Do not put the microcontroller into power saving mode
+# when we get USB suspend event. We want it to keep updating
+# backlight effects.
+OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
+
+# Options to pass to dfu-util when flashing
+DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+
+# Build Options
+# comment out to disable the options.
+#
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+AUDIO_ENABLE = no # Audio output on port C6
+NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
+#SERIAL_LINK_ENABLE = yes
+
+RAW_ENABLE = yes
+DYNAMIC_KEYMAP_ENABLE = yes
+CIE1931_CURVE = yes
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h
index 4576211f1..5aab3098c 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/config.h
+++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h
@@ -20,3 +20,22 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 //Setting \ key to "MOD" instead of "ALPHA" for lighting
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
+
+#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR
+#undef RGB_BACKLIGHT_LAYER_1_INDICATOR
+#undef RGB_BACKLIGHT_LAYER_2_INDICATOR
+#undef RGB_BACKLIGHT_LAYER_3_INDICATOR
+
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 200, .s = 255 }, .index = 3-1 } //purple
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 100, .s = 255 }, .index = 60-1 } //green
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 150, .s = 255 }, .index = 60-1 } //blue
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 60-1 } //white
+
+#undef RGB_BACKLIGHT_BRIGHTNESS
+#define RGB_BACKLIGHT_BRIGHTNESS 175
+
+#undef RGB_BACKLIGHT_COLOR_1
+#undef RGB_BACKLIGHT_COLOR_2
+
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 }
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c
index 276adfe29..2fa3f4453 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c
+++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c
@@ -16,24 +16,13 @@
#include QMK_KEYBOARD_H
#include "stanrc85.h"
-//Tap Dance Declarations
-enum {
- TD_WIN = 0,
- TD_ESC
-};
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK),
- [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV)
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi(
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL),
+ KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
[1] = LAYOUT_60_ansi(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
@@ -46,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_DEL,
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS,
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT_60_ansi(
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/keymaps/stanrc85/readme.md
index 4e978e771..430d363f3 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/readme.md
+++ b/keyboards/hs60/v2/keymaps/stanrc85/readme.md
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.-->
- Layer 3 is Backlight control and RESET
- `Fn2+CAPS` used to toggle Default QWERTY layer on and off
-![RGB and RESET Layer](https://imgur.com/1ScpRE4.png)
+![RGB and RESET Layer](https://imgur.com/mMHoJPa.png)
### Build
To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`.
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
index a2850a830..c46a6b952 100644
--- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
+++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk
@@ -1,6 +1,6 @@
# project specific files
SRC = keyboards/zeal60/zeal60.c \
- keyboards/zeal60/rgb_backlight.c \
+ keyboards/zeal60/rgb_backlight.c \
drivers/issi/is31fl3733.c \
quantum/color.c \
drivers/arm/i2c_master.c
diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json
new file mode 100644
index 000000000..95122075b
--- /dev/null
+++ b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json
@@ -0,0 +1,190 @@
+[
+ {
+ "name": "gsm-idobo",
+ "notes": "Massdrop xd75\n\nFront Legend = \"Adust\" layer (both lower and Raise)"
+ },
+ [
+ {
+ "a": 3
+ },
+ "Esc\n\n\n\nreset",
+ {
+ "t": "#0000ff\n#ff0000",
+ "a": 4
+ },
+ "\nF1\n\n\n\n\n\n\n\n1 !",
+ "\nF2\n\n\n\n\n\n\n\n2 @",
+ "\nF3\n\n\n\n\n\n\n\n3 #",
+ "\nF4\n\n\n\n\n\n\n\n4 $",
+ "\nF5\n\n\n\n\n\n\n\n5 %",
+ {
+ "t": "#000000",
+ "a": 7
+ },
+ "= +",
+ "",
+ "- _",
+ {
+ "t": "#0000ff\n#ff0000",
+ "a": 0
+ },
+ "\nF6\n\n\nrgbplain\n\n\n\n\n6 ^",
+ "\nF7\n\n\nrgbtest\n\n\n\n\n7 &",
+ "\nF8\n\n\nrgbmode\n\n\n\n\n8 *",
+ {
+ "a": 4
+ },
+ "\nF9\n\n\n\n\n\n\n\n9 (",
+ "\nF10\n\n\n\n\n\n\n\n0 )",
+ {
+ "t": "#000000",
+ "a": 7
+ },
+ "Bksp"
+ ],
+ [
+ "Tab",
+ "Q",
+ {
+ "t": "#0000ff\n#ff0000",
+ "a": 4
+ },
+ "PgUp\nUP\n\n\n\n\n\n\n\nW",
+ {
+ "t": "#000000",
+ "a": 7
+ },
+ "E",
+ {
+ "a": 3
+ },
+ "R\n\n\n\nrgb_tog",
+ "T\n\n\n\nbl_tog",
+ {
+ "a": 7
+ },
+ "",
+ "",
+ "[ {",
+ "T",
+ "Y",
+ "I",
+ "O",
+ "P",
+ "]"
+ ],
+ [
+ {
+ "c": "#0000ff",
+ "t": "#ffffff"
+ },
+ "Raise",
+ {
+ "c": "#cccccc",
+ "t": "#0000ff\n#ff0000",
+ "a": 4
+ },
+ "Home\nLEFT\n\n\n\n\n\n\n\nA",
+ {
+ "a": 0
+ },
+ "PgDwn\nDOWN\n\n\nrgb_hai\n\n\n\n\nS",
+ "End\nRIGHT\n\n\nrgb_sai\n\n\n\n\nD",
+ {
+ "t": "#000000",
+ "a": 3
+ },
+ "F\n\n\n\nrgb_vai",
+ "G\n\n\n\nbl_inc",
+ {
+ "a": 7
+ },
+ "",
+ "UP",
+ "",
+ "H",
+ "J",
+ "K",
+ "L",
+ "; :",
+ "' \""
+ ],
+ [
+ {
+ "a": 3
+ },
+ "Shift\n\n\n\neep_rst",
+ {
+ "a": 7
+ },
+ "Z",
+ {
+ "a": 3
+ },
+ "X\n\n\n\nrgb_hud",
+ "C\n\n\n\nrgb_sad",
+ "V\n\n\n\nrgb_vad",
+ "B\n\n\n\nbl_dec",
+ {
+ "a": 7
+ },
+ "LEFT",
+ "DOWN",
+ "RIGHT",
+ "N",
+ "M",
+ ", <",
+ ". >",
+ "/ ?",
+ {
+ "a": 6
+ },
+ "Shift"
+ ],
+ [
+ {
+ "a": 7
+ },
+ "` ~",
+ "\\ |",
+ "Alt",
+ "Ctrl",
+ {
+ "c": "#ff0000"
+ },
+ "Lower",
+ {
+ "c": "#eb7c15"
+ },
+ "Space",
+ {
+ "c": "#cccccc",
+ "t": "#0000ff\n#ff0000",
+ "a": 4
+ },
+ "\nApp\n\n\n\n\n\n\n\nOS",
+ {
+ "t": "#000000",
+ "a": 7
+ },
+ "Del",
+ "Enter",
+ {
+ "c": "#eb7c15"
+ },
+ "Space",
+ {
+ "c": "#0000ff",
+ "t": "#ffffff"
+ },
+ "Raise",
+ {
+ "c": "#cccccc",
+ "t": "#000000"
+ },
+ "",
+ "",
+ "",
+ "PrtScr"
+ ]
+] \ No newline at end of file
diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keymap.c b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c
new file mode 100644
index 000000000..e96459da5
--- /dev/null
+++ b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c
@@ -0,0 +1,152 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 16
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | RAISE | A | S | D | F | G | | UP | | H | J | K | L | ; | ' |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | LEFT | DOWN | RIGHT | N | M | , | . | / | RSHIFT |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | ` | \ | LALT | LCTRL | LOWER | SPACE | LGUI | DEL | ENTER | SPACE | RAISE | | | | PrtScr |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_5x15( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, XXXXXXX, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \
+ RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_UP, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LEFT, KC_DOWN, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_GRAVE, KC_GRAVE, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_LGUI, KC_DEL, KC_ENT, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR \
+),
+
+
+/* LOWER
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | UP | | | | | | | | | | PR SCR | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | RAISE | LEFT | DOWN | RIGHT | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | LOWER | | APP | | | | RAISE | | | | |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_5x15( \
+ XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \
+ XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+),
+
+ /* RAISE
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | pgup | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | RAISE | home | pgdn | end | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | LOWER | | | | | | RAISE | | | | |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_5x15( \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ RAISE, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+),
+
+
+ /* ADJUST
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | RESET | | | | | | | | |rgbplain|rgbtest | rgbmode| | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | |rgb tog | bl_tog | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | RAISE | | rgb hi | rgb sai|rgb vai | bl inc | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | EEP Rst| | rgb hd | rgb sad|rgb vad | bl dec | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | LOWER | | | | | | RAISE | | | | |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_5x15( \
+ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, RGB_M_T, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+),
+
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/idobo/keymaps/greenshadowmaker/readme.md b/keyboards/idobo/keymaps/greenshadowmaker/readme.md
new file mode 100644
index 000000000..bdd28d4ff
--- /dev/null
+++ b/keyboards/idobo/keymaps/greenshadowmaker/readme.md
@@ -0,0 +1,3 @@
+# GreenShadowMaker keymap for idobo
+
+Note: keyboard-layout-editor-gsm-idobo.json shoudl be the matching layout for http://www.keyboard-layout-editor.com
diff --git a/keyboards/idobo/keymaps/greenshadowmaker/rules.mk b/keyboards/idobo/keymaps/greenshadowmaker/rules.mk
new file mode 100644
index 000000000..f6587a835
--- /dev/null
+++ b/keyboards/idobo/keymaps/greenshadowmaker/rules.mk
@@ -0,0 +1,3 @@
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+COMMAND_ENABLE = no # Commands for debug and configuration
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
diff --git a/keyboards/jc65/v32u4/keymaps/default/config.h b/keyboards/jc65/v32u4/keymaps/default/config.h
index a5568e400..271f48d00 100644
--- a/keyboards/jc65/v32u4/keymaps/default/config.h
+++ b/keyboards/jc65/v32u4/keymaps/default/config.h
@@ -1 +1,3 @@
-#include "../../config.h"
+#pragma once
+
+// place overrides here
diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md
index ed1ea90fe..7d3612554 100644
--- a/keyboards/jj40/README.md
+++ b/keyboards/jj40/README.md
@@ -36,7 +36,7 @@ $ make
$ sudo cp bootloadHID /usr/bin
```
-In order to use the `./program` script, which can reboot the board into
+In order to use the `././util/atmega32a_program.py` script, which can reboot the board into
the bootloader, you'll need Python 2 with PyUSB installed:
```
diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/README.md
index 09684bd82..29dc2605d 100644
--- a/keyboards/jj4x4/README.md
+++ b/keyboards/jj4x4/README.md
@@ -36,7 +36,7 @@ $ make
$ sudo cp bootloadHID /usr/bin
```
-In order to use the `./program` script, which can reboot the board into
+In order to use the `./util/atmega32a_program.py` script, which can reboot the board into
the bootloader, you'll need Python 2 with PyUSB installed:
```
diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md
index 397889535..f7b8acc64 100644
--- a/keyboards/jj50/README.md
+++ b/keyboards/jj50/README.md
@@ -37,7 +37,7 @@ $ brew cask install crosspack-avr
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
```
-In order to use the `./program` script, which can reboot the board into
+In order to use the `././util/atmega32a_program.py` script, which can reboot the board into
the bootloader, you'll need Python 2 with PyUSB installed:
```
diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c
new file mode 100644
index 000000000..456adeee4
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb/keymap.c
@@ -0,0 +1,135 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+Modified 2019 AbstractKB
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public LicensezZZ
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _DEFLT,
+ _RAISE,
+ _LOWER,
+ _FN
+};
+
+enum custom_keycodes {
+ MYRGB_TG = SAFE_RANGE
+};
+
+bool rgbinit = true;
+bool rgbon = true;
+
+const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one
+
+void keyboard_post_init_user(void) {
+ rgblight_enable_noeeprom();
+ led_set_user(host_keyboard_leds());
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+ switch (biton32(state)) {
+ case _RAISE:
+ rgblight_sethsv_noeeprom(240,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ case _LOWER:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ case _FN:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
+ break;
+ default: //_DEFLT
+ rgblight_sethsv_noeeprom(0,0,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ }
+
+ return state;
+}
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_ALTERNATING);
+ } else {
+ layer_state_set_user(layer_state);
+ }
+}
+
+void myrgb_toggle(void) {
+ if (rgbon) {
+ rgblight_disable_noeeprom();
+ rgbon = false;
+ } else {
+ rgblight_enable_noeeprom();
+ layer_state_set_user(layer_state);
+ led_set_user(host_keyboard_leds());
+ rgbon = true;
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case MYRGB_TG:
+ if (record->event.pressed) {
+ myrgb_toggle();
+ }
+ return false;
+ default:
+ return true;
+ }
+}
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_DEFLT] = LAYOUT( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \
+ KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ ),
+
+
+ [_RAISE] = LAYOUT( \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \
+ ),
+
+
+ [_LOWER] = LAYOUT( \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \
+ _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+
+ [_FN] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \
+ )
+};
diff --git a/keyboards/jj50/keymaps/abstractkb/readme.md b/keyboards/jj50/keymaps/abstractkb/readme.md
new file mode 100644
index 000000000..7ff7e0268
--- /dev/null
+++ b/keyboards/jj50/keymaps/abstractkb/readme.md
@@ -0,0 +1,6 @@
+# My personal layout for the JJ50
+
+It is an approximation of a 60% layout with the alternate layers set up for programming,
+with brackets and parenthesis on the homerow
+Other things I changed were swapping around delete, backspace, and capslock around
+It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file
diff --git a/keyboards/jj50/keymaps/archetype/README.md b/keyboards/jj50/keymaps/archetype/README.md
new file mode 100644
index 000000000..a2ae4e912
--- /dev/null
+++ b/keyboards/jj50/keymaps/archetype/README.md
@@ -0,0 +1,22 @@
+# archetype keymap for jj50 keyboards
+A keymap that can be used with the jj50 ortholinear keyboard.
+
+## Features
+
+- `QWERTY` layout (Default)
+- `COLEMAK` layout
+- `FN` layout (various keys that are rarely needed)
+- `FX` layout (Control lighting and audio)
+- Use `Left Ctrl` and `Left Alt` to output `()`, `[]` and `{}` by tapping once, twice or thrice respectively. Hold them down for the regular keycode (LCtrl or LAlt)
+- `Right Shift` when held or Enter when tapped
+- Auto-Shift enabled (long press on alphas and numeric keys outputs shifted character)
+- Full arrow keys available
+
+
+## Feedback
+
+I made this keymap based on the existing default one. If you happen to use this keymap [drop me a line](mailto://idimitrakopoulos@gmail.com) about what could be improved etc
+
+Enjoy!
+
+Iason Dimitrakopoulos
diff --git a/keyboards/jj50/keymaps/archetype/config.h b/keyboards/jj50/keymaps/archetype/config.h
new file mode 100644
index 000000000..7955796ea
--- /dev/null
+++ b/keyboards/jj50/keymaps/archetype/config.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#undef AUTO_SHIFT_TIMEOUT
+#undef TAPPING_TERM
+
+#define AUTO_SHIFT_TIMEOUT 150
+#define TAPPING_TERM 150
+//#define BOOTMAGIC_KEY_SALT KC_LCTL
diff --git a/keyboards/jj50/keymaps/archetype/keymap.c b/keyboards/jj50/keymaps/archetype/keymap.c
new file mode 100644
index 000000000..0704943e0
--- /dev/null
+++ b/keyboards/jj50/keymaps/archetype/keymap.c
@@ -0,0 +1,215 @@
+/*
+Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
+Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com>
+Modified 2019 Iason Dimitrakopoulos (idimitrakopoulos) <idimitrakopoulos@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 LicensezZZ
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+#include "action_layer.h"
+#include "rgblight.h"
+#include "quantum.h"
+
+#define _QWERTY 0
+#define _COLEMAK 1
+#define _FN 2
+#define _FX 3
+
+enum {
+ TD_BSPC_DEL = 0,
+ TD_LCTL_LBRC = 1,
+ TD_LALT_RBRC = 2,
+};
+
+
+void left_brackets(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) {
+ register_mods(MOD_LSFT);
+ register_code(KC_9);
+ } else {
+ register_mods(MOD_LCTL);
+ }
+ } else if (state->count == 2) {
+ register_code(KC_LBRC);
+ } else if (state->count == 3) {
+ register_mods(MOD_LSFT);
+ register_code(KC_LBRC);
+ }
+}
+
+void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) {
+ unregister_mods(MOD_LSFT);
+ unregister_code(KC_9);
+ } else {
+ unregister_mods(MOD_LCTL);
+ }
+ } else if (state->count == 2) {
+ unregister_code(KC_LBRC);
+ } else if (state->count == 3) {
+ unregister_mods(MOD_LSFT);
+ unregister_code(KC_LBRC);
+ }
+}
+
+void right_brackets(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) {
+ register_mods(MOD_LSFT);
+ register_code(KC_0);
+ } else {
+ register_mods(MOD_LALT);
+ }
+ } else if (state->count == 2) {
+ register_code(KC_RBRC);
+ } else if (state->count == 3) {
+ register_mods(MOD_LSFT);
+ register_code(KC_RBRC);
+ }
+}
+
+void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) {
+ unregister_mods(MOD_LSFT);
+ unregister_code(KC_0);
+ } else {
+ unregister_mods(MOD_LALT);
+ }
+ } else if (state->count == 2) {
+ unregister_code(KC_RBRC);
+ } else if (state->count == 3) {
+ unregister_mods(MOD_LSFT);
+ unregister_code(KC_RBRC);
+ }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ // Single tap = Backspace | Double tap = Delete
+ [TD_BSPC_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, KC_DEL),
+ // Single tap = ( | Double tap = [ | Triple tap = { | Single hold = KC_LCTL
+ [TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset),
+ // Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT
+ [TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset),
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_SLSH, KC_UP, SFT_T(KC_ENT), \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), LT(_FN, KC_SPC), _______, KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+ [_COLEMAK] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, KC_R, KC_S, KC_T, KC_D, _______, KC_N, KC_E, KC_I, KC_O, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, KC_K, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+ [_FN] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINUS, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+ [_FX] = LAYOUT( \
+
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+.
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, BL_ON, BL_INC, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, BL_OFF, BL_DEC, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, RGB_TOG, BL_STEP, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+|
+ //| | | | | | | | | | | | |
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ //| | | | | | | | | | | | |
+ //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+'
+ ),
+
+
+};
diff --git a/keyboards/jj50/keymaps/archetype/rules.mk b/keyboards/jj50/keymaps/archetype/rules.mk
new file mode 100644
index 000000000..e32e8ce74
--- /dev/null
+++ b/keyboards/jj50/keymaps/archetype/rules.mk
@@ -0,0 +1,65 @@
+# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
+# Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@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/>.
+
+# MCU name
+MCU = atmega32a
+PROTOCOL = VUSB
+
+# unsupported features for now
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+
+# processor frequency
+F_CPU = 12000000
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
+# build options
+BOOTMAGIC_ENABLE = lite
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = no
+COMMAND_ENABLE = yes
+BACKLIGHT_ENABLE = yes
+RGBLIGHT_ENABLE = yes
+RGBLIGHT_CUSTOM_DRIVER = yes
+NKRO_ENABLE = no
+# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+TAP_DANCE_ENABLE = yes
+AUTO_SHIFT_ENABLE = yes
+
+
+DISABLE_WS2812 = no
+
+KEY_LOCK_ENABLE = yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+
+#OPT_DEFS = -DDEBUG_LEVEL=0
+
+# custom matrix setup
+CUSTOM_MATRIX = yes
+SRC = matrix.c i2c.c backlight.c
+
+# programming options
+PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
+
+LAYOUTS = ortho_5x12
diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c
index 9d753eb8e..d5334d495 100644
--- a/keyboards/jj50/keymaps/default/keymap.c
+++ b/keyboards/jj50/keymaps/default/keymap.c
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
-#include "action_layer.h"
-#include "rgblight.h"
#define ______ KC_TRNS
#define _DEFLT 0
@@ -113,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \
BL_STEP, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),
-
+
/* Fn
* ,-----------------------------------------------------------------------------------.
* | | | £ | | | | | | | | | |
diff --git a/keyboards/jj50/program b/keyboards/jj50/program
deleted file mode 100644
index a88d9cd9b..000000000
--- a/keyboards/jj50/program
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-print('Searching for ps2avrGB... ', end='')
-
-dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-if dev is None:
- raise ValueError('Device not found')
-
-print('Found', end='\n\n')
-
-print('Device Information:')
-print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
-print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
-print('Manufacturer: %s' % (dev.iManufacturer))
-print('Serial: %s' % (dev.iSerialNumber))
-print('Product: %s' % (dev.iProduct), end='\n\n')
-
-print('Transferring control to bootloader... ', end='')
-
-dev.set_configuration()
-
-request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
-USBRQ_HID_SET_REPORT = 0x09
-HID_REPORT_OPTION = 0x0301
-
-
-try:
- dev.ctrl_transfer(
- request_type,
- USBRQ_HID_SET_REPORT,
- HID_REPORT_OPTION,
- 0,
- [0, 0, 0xFF] + [0] * 5
- )
-except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-# wait a bit until bootloader starts up
-time.sleep(2)
-
-print('OK')
-print('Programming...')
-if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
- print('\nDone!')
diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk
index 1a18ec4fe..4ee571918 100644
--- a/keyboards/jj50/rules.mk
+++ b/keyboards/jj50/rules.mk
@@ -58,6 +58,6 @@ CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c backlight.c
# programming options
-PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
LAYOUTS = ortho_5x12
diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c
index 29d93c107..331d33155 100644
--- a/keyboards/k_type/keymaps/default/keymap.c
+++ b/keyboards/k_type/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "k_type.h"
+#include QMK_KEYBOARD_H
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
diff --git a/keyboards/katana60/keymaps/default/config.h b/keyboards/katana60/keymaps/default/config.h
index 08c51f6cb..c4bea7eb0 100644
--- a/keyboards/katana60/keymaps/default/config.h
+++ b/keyboards/katana60/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/katana60/keymaps/msiu/config.h b/keyboards/katana60/keymaps/msiu/config.h
new file mode 100644
index 000000000..b57cc482e
--- /dev/null
+++ b/keyboards/katana60/keymaps/msiu/config.h
@@ -0,0 +1,21 @@
+/* Copyright 2017 Baris Tosun
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+
+
+// place overrides here
+
diff --git a/keyboards/katana60/keymaps/msiu/keymap.c b/keyboards/katana60/keymaps/msiu/keymap.c
new file mode 100644
index 000000000..72b795baa
--- /dev/null
+++ b/keyboards/katana60/keymaps/msiu/keymap.c
@@ -0,0 +1,70 @@
+#include QMK_KEYBOARD_H
+
+// Mod-Tap keys for cleaner code
+#define ESC_CTL LCTL_T(KC_ESC)
+#define SPC_LW LT(2, KC_SPC)
+#define ENT_FN LT(4, KC_ENT)
+
+#define _QW 0
+#define _DV 1
+#define _LW 2
+#define _RS 3
+#define _FN 4
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_QW] = LAYOUT( /* Base */
+ KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, SPC_LW, ENT_FN, KC_SPC, MO(3), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+ ),
+[_DV] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
+ _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+[_LW] = 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+[_RS] = 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_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
+[_FN] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+
+
+
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/katana60/keymaps/msiu/readme.md b/keyboards/katana60/keymaps/msiu/readme.md
new file mode 100644
index 000000000..e4f0ebdb6
--- /dev/null
+++ b/keyboards/katana60/keymaps/msiu/readme.md
@@ -0,0 +1,3 @@
+# msiu's keymap for katana: standard QWERTY layout with planck like layers
+
+This layout take a standard QWERTY default layer, with raise and lower layers similar to planck. It is for me to easily transition between keyboards. I put a few nav keys in the 'tree' middle, but I have come to realise I rarely use them as I am used to the planck layering. Top of the tree is a toggle for Dvorak layer.
diff --git a/keyboards/kbdfans/kbd19x/info.json b/keyboards/kbdfans/kbd19x/info.json
index 31f2f9cf5..c24ed9caa 100644
--- a/keyboards/kbdfans/kbd19x/info.json
+++ b/keyboards/kbdfans/kbd19x/info.json
@@ -1,218 +1,221 @@
{
"keyboard_name": "KBD19x",
- "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbd19x",
+ "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd19x",
"maintainer": "qmk",
"width": 19.5,
"height": 6.75,
"layouts": {
"LAYOUT_ansi": {
- "key_count": 99,
- "layout": [{"label":"Esc", "x":0, "y":0},
- {"label":"F1", "x":1.25, "y":0},
- {"label":"F2", "x":2.25, "y":0},
- {"label":"F3", "x":3.25, "y":0},
- {"label":"F4", "x":4.25, "y":0},
- {"label":"F5", "x":5.5, "y":0},
- {"label":"F6", "x":6.5, "y":0},
- {"label":"F7", "x":7.5, "y":0},
- {"label":"F8", "x":8.5, "y":0},
- {"label":"F9", "x":9.75, "y":0},
- {"label":"F10", "x":10.75, "y":0},
- {"label":"F11", "x":11.75, "y":0},
- {"label":"F12", "x":12.75, "y":0},
- {"label":"BkLgt Step", "x":14, "y":0},
- {"label":"Print Screen", "x":15.5, "y":0},
- {"label":"Scroll Lock", "x":16.5, "y":0},
- {"label":"Pause Break", "x":17.5, "y":0},
- {"label":"PgDn", "x":18.5, "y":0},
- {"label":"~", "x":0, "y":1.5},
- {"label":"!", "x":1, "y":1.5},
- {"label":"@", "x":2, "y":1.5},
- {"label":"#", "x":3, "y":1.5},
- {"label":"$", "x":4, "y":1.5},
- {"label":"%", "x":5, "y":1.5},
- {"label":"^", "x":6, "y":1.5},
- {"label":"&", "x":7, "y":1.5},
- {"label":"*", "x":8, "y":1.5},
- {"label":"(", "x":9, "y":1.5},
- {"label":")", "x":10, "y":1.5},
- {"label":"_", "x":11, "y":1.5},
- {"label":"+", "x":12, "y":1.5},
- {"label":"Backspace", "x":13, "y":1.5, "w":2},
- {"label":"Num Lock", "x":15.5, "y":1.5},
- {"label":"/", "x":16.5, "y":1.5},
- {"label":"*", "x":17.5, "y":1.5},
- {"label":"-", "x":18.5, "y":1.5},
- {"label":"Tab", "x":0, "y":2.5, "w":1.5},
- {"label":"Q", "x":1.5, "y":2.5},
- {"label":"W", "x":2.5, "y":2.5},
- {"label":"E", "x":3.5, "y":2.5},
- {"label":"R", "x":4.5, "y":2.5},
- {"label":"T", "x":5.5, "y":2.5},
- {"label":"Y", "x":6.5, "y":2.5},
- {"label":"U", "x":7.5, "y":2.5},
- {"label":"I", "x":8.5, "y":2.5},
- {"label":"O", "x":9.5, "y":2.5},
- {"label":"P", "x":10.5, "y":2.5},
- {"label":"{", "x":11.5, "y":2.5},
- {"label":"}", "x":12.5, "y":2.5},
- {"label":"|", "x":13.5, "y":2.5, "w":1.5},
- {"label":"7", "x":15.5, "y":2.5},
- {"label":"8", "x":16.5, "y":2.5},
- {"label":"9", "x":17.5, "y":2.5},
- {"label":"+", "x":18.5, "y":2.5, "h":2},
- {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
- {"label":"A", "x":1.75, "y":3.5},
- {"label":"S", "x":2.75, "y":3.5},
- {"label":"D", "x":3.75, "y":3.5},
- {"label":"F", "x":4.75, "y":3.5},
- {"label":"G", "x":5.75, "y":3.5},
- {"label":"H", "x":6.75, "y":3.5},
- {"label":"J", "x":7.75, "y":3.5},
- {"label":"K", "x":8.75, "y":3.5},
- {"label":"L", "x":9.75, "y":3.5},
- {"label":":", "x":10.75, "y":3.5},
- {"label":"\"", "x":11.75, "y":3.5},
- {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
- {"label":"4", "x":15.5, "y":3.5},
- {"label":"5", "x":16.5, "y":3.5},
- {"label":"6", "x":17.5, "y":3.5},
- {"label":"Shift", "x":0, "y":4.5, "w":2.25},
- {"label":"Z", "x":2.25, "y":4.5},
- {"label":"X", "x":3.25, "y":4.5},
- {"label":"C", "x":4.25, "y":4.5},
- {"label":"V", "x":5.25, "y":4.5},
- {"label":"B", "x":6.25, "y":4.5},
- {"label":"N", "x":7.25, "y":4.5},
- {"label":"M", "x":8.25, "y":4.5},
- {"label":"<", "x":9.25, "y":4.5},
- {"label":">", "x":10.25, "y":4.5},
- {"label":"?", "x":11.25, "y":4.5},
- {"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
- {"label":"1", "x":15.5, "y":4.5},
- {"label":"2", "x":16.5, "y":4.5},
- {"label":"3", "x":17.5, "y":4.5},
- {"label":"Enter", "x":18.5, "y":4.5, "h":2},
- {"label":"\u2191", "x":14.25, "y":4.75},
- {"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
- {"label":"Win", "x":1.25, "y":5.5},
- {"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
- {"x":3.5, "y":5.5, "w":6.25},
- {"label":"Alt", "x":9.75, "y":5.5},
- {"label":"MO(1)", "x":10.75, "y":5.5},
- {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25},
- {"label":"0", "x":16.5, "y":5.5},
- {"label":".", "x":17.5, "y":5.5},
- {"label":"\u2190", "x":13.25, "y":5.75},
- {"label":"\u2193", "x":14.25, "y":5.75},
- {"label":"\u2192", "x":15.25, "y":5.75}]
+ "key_count": 99,
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"F1", "x":1.25, "y":0},
+ {"label":"F2", "x":2.25, "y":0},
+ {"label":"F3", "x":3.25, "y":0},
+ {"label":"F4", "x":4.25, "y":0},
+ {"label":"F5", "x":5.5, "y":0},
+ {"label":"F6", "x":6.5, "y":0},
+ {"label":"F7", "x":7.5, "y":0},
+ {"label":"F8", "x":8.5, "y":0},
+ {"label":"F9", "x":9.75, "y":0},
+ {"label":"F10", "x":10.75, "y":0},
+ {"label":"F11", "x":11.75, "y":0},
+ {"label":"F12", "x":12.75, "y":0},
+ {"label":"Extra Esc", "x":14, "y":0},
+ {"label":"PrtSc", "x":15.5, "y":0},
+ {"label":"Pause", "x":16.5, "y":0},
+ {"label":"Insert", "x":17.5, "y":0},
+ {"label":"Home", "x":18.5, "y":0},
+ {"label":"`~", "x":0, "y":1.5},
+ {"label":"1!", "x":1, "y":1.5},
+ {"label":"2@", "x":2, "y":1.5},
+ {"label":"3#", "x":3, "y":1.5},
+ {"label":"4$", "x":4, "y":1.5},
+ {"label":"5%", "x":5, "y":1.5},
+ {"label":"6^", "x":6, "y":1.5},
+ {"label":"7&", "x":7, "y":1.5},
+ {"label":"8*", "x":8, "y":1.5},
+ {"label":"9(", "x":9, "y":1.5},
+ {"label":"0)", "x":10, "y":1.5},
+ {"label":"-_", "x":11, "y":1.5},
+ {"label":"=+", "x":12, "y":1.5},
+ {"label":"Backspace", "x":13, "y":1.5, "w":2},
+ {"label":"Num Lock", "x":15.5, "y":1.5},
+ {"label":"/", "x":16.5, "y":1.5},
+ {"label":"*", "x":17.5, "y":1.5},
+ {"label":"-", "x":18.5, "y":1.5},
+ {"label":"Tab", "x":0, "y":2.5, "w":1.5},
+ {"label":"Q", "x":1.5, "y":2.5},
+ {"label":"W", "x":2.5, "y":2.5},
+ {"label":"E", "x":3.5, "y":2.5},
+ {"label":"R", "x":4.5, "y":2.5},
+ {"label":"T", "x":5.5, "y":2.5},
+ {"label":"Y", "x":6.5, "y":2.5},
+ {"label":"U", "x":7.5, "y":2.5},
+ {"label":"I", "x":8.5, "y":2.5},
+ {"label":"O", "x":9.5, "y":2.5},
+ {"label":"P", "x":10.5, "y":2.5},
+ {"label":"[{", "x":11.5, "y":2.5},
+ {"label":"]}", "x":12.5, "y":2.5},
+ {"label":"\\|", "x":13.5, "y":2.5, "w":1.5},
+ {"label":"7", "x":15.5, "y":2.5},
+ {"label":"8", "x":16.5, "y":2.5},
+ {"label":"9", "x":17.5, "y":2.5},
+ {"label":"+", "x":18.5, "y":2.5, "h":2},
+ {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
+ {"label":"A", "x":1.75, "y":3.5},
+ {"label":"S", "x":2.75, "y":3.5},
+ {"label":"D", "x":3.75, "y":3.5},
+ {"label":"F", "x":4.75, "y":3.5},
+ {"label":"G", "x":5.75, "y":3.5},
+ {"label":"H", "x":6.75, "y":3.5},
+ {"label":"J", "x":7.75, "y":3.5},
+ {"label":"K", "x":8.75, "y":3.5},
+ {"label":"L", "x":9.75, "y":3.5},
+ {"label":";:", "x":10.75, "y":3.5},
+ {"label":"'\"", "x":11.75, "y":3.5},
+ {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"4", "x":15.5, "y":3.5},
+ {"label":"5", "x":16.5, "y":3.5},
+ {"label":"6", "x":17.5, "y":3.5},
+ {"label":"Shift", "x":0, "y":4.5, "w":2.25},
+ {"label":"Z", "x":2.25, "y":4.5},
+ {"label":"X", "x":3.25, "y":4.5},
+ {"label":"C", "x":4.25, "y":4.5},
+ {"label":"V", "x":5.25, "y":4.5},
+ {"label":"B", "x":6.25, "y":4.5},
+ {"label":"N", "x":7.25, "y":4.5},
+ {"label":"M", "x":8.25, "y":4.5},
+ {"label":",<", "x":9.25, "y":4.5},
+ {"label":".>", "x":10.25, "y":4.5},
+ {"label":"/?", "x":11.25, "y":4.5},
+ {"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
+ {"label":"Up", "x":14.25, "y":4.75},
+ {"label":"1", "x":15.5, "y":4.5},
+ {"label":"2", "x":16.5, "y":4.5},
+ {"label":"3", "x":17.5, "y":4.5},
+ {"label":"Enter", "x":18.5, "y":4.5, "h":2},
+ {"label":"Control", "x":0, "y":5.5, "w":1.25},
+ {"label":"GUI", "x":1.25, "y":5.5},
+ {"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
+ {"label":"Space", "x":3.5, "y":5.5, "w":6.25},
+ {"label":"Alt", "x":9.75, "y":5.5},
+ {"label":"Fn", "x":10.75, "y":5.5},
+ {"label":"Control", "x":11.75, "y":5.5, "w":1.25},
+ {"label":"Left", "x":13.25, "y":5.75},
+ {"label":"Right", "x":14.25, "y":5.75},
+ {"label":"Down", "x":15.25, "y":5.75},
+ {"label":"0", "x":16.5, "y":5.5},
+ {"label":".", "x":17.5, "y":5.5}
+ ]
},
"LAYOUT_all": {
- "key_count": 103,
- "layout": [{"label":"Esc", "x":0, "y":0},
- {"label":"F1", "x":1.25, "y":0},
- {"label":"F2", "x":2.25, "y":0},
- {"label":"F3", "x":3.25, "y":0},
- {"label":"F4", "x":4.25, "y":0},
- {"label":"F5", "x":5.5, "y":0},
- {"label":"F6", "x":6.5, "y":0},
- {"label":"F7", "x":7.5, "y":0},
- {"label":"F8", "x":8.5, "y":0},
- {"label":"F9", "x":9.75, "y":0},
- {"label":"F10", "x":10.75, "y":0},
- {"label":"F11", "x":11.75, "y":0},
- {"label":"F12", "x":12.75, "y":0},
- {"label":"BkLgt Step", "x":14, "y":0},
- {"label":"Print Screen", "x":15.5, "y":0},
- {"label":"Scroll Lock", "x":16.5, "y":0},
- {"label":"Pause Break", "x":17.5, "y":0},
- {"label":"PgDn", "x":18.5, "y":0},
- {"label":"~", "x":0, "y":1.5},
- {"label":"!", "x":1, "y":1.5},
- {"label":"@", "x":2, "y":1.5},
- {"label":"#", "x":3, "y":1.5},
- {"label":"$", "x":4, "y":1.5},
- {"label":"%", "x":5, "y":1.5},
- {"label":"^", "x":6, "y":1.5},
- {"label":"&", "x":7, "y":1.5},
- {"label":"*", "x":8, "y":1.5},
- {"label":"(", "x":9, "y":1.5},
- {"label":")", "x":10, "y":1.5},
- {"label":"_", "x":11, "y":1.5},
- {"label":"+", "x":12, "y":1.5},
- {"x":13, "y":1.5},
- {"label":"BS", "x":14, "y":1.5},
- {"label":"Num Lock", "x":15.5, "y":1.5},
- {"label":"/", "x":16.5, "y":1.5},
- {"label":"*", "x":17.5, "y":1.5},
- {"label":"-", "x":18.5, "y":1.5},
- {"label":"Tab", "x":0, "y":2.5, "w":1.5},
- {"label":"Q", "x":1.5, "y":2.5},
- {"label":"W", "x":2.5, "y":2.5},
- {"label":"E", "x":3.5, "y":2.5},
- {"label":"R", "x":4.5, "y":2.5},
- {"label":"T", "x":5.5, "y":2.5},
- {"label":"Y", "x":6.5, "y":2.5},
- {"label":"U", "x":7.5, "y":2.5},
- {"label":"I", "x":8.5, "y":2.5},
- {"label":"O", "x":9.5, "y":2.5},
- {"label":"P", "x":10.5, "y":2.5},
- {"label":"{", "x":11.5, "y":2.5},
- {"label":"}", "x":12.5, "y":2.5},
- {"label":"|", "x":13.5, "y":2.5, "w":1.5},
- {"label":"7", "x":15.5, "y":2.5},
- {"label":"8", "x":16.5, "y":2.5},
- {"label":"9", "x":17.5, "y":2.5},
- {"label":"+", "x":18.5, "y":2.5},
- {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
- {"label":"A", "x":1.75, "y":3.5},
- {"label":"S", "x":2.75, "y":3.5},
- {"label":"D", "x":3.75, "y":3.5},
- {"label":"F", "x":4.75, "y":3.5},
- {"label":"G", "x":5.75, "y":3.5},
- {"label":"H", "x":6.75, "y":3.5},
- {"label":"J", "x":7.75, "y":3.5},
- {"label":"K", "x":8.75, "y":3.5},
- {"label":"L", "x":9.75, "y":3.5},
- {"label":":", "x":10.75, "y":3.5},
- {"label":"\"", "x":11.75, "y":3.5},
- {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
- {"label":"4", "x":15.5, "y":3.5},
- {"label":"5", "x":16.5, "y":3.5},
- {"label":"6", "x":17.5, "y":3.5},
- {"x":18.5, "y":3.5},
- {"label":"Shift", "x":0, "y":4.5, "w":1.25},
- {"x":1.25, "y":4.5},
- {"label":"Z", "x":2.25, "y":4.5},
- {"label":"X", "x":3.25, "y":4.5},
- {"label":"C", "x":4.25, "y":4.5},
- {"label":"V", "x":5.25, "y":4.5},
- {"label":"B", "x":6.25, "y":4.5},
- {"label":"N", "x":7.25, "y":4.5},
- {"label":"M", "x":8.25, "y":4.5},
- {"label":"<", "x":9.25, "y":4.5},
- {"label":">", "x":10.25, "y":4.5},
- {"label":"?", "x":11.25, "y":4.5},
- {"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
- {"label":"1", "x":15.5, "y":4.5},
- {"label":"2", "x":16.5, "y":4.5},
- {"label":"3", "x":17.5, "y":4.5},
- {"label":"Enter", "x":18.5, "y":4.5},
- {"label":"\u2191", "x":14.25, "y":4.75},
- {"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
- {"label":"Win", "x":1.25, "y":5.5},
- {"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
- {"x":3.5, "y":5.5, "w":6.25},
- {"label":"Alt", "x":9.75, "y":5.5},
- {"label":"Menu", "x":10.75, "y":5.5},
- {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25},
- {"label":"0", "x":16.5, "y":5.5},
- {"label":".", "x":17.5, "y":5.5},
- {"x":18.5, "y":5.5},
- {"label":"\u2190", "x":13.25, "y":5.75},
- {"label":"\u2193", "x":14.25, "y":5.75},
- {"label":"\u2192", "x":15.25, "y":5.75}]
+ "key_count": 103,
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"F1", "x":1.25, "y":0},
+ {"label":"F2", "x":2.25, "y":0},
+ {"label":"F3", "x":3.25, "y":0},
+ {"label":"F4", "x":4.25, "y":0},
+ {"label":"F5", "x":5.5, "y":0},
+ {"label":"F6", "x":6.5, "y":0},
+ {"label":"F7", "x":7.5, "y":0},
+ {"label":"F8", "x":8.5, "y":0},
+ {"label":"F9", "x":9.75, "y":0},
+ {"label":"F10", "x":10.75, "y":0},
+ {"label":"F11", "x":11.75, "y":0},
+ {"label":"F12", "x":12.75, "y":0},
+ {"label":"Extra Esc", "x":14, "y":0},
+ {"label":"PrtSc", "x":15.5, "y":0},
+ {"label":"Pause", "x":16.5, "y":0},
+ {"label":"Insert", "x":17.5, "y":0},
+ {"label":"Home", "x":18.5, "y":0},
+ {"label":"`~", "x":0, "y":1.5},
+ {"label":"1!", "x":1, "y":1.5},
+ {"label":"2@", "x":2, "y":1.5},
+ {"label":"3#", "x":3, "y":1.5},
+ {"label":"4$", "x":4, "y":1.5},
+ {"label":"5%", "x":5, "y":1.5},
+ {"label":"6^", "x":6, "y":1.5},
+ {"label":"7&", "x":7, "y":1.5},
+ {"label":"8*", "x":8, "y":1.5},
+ {"label":"9(", "x":9, "y":1.5},
+ {"label":"0)", "x":10, "y":1.5},
+ {"label":"-_", "x":11, "y":1.5},
+ {"label":"=+", "x":12, "y":1.5},
+ {"label":"Split Backspace (Left)", "x":13, "y":1.5},
+ {"label":"Split Backspace (Right)", "x":14, "y":1.5},
+ {"label":"Num Lock", "x":15.5, "y":1.5},
+ {"label":"/", "x":16.5, "y":1.5},
+ {"label":"*", "x":17.5, "y":1.5},
+ {"label":"-", "x":18.5, "y":1.5},
+ {"label":"Tab", "x":0, "y":2.5, "w":1.5},
+ {"label":"Q", "x":1.5, "y":2.5},
+ {"label":"W", "x":2.5, "y":2.5},
+ {"label":"E", "x":3.5, "y":2.5},
+ {"label":"R", "x":4.5, "y":2.5},
+ {"label":"T", "x":5.5, "y":2.5},
+ {"label":"Y", "x":6.5, "y":2.5},
+ {"label":"U", "x":7.5, "y":2.5},
+ {"label":"I", "x":8.5, "y":2.5},
+ {"label":"O", "x":9.5, "y":2.5},
+ {"label":"P", "x":10.5, "y":2.5},
+ {"label":"[{", "x":11.5, "y":2.5},
+ {"label":"]}", "x":12.5, "y":2.5},
+ {"label":"\\|", "x":13.5, "y":2.5, "w":1.5},
+ {"label":"7", "x":15.5, "y":2.5},
+ {"label":"8", "x":16.5, "y":2.5},
+ {"label":"9", "x":17.5, "y":2.5},
+ {"label":"Split + (Top)", "x":18.5, "y":2.5},
+ {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75},
+ {"label":"A", "x":1.75, "y":3.5},
+ {"label":"S", "x":2.75, "y":3.5},
+ {"label":"D", "x":3.75, "y":3.5},
+ {"label":"F", "x":4.75, "y":3.5},
+ {"label":"G", "x":5.75, "y":3.5},
+ {"label":"H", "x":6.75, "y":3.5},
+ {"label":"J", "x":7.75, "y":3.5},
+ {"label":"K", "x":8.75, "y":3.5},
+ {"label":"L", "x":9.75, "y":3.5},
+ {"label":";:", "x":10.75, "y":3.5},
+ {"label":"'\"", "x":11.75, "y":3.5},
+ {"label":"Enter", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"4", "x":15.5, "y":3.5},
+ {"label":"5", "x":16.5, "y":3.5},
+ {"label":"6", "x":17.5, "y":3.5},
+ {"label":"Split + (Bottom)", "x":18.5, "y":3.5},
+ {"label":"Shift", "x":0, "y":4.5, "w":1.25},
+ {"label":"ISO Backslash", "x":1.25, "y":4.5},
+ {"label":"Z", "x":2.25, "y":4.5},
+ {"label":"X", "x":3.25, "y":4.5},
+ {"label":"C", "x":4.25, "y":4.5},
+ {"label":"V", "x":5.25, "y":4.5},
+ {"label":"B", "x":6.25, "y":4.5},
+ {"label":"N", "x":7.25, "y":4.5},
+ {"label":"M", "x":8.25, "y":4.5},
+ {"label":",<", "x":9.25, "y":4.5},
+ {"label":".>", "x":10.25, "y":4.5},
+ {"label":"/?", "x":11.25, "y":4.5},
+ {"label":"Shift", "x":12.25, "y":4.5, "w":1.75},
+ {"label":"Up", "x":14.25, "y":4.75},
+ {"label":"1", "x":15.5, "y":4.5},
+ {"label":"2", "x":16.5, "y":4.5},
+ {"label":"3", "x":17.5, "y":4.5},
+ {"label":"Split Enter (Top)", "x":18.5, "y":4.5},
+ {"label":"Ctrl", "x":0, "y":5.5, "w":1.25},
+ {"label":"GUI", "x":1.25, "y":5.5},
+ {"label":"Alt", "x":2.25, "y":5.5, "w":1.25},
+ {"label":"Space", "x":3.5, "y":5.5, "w":6.25},
+ {"label":"Alt", "x":9.75, "y":5.5},
+ {"label":"Fn", "x":10.75, "y":5.5},
+ {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25},
+ {"label":"Left", "x":13.25, "y":5.75},
+ {"label":"Down", "x":14.25, "y":5.75},
+ {"label":"Right", "x":15.25, "y":5.75},
+ {"label":"0", "x":16.5, "y":5.5},
+ {"label":".", "x":17.5, "y":5.5},
+ {"label":"Split Enter (Bottom)", "x":18.5, "y":5.5}
+ ]
}
}
}
-
diff --git a/keyboards/kbdfans/kbd66/keymaps/default/config.h b/keyboards/kbdfans/kbd66/keymaps/default/config.h
index c7b3d6ecc..6d42fc568 100644
--- a/keyboards/kbdfans/kbd66/keymaps/default/config.h
+++ b/keyboards/kbdfans/kbd66/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h
index c7b3d6ecc..c7b3d6ecc 100755..100644
--- a/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h
+++ b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h
diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md
index 7ee3c6adb..6d5f774e6 100644
--- a/keyboards/kbdfans/kbd67/readme.md
+++ b/keyboards/kbdfans/kbd67/readme.md
@@ -1,7 +1,9 @@
# KBD67
-A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts.
-Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board.
+A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts.
+Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board.
+
+The rev1 PCB for the KBD67 is sold under the name "KBD65."
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
Hardware Supported: KBD67
diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h
new file mode 100644
index 000000000..f4d7de06e
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h
@@ -0,0 +1,17 @@
+/* Copyright 2019 Daisuke Kobayashi
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c
new file mode 100644
index 000000000..b00805e9e
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c
@@ -0,0 +1,61 @@
+/* Copyright 2019 Daisuke Kobayashi
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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_jp.h"
+
+#define RGB_RMO RGB_RMOD
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap (Base Layer) Default Layer
+ * ,----------------------------------------------------------------.
+ * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del |
+ * |----------------------------------------------------------------|
+ * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp|
+ * |------------------------------------------------------. |----|
+ * |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn|
+ * |----------------------------------------------------------------|
+ * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr|
+ * |----------------------------------------------------------------|
+ * |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig |
+ * `------------------------------------------------' `------------'
+ */
+[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, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \
+ KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \
+ KC_LSFT, XXXXXXX, 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_PSCR, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT),
+
+ /* Keymap Fn Layer
+ * ,----------------------------------------------------------------.
+ * |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins |
+ * |----------------------------------------------------------------|
+ * | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | |
+ * |------------------------------------------------------. |----|
+ * |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | |
+ * |----------------------------------------------------------------|
+ * | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| |
+ * |----------------------------------------------------------------|
+ * | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End |
+ * `------------------------------------------------' `------------'
+ */
+[1] = LAYOUT_all(
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS, \
+ _______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \
+ KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \
+ _______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \
+ _______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END),
+};
diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md
new file mode 100644
index 000000000..b432436d4
--- /dev/null
+++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md
@@ -0,0 +1,7 @@
+# Koba's keymap for KBD67
+
+![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png)
+
+- JIS layout.
+- Fn layer is arranged like HHKB.
+- 3 splitted space bar. (Space-Fn-Space)
diff --git a/keyboards/kbdfans/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md
index ab5209646..9074557cb 100644
--- a/keyboards/kbdfans/kbd67/rev1/readme.md
+++ b/keyboards/kbdfans/kbd67/rev1/readme.md
@@ -3,8 +3,8 @@
65% keyboard with blocker.
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
-Hardware Supported: KBD67 PCB
-Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit)
+Hardware Supported: KBD67 PCB (Sometimes sold under the name "KBD65")
+Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb)
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c
index ee1f69e91..98d735356 100644
--- a/keyboards/kc60/keymaps/noroadsleft/keymap.c
+++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c
@@ -9,24 +9,24 @@
** LAYER DEFINITIONS **
**********************/
enum layers_keymap {
- // BASE LAYERS
- _QWERTY = 0,
- _DVORAK,
- _COLEMAK,
- _MAC,
- _QUAKE2,
- _QUAKE2_DVORAK,
- _QUAKE2_CONSOLE,
-
- // FUNCTION LAYERS
- _FUNCWIN,
- _FUNCMAC,
- _FUNCQ2,
-
- // OTHER LAYERS
- _NUMPAD,
- _MACROS,
- _SYSTEM
+ // BASE LAYERS
+ _QWERTY = 0,
+ _DVORAK,
+ _COLEMAK,
+ _MAC,
+ _QUAKE2,
+ _QUAKE2_DVORAK,
+ _QUAKE2_CONSOLE,
+
+ // FUNCTION LAYERS
+ _FUNCWIN,
+ _FUNCMAC,
+ _FUNCQ2,
+
+ // OTHER LAYERS
+ _NUMPAD,
+ _MACROS,
+ _SYSTEM
};
// LAYER SHORT CODES
@@ -70,24 +70,24 @@ enum layers_keymap {
// MACRO DEFINITIONS
enum custom_keycodes {
- F_CAPS = SAFE_RANGE,
- T_L3DED,
- G_PUSH,
- G_FTCH,
- G_COMM,
- G_RST,
- G_C10R,
- G_BRCH,
- SIGNA,
- GO_Q2,
- Q2_ON,
- Q2_OFF,
- Q2_ESC,
- Q2_GRV,
- MC_UNDO,
- MC_PSTE,
- NUBS_Z,
- VRSN
+ F_CAPS = SAFE_RANGE,
+ T_L3DED,
+ G_PUSH,
+ G_FTCH,
+ G_COMM,
+ G_RST,
+ G_C10R,
+ G_BRCH,
+ SIGNA,
+ GO_Q2,
+ Q2_ON,
+ Q2_OFF,
+ Q2_ESC,
+ Q2_GRV,
+ MC_UNDO,
+ MC_PSTE,
+ NUBS_Z,
+ VRSN
};
@@ -98,293 +98,314 @@ enum custom_keycodes {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch(keycode) {
- // these are our macros!
- case F_CAPS:
- /*
- Objective: write a macro that checks the current layers that are
- enabled, and activates the appropriate function layer.
- */
- if ( biton32(layer_state) == _MAC ) {
- if (record->event.pressed) {
- layer_on(_FUNCMAC);
- } else {
- layer_off(_FUNCMAC);
- }
- } else {
- if (record->event.pressed) {
- layer_on(_FUNCWIN);
- } else {
- layer_off(_FUNCWIN);
- }
- };
- return false;
- case T_L3DED:
- if (record->event.pressed) {
- SEND_STRING("lavak3DED ");
- };
- return false;
- case G_PUSH:
- if (record->event.pressed) {
- SEND_STRING("git push origin ");
- };
- return false;
- case G_FTCH:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- clear_mods();
- SEND_STRING("git pull upstream ");
- } else {
- SEND_STRING("git fetch upstream ");
- }
- };
- return false;
- case G_COMM:
- if (record->event.pressed) {
- SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT));
- layer_off(_MACROS);
- };
- return false;
- case G_BRCH:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- clear_mods();
- SEND_STRING("master");
- } else {
- SEND_STRING("$(git branch-name)");
- }
- layer_off(_MACROS);
- };
- return false;
- case SIGNA:
- if (record->event.pressed) {
- SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER));
- layer_off(_MACROS);
- };
- return false;
- case GO_Q2:
- if (record->event.pressed) {
- //default_layer_set(_QWERTY);
- layer_move(_QWERTY); // TO(_QWERTY);
- layer_on(_QUAKE2);
- //layer_off(_SYSTEM);
- };
- return false;
- case Q2_ON:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_ENTER));
- layer_on(_DVORAK);
- layer_on(_QUAKE2_DVORAK);
- };
- return false;
- case Q2_OFF:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_ENTER));
- layer_move(_QWERTY); // TO(_QWERTY);
- layer_on(_QUAKE2);
- };
- return false;
- case Q2_ESC:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_ESCAPE));
- layer_move(_QWERTY); // TO(_QWERTY);
- layer_on(_QUAKE2);
- };
- return false;
- case Q2_GRV:
- if (record->event.pressed) {
- SEND_STRING(SS_TAP(X_GRAVE));
- layer_on(_DVORAK);
- layer_on(_QUAKE2_DVORAK);
- layer_on(_QUAKE2_CONSOLE);
- };
- return false;
- case MC_UNDO:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
- } else {
- SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) );
- }
- };
- return false;
- case MC_PSTE:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_SHIFT ) {
- SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
- } else {
- SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) );
- }
- };
- return false;
- case NUBS_Z:
- if (record->event.pressed) {
- if ( get_mods() & MOD_MASK_RALT ) {
- SEND_STRING( SS_TAP(X_NONUS_BSLASH) );
- } else {
- SEND_STRING( SS_TAP(X_Z) );
- }
- };
- return false;
- case VRSN:
- if (record->event.pressed) {
- SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION );
- }
- return false;
- } // switch()
- return true;
+ switch(keycode) {
+ // these are our macros!
+ case F_CAPS:
+ /*
+ * Objective: write a macro that checks the current layers that are
+ * enabled, and activates the appropriate function layer.
+ */
+ if ( biton32(layer_state) == _MAC ) {
+ if (record->event.pressed) {
+ layer_on(_FUNCMAC);
+ } else {
+ layer_off(_FUNCMAC);
+ }
+ } else {
+ if (record->event.pressed) {
+ layer_on(_FUNCWIN);
+ } else {
+ layer_off(_FUNCWIN);
+ }
+ };
+ return false;
+ case T_L3DED:
+ if (record->event.pressed) {
+ SEND_STRING("lavak3DED ");
+ };
+ return false;
+ case G_PUSH:
+ if (record->event.pressed) {
+ SEND_STRING("git push origin ");
+ };
+ return false;
+ case G_FTCH:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ clear_mods();
+ SEND_STRING("git pull upstream ");
+ } else {
+ SEND_STRING("git fetch upstream ");
+ }
+ };
+ return false;
+ case G_COMM:
+ if (record->event.pressed) {
+ SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT));
+ layer_off(_MACROS);
+ };
+ return false;
+ case G_BRCH:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ clear_mods();
+ SEND_STRING("master");
+ } else {
+ SEND_STRING("$(git branch-name)");
+ }
+ layer_off(_MACROS);
+ };
+ return false;
+ case SIGNA:
+ if (record->event.pressed) {
+ SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER));
+ layer_off(_MACROS);
+ };
+ return false;
+ case GO_Q2:
+ if (record->event.pressed) {
+ //default_layer_set(_QWERTY);
+ layer_move(_QWERTY); // TO(_QWERTY);
+ layer_on(_QUAKE2);
+ //layer_off(_SYSTEM);
+ };
+ return false;
+ case Q2_ON:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ENTER));
+ layer_on(_DVORAK);
+ layer_on(_QUAKE2_DVORAK);
+ };
+ return false;
+ case Q2_OFF:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ENTER));
+ layer_move(_QWERTY); // TO(_QWERTY);
+ layer_on(_QUAKE2);
+ };
+ return false;
+ case Q2_ESC:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_ESCAPE));
+ layer_move(_QWERTY); // TO(_QWERTY);
+ layer_on(_QUAKE2);
+ };
+ return false;
+ case Q2_GRV:
+ if (record->event.pressed) {
+ SEND_STRING(SS_TAP(X_GRAVE));
+ layer_on(_DVORAK);
+ layer_on(_QUAKE2_DVORAK);
+ layer_on(_QUAKE2_CONSOLE);
+ };
+ return false;
+ case MC_UNDO:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
+ } else {
+ SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) );
+ }
+ };
+ return false;
+ case MC_PSTE:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_SHIFT ) {
+ SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
+ } else {
+ SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) );
+ }
+ };
+ return false;
+ case NUBS_Z:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ SEND_STRING( SS_DOWN(X_NONUS_BSLASH) );
+ } else {
+ SEND_STRING( SS_DOWN(X_Z) );
+ }
+ } else {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ SEND_STRING( SS_UP(X_NONUS_BSLASH) );
+ } else {
+ SEND_STRING( SS_UP(X_Z) );
+ }
+ };
+ return false;
+ case VRSN:
+ if (record->event.pressed) {
+ SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION );
+ }
+ return false;
+ case KC_1 ... KC_0:
+ if (record->event.pressed) {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ register_code( keycode + 0x3b );
+ } else {
+ register_code( keycode );
+ }
+ } else {
+ if ( get_mods() & MOD_MASK_RALT ) {
+ unregister_code( keycode + 0x3b );
+ } else {
+ unregister_code( keycode );
+ }
+ }
+ return false;
+ } // switch()
+ return true;
};
// KEYMAPS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /****************
- ** BASE LAYERS **
- ****************/
-
- /* QWERTY */
- [_QWERTY] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
- FW_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
- KC_LSFT, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
- ),
-
- /* Dvorak */
- [_DVORAK] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \
- KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
- FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
- KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
- ),
-
- /* Colemak */
- [_COLEMAK] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
- FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
- ),
-
- /****************
- ** OS OVERLAYS **
- ****************/
-
- /* Mac */
- [_MAC] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FM), _______ \
- ),
-
- /*********************
- ** QUAKE 2 OVERLAYS **
- *********************/
-
- /* Quake 2 */
- [_QUAKE2] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
- ),
-
- [_QUAKE2_DVORAK] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
- ),
-
- [_QUAKE2_CONSOLE] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
- ),
-
- /********************
- ** FUNCTION LAYERS **
- ********************/
-
- /* Windows Fn layer */
- [_FUNCWIN] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- 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_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
- NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \
- _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \
- _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \
- ),
-
- /* MacOS Fn layer */
- [_FUNCMAC] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
- _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \
- NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \
- _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \
- _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
- ),
-
- /* Quake 2 Fn layer */
- [_FUNCQ2] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
- _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
- NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \
- _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
- ),
-
- /*****************
- ** OTHER LAYERS **
- *****************/
-
- /* Numpad layer */
- [_NUMPAD] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \
- _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \
- _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \
- _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \
- _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
- ),
-
- /* Macro layer */
- [_MACROS] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \
- _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
- ),
-
- /* System layer */
- [_SYSTEM] = LAYOUT_60_ansi(
- // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \
- XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \
- ),
+ /****************
+ ** BASE LAYERS **
+ ****************/
+
+ /* QWERTY */
+ [_QWERTY] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ FW_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
+ ),
+
+ /* Dvorak */
+ [_DVORAK] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
+ FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
+ ),
+
+ /* Colemak */
+ [_COLEMAK] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
+ FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \
+ ),
+
+ /****************
+ ** OS OVERLAYS **
+ ****************/
+
+ /* Mac */
+ [_MAC] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FM), _______ \
+ ),
+
+ /*********************
+ ** QUAKE 2 OVERLAYS **
+ *********************/
+
+ /* Quake 2 */
+ [_QUAKE2] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
+ ),
+
+ [_QUAKE2_DVORAK] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
+ ),
+
+ [_QUAKE2_CONSOLE] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
+ ),
+
+ /********************
+ ** FUNCTION LAYERS **
+ ********************/
+
+ /* Windows Fn layer */
+ [_FUNCWIN] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ 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_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
+ NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \
+ _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \
+ _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \
+ ),
+
+ /* MacOS Fn layer */
+ [_FUNCMAC] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
+ _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \
+ NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \
+ _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \
+ _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
+ ),
+
+ /* Quake 2 Fn layer */
+ [_FUNCQ2] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
+ _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
+ NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \
+ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
+ ),
+
+ /*****************
+ ** OTHER LAYERS **
+ *****************/
+
+ /* Numpad layer */
+ [_NUMPAD] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \
+ _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \
+ _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \
+ _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \
+ _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
+ ),
+
+ /* Macro layer */
+ [_MACROS] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \
+ _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
+ ),
+
+ /* System layer */
+ [_SYSTEM] = LAYOUT_60_ansi(
+ // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+ TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \
+ XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \
+ ),
};
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md
index 59fbfd246..c9db4f8de 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme.md
@@ -1,6 +1,6 @@
# @noroadsleft's KC60 keymap
-### Last updated: February 14, 2019, 3:50 AM UTC-0800
+### Last updated: April 7, 2019, 2:26 AM UTC-0700
![](https://i.imgur.com/tzhXQYI.jpg)
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
index ebcb3cca8..b9dc556e4 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md
@@ -16,7 +16,7 @@
These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method.
-I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L383), is a [macro](./keymap.c#L165-172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching.
+I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L404), is a [macro](./keymap.c#L165-L172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching.
When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers.
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md
index e5ee7cbde..a65b3acbe 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md
@@ -60,7 +60,7 @@ Output: `git commit -m ""` <kbd>Left</kbd>
Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer.
-#### [G_BRCH](./keymap.c#L148-158)
+#### [G_BRCH](./keymap.c#L148-L158)
| Condition | Output |
| :-------- | :----- |
@@ -93,7 +93,7 @@ An Undo shortcut that turns to Redo if <kbd>Shift</kbd> is being held. I'm not s
The program I use this in uses <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Option</kbd> + <kbd>V</kbd> to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using <kbd>Shift</kbd> changes the behavior.
-#### [NUBS_Z](./keymap.c#L220-L228)
+#### [NUBS_Z](./keymap.c#L220-L234)
| Condition | Output |
| :-------- | :----- |
@@ -102,11 +102,15 @@ The program I use this in uses <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Opti
Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z.
-#### [VRSN](./keymap.c#L229-L233)
+#### [VRSN](./keymap.c#L235-L239)
Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
- kc60/noroadsleft @ 0.6.240-20-ge91549-dirty
+ kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty
+
+#### [Emulated Numeric Keypad](./keymap.c#L240-L254)
+
+If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °.
----
diff --git a/keyboards/kc60/keymaps/stanleylai/readme.md b/keyboards/kc60/keymaps/stanleylai/readme.md
index 815649d98..6f5953ded 100644
--- a/keyboards/kc60/keymaps/stanleylai/readme.md
+++ b/keyboards/kc60/keymaps/stanleylai/readme.md
@@ -1,8 +1,6 @@
Stanley Lai's Split Right Shift with Dedicated Arrow Keys
======================
-![Image of KC60 with RGB Underglow](../ws2812/ws2812_example.jpg)
-
## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme.md](/readme.md).
@@ -20,7 +18,7 @@ For the full Quantum feature list, see [the parent readme.md](/readme.md).
![RGB Layer](http://imgur.com/ZWIfuPM)
## WS2812 Support
-By default, it is now setup for 16 LEDs on the PF5 breakout pin. See [included image](../ws2812/ws2812_wiring.jpg) for wiring reference.
+By default, it is now setup for 16 LEDs on the PF5 breakout pin.
### Build
To build this keymap, simply run `make KEYMAP=stanleylai`.
diff --git a/keyboards/kc60/readme.md b/keyboards/kc60/readme.md
index da84f6159..e152824cc 100644
--- a/keyboards/kc60/readme.md
+++ b/keyboards/kc60/readme.md
@@ -24,7 +24,6 @@ $ make [default|jack|<name>]
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
## WS2812 Support
-![Image of KC60 with RGB Underglow](keymaps/ws2812/ws2812_example.jpg)
Build with WS2812 Support by running `make ws2812`.
diff --git a/keyboards/kc60se/keymaps/default/config.h b/keyboards/kc60se/keymaps/default/config.h
index 0f7563505..4496c5910 100644
--- a/keyboards/kc60se/keymaps/default/config.h
+++ b/keyboards/kc60se/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h
new file mode 100644
index 000000000..67c64fd8e
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h
@@ -0,0 +1,37 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+(Modified) Copyright 2019 AbstractKB
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+//my block------------
+#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_SLEEP
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c
new file mode 100644
index 000000000..a8348ecfb
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c
@@ -0,0 +1,92 @@
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _BASE,
+ _LIST
+};
+
+enum my_keycodes {
+ MYRGB_TG = SAFE_RANGE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_BASE] = LAYOUT( \
+ KC_MPLY, KC_PSLS, KC_PAST, 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, MYRGB_TG, KC_PGUP, \
+ KC_MUTE, KC_PPLS, KC_PMNS, 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_DEL, KC_PGDN, \
+ KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \
+ KC_P4, KC_P5, KC_P6, KC_BSPACE, 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_CAPS, KC_PSCR, \
+ KC_P1, KC_P2, KC_P3, 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, XXXXXXX, KC_INS, \
+ KC_P0, KC_PDOT, KC_PENT, TO(_LIST), KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \
+),
+
+[_LIST] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
+
+bool rgbinit = true;
+bool rgbon = true;
+
+const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one
+
+void matrix_post_init_user(void) {
+ rgblight_enable_noeeprom();
+ led_set_user(host_keyboard_leds());
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+ switch (biton32(state)) {
+ case _LIST:
+ rgblight_sethsv_noeeprom(0,255,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
+ break;
+ default: //_BASE
+ rgblight_sethsv_noeeprom(0,0,255);
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ break;
+ }
+
+ return state;
+}
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_ALTERNATING);
+ } else {
+ layer_state_set_user(layer_state);
+ }
+}
+
+void myrgb_toggle(void) {
+ if (rgbon) {
+ rgblight_disable_noeeprom();
+ rgbon = false;
+ } else {
+ rgblight_enable_noeeprom();
+ layer_state_set_user(layer_state);
+ led_set_user(host_keyboard_leds());
+ rgbon = true;
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case MYRGB_TG:
+ if (record->event.pressed) {
+ myrgb_toggle();
+ }
+ return false;
+ default:
+ return true;
+ }
+}
+
+
+
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md
new file mode 100644
index 000000000..3ba56571f
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md
@@ -0,0 +1,5 @@
+# My personal layout for the BFO-9000
+
+It is an approximation of a 96% layout with a left-hand number pad
+Other things I changed were swapping around delete, backspace, and capslock
+It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file
diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk
new file mode 100644
index 000000000..7ad666d1a
--- /dev/null
+++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk
@@ -0,0 +1 @@
+RGBLIGHT_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/keebio/chocopad/keymaps/default/config.h b/keyboards/keebio/chocopad/keymaps/default/config.h
index 7fa3bf328..271f48d00 100644
--- a/keyboards/keebio/chocopad/keymaps/default/config.h
+++ b/keyboards/keebio/chocopad/keymaps/default/config.h
@@ -1,6 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
-
-#endif
+// place overrides here
diff --git a/keyboards/keebio/iris/keymaps/davidrambo/config.h b/keyboards/keebio/iris/keymaps/davidrambo/config.h
index 2cdff4213..0c4bf8c8f 100644
--- a/keyboards/keebio/iris/keymaps/davidrambo/config.h
+++ b/keyboards/keebio/iris/keymaps/davidrambo/config.h
@@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
/* Use I2C or Serial, not both */
@@ -39,6 +36,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_VAL_STEP 8
*/
#define TAPPING_TERM 200
-#include "../../config.h"
-#endif
+
diff --git a/keyboards/keebio/iris/keymaps/davidrambo/keymap.c b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c
index 40f0d0145..4d76d745d 100644
--- a/keyboards/keebio/iris/keymaps/davidrambo/keymap.c
+++ b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c
@@ -1,6 +1,4 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -85,13 +83,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_GAME] = LAYOUT_kc(
___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
- ___ , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ ,
+ B , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ ,
TAB , LSFT, A , S , D , F , ___ , ___ , ___ , ___ , ___ , ___ ,
- I , LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ ,
+ LALT, LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ ,
- LALT , LALT , SPC, BSPC, MAC, ___
+ G , I , SPC, BSPC, MAC, ___
),
[_SYMBOL] = LAYOUT_kc(
diff --git a/keyboards/keebio/iris/keymaps/davidrambo/readme.md b/keyboards/keebio/iris/keymaps/davidrambo/readme.md
index 4d21f37c0..181ff97f3 100644
--- a/keyboards/keebio/iris/keymaps/davidrambo/readme.md
+++ b/keyboards/keebio/iris/keymaps/davidrambo/readme.md
@@ -1,3 +1,5 @@
-# Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer.
-# Symbol layer is based on my Planck layout, so it provides numbers, symbols, and volume controls.
-# Two Navigation layers, for Mac and Windows Colemak layers respectively. \ No newline at end of file
+# Iris
+
+This is a simple Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer.
+The Symbol layer is based on my Planck layout. It provides numbers, symbols, and volume controls.
+There are two Navigation layers, for the Mac and Windows Colemak layers respectively. \ No newline at end of file
diff --git a/keyboards/keebio/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/default/config.h
index 7986b5041..01bb31a6e 100644
--- a/keyboards/keebio/iris/keymaps/default/config.h
+++ b/keyboards/keebio/iris/keymaps/default/config.h
@@ -17,16 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
+#define EE_HANDS
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c
index 4644c3d9b..f0e4d6f15 100644
--- a/keyboards/keebio/iris/keymaps/default/keymap.c
+++ b/keyboards/keebio/iris/keymaps/default/keymap.c
@@ -5,7 +5,7 @@ extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
-#define _ADJUST 16
+#define _ADJUST 3
enum custom_keycodes {
QWERTY = SAFE_RANGE,
@@ -20,25 +20,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
- KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT
+ KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_RALT
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
),
[_LOWER] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PGUP,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGDN,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE,
+ KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_HOME,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______,
+ BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_END,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
_______, _______, KC_DEL, KC_DEL, _______, KC_P0
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
RGB_TOG, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
- RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_BSLS,
+ RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, _______,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_LPRN, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______,
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
diff --git a/keyboards/keebio/iris/keymaps/moonfall/config.h b/keyboards/keebio/iris/keymaps/moonfall/config.h
new file mode 100644
index 000000000..7986b5041
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/moonfall/config.h
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 Danny Nguyen <danny@keeb.io>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/iris/keymaps/moonfall/keymap.c b/keyboards/keebio/iris/keymaps/moonfall/keymap.c
new file mode 100644
index 000000000..0b6cde45e
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/moonfall/keymap.c
@@ -0,0 +1,114 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 3
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ ADJUST,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
+ LOWER, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_LCTL
+ // └────────┴────────┴────────┘ └────────┴────────┴────────┘
+ ),
+
+ [_LOWER] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ KC_EQL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, _______, KC_UP, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_TILD, _______, _______,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_UP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, KC_GRV,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, KC_GRV, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______,
+ //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
+ _______, _______, KC_END, KC_PGDN, _______, _______
+ // └────────┴────────┴────────┘ └────────┴────────┴────────┘
+ ),
+
+ [_RAISE] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ KC_EQL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, _______, KC_UP, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_TILD, _______, _______,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_UP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, KC_GRV,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, KC_GRV, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______,
+ //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
+ _______, _______, KC_END, KC_PGDN, _______, _______
+ // └────────┴────────┴────────┘ └────────┴────────┴────────┘
+ ),
+
+ [_ADJUST] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
+ _______, _______, _______, _______, _______, _______
+ // └────────┴────────┴────────┘ └────────┴────────┴────────┘
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/keebio/iris/keymaps/moonfall/rules.mk b/keyboards/keebio/iris/keymaps/moonfall/rules.mk
new file mode 100644
index 000000000..db925dd2b
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/moonfall/rules.mk
@@ -0,0 +1,2 @@
+RGBLIGHT_ENABLE = yes
+BACKLIGHT_ENABLE = no
diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h
index 70e5d6e2a..ff0d28c73 100644
--- a/keyboards/keebio/iris/rev3/config.h
+++ b/keyboards/keebio/iris/rev3/config.h
@@ -71,6 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* ws2812 RGB LED */
#define RGB_DI_PIN F7
#define RGBLED_NUM 12 // Number of LEDs
+#define RGBLED_SPLIT { 6, 6 }
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
diff --git a/keyboards/keebio/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h
index 18b40ecec..3c7822def 100644
--- a/keyboards/keebio/nyquist/rev3/config.h
+++ b/keyboards/keebio/nyquist/rev3/config.h
@@ -56,6 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN B4
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
+#define RGBLED_SPLIT { 6, 6 }
/* Backlight LEDs */
#define BACKLIGHT_PIN B5
diff --git a/keyboards/keebio/quefrency/info.json b/keyboards/keebio/quefrency/info.json
index 160e7896b..1b50ccbe5 100644
--- a/keyboards/keebio/quefrency/info.json
+++ b/keyboards/keebio/quefrency/info.json
@@ -169,6 +169,201 @@
{"label":"Down", "x":15, "y":4},
{"label":"Right", "x":16, "y":4}
]
+ },
+ "LAYOUT_60_with_macro": {
+ "layout": [
+ {"label":"F1", "x":0, "y":0},
+ {"label":"F6", "x":1, "y":0},
+
+ {"label":"Esc", "x":2.25, "y":0},
+ {"label":"1", "x":3.25, "y":0},
+ {"label":"2", "x":4.25, "y":0},
+ {"label":"3", "x":5.25, "y":0},
+ {"label":"4", "x":6.25, "y":0},
+ {"label":"5", "x":7.25, "y":0},
+ {"label":"6", "x":8.25, "y":0},
+
+ {"label":"7", "x":10.25, "y":0},
+ {"label":"8", "x":11.25, "y":0},
+ {"label":"9", "x":12.25, "y":0},
+ {"label":"0", "x":13.25, "y":0},
+ {"label":"-", "x":14.25, "y":0},
+ {"label":"=", "x":15.25, "y":0},
+ {"label":"Del", "x":16.25, "y":0},
+ {"label":"Bksp", "x":17.25, "y":0},
+
+ {"label":"F2", "x":0, "y":1},
+ {"label":"F7", "x":1, "y":1},
+
+ {"label":"Tab", "x":2.25, "y":1, "w":1.5},
+ {"label":"Q", "x":3.75, "y":1},
+ {"label":"W", "x":4.75, "y":1},
+ {"label":"E", "x":5.75, "y":1},
+ {"label":"R", "x":6.75, "y":1},
+ {"label":"T", "x":7.75, "y":1},
+
+ {"label":"Y", "x":9.75, "y":1},
+ {"label":"U", "x":10.75, "y":1},
+ {"label":"I", "x":11.75, "y":1},
+ {"label":"O", "x":12.75, "y":1},
+ {"label":"P", "x":13.75, "y":1},
+ {"label":"{", "x":14.75, "y":1},
+ {"label":"}", "x":15.75, "y":1},
+ {"label":"Backslash", "x":16.75, "y":1, "w":1.5},
+
+ {"label":"F3", "x":0, "y":2},
+ {"label":"F8", "x":1, "y":2},
+
+ {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75},
+ {"label":"A", "x":4, "y":2},
+ {"label":"S", "x":5, "y":2},
+ {"label":"D", "x":6, "y":2},
+ {"label":"F", "x":7, "y":2},
+ {"label":"G", "x":8, "y":2},
+
+ {"label":"H", "x":10, "y":2},
+ {"label":"J", "x":11, "y":2},
+ {"label":"K", "x":12, "y":2},
+ {"label":"L", "x":13, "y":2},
+ {"label":":", "x":14, "y":2},
+ {"label":"\"", "x":15, "y":2},
+ {"label":"Enter", "x":16, "y":2, "w":2.25},
+
+ {"label":"F4", "x":0, "y":3},
+ {"label":"F9", "x":1, "y":3},
+
+ {"label":"Shift", "x":2.25, "y":3, "w":2.25},
+ {"label":"Z", "x":4.5, "y":3},
+ {"label":"X", "x":5.5, "y":3},
+ {"label":"C", "x":6.5, "y":3},
+ {"label":"V", "x":7.5, "y":3},
+ {"label":"B", "x":8.5, "y":3},
+
+ {"label":"N", "x":10.5, "y":3},
+ {"label":"M", "x":11.5, "y":3},
+ {"label":",", "x":12.5, "y":3},
+ {"label":".", "x":13.5, "y":3},
+ {"label":"/", "x":14.5, "y":3},
+ {"label":"Shift", "x":15.5, "y":3, "w":1.75},
+ {"label":"Fn", "x":17.25, "y":3},
+
+ {"label":"F5", "x":0, "y":4},
+ {"label":"F10", "x":1, "y":4},
+
+ {"label":"Ctrl", "x":2.25, "y":4, "w":1.25},
+ {"label":"Win", "x":3.5, "y":4, "w":1.25},
+ {"label":"Alt", "x":4.75, "y":4, "w":1.25},
+ {"label":"Fn", "x":6, "y":4, "w":1.25},
+ {"label":"Space", "x":7.25, "y":4, "w":2.25},
+
+ {"label":"Fn", "x":10.5, "y":4, "w":1.25},
+ {"label":"Space", "x":11.75, "y":4, "w":1.5},
+ {"label":"Alt", "x":13.25, "y":4},
+ {"label":"Ctrl", "x":14.25, "y":4},
+ {"label":"Left", "x":15.25, "y":4},
+ {"label":"Down", "x":16.25, "y":4},
+ {"label":"Right", "x":17.25, "y":4}
+ ]
+ },
+ "LAYOUT_65_with_macro": {
+ "layout": [
+ {"label":"F1", "x":0, "y":0},
+ {"label":"F6", "x":1, "y":0},
+
+ {"label":"Esc", "x":2.25, "y":0},
+ {"label":"1", "x":3.25, "y":0},
+ {"label":"2", "x":4.25, "y":0},
+ {"label":"3", "x":5.25, "y":0},
+ {"label":"4", "x":6.25, "y":0},
+ {"label":"5", "x":7.25, "y":0},
+ {"label":"6", "x":8.25, "y":0},
+
+ {"label":"7", "x":10.25, "y":0},
+ {"label":"8", "x":11.25, "y":0},
+ {"label":"9", "x":12.25, "y":0},
+ {"label":"0", "x":13.25, "y":0},
+ {"label":"-", "x":14.25, "y":0},
+ {"label":"=", "x":15.25, "y":0},
+ {"label":"=", "x":16.25, "y":0},
+ {"label":"Bksp", "x":17.25, "y":0},
+ {"label":"Home", "x":18.25, "y":0},
+
+ {"label":"F2", "x":0, "y":1},
+ {"label":"F7", "x":1, "y":1},
+
+ {"label":"Tab", "x":2.25, "y":1, "w":1.5},
+ {"label":"Q", "x":3.75, "y":1},
+ {"label":"W", "x":4.75, "y":1},
+ {"label":"E", "x":5.75, "y":1},
+ {"label":"R", "x":6.75, "y":1},
+ {"label":"T", "x":7.75, "y":1},
+
+ {"label":"Y", "x":9.75, "y":1},
+ {"label":"U", "x":10.75, "y":1},
+ {"label":"I", "x":11.75, "y":1},
+ {"label":"O", "x":12.75, "y":1},
+ {"label":"P", "x":13.75, "y":1},
+ {"label":"{", "x":14.75, "y":1},
+ {"label":"}", "x":15.75, "y":1},
+ {"label":"|", "x":16.75, "y":1, "w":1.5},
+ {"label":"PgUp", "x":18.25, "y":1},
+
+ {"label":"F3", "x":0, "y":2},
+ {"label":"F8", "x":1, "y":2},
+
+ {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75},
+ {"label":"A", "x":4, "y":2},
+ {"label":"S", "x":5, "y":2},
+ {"label":"D", "x":6, "y":2},
+ {"label":"F", "x":7, "y":2},
+ {"label":"G", "x":8, "y":2},
+
+ {"label":"H", "x":10, "y":2},
+ {"label":"J", "x":11, "y":2},
+ {"label":"K", "x":12, "y":2},
+ {"label":"L", "x":13, "y":2},
+ {"label":":", "x":14, "y":2},
+ {"label":"\"", "x":15, "y":2},
+ {"label":"Enter", "x":16, "y":2, "w":2.25},
+ {"label":"PgDn", "x":18.25, "y":2},
+
+ {"label":"F4", "x":0, "y":3},
+ {"label":"F9", "x":1, "y":3},
+
+ {"label":"Shift", "x":2.25, "y":3, "w":2.25},
+ {"label":"Z", "x":4.5, "y":3},
+ {"label":"X", "x":5.5, "y":3},
+ {"label":"C", "x":6.5, "y":3},
+ {"label":"V", "x":7.5, "y":3},
+ {"label":"B", "x":8.5, "y":3},
+
+ {"label":"N", "x":10.5, "y":3},
+ {"label":"M", "x":11.5, "y":3},
+ {"label":",", "x":12.5, "y":3},
+ {"label":".", "x":13.5, "y":3},
+ {"label":"/", "x":14.5, "y":3},
+ {"label":"Shift", "x":15.5, "y":3, "w":1.75},
+ {"label":"Up", "x":17.25, "y":3},
+ {"label":"End", "x":18.25, "y":3},
+
+ {"label":"F5", "x":0, "y":4},
+ {"label":"F10", "x":1, "y":4},
+
+ {"label":"Ctrl", "x":2.25, "y":4, "w":1.25},
+ {"label":"Win", "x":3.5, "y":4, "w":1.25},
+ {"label":"Alt", "x":4.75, "y":4, "w":1.25},
+ {"label":"Fn", "x":6, "y":4, "w":1.25},
+ {"label":"Space", "x":7.25, "y":4, "w":2.25},
+
+ {"label":"Fn", "x":10.5, "y":4, "w":1.25},
+ {"label":"Space", "x":11.75, "y":4, "w":1.5},
+ {"label":"Alt", "x":13.25, "y":4},
+ {"label":"Ctrl", "x":14.25, "y":4},
+ {"label":"Win", "x":15.25, "y":4},
+ {"label":"Left", "x":16.25, "y":4},
+ {"label":"Down", "x":17.25, "y":4},
+ {"label":"Right", "x":18.25, "y":4}
+ ]
+ }
}
- }
}
diff --git a/keyboards/kinesis/keymaps/default/config.h b/keyboards/kinesis/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/kinesis/keymaps/default/config.h
+++ b/keyboards/kinesis/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/kira75/keymaps/default/config.h b/keyboards/kira75/keymaps/default/config.h
index 2c852d181..a3ed4f762 100644
--- a/keyboards/kira75/keymaps/default/config.h
+++ b/keyboards/kira75/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/kmac/keymaps/default/config.h b/keyboards/kmac/keymaps/default/config.h
index a3828f7d5..09b8f1bc7 100644
--- a/keyboards/kmac/keymaps/default/config.h
+++ b/keyboards/kmac/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md
index ec36c0a5c..cd181a5f6 100644
--- a/keyboards/kmac/readme.md
+++ b/keyboards/kmac/readme.md
@@ -20,7 +20,7 @@ For the full Quantum feature list, see the [documentation](https://docs.qmk.fm).
The KMAC are available with two different PCB layouts, a winkey version and a winkeyless version. A default keymap are provided for each versions of the PCB.
-Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/kmac](/keyboards/kmac) folder.
+Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [qmk root](https://github.com/qmk/qmk_firmware/) folder.
### Winkey keymap
diff --git a/keyboards/knops/mini/keymaps/default/config.h b/keyboards/knops/mini/keymaps/default/config.h
index 999d8876c..6775ba671 100644
--- a/keyboards/knops/mini/keymaps/default/config.h
+++ b/keyboards/knops/mini/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/knops/readme.md b/keyboards/knops/readme.md
index 563099b6d..115e4d7c6 100644
--- a/keyboards/knops/readme.md
+++ b/keyboards/knops/readme.md
@@ -7,4 +7,4 @@
* Maintainer: [Pawnerd](https://github.com/pawnerd)
* Hardware Supported:
* [`Mini`](mini/): Knops Mini
-* Hardware Availability: [knops.io](https://www.knops.io/) \ No newline at end of file
+* Hardware Availability: [knops.io](http://www.knops.io/) \ No newline at end of file
diff --git a/keyboards/kona_classic/keymaps/default/config.h b/keyboards/kona_classic/keymaps/default/config.h
index a3828f7d5..09b8f1bc7 100644
--- a/keyboards/kona_classic/keymaps/default/config.h
+++ b/keyboards/kona_classic/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c
index da2ff292a..c793349a5 100644
--- a/keyboards/launchpad/keymaps/default/keymap.c
+++ b/keyboards/launchpad/keymaps/default/keymap.c
@@ -1,7 +1,5 @@
// Below layout is based upon /u/That-Canadian's planck layout
-#include "launchpad.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -21,9 +19,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-------------.
- * | 1 | 2 |
+ * | 1 | 2 |
* |------+------|
- * | 3 | 4 |
+ * | 3 | 4 |
* |------+------|
* | 5 | 6 |
* |------+------|
@@ -39,9 +37,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Function
* ,-------------.
- * | Q |CALDEL|
+ * | Q |CALDEL|
* |------+------|
- * | A |TSKMGR|
+ * | A |TSKMGR|
* |------+------|
* | Z | X |
* |------+------|
@@ -58,5 +56,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void matrix_init_user(void) {
-
+
}
diff --git a/keyboards/launchpad/keymaps/default_rgb/config.h b/keyboards/launchpad/keymaps/default_rgb/config.h
new file mode 100644
index 000000000..cae1450c1
--- /dev/null
+++ b/keyboards/launchpad/keymaps/default_rgb/config.h
@@ -0,0 +1,9 @@
+#pragma once
+
+/* Underlight Configuration */
+#define RGB_DI_PIN F4
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 2 // Number of LEDs
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+#define RGBLIGHT_VAL_STEP 17 \ No newline at end of file
diff --git a/keyboards/launchpad/keymaps/default_rgb/keymap.c b/keyboards/launchpad/keymaps/default_rgb/keymap.c
new file mode 100644
index 000000000..50fef532c
--- /dev/null
+++ b/keyboards/launchpad/keymaps/default_rgb/keymap.c
@@ -0,0 +1,76 @@
+// Below layout is based upon /u/That-Canadian's planck layout
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _RGB 1
+#define _FUNC 15
+
+// Defines for task manager and such
+#define CALTDEL LCTL(LALT(KC_DEL))
+#define TSKMGR LCTL(LSFT(KC_ESC))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Qwerty
+ * ,-------------.
+ * | 1 | 2 |
+ * |------+------|
+ * | 3 | 4 |
+ * |------+------|
+ * | 5 | 6 |
+ * |------+------|
+ * | FUNC | RGB |
+ * `-------------'
+ */
+ [_QWERTY] = LAYOUT( \
+ KC_1, KC_2, \
+ KC_3, KC_4, \
+ KC_5, KC_6, \
+ MO(_FUNC), TG(_RGB) \
+ ),
+
+ /* RGB
+ * ,-------------.
+ * | Mode-| Mode+|
+ * |------+------|
+ * | HUE- | HUE+ |
+ * |------+------|
+ * | SAT- | SAT+ |
+ * |------+------|
+ * |RGBTOG| |
+ * `-------------'
+ */
+ [_RGB] = LAYOUT( \
+ RGB_RMOD, RGB_MOD, \
+ RGB_HUD, RGB_HUI, \
+ RGB_SAD, RGB_SAI, \
+ RGB_TOG, KC_TRNS \
+ ),
+
+ /* Function
+ * ,-------------.
+ * | Q |CALDEL|
+ * |------+------|
+ * | A |TSKMGR|
+ * |------+------|
+ * | Z | X |
+ * |------+------|
+ * | | C |
+ * `-------------'
+ */
+ [_FUNC] = LAYOUT( \
+ KC_Q, CALTDEL, \
+ KC_A, TSKMGR, \
+ KC_Z, KC_X, \
+ _______, KC_C \
+ )
+
+};
+
+void matrix_init_user(void) {}
diff --git a/keyboards/launchpad/keymaps/default_rgb/readme.md b/keyboards/launchpad/keymaps/default_rgb/readme.md
new file mode 100644
index 000000000..3f15ff9bc
--- /dev/null
+++ b/keyboards/launchpad/keymaps/default_rgb/readme.md
@@ -0,0 +1,41 @@
+# Launch Pad
+
+![Launch Pad](https://i.imgur.com/WVTe0Ku.png)
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+A budget-minded, 4-8 key macro-pad with built in legs, plate & case.
+
+Supports MX & Alps switches. 2x 1u or 1x 2u supported for each row.
+
+Supports 2u PCB-Mount stabilizers.
+
+Runs off of 1x Pro Micro & 8x diodes (1n4148).
+
+Optional "Reset" switch can be used on the PCB.
+
+A fantastic project for beginners to learn to solder, veteran's of the hobby who want to add an easy macro-pad to their collection, and everyone in between.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+Make example for this keyboard (after setting up your build environment):
+
+ make launchpad/rev1:default
+
+See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
+
+# Under Glow
+
+![Underglow](https://i.imgur.com/3zFIOmu.jpg)
+
+SpaceCat now provides an underglow add-on kit. Please refer to the picture above for wiring.
+
+Make example for this keyboard (after setting up your build environment):
+
+ make launchpad/rev1:default_rgb
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+Due to PCB tolerance issues outside of our control, the snap-apart legs included on the PCB may need extra padding to prevent a small amount of wobbling once placed properly. We have included small, clear, and semi-permanent "glue dots" in each order (PCB Only -and- Full Kit) to help with this. You may also use plastic wrap, tape, Elmer's glue, hot glue, rubber cement, etc. We advise against using anything more "permanent" in case you wish to make changes to your Launch Pad in the future. It is also best to attach legs after all of your soldering and building is finished, to get the most accurate feel for your Launch Pad.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
diff --git a/keyboards/launchpad/keymaps/default_rgb/rules.mk b/keyboards/launchpad/keymaps/default_rgb/rules.mk
new file mode 100644
index 000000000..164232f33
--- /dev/null
+++ b/keyboards/launchpad/keymaps/default_rgb/rules.mk
@@ -0,0 +1 @@
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file
diff --git a/keyboards/lazydesigners/the60/config.h b/keyboards/lazydesigners/the60/config.h
new file mode 100644
index 000000000..a767d1dc8
--- /dev/null
+++ b/keyboards/lazydesigners/the60/config.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER LazyDesigners
+#define PRODUCT THE60
+#define DESCRIPTION A 60% keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
+#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B6
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 6
+#endif
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/lazydesigners/the60/info.json b/keyboards/lazydesigners/the60/info.json
new file mode 100644
index 000000000..4fef5a098
--- /dev/null
+++ b/keyboards/lazydesigners/the60/info.json
@@ -0,0 +1,79 @@
+{
+ "keyboard_name": "THE60",
+ "url": "http://lazydesigners.cn",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_split_spc_split_bspc": {
+ "key_count": 66,
+ "layout": [
+ {"label":"~", "x":0, "y":0},
+ {"label":"!", "x":1, "y":0},
+ {"label":"@", "x":2, "y":0},
+ {"label":"#", "x":3, "y":0},
+ {"label":"$", "x":4, "y":0},
+ {"label":"%", "x":5, "y":0},
+ {"label":"^", "x":6, "y":0},
+ {"label":"&", "x":7, "y":0},
+ {"label":"*", "x":8, "y":0},
+ {"label":"(", "x":9, "y":0},
+ {"label":")", "x":10, "y":0},
+ {"label":"_", "x":11, "y":0},
+ {"label":"+", "x":12, "y":0},
+ {"label":"Home", "x":13, "y":0},
+ {"label":"Del", "x":14, "y":0},
+ {"label":"Tab", "x":0, "y":1, "w":1.5},
+ {"label":"Q", "x":1.5, "y":1},
+ {"label":"W", "x":2.5, "y":1},
+ {"label":"E", "x":3.5, "y":1},
+ {"label":"R", "x":4.5, "y":1},
+ {"label":"T", "x":5.5, "y":1},
+ {"label":"Y", "x":6.5, "y":1},
+ {"label":"U", "x":7.5, "y":1},
+ {"label":"I", "x":8.5, "y":1},
+ {"label":"O", "x":9.5, "y":1},
+ {"label":"P", "x":10.5, "y":1},
+ {"label":"|", "x":11.5, "y":1, "w":1.5},
+ {"label":"}", "x":13, "y":1},
+ {"label":"{", "x":14, "y":1},
+ {"label":"Caps Lock", "x":0, "y":2, "w":1.75},
+ {"label":"A", "x":1.75, "y":2},
+ {"label":"S", "x":2.75, "y":2},
+ {"label":"D", "x":3.75, "y":2},
+ {"label":"F", "x":4.75, "y":2},
+ {"label":"G", "x":5.75, "y":2},
+ {"label":"H", "x":6.75, "y":2},
+ {"label":"J", "x":7.75, "y":2},
+ {"label":"K", "x":8.75, "y":2},
+ {"label":"L", "x":9.75, "y":2},
+ {"label":"Enter", "x":10.75, "y":2, "w":2.25},
+ {"label":":", "x":13, "y":2},
+ {"label":"\"", "x":14, "y":2},
+ {"label":"Shift", "x":0, "y":3, "w":2.25},
+ {"label":"Z", "x":2.25, "y":3},
+ {"label":"X", "x":3.25, "y":3},
+ {"label":"C", "x":4.25, "y":3},
+ {"label":"V", "x":5.25, "y":3},
+ {"label":"B", "x":6.25, "y":3},
+ {"label":"N", "x":7.25, "y":3},
+ {"label":"M", "x":8.25, "y":3},
+ {"label":"<", "x":9.25, "y":3},
+ {"label":">", "x":10.25, "y":3},
+ {"label":"Shift", "x":11.25, "y":3, "w":1.75},
+ {"label":"Up", "x":13, "y":3},
+ {"label":"/", "x":14, "y":3},
+ {"label":"Ctrl", "x":0, "y":4, "w":1.25},
+ {"label":"Win", "x":1.25, "y":4, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":4, "w":1.25},
+ {"x":3.75, "y":4, "w":2.25},
+ {"x":6, "y":4, "w":2.75},
+ {"label":"Alt", "x":8.75, "y":4, "w":1.25},
+ {"label":"Menu", "x":10, "y":4},
+ {"label":"Fn", "x":11, "y":4},
+ {"label":"Left", "x":12, "y":4},
+ {"label":"Down", "x":13, "y":4},
+ {"label":"Right", "x":14, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/lazydesigners/the60/keymaps/default/keymap.c b/keyboards/lazydesigners/the60/keymaps/default/keymap.c
new file mode 100644
index 000000000..8a95b4474
--- /dev/null
+++ b/keyboards/lazydesigners/the60/keymaps/default/keymap.c
@@ -0,0 +1,54 @@
+#include QMK_KEYBOARD_H
+
+enum custom_layers {
+ _QWERTY,
+ _FN
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,--------------------------------------------------------------------------.
+ * |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del |
+ * |--------------------------------------------------------------------------|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] |
+ * |--------------------------------------------------------------------------|
+ * |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' |
+ * |--------------------------------------------------------------------------|
+ * | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / |
+ * |--------------------------------------------------------------------------|
+ * | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght|
+ * `--------------------------------------------------------------------------'
+ */
+
+[_QWERTY] = LAYOUT_split_spc_split_bspc(
+KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_HOME, KC_DEL,
+KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_LBRC, KC_RBRC,
+KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_SCLN, KC_QUOT,
+KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH,
+KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
+),
+
+/* FN
+ * ,--------------------------------------------------------------------------.
+ * |RST | | | | | | | | | | | | |End |Ins |
+ * |--------------------------------------------------------------------------|
+ * | | | | | | | | | | | | |PgUp|PgDn|
+ * |--------------------------------------------------------------------------|
+ * | | |Prev|Play|Next| |VolD|Mute|VolU| | | | |
+ * |--------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | |
+ * |--------------------------------------------------------------------------|
+ * |EEPRST| | | | | | | | | | |
+ * `--------------------------------------------------------------------------'
+ */
+
+[_FN] = LAYOUT_split_spc_split_bspc(
+RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_INS,
+XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN,
+XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+)
+};
+
diff --git a/keyboards/lazydesigners/the60/keymaps/default/readme.md b/keyboards/lazydesigners/the60/keymaps/default/readme.md
new file mode 100644
index 000000000..7a5a10a34
--- /dev/null
+++ b/keyboards/lazydesigners/the60/keymaps/default/readme.md
@@ -0,0 +1,32 @@
+# Default keymap for THE60
+
+
+## QWERTY (Normal) Layer
+```
+ ,--------------------------------------------------------------------------.
+ |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del |
+ |--------------------------------------------------------------------------|
+ | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] |
+ |--------------------------------------------------------------------------|
+ |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' |
+ |--------------------------------------------------------------------------|
+ | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / |
+ |--------------------------------------------------------------------------|
+ | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght|
+ `--------------------------------------------------------------------------'
+```
+
+## FN layer
+```
+ ,--------------------------------------------------------------------------.
+ |RST | | | | | | | | | | | | |End |Ins |
+ |--------------------------------------------------------------------------|
+ | | | | | | | | | | | | |PgUp|PgDn|
+ |--------------------------------------------------------------------------|
+ | | |Prev|Play|Next| |VolD|Mute|VolU| | | | |
+ |--------------------------------------------------------------------------|
+ | | | | | | | | | | | | | |
+ |--------------------------------------------------------------------------|
+ |EEPRST| | | | | | | | | | |
+ `--------------------------------------------------------------------------'
+```
diff --git a/keyboards/lazydesigners/the60/readme.md b/keyboards/lazydesigners/the60/readme.md
new file mode 100644
index 000000000..bf7cc771a
--- /dev/null
+++ b/keyboards/lazydesigners/the60/readme.md
@@ -0,0 +1,18 @@
+# THE60
+
+![THE60](https://cdn.discordapp.com/attachments/536190211240099840/549506683064287243/image0.jpg)
+
+A 60% custom PCB and case designed and produced by [LazyDesigners](http://lazydesigners.cn).
+The PCB allows one to test a 40% layout in a 60% case.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: THE60 PCB
+Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make lazydesigners/the60:default:dfu
+
+To enter the bootloader, either short the pins on the PCB, use the RESET button on the FN layer or hold the Esc key while plugging in your keyboard.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/lazydesigners/the60/rules.mk b/keyboards/lazydesigners/the60/rules.mk
new file mode 100644
index 000000000..76fb44b2c
--- /dev/null
+++ b/keyboards/lazydesigners/the60/rules.mk
@@ -0,0 +1,51 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
diff --git a/keyboards/lazydesigners/the60/the60.c b/keyboards/lazydesigners/the60/the60.c
new file mode 100644
index 000000000..09eeb63cf
--- /dev/null
+++ b/keyboards/lazydesigners/the60/the60.c
@@ -0,0 +1,2 @@
+#include "the60.h"
+
diff --git a/keyboards/lazydesigners/the60/the60.h b/keyboards/lazydesigners/the60/the60.h
new file mode 100644
index 000000000..e3708461c
--- /dev/null
+++ b/keyboards/lazydesigners/the60/the60.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#include "quantum.h"
+
+/*
+ * ,--------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |--------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | | |
+ * |--------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | |
+ * |--------------------------------------------------------------------------|
+ * | | | | | | | | | | | | | |
+ * |--------------------------------------------------------------------------|
+ * | | | | | | | | | | | |
+ * `--------------------------------------------------------------------------'
+ */
+
+#define LAYOUT_split_spc_split_bspc( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
+ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
+ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
+ K400, K402, K403, K404, K407, K409, K410, K411, K412, K413, K414 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
+ { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
+ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
+ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \
+ { K400, KC_NO, K402, K403, K404, KC_NO, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414 } \
+}
+
diff --git a/keyboards/lets_split/keymaps/piemod/README.md b/keyboards/lets_split/keymaps/piemod/README.md
index f2a051da1..6bae7e76d 100644
--- a/keyboards/lets_split/keymaps/piemod/README.md
+++ b/keyboards/lets_split/keymaps/piemod/README.md
@@ -17,9 +17,6 @@ A keymap for users that need:
Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod.
-### Keymap
-
-![PieMod Keymap](./keymap.png)
### TODO
diff --git a/keyboards/lets_split/keymaps/vim-mode/config.h b/keyboards/lets_split/keymaps/vim-mode/config.h
new file mode 100644
index 000000000..25512a5c9
--- /dev/null
+++ b/keyboards/lets_split/keymaps/vim-mode/config.h
@@ -0,0 +1,39 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+// comment the following lines if sounds are not desired
+#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
diff --git a/keyboards/lets_split/keymaps/vim-mode/keymap.c b/keyboards/lets_split/keymaps/vim-mode/keymap.c
new file mode 100644
index 000000000..4b25aa5dc
--- /dev/null
+++ b/keyboards/lets_split/keymaps/vim-mode/keymap.c
@@ -0,0 +1,196 @@
+#include QMK_KEYBOARD_H
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_names {
+ _QWERTY = 0,
+ _COLEMAK = 1,
+ _DVORAK = 2,
+ _LOWER = 3,
+ _RAISE = 4,
+ _ADJUST = 16
+};
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ LOWER,
+ RAISE,
+ ADJUST,
+};
+
+// Fillers to make layering more clear
+
+// keys in multiple locations:
+// - parenteses in both raise and lower
+// - asterix in raise and twice on lower (normal and numpad)
+// - minus/plus twice on lower (normal and numpad)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_ortho_4x12 ( \
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
+ ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl | A | R | S | T | D | H | N | E | I | O | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_ortho_4x12( \
+ KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
+ KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
+ ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | ' | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Ctrl | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_ortho_4x12( \
+ KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
+ KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
+ ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | | * | ( | ) | | | 7 | 8 | 9 | * | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Del | _ | + | { | } | | | 4 | 5 | 6 | - | \ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | - | = | [ | ] | | | 1 | 2 | 3 | + | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | Alt | | | | 0 | . | Enter| |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_ortho_4x12( \
+ KC_GRAVE,_______, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______, \
+ KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINS, KC_BSLS, \
+ KC_NLCK, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, KC_1, KC_2, KC_3, KC_PLUS, _______, \
+ _______, _______, _______, KC_LALT, _______, _______, _______, _______, KC_0, KC_DOT, KC_ENT, _______ \
+),
+
+/* Raise: featuring vim-style hjkl arrow keys
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | Left | Down | Up |Right | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | F6 | F7 | F8 | F9 | F10 | Home | PgDn | PgUp | End | |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | F11 | F12 | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_ortho_4x12( \
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, KC_PIPE, \
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \
+ _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| |QWERTY|Colemk|Dvorak| | Prev | Pl/Ps| Next | | Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Mute | VolDn| VolUp| | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_ortho_4x12( \
+ _______, RESET, _______, QWERTY, COLEMAK, DVORAK, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_DEL, \
+ _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+)
+
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/lets_split/keymaps/vim-mode/readme.md b/keyboards/lets_split/keymaps/vim-mode/readme.md
new file mode 100644
index 000000000..9bb6131b1
--- /dev/null
+++ b/keyboards/lets_split/keymaps/vim-mode/readme.md
@@ -0,0 +1,22 @@
+# Vim-mode Keymap
+
+This layout is designed with the vim philosophy in mind: You should be able to do your work without lifting your hands off the keyboard. Some movement keys (like the arrow keys) have been directly borrowed from vim, and other keys (like the numpad) have been placed in easy-to-reach areas, following the vim philosophy.
+
+Based on the default keymap.
+
+## Features:
+
+* Vim-like `hjkl` arrow keys in raise layer.
+* Right-hand numpad in lower layer.
+* All brackets and the most frequently used operators are intuitively handled in the lower layer for easy access.
+* Ctrl is just to the left of the left-hand pinky.
+* The raise layer provides the symbol bar on the first row that you're used to.
+* Media keys available in adjust layer (complete) and in the bottom-right corner of the default layer (frequently used).
+* The two keys that are traditionally the keys for `space` behave differently. The right-hand key inserts a space. The left-hand key inserts a tab. This is intuitive: Both keys that would normally make up the spacebar are increasing the space, but in different manners.
+
+
+## Some things to look out for:
+
+* Page up, page down, home, and end have been placed directly under the `hjkl` arrow keys, and each key moves the same direction as the key above it. (for instance, `h` moves left. Home has therefore been placed on `n`). You may ask why this was done instead of placing page down on `f` and page up on `b`. Here's why:
+ * In short, `f` and `b` are in prime locations for other types of keys, and using those keys for page down and page up would interrupt the space available for other keys. Using vim-style `f` and `b` would require either divide up the list of function keys with unrelated keys, which is unintuitive, or move all the function keys to another later, requiring restructuring that does not lend itself to an intuitive layout.
+* Audio is not tested. If it doesn't work, please open an issue.
diff --git a/keyboards/lets_split/keymaps/vim-mode/rules.mk b/keyboards/lets_split/keymaps/vim-mode/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/lets_split/keymaps/vim-mode/rules.mk
diff --git a/keyboards/gray_studio/hb85/i2c.h b/keyboards/lets_split_eh/keymaps/msiu/config.h
index 93a69c94d..526c0837c 100644
--- a/keyboards/gray_studio/hb85/i2c.h
+++ b/keyboards/lets_split_eh/keymaps/msiu/config.h
@@ -1,5 +1,8 @@
/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com>
+This is the c configuration file for the keymap
+
+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
@@ -15,13 +18,4 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Please do not modify this file
-
-#ifndef __I2C_H__
-#define __I2C_H__
-
-void i2c_init(void);
-void i2c_set_bitrate(uint16_t bitrate_khz);
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length);
-
-#endif
+#pragma once
diff --git a/keyboards/lets_split_eh/keymaps/msiu/keymap.c b/keyboards/lets_split_eh/keymaps/msiu/keymap.c
new file mode 100644
index 000000000..af5c98241
--- /dev/null
+++ b/keyboards/lets_split_eh/keymaps/msiu/keymap.c
@@ -0,0 +1,195 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _DVORAK 1
+
+#define _LOWER 3
+#define _RAISE 4
+
+#define _NUMB 14
+#define _FUNC 15
+#define _ADJUST 16
+
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ DVORAK,
+ LOWER,
+ RAISE,
+ ADJUST
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl |Hyper | Alt | GUI |Lower | Func |Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT( \
+ LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
+ KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+// Dvorak
+[_DVORAK] = LAYOUT( \
+ _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, \
+ _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
+ _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______ , \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT( \
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, \
+ _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
+ _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
+ _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, \
+ _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde|
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | |Qwerty|RGBVAD|RGBSAD|RGBHUD|RGBTOG|
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | |BLSTEP|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | RESET|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT( \
+ RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, \
+ RGB_MOD, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, QWERTY, DVORAK, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \
+),
+
+/* FUNC
+ * ,-----------------------------------------------------------------------------------.
+ * | | | | | | | | | Up | | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | Left | Down |Right | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Caps | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_FUNC] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
+// Numpad
+[_NUMB] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, \
+ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ \
+)
+
+};
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // case QWERTY:
+ // if (record->event.pressed) {
+ // persistent_default_layer_set(1UL<<_QWERTY);
+ // }
+ // return false;
+ // break;
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/config.h b/keyboards/lfkeyboards/lfk87/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/lfkeyboards/lfk87/keymaps/default/config.h
+++ b/keyboards/lfkeyboards/lfk87/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h
+++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/config.h b/keyboards/lfkeyboards/mini1800/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/lfkeyboards/mini1800/keymaps/default/config.h
+++ b/keyboards/lfkeyboards/mini1800/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/config.h b/keyboards/lfkeyboards/smk65/keymaps/default/config.h
index 8893d122e..271f48d00 100644
--- a/keyboards/lfkeyboards/smk65/keymaps/default/config.h
+++ b/keyboards/lfkeyboards/smk65/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h
index b88ec06bf..fb1cdf396 100644
--- a/keyboards/lily58/config.h
+++ b/keyboards/lily58/config.h
@@ -24,11 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USE_I2C
#define USE_SERIAL
-#ifdef USE_Link_Time_Optimization
- // LTO has issues with macros (action_get_macro) and "functions" (fn_actions),
- // so just disable them
- #define NO_ACTION_MACRO
- #define NO_ACTION_FUNCTION
-
- #define DISABLE_LEADER
-#endif // USE_Link_Time_Optimization \ No newline at end of file
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c
index 5ff5dc318..b8dda17d5 100644
--- a/keyboards/lily58/keymaps/default/keymap.c
+++ b/keyboards/lily58/keymaps/default/keymap.c
@@ -21,7 +21,7 @@ extern uint8_t is_master;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
-#define _ADJUST 16
+#define _ADJUST 3
enum custom_keycodes {
QWERTY = SAFE_RANGE,
@@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
- */
+ */
[_ADJUST] = LAYOUT( \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
@@ -235,4 +235,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
}
return true;
-} \ No newline at end of file
+}
diff --git a/keyboards/lily58/rev1/info.json b/keyboards/lily58/rev1/info.json
new file mode 100644
index 000000000..4a3568c3e
--- /dev/null
+++ b/keyboards/lily58/rev1/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Lily58",
+ "url": "",
+ "maintainer": "F_YUUCHI",
+ "width": 16.5,
+ "height": 5.25,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5},
+ {"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5},
+ {"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5},
+ {"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5},
+ {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.15}
+ ]
+ }
+ }
+}
diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk
index f6b922eea..f2947c81c 100644
--- a/keyboards/lily58/rules.mk
+++ b/keyboards/lily58/rules.mk
@@ -65,9 +65,7 @@ MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-SUBPROJECT_rev1 = no
-USE_I2C = yes
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c
index 0c2fb62b0..232239609 100644
--- a/keyboards/m10a/keymaps/default/keymap.c
+++ b/keyboards/m10a/keymaps/default/keymap.c
@@ -1,7 +1,4 @@
-
-#include "m10a.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h
index d2f73a6a8..f63c38bf6 100644
--- a/keyboards/massdrop/alt/config.h
+++ b/keyboards/massdrop/alt/config.h
@@ -119,3 +119,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 15
+#define RGB_MATRIX_LED_FLUSH_LIMIT 10
+#define RGB_MATRIX_EXTRA_TOG
+
+#include "config_led.h"
diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c
new file mode 100644
index 000000000..7d98e47c9
--- /dev/null
+++ b/keyboards/massdrop/alt/config_led.c
@@ -0,0 +1,148 @@
+#ifdef RGB_MATRIX_ENABLE
+#include "alt.h"
+
+#include "led_matrix.h"
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// This table can be almost-automatically derived from ISSI3733_LED_MAP that is
+// defined in config_led.h
+
+// You can calculate the (0-244, 0-64) x/y values from the x/y values defined in
+// ISSI3733_LED_MAP with the following formula:
+// uint8_t rgb_x = ((ISSI3733_LED_MAP[i].x - MIN_X) / (MAX_X - MIN_X)) * 224;
+// uint8_t rgb_y = ((ISSI3733_LED_MAP[i].y - MIN_Y) / (MAX_Y - MIN_Y)) * 64;
+// Where the min/max vars are the minimum and maximum "bounds" of x/y values
+// present in ISSI3733_LED_MAP
+//
+// The row/col values need to be manually tweaked though, compensating for the
+// "empty" cells that are a product of larger keys
+//
+// There is a quick-and-dirty implementation of this under ledvis.html
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC
+ /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1
+ /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2
+ /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3
+ /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4
+ /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5
+ /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6
+ /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7
+ /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8
+ /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9
+ /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0
+ /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS
+ /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL
+ /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC
+ /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL
+ /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB
+ /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q
+ /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W
+ /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E
+ /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R
+ /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T
+ /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y
+ /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U
+ /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I
+ /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O
+ /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P
+ /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC
+ /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC
+ /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS
+ /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME
+ /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
+ /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A
+ /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S
+ /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D
+ /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F
+ /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G
+ /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H
+ /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J
+ /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K
+ /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L
+ /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN
+ /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT
+ /* _________________________________________ */ // ____
+ /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT
+ /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP
+ /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT
+ /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z
+ /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X
+ /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C
+ /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V
+ /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B
+ /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N
+ /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M
+ /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM
+ /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT
+ /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH
+ /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT
+ /* _________________________________________ */ // ____
+ /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP
+ /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN
+ /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL
+ /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI
+ /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT
+ /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1)
+ /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT
+ /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN
+ /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT
+
+ // Underglow LEDs
+ { { 255 }, { 1, 1 }, 0 },
+ { { 255 }, { 15, 0 }, 0 },
+ { { 255 }, { 31, 0 }, 0 },
+ { { 255 }, { 47, 0 }, 0 },
+ { { 255 }, { 63, 0 }, 0 },
+ { { 255 }, { 79, 0 }, 0 },
+ { { 255 }, { 95, 0 }, 0 },
+ { { 255 }, { 112, 0 }, 0 },
+ { { 255 }, { 128, 0 }, 0 },
+ { { 255 }, { 144, 0 }, 0 },
+ { { 255 }, { 160, 0 }, 0 },
+ { { 255 }, { 176, 0 }, 0 },
+ { { 255 }, { 192, 0 }, 0 },
+ { { 255 }, { 208, 0 }, 0 },
+ { { 255 }, { 222, 1 }, 0 },
+ { { 255 }, { 224, 13 }, 0 },
+ { { 255 }, { 224, 25 }, 0 },
+ { { 255 }, { 224, 38 }, 0 },
+ { { 255 }, { 224, 50 }, 0 },
+ { { 255 }, { 222, 62 }, 0 },
+ { { 255 }, { 191, 64 }, 0 },
+ { { 255 }, { 179, 64 }, 0 },
+ { { 255 }, { 167, 64 }, 0 },
+ { { 255 }, { 153, 64 }, 0 },
+ { { 255 }, { 139, 64 }, 0 },
+ { { 255 }, { 125, 64 }, 0 },
+ { { 255 }, { 112, 64 }, 0 },
+ { { 255 }, { 98, 64 }, 0 },
+ { { 255 }, { 84, 64 }, 0 },
+ { { 255 }, { 70, 64 }, 0 },
+ { { 255 }, { 56, 64 }, 0 },
+ { { 255 }, { 42, 64 }, 0 },
+ { { 255 }, { 28, 64 }, 0 },
+ { { 255 }, { 1, 62 }, 0 },
+ { { 255 }, { 0, 50 }, 0 },
+ { { 255 }, { 0, 38 }, 0 },
+ { { 255 }, { 0, 25 }, 0 },
+ { { 255 }, { 0, 13 }, 0 },
+};
+
+#ifdef USB_LED_INDICATOR_ENABLE
+void rgb_matrix_indicators_kb(void)
+{
+ led_matrix_indicators();
+}
+#endif // USB_LED_INDICATOR_ENABLE
+
+#endif
diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h
index a049e3817..82117b332 100644
--- a/keyboards/massdrop/alt/config_led.h
+++ b/keyboards/massdrop/alt/config_led.h
@@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _config_led_h_
-#define _config_led_h_
+#pragma once
//Define number of ISSI3733 drivers being used (1...16)
#define ISSI3733_DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT
//Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic)
#define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE }
@@ -30,21 +30,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//Count of LED bodies
#define ISSI3733_LED_COUNT 105
-//Default Global Current Register value (Default brightness 0 - 255)
-#define ISSI3733_GCR_DEFAULT 128
-
#define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus
#define LED_GCR_STEP 10 //GCR increment/decrement value
-//Automatic power rollback and recovery
-#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
-#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
-#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
-
+#ifdef USE_MASSDROP_CONFIGURATOR
#define ANIMATION_SPEED_STEP 1
+#define BREATHE_STEP 1
#define BREATHE_MIN_STEP 0
#define BREATHE_MAX_STEP 255
+#endif
+
+//Default Global Current Register value (Default brightness 0 - 255)
+#define ISSI3733_GCR_DEFAULT LED_GCR_MAX
+
+//Automatic power rollback and recovery
+#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
+#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
+#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
//LED Mapping - More practically generated from a spreadsheet program
//id: ID of the LED (Sync with PCB callouts)
@@ -174,5 +177,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USB_LED_COMPOSE_SCANCODE 255
#define USB_LED_KANA_SCANCODE 255
#endif //USB_LED_INDICATOR_ENABLE
-
-#endif //_config_led_h_
diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
index 10bc62c1f..a4519d404 100644
--- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, 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_TRNS, KC_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c
index 10bc62c1f..a4519d404 100644
--- a/keyboards/massdrop/alt/keymaps/default/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/default/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, 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_TRNS, KC_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c
new file mode 100644
index 000000000..7969583df
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c
@@ -0,0 +1,223 @@
+#include QMK_KEYBOARD_H
+
+enum alt_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+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_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, 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_MUTE, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //LEDs are normally inactive, no processing is performed on them
+ //Flags are used in matching criteria for an LED to be active and indicate how to color it
+ //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_)
+ //LED IDs can be found in config_led.h in the keyboard's directory
+ //Examples are below
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //Specific LEDs use the user's selected pattern while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 },
+
+ //Specific LEDs use specified RGB values while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 },
+
+ //All LEDs use the user's selected pattern
+ //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green
+ //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1)
+ //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //When layer 1 is active, key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007)
+ //When layer 1 is active, edge LEDs use green (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8)
+ //When layer 1 is active, edge LEDs use green (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF)
+ // { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF8000, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255, .layer = 1 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFFFFFFF8, .id3 = 0x000003FF, .g = 127, .layer = 1 },
+
+ //All key LEDs use red while edge LEDs use the active pattern
+ //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007)
+ //Edge uses active pattern (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8)
+ //Edge uses active pattern (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF)
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFFFFFFF8, .id3 = 0x000003FF },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/alt/keymaps/default_md/rules.mk b/keyboards/massdrop/alt/keymaps/default_md/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/default_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c
index 639eb2da7..26a1c6d01 100644
--- a/keyboards/massdrop/alt/keymaps/mac/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, 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_TRNS, KC_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c
new file mode 100644
index 000000000..8a052cc25
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c
@@ -0,0 +1,193 @@
+#include QMK_KEYBOARD_H
+
+enum alt_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+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_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, 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_MUTE, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //Please see ../default_md/keymap.c for examples
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/alt/keymaps/mac_md/rules.mk b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/keymaps/reywood/README.md b/keyboards/massdrop/alt/keymaps/reywood/README.md
new file mode 100644
index 000000000..5ee630dfb
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/reywood/README.md
@@ -0,0 +1,5 @@
+# THIS KEYMAP IS BROKEN
+
+The CTRL and ALT have both been switched to using the QMK RGB Matrix system,
+rendering any custom effects that used the old, custom Massdrop lighting system,
+BROKEN.
diff --git a/keyboards/massdrop/alt/keymaps/reywood/rules.mk b/keyboards/massdrop/alt/keymaps/reywood/rules.mk
index b5b961a0f..956d1c700 100644
--- a/keyboards/massdrop/alt/keymaps/reywood/rules.mk
+++ b/keyboards/massdrop/alt/keymaps/reywood/rules.mk
@@ -1,6 +1,4 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
SRC += rgb_matrix_user.c
#For platform and packs
@@ -32,3 +30,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/led_programs.c b/keyboards/massdrop/alt/led_programs.c
deleted file mode 100644
index b3b7a7e90..000000000
--- a/keyboards/massdrop/alt/led_programs.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2018 Massdrop Inc.
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-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 "alt.h"
-#include "led_matrix.h"
-
-//Teal <-> Salmon
-led_setup_t leds_teal_salmon[] = {
- { .hs = 0, .he = 33, .rs = 24, .re = 24, .gs = 215, .ge = 215, .bs = 204, .be = 204, .ef = EF_NONE },
- { .hs = 33, .he = 66, .rs = 24, .re = 255, .gs = 215, .ge = 114, .bs = 204, .be = 118, .ef = EF_NONE },
- { .hs = 66, .he = 100, .rs = 255, .re = 255, .gs = 114, .ge = 114, .bs = 118, .be = 118, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Yellow
-led_setup_t leds_yellow[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Off
-led_setup_t leds_off[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Red
-led_setup_t leds_red[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Green
-led_setup_t leds_green[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Blue
-led_setup_t leds_blue[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//White
-led_setup_t leds_white[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//White with moving red stripe
-led_setup_t leds_white_with_red_stripe[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE },
- { .hs = 0, .he = 15, .rs = 0, .re = 0, .gs = 0, .ge = 255, .bs = 0, .be = 255, .ef = EF_SCR_R | EF_SUBTRACT },
- { .hs = 15, .he = 30, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 0, .ef = EF_SCR_R | EF_SUBTRACT },
- { .end = 1 },
-};
-
-//Black with moving red stripe
-led_setup_t leds_black_with_red_stripe[] = {
- { .hs = 0, .he = 15, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R },
- { .hs = 15, .he = 30, .rs = 255, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R },
- { .end = 1 },
-};
-
-//Rainbow no scrolling
-led_setup_t leds_rainbow_ns[] = {
- { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER },
- { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER },
- { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER },
- { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER },
- { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER },
- { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER },
- { .end = 1 },
-};
-
-//Rainbow scrolling
-led_setup_t leds_rainbow_s[] = {
- { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .end = 1 },
-};
-
-//Add new LED animations here using one from above as example
-//The last entry must be { .end = 1 }
-//Add the new animation name to the list below following its format
-
-void *led_setups[] = {
- leds_rainbow_s,
- leds_rainbow_ns,
- leds_teal_salmon,
- leds_yellow,
- leds_red,
- leds_green,
- leds_blue,
- leds_white,
- leds_white_with_red_stripe,
- leds_black_with_red_stripe,
- leds_off
-};
-
-const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]);
diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk
index c5539158f..aa45c6805 100644
--- a/keyboards/massdrop/alt/rules.mk
+++ b/keyboards/massdrop/alt/rules.mk
@@ -1,6 +1,6 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
+SRC = matrix.c
+SRC += config_led.c
#For platform and packs
ARM_ATSAM = SAMD51J18A
@@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = custom
diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h
index 71ccac0f3..df2e50921 100644
--- a/keyboards/massdrop/ctrl/config.h
+++ b/keyboards/massdrop/ctrl/config.h
@@ -119,3 +119,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 15
+#define RGB_MATRIX_LED_FLUSH_LIMIT 10
+#define RGB_MATRIX_EXTRA_TOG
+
+#include "config_led.h"
diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c
new file mode 100644
index 000000000..afdbf3a22
--- /dev/null
+++ b/keyboards/massdrop/ctrl/config_led.c
@@ -0,0 +1,144 @@
+#ifdef RGB_MATRIX_ENABLE
+#include "ctrl.h"
+
+#include "led_matrix.h"
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS
+ { { 0|(0<<4) }, { 7, 5 }, 0 },
+ { { 0|(1<<4) }, { 31, 5 }, 0 },
+ { { 0|(2<<4) }, { 43, 5 }, 0 },
+ { { 0|(3<<4) }, { 55, 5 }, 0 },
+ { { 0|(4<<4) }, { 67, 5 }, 0 },
+ { { 0|(5<<4) }, { 85, 5 }, 0 },
+ { { 0|(6<<4) }, { 97, 5 }, 0 },
+ { { 0|(7<<4) }, { 109, 5 }, 0 },
+ { { 6|(0<<4) }, { 121, 5 }, 0 },
+ { { 6|(1<<4) }, { 139, 5 }, 0 },
+ { { 6|(2<<4) }, { 151, 5 }, 0 },
+ { { 6|(3<<4) }, { 163, 5 }, 0 },
+ { { 6|(4<<4) }, { 175, 5 }, 0 },
+ { { 6|(5<<4) }, { 193, 5 }, 0 },
+ { { 6|(6<<4) }, { 205, 5 }, 1 },
+ { { 6|(7<<4) }, { 217, 5 }, 0 },
+ // 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
+ { { 1|(0<<4) }, { 7, 20 }, 0 },
+ { { 1|(1<<4) }, { 19, 20 }, 0 },
+ { { 1|(2<<4) }, { 31, 20 }, 0 },
+ { { 1|(3<<4) }, { 43, 20 }, 0 },
+ { { 1|(4<<4) }, { 55, 20 }, 0 },
+ { { 1|(5<<4) }, { 67, 20 }, 0 },
+ { { 1|(6<<4) }, { 79, 20 }, 0 },
+ { { 1|(7<<4) }, { 91, 20 }, 0 },
+ { { 7|(0<<4) }, { 103, 20 }, 0 },
+ { { 7|(1<<4) }, { 115, 20 }, 0 },
+ { { 7|(2<<4) }, { 127, 20 }, 0 },
+ { { 7|(3<<4) }, { 139, 20 }, 0 },
+ { { 7|(4<<4) }, { 151, 20 }, 0 },
+ { { 7|(5<<4) }, { 169, 20 }, 0 },
+ { { 7|(6<<4) }, { 193, 20 }, 0 },
+ { { 7|(7<<4) }, { 205, 20 }, 0 },
+ { { 9|(7<<4) }, { 217, 20 }, 0 },
+ // 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
+ { { 2|(0<<4) }, { 10, 30 }, 0 },
+ { { 2|(1<<4) }, { 25, 30 }, 0 },
+ { { 2|(2<<4) }, { 37, 30 }, 0 },
+ { { 2|(3<<4) }, { 49, 30 }, 0 },
+ { { 2|(4<<4) }, { 61, 30 }, 0 },
+ { { 2|(5<<4) }, { 73, 30 }, 0 },
+ { { 2|(6<<4) }, { 85, 30 }, 0 },
+ { { 2|(7<<4) }, { 97, 30 }, 0 },
+ { { 8|(0<<4) }, { 109, 30 }, 0 },
+ { { 8|(1<<4) }, { 121, 30 }, 0 },
+ { { 8|(2<<4) }, { 133, 30 }, 0 },
+ { { 8|(3<<4) }, { 145, 30 }, 0 },
+ { { 8|(4<<4) }, { 157, 30 }, 0 },
+ { { 8|(5<<4) }, { 172, 30 }, 0 },
+ { { 8|(6<<4) }, { 193, 30 }, 0 },
+ { { 8|(7<<4) }, { 205, 30 }, 0 },
+ { { 9|(6<<4) }, { 217, 30 }, 0 },
+ // 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
+ { { 3|(0<<4) }, { 11, 39 }, 1 },
+ { { 3|(1<<4) }, { 28, 39 }, 0 },
+ { { 3|(2<<4) }, { 40, 39 }, 0 },
+ { { 3|(3<<4) }, { 52, 39 }, 0 },
+ { { 3|(4<<4) }, { 64, 39 }, 0 },
+ { { 3|(5<<4) }, { 76, 39 }, 0 },
+ { { 3|(6<<4) }, { 88, 39 }, 0 },
+ { { 3|(7<<4) }, { 100, 39 }, 0 },
+ { { 9|(0<<4) }, { 112, 39 }, 0 },
+ { { 9|(1<<4) }, { 124, 39 }, 0 },
+ { { 9|(2<<4) }, { 136, 39 }, 0 },
+ { { 9|(3<<4) }, { 148, 39 }, 0 },
+ { { 9|(4<<4) }, { 168, 39 }, 0 },
+ // 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
+ { { 4|(0<<4) }, { 14, 49 }, 0 },
+ { { 4|(1<<4) }, { 34, 49 }, 0 },
+ { { 4|(2<<4) }, { 46, 49 }, 0 },
+ { { 4|(3<<4) }, { 58, 49 }, 0 },
+ { { 4|(4<<4) }, { 70, 49 }, 0 },
+ { { 4|(5<<4) }, { 82, 49 }, 0 },
+ { { 4|(6<<4) }, { 94, 49 }, 0 },
+ { { 4|(7<<4) }, { 106, 49 }, 0 },
+ { { 10|(0<<4) }, { 118, 49 }, 0 },
+ { { 10|(1<<4) }, { 130, 49 }, 0 },
+ { { 10|(2<<4) }, { 142, 49 }, 0 },
+ { { 10|(3<<4) }, { 165, 49 }, 0 },
+ { { 9|(5<<4) }, { 205, 49 }, 0 },
+ // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ { { 5|(0<<4) }, { 8, 59 }, 0 },
+ { { 5|(1<<4) }, { 23, 59 }, 0 },
+ { { 5|(2<<4) }, { 38, 59 }, 0 },
+ { { 5|(3<<4) }, { 83, 59 }, 0 },
+ { { 5|(4<<4) }, { 129, 59 }, 0 },
+ { { 5|(5<<4) }, { 144, 59 }, 0 },
+ { { 5|(6<<4) }, { 159, 59 }, 0 },
+ { { 5|(7<<4) }, { 174, 59 }, 0 },
+ { { 10|(4<<4) }, { 193, 59 }, 0 },
+ { { 10|(5<<4) }, { 205, 59 }, 0 },
+ { { 10|(6<<4) }, { 217, 59 }, 0 },
+ // Underglow / Border
+ { { 0xFF }, { 222, 64 }, 0 },
+ { { 0xFF }, { 204, 64 }, 0 },
+ { { 0xFF }, { 186, 64 }, 0 },
+ { { 0xFF }, { 167, 64 }, 0 },
+ { { 0xFF }, { 149, 64 }, 0 },
+ { { 0xFF }, { 130, 64 }, 0 },
+ { { 0xFF }, { 112, 64 }, 0 },
+ { { 0xFF }, { 94, 64 }, 0 },
+ { { 0xFF }, { 75, 64 }, 0 },
+ { { 0xFF }, { 57, 64 }, 0 },
+ { { 0xFF }, { 38, 64 }, 0 },
+ { { 0xFF }, { 20, 64 }, 0 },
+ { { 0xFF }, { 0, 64 }, 0 },
+ { { 0xFF }, { 0, 47 }, 0 },
+ { { 0xFF }, { 0, 32 }, 0 },
+ { { 0xFF }, { 0, 17 }, 0 },
+ { { 0xFF }, { 0, 0 }, 0 },
+ { { 0xFF }, { 20, 0 }, 0 },
+ { { 0xFF }, { 38, 0 }, 0 },
+ { { 0xFF }, { 57, 0 }, 0 },
+ { { 0xFF }, { 75, 0 }, 0 },
+ { { 0xFF }, { 94, 0 }, 0 },
+ { { 0xFF }, { 112, 0 }, 0 },
+ { { 0xFF }, { 130, 0 }, 0 },
+ { { 0xFF }, { 149, 0 }, 0 },
+ { { 0xFF }, { 167, 0 }, 0 },
+ { { 0xFF }, { 186, 0 }, 0 },
+ { { 0xFF }, { 204, 0 }, 0 },
+ { { 0xFF }, { 222, 1 }, 0 },
+ { { 0xFF }, { 224, 17 }, 0 },
+ { { 0xFF }, { 224, 32 }, 0 },
+ { { 0xFF }, { 224, 47 }, 0 },
+};
+
+#ifdef USB_LED_INDICATOR_ENABLE
+void rgb_matrix_indicators_kb(void)
+{
+ led_matrix_indicators();
+}
+#endif // USB_LED_INDICATOR_ENABLE
+
+#endif
diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h
index 471ab7007..0c91a0c80 100644
--- a/keyboards/massdrop/ctrl/config_led.h
+++ b/keyboards/massdrop/ctrl/config_led.h
@@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _config_led_h_
-#define _config_led_h_
+#pragma once
//Define number of ISSI3733 drivers being used (1...16)
#define ISSI3733_DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT
//Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic)
#define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE }
@@ -30,21 +30,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//Count of LED bodies
#define ISSI3733_LED_COUNT 119
-//Default Global Current Register value (Default brightness 0 - 255)
-#define ISSI3733_GCR_DEFAULT 128
-
#define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus
#define LED_GCR_STEP 10 //GCR increment/decrement value
-//Automatic power rollback and recovery
-#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
-#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
-#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
-
+#ifdef USE_MASSDROP_CONFIGURATOR
#define ANIMATION_SPEED_STEP 1
+#define BREATHE_STEP 1
#define BREATHE_MIN_STEP 0
#define BREATHE_MAX_STEP 255
+#endif
+
+//Default Global Current Register value (Default brightness 0 - 255)
+#define ISSI3733_GCR_DEFAULT LED_GCR_MAX
+
+//Automatic power rollback and recovery
+#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
+#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
+#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
//LED Mapping - More practically generated from a spreadsheet program
//id: ID of the LED (Sync with PCB callouts)
@@ -187,5 +190,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USB_LED_COMPOSE_SCANCODE 255
#define USB_LED_KANA_SCANCODE 255
#endif //USB_LED_INDICATOR_ENABLE
-
-#endif //_config_led_h_
diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c
index cdb627f9c..182abbbad 100644
--- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum ctrl_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[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_MUTE, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c
new file mode 100644
index 000000000..16f88ffe1
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c
@@ -0,0 +1,226 @@
+#include QMK_KEYBOARD_H
+
+enum ctrl_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //LEDs are normally inactive, no processing is performed on them
+ //Flags are used in matching criteria for an LED to be active and indicate how to color it
+ //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_)
+ //LED IDs can be found in config_led.h in the keyboard's directory
+ //Examples are below
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //Specific LEDs use the user's selected pattern while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 },
+
+ //Specific LEDs use specified RGB values while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 },
+
+ //All LEDs use the user's selected pattern
+ //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green
+ //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1)
+ //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //When layer 1 is active, key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF)
+ //When layer 1 is active, edge LEDs use green (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000)
+ //When layer 1 is active, edge LEDs use green (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF)
+ // { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF0000, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255, .layer = 1 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFF800000, .id3 = 0x00FFFFFF, .g = 127, .layer = 1 },
+
+ //All key LEDs use red while edge LEDs use the active pattern
+ //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF)
+ //Edge uses active pattern (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000)
+ //Edge uses active pattern (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF)
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFF800000, .id3 = 0x00FFFFFF },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c
index e41b5eba2..41cf82757 100644
--- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum ctrl_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[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_MUTE, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MSTP, KC_VOLU, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/*
[X] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c
new file mode 100644
index 000000000..6dfc21378
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c
@@ -0,0 +1,196 @@
+#include QMK_KEYBOARD_H
+
+enum ctrl_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //Please see ../default_md/keymap.c for examples
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md
new file mode 100644
index 000000000..5ee630dfb
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md
@@ -0,0 +1,5 @@
+# THIS KEYMAP IS BROKEN
+
+The CTRL and ALT have both been switched to using the QMK RGB Matrix system,
+rendering any custom effects that used the old, custom Massdrop lighting system,
+BROKEN.
diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c
index 0bdc15214..58911aa75 100644
--- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c
@@ -15,7 +15,6 @@
extern issi3733_led_t *lede;
extern issi3733_led_t led_map[];
-extern led_disp_t disp;
enum ctrl_keycodes {
L_BRI = SAFE_RANGE, //LED Brightness Increase
@@ -238,8 +237,6 @@ void led_matrix_run(void)
{
led_cur = led_map;
- disp.frame += 1;
-
breathe_mult = 1;
if (led_animation_breathing)
@@ -314,7 +311,7 @@ void led_matrix_run(void)
}
float pomod;
- pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed;
+ pomod = (float)(g_tick % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed;
//Add in any moving effects
if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L)))
diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk
index c5539158f..aa45c6805 100644
--- a/keyboards/massdrop/ctrl/rules.mk
+++ b/keyboards/massdrop/ctrl/rules.mk
@@ -1,6 +1,6 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
+SRC = matrix.c
+SRC += config_led.c
#For platform and packs
ARM_ATSAM = SAMD51J18A
@@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = custom
diff --git a/keyboards/mechmini/v1/README.md b/keyboards/mechmini/v1/README.md
index b4a1924c4..315349803 100644
--- a/keyboards/mechmini/v1/README.md
+++ b/keyboards/mechmini/v1/README.md
@@ -29,7 +29,7 @@ $ brew cask install crosspack-avr
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
```
-In order to use the `./program` script, which can reboot the board into
+In order to use the `./util/atmega32a_program.py` script, which can reboot the board into
the bootloader, you'll need Python 2 with PyUSB installed:
```
diff --git a/keyboards/mechmini/v1/keymaps/default/keymap.c b/keyboards/mechmini/v1/keymaps/default/keymap.c
index 4a0a4dc0a..f9e446064 100644
--- a/keyboards/mechmini/v1/keymaps/default/keymap.c
+++ b/keyboards/mechmini/v1/keymaps/default/keymap.c
@@ -13,8 +13,7 @@ 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 "mechmini.h"
-#include "quantum.h"
+#include QMK_KEYBOARD_H
#define _BL 0 // base layer
#define _FN1 1 // function layer 1
diff --git a/keyboards/mechmini/v2/keymaps/arkag/keymap.c b/keyboards/mechmini/v2/keymaps/arkag/keymap.c
index 29e125394..4f4cbda3f 100644
--- a/keyboards/mechmini/v2/keymaps/arkag/keymap.c
+++ b/keyboards/mechmini/v2/keymaps/arkag/keymap.c
@@ -7,33 +7,47 @@
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
[_QWERTY] = LAYOUT_2u_space_ortho(
- KC_LEAD, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, QUOTE,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT,
- M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, KC_SLSH, KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT),
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, GAME , KC_LEAD),
[_RAISE] = LAYOUT_2u_space_ortho(
- GRAVE, KC_1, KC_2, THREE, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ GRAVE, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______,
_______, OBRACK, CBRACK, KC_EQL, HYPHEN, _______, _______, KC_4, KC_5, KC_6, _______, KC_NLCK,
- _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_PPLS, KC_PENT,
- _______, _______, _______, KEEB, _______, _______, _______, M_OS, KC_PSLS, KC_PMNS, KC_PAST),
+ _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT,
+ _______, _______, _______, KEEB, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST),
[_LOWER] = LAYOUT_2u_space_ortho(
- KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, M_P_B, M_C_A_D,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- KC_CAPS, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
+ _______, LRALT, _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [_KEEB] = LAYOUT_2u_space_ortho(
+ [_MEDIA] = LAYOUT_2u_space_ortho(
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______),
+
+ [_FUNCT] = LAYOUT_2u_space_ortho(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, M_SFT, M_SPC, M_OS ),
+
+ [_KEEB] = LAYOUT_2u_space_ortho(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______,
RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
- [_LAZY] = LAYOUT_2u_space_ortho(
- _______, _______, _______, _______, _______, M_TM, _______, M_SNIPT, M_SHRUG, _______, _______, KC_MUTE,
- _______, _______, _______, _______, _______, M_GGT, _______, M_UF, M_LOD, M_REPO, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, M_TF, M_LENNY, _______, KC_VOLU, KC_MPLY,
- _______, _______, _______, _______, _______, _______, M_CALC, _______, KC_MPRV, KC_VOLD, KC_MNXT),
+ [_GAMING] = LAYOUT_2u_space_ortho(
+ KC_ESC, KC_F13, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_TAB, KC_F14, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_LSFT, KC_F15, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_LCTL, KC_F16, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX),
+
};
diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk
index c1d5afa1e..64f65f706 100644
--- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk
+++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk
@@ -1,4 +1,4 @@
-BOOTMAGIC_ENABLE = no
+BOOTMAGIC_ENABLE = lite
MOUSEKEY_ENABLE = no
STENO_ENABLE = no
EXTRAKEY_ENABLE = yes
@@ -6,7 +6,7 @@ CONSOLE_ENABLE = no
COMMAND_ENABLE = no
SLEEP_LED_ENABLE = no
NKRO_ENABLE = yes
-BACKLIGHT_ENABLE = yes
+BACKLIGHT_ENABLE = no
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
TAP_DANCE_ENABLE = yes
diff --git a/keyboards/mehkee96/program b/keyboards/mehkee96/program
deleted file mode 100644
index b777b9110..000000000
--- a/keyboards/mehkee96/program
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>, Sebastian Kaim <sebb@sebb767.de>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-
-def checkForKeyboardInNormalMode():
- """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
- return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-
-def checkForKeyboardInBootloaderMode():
- """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
- return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
-
-def flashKeyboard(firmware_file):
- """Calls bootloadHID to flash the given file to the device."""
- print('Flashing firmware to device ...')
- if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
- print('\nDone!')
- else:
- print('\nbootloadHID returned an error.')
-
-def printDeviceInfo(dev):
- """Prints all infos for a given USB device"""
- print('Device Information:')
- print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
- print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
- print('Manufacturer: %s' % (dev.iManufacturer))
- print('Serial: %s' % (dev.iSerialNumber))
- print('Product: %s' % (dev.iProduct), end='\n\n')
-
-def sendDeviceToBootloaderMode(dev):
- """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
- try:
- dev.set_configuration()
-
- request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
- USBRQ_HID_SET_REPORT = 0x09
- HID_REPORT_OPTION = 0x0301
-
- dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5)
- except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-kb = checkForKeyboardInNormalMode()
-
-if kb is not None:
- print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='')
- sendDeviceToBootloaderMode(kb)
- print(' done.')
- print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
- print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
-
-attempts = 12 # 60 seconds
-found = False
-for attempt in range(1, attempts + 1):
- print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
-
- if checkForKeyboardInBootloaderMode():
- print('Found', end='\n\n')
- flashKeyboard(sys.argv[1])
- found = True
- break
- else:
- print('Nothing.', end='')
-
- if attempt != attempts: # no need to wait on the last attempt
- print(' Sleeping 5 seconds.', end='')
- time.sleep(5)
-
- # print a newline
- print()
-
-if not found:
- print("Couldn't find a flashable keyboard. Aborting.")
- sys.exit(2)
-
diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk
index e6e7d4a58..f7fb397e2 100644
--- a/keyboards/mehkee96/rules.mk
+++ b/keyboards/mehkee96/rules.mk
@@ -32,4 +32,4 @@ CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c
# programming options
-PROGRAM_CMD = ./keyboards/mehkee96/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/meira/keymaps/default/config.h b/keyboards/meira/keymaps/default/config.h
index 5f5844a70..e3776d2ef 100644
--- a/keyboards/meira/keymaps/default/config.h
+++ b/keyboards/meira/keymaps/default/config.h
@@ -14,10 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
// place overrides here
#define MUSIC_MASK (keycode != KC_NO)
@@ -30,5 +29,3 @@
SONG(DVORAK_SOUND) \
}
#endif
-
-#endif
diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c
index b25d78919..5703999a0 100644
--- a/keyboards/meira/keymaps/default/keymap.c
+++ b/keyboards/meira/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "meira.h"
+#include QMK_KEYBOARD_H
#include "lighting.h"
#ifdef RGBLIGHT_ENABLE
diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c
index 88f08ee56..528beb168 100644
--- a/keyboards/meishi/keymaps/default/keymap.c
+++ b/keyboards/meishi/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "meishi.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT( /* Base */
diff --git a/keyboards/meme/keymaps/default/config.h b/keyboards/meme/keymaps/default/config.h
index 2c852d181..a3ed4f762 100644
--- a/keyboards/meme/keymaps/default/config.h
+++ b/keyboards/meme/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/miuni32/keymaps/default/config.h b/keyboards/miuni32/keymaps/default/config.h
index df06a2620..271f48d00 100644
--- a/keyboards/miuni32/keymaps/default/config.h
+++ b/keyboards/miuni32/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif \ No newline at end of file
diff --git a/keyboards/mt40/keymaps/default/config.h b/keyboards/mt40/keymaps/default/config.h
index 9f9a9fc10..6c3e30ef7 100644
--- a/keyboards/mt40/keymaps/default/config.h
+++ b/keyboards/mt40/keymaps/default/config.h
@@ -1,5 +1,6 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
+
+// place overrides here
#define TAPPING_TERM 200
@@ -7,5 +8,3 @@
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 15
#define RGBLIGHT_VAL_STEP 18
-
-#endif
diff --git a/keyboards/mt980/config.h b/keyboards/mt980/config.h
new file mode 100644
index 000000000..88c25a587
--- /dev/null
+++ b/keyboards/mt980/config.h
@@ -0,0 +1,52 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Wheat Field Peripherals
+#define PRODUCT MT980
+#define DESCRIPTION Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 12
+#define MATRIX_COLS 9
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 }
+#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B6
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 3
+#endif
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+#define RGB_DI_PIN E2
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 24
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#define RGBLIGHT_LIMIT_VAL 185
+#endif
+
+/* Place bootmagic key on Esc */
+#define BOOTMAGIC_LITE_ROW 5
+#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/mt980/info.json b/keyboards/mt980/info.json
new file mode 100644
index 000000000..f71d02285
--- /dev/null
+++ b/keyboards/mt980/info.json
@@ -0,0 +1,117 @@
+{
+ "keyboard_name": "mt980",
+ "url": "https://shop110310565.taobao.com",
+ "maintainer": "walkerstop",
+ "width": 19.5,
+ "height": 6.75,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 103,
+ "layout": [
+ {"label":"K50", "x":0, "y":0},
+ {"label":"K52", "x":1.25, "y":0},
+ {"label":"K53", "x":2.25, "y":0},
+ {"label":"K54", "x":3.25, "y":0},
+ {"label":"K55", "x":4.25, "y":0},
+ {"label":"K57", "x":5.5, "y":0},
+ {"label":"K58", "x":6.5, "y":0},
+ {"label":"KB8", "x":7.5, "y":0},
+ {"label":"KB7", "x":8.5, "y":0},
+ {"label":"KB5", "x":9.75, "y":0},
+ {"label":"KB4", "x":10.75, "y":0},
+ {"label":"KB3", "x":11.75, "y":0},
+ {"label":"KB6", "x":12.75, "y":0},
+ {"label":"K51", "x":14, "y":0},
+ {"label":"KB2", "x":15.5, "y":0},
+ {"label":"KB1", "x":16.5, "y":0},
+ {"label":"KB0", "x":17.5, "y":0},
+ {"label":"K63", "x":18.5, "y":0},
+ {"label":"K40", "x":0, "y":1.5},
+ {"label":"K41", "x":1, "y":1.5},
+ {"label":"K42", "x":2, "y":1.5},
+ {"label":"K43", "x":3, "y":1.5},
+ {"label":"K44", "x":4, "y":1.5},
+ {"label":"K45", "x":5, "y":1.5},
+ {"label":"K46", "x":6, "y":1.5},
+ {"label":"K47", "x":7, "y":1.5},
+ {"label":"K48", "x":8, "y":1.5},
+ {"label":"KA8", "x":9, "y":1.5},
+ {"label":"KA7", "x":10, "y":1.5},
+ {"label":"KA5", "x":11, "y":1.5},
+ {"label":"KA4", "x":12, "y":1.5},
+ {"label":"KA3", "x":13, "y":1.5},
+ {"label":"KA6", "x":14, "y":1.5},
+ {"label":"KA2", "x":15.5, "y":1.5},
+ {"label":"KA1", "x":16.5, "y":1.5},
+ {"label":"KA0", "x":17.5, "y":1.5},
+ {"label":"K64", "x":18.5, "y":1.5},
+ {"label":"K30", "x":0, "y":2.5, "w":1.5},
+ {"label":"K31", "x":1.5, "y":2.5},
+ {"label":"K32", "x":2.5, "y":2.5},
+ {"label":"K33", "x":3.5, "y":2.5},
+ {"label":"K34", "x":4.5, "y":2.5},
+ {"label":"K35", "x":5.5, "y":2.5},
+ {"label":"K36", "x":6.5, "y":2.5},
+ {"label":"K37", "x":7.5, "y":2.5},
+ {"label":"K38", "x":8.5, "y":2.5},
+ {"label":"K98", "x":9.5, "y":2.5},
+ {"label":"K97", "x":10.5, "y":2.5},
+ {"label":"K95", "x":11.5, "y":2.5},
+ {"label":"K94", "x":12.5, "y":2.5},
+ {"label":"K84", "x":13.5, "y":2.5, "w":1.5},
+ {"label":"K96", "x":15.5, "y":2.5},
+ {"label":"K92", "x":16.5, "y":2.5},
+ {"label":"K91", "x":17.5, "y":2.5},
+ {"label":"K90", "x":18.5, "y":2.5},
+ {"label":"K20", "x":0, "y":3.5, "w":1.75},
+ {"label":"K21", "x":1.75, "y":3.5},
+ {"label":"K22", "x":2.75, "y":3.5},
+ {"label":"K23", "x":3.75, "y":3.5},
+ {"label":"K24", "x":4.75, "y":3.5},
+ {"label":"K25", "x":5.75, "y":3.5},
+ {"label":"K26", "x":6.75, "y":3.5},
+ {"label":"K27", "x":7.75, "y":3.5},
+ {"label":"K28", "x":8.75, "y":3.5},
+ {"label":"K88", "x":9.75, "y":3.5},
+ {"label":"K87", "x":10.75, "y":3.5},
+ {"label":"K85", "x":11.75, "y":3.5},
+ {"label":"K93", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"K86", "x":15.5, "y":3.5},
+ {"label":"K82", "x":16.5, "y":3.5},
+ {"label":"K81", "x":17.5, "y":3.5},
+ {"label":"K80", "x":18.5, "y":3.5},
+ {"label":"K10", "x":0, "y":4.5, "w":1.25},
+ {"label":"K11", "x":1.25, "y":4.5},
+ {"label":"K12", "x":2.25, "y":4.5},
+ {"label":"K13", "x":3.25, "y":4.5},
+ {"label":"K14", "x":4.25, "y":4.5},
+ {"label":"K15", "x":5.25, "y":4.5},
+ {"label":"K16", "x":6.25, "y":4.5},
+ {"label":"K17", "x":7.25, "y":4.5},
+ {"label":"K18", "x":8.25, "y":4.5},
+ {"label":"K78", "x":9.25, "y":4.5},
+ {"label":"K77", "x":10.25, "y":4.5},
+ {"label":"K75", "x":11.25, "y":4.5},
+ {"label":"K74", "x":12.25, "y":4.5, "w":1.75},
+ {"label":"K73", "x":14.25, "y":4.75},
+ {"label":"K76", "x":15.5, "y":4.5},
+ {"label":"K72", "x":16.5, "y":4.5},
+ {"label":"K71", "x":17.5, "y":4.5},
+ {"label":"K70", "x":18.5, "y":4.5},
+ {"label":"K00", "x":0, "y":5.5, "w":1.25},
+ {"label":"K01", "x":1.25, "y":5.5},
+ {"label":"K02", "x":2.25, "y":5.5, "w":1.25},
+ {"label":"K06", "x":3.5, "y":5.5, "w":6.25},
+ {"label":"K08", "x":9.75, "y":5.5},
+ {"label":"K07", "x":10.75, "y":5.5},
+ {"label":"K05", "x":11.75, "y":5.5, "w":1.25},
+ {"label":"K04", "x":13.25, "y":5.75},
+ {"label":"K03", "x":14.25, "y":5.75},
+ {"label":"K66", "x":15.25, "y":5.75},
+ {"label":"K62", "x":16.5, "y":5.5},
+ {"label":"K61", "x":17.5, "y":5.5},
+ {"label":"K60", "x":18.5, "y":5.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/mt980/keymaps/default/keymap.c b/keyboards/mt980/keymaps/default/keymap.c
new file mode 100644
index 000000000..504233a98
--- /dev/null
+++ b/keyboards/mt980/keymaps/default/keymap.c
@@ -0,0 +1,21 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_INS, KC_PSCR, KC_PGUP, KC_PGDN,
+ 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, KC_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
+
+ [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_PAUSE, KC_SLCK, KC_HOME, KC_END,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS)
+
+};
diff --git a/keyboards/mt980/keymaps/walker/config.h b/keyboards/mt980/keymaps/walker/config.h
new file mode 100644
index 000000000..0bd395993
--- /dev/null
+++ b/keyboards/mt980/keymaps/walker/config.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#define TAPPING_TERM 200
+#define ONESHOT_TAP_TOGGLE 5
+#define ONESHOT_TIMEOUT 5000
diff --git a/keyboards/mt980/keymaps/walker/keymap.c b/keyboards/mt980/keymaps/walker/keymap.c
new file mode 100644
index 000000000..83a3fb816
--- /dev/null
+++ b/keyboards/mt980/keymaps/walker/keymap.c
@@ -0,0 +1,168 @@
+#include "mt980.h"
+
+bool numlock_on = true;
+
+typedef struct {
+ bool is_press_action;
+ int state;
+} tap;
+
+enum {
+ SINGLE_TAP = 1,
+ SINGLE_HOLD = 2,
+ DOUBLE_TAP = 3,
+ DOUBLE_HOLD = 4,
+ TRIPLE_TAP = 5,
+ TRIPLE_HOLD = 6
+};
+
+enum {
+ ALT_L1 = 0
+};
+
+int cur_dance (qk_tap_dance_state_t *state);
+void alt_finished (qk_tap_dance_state_t *state, void *user_data);
+void alt_reset (qk_tap_dance_state_t *state, void *user_data);
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_INS, KC_PSCR, KC_PGUP, KC_PGDN,
+ 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, KC_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, TD(ALT_L1), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
+
+ [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_PAUSE, KC_SLCK, KC_HOME, KC_END,
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS)
+
+};
+
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->pressed) return SINGLE_HOLD;
+ else return SINGLE_TAP;
+ }
+ else if (state->count == 2) {
+ if (state->pressed) return DOUBLE_HOLD;
+ else return DOUBLE_TAP;
+ }
+ else if (state->count == 3) {
+ if (state->interrupted || !state->pressed) return TRIPLE_TAP;
+ else return TRIPLE_HOLD;
+ }
+ else return 8;
+}
+
+static tap alttap_state = {
+ .is_press_action = true,
+ .state = 0
+};
+
+void alt_finished (qk_tap_dance_state_t *state, void *user_data) {
+ alttap_state.state = cur_dance(state);
+ switch (alttap_state.state) {
+ case SINGLE_TAP: set_oneshot_layer(1, ONESHOT_START); clear_oneshot_layer_state(ONESHOT_PRESSED); break;
+ case SINGLE_HOLD: register_code(KC_LALT); break;
+ case DOUBLE_TAP: set_oneshot_layer(1, ONESHOT_START); set_oneshot_layer(1, ONESHOT_PRESSED); break;
+ case DOUBLE_HOLD: register_code(KC_LALT); layer_on(1); break;
+ }
+}
+
+void alt_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (alttap_state.state) {
+ case SINGLE_TAP: break;
+ case SINGLE_HOLD: unregister_code(KC_LALT); break;
+ case DOUBLE_TAP: break;
+ case DOUBLE_HOLD: layer_off(1); unregister_code(KC_LALT); break;
+ }
+ alttap_state.state = 0;
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [ALT_L1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,alt_finished, alt_reset)
+};
+
+void led_set_keymap(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_NUM_LOCK)) {
+ numlock_on = true;
+ }
+ else {
+ numlock_on = false;
+ }
+}
+
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+
+ switch (keycode) {
+ case KC_TRNS:
+ case KC_NO:
+ /* Always cancel one-shot layer when another key gets pressed */
+ if (record->event.pressed && is_oneshot_layer_active())
+ clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
+ return true;
+ case RESET:
+ /* Don't allow reset from oneshot layer state */
+ if (record->event.pressed && is_oneshot_layer_active()) {
+ clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
+ return false;
+ }
+ return true;
+ case KC_PPLS:
+ if (!numlock_on) {
+ if (is_oneshot_layer_active() || layer_state & 0x2) {
+ if (record->event.pressed)
+ register_code(KC_HOME);
+ else
+ unregister_code(KC_HOME);
+ clear_oneshot_layer_state(ONESHOT_START);
+ }
+ else {
+ if (record->event.pressed)
+ register_code(KC_PGUP);
+ else
+ unregister_code(KC_PGUP);
+ }
+ return false;
+ }
+ return true;
+ case KC_PENT:
+ if (!numlock_on) {
+ if (is_oneshot_layer_active() || layer_state & 0x2) {
+ if (record->event.pressed)
+ register_code(KC_END);
+ else
+ unregister_code(KC_END);
+ clear_oneshot_layer_state(ONESHOT_START);
+ }
+ else {
+ if (record->event.pressed)
+ register_code(KC_PGDN);
+ else
+ unregister_code(KC_PGDN);
+ }
+ return false;
+ }
+ return true;
+ case KC_NLCK:
+ /* Shift + NumLock will be treated as shift-Insert */
+ if ((keyboard_report->mods & MOD_BIT (KC_LSFT)) || (keyboard_report->mods & MOD_BIT (KC_RSFT))) {
+ if (record->event.pressed) {
+ register_code(KC_INS);
+ unregister_code(KC_INS);
+ }
+ return false;
+ }
+ else
+ return true;
+ default:
+ return true;
+ }
+ return true;
+}
diff --git a/keyboards/mt980/keymaps/walker/rules.mk b/keyboards/mt980/keymaps/walker/rules.mk
new file mode 100644
index 000000000..e5ddcae8d
--- /dev/null
+++ b/keyboards/mt980/keymaps/walker/rules.mk
@@ -0,0 +1 @@
+TAP_DANCE_ENABLE = yes
diff --git a/keyboards/mt980/mt980.c b/keyboards/mt980/mt980.c
new file mode 100644
index 000000000..5461a3b21
--- /dev/null
+++ b/keyboards/mt980/mt980.c
@@ -0,0 +1,65 @@
+#include "mt980.h"
+
+__attribute__ ((weak))
+void matrix_init_keymap(void) {}
+
+__attribute__ ((weak))
+void matrix_scan_keymap(void) {}
+
+__attribute__ ((weak))
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+__attribute__ ((weak))
+uint32_t layer_state_set_keymap (uint32_t state) {
+ return state;
+}
+__attribute__ ((weak))
+void led_set_keymap(uint8_t usb_led) {}
+
+void matrix_init_user(void) {
+ matrix_init_keymap();
+}
+
+void matrix_scan_user(void) {
+ matrix_scan_keymap();
+}
+
+void keyboard_pre_init_user(void) {
+ /* Set NUMLOCK indicator pin as output */
+ setPinOutput(C6);
+ /* Set CAPSLOCK indicator pin as output */
+ setPinOutput(C7);
+ /* Set SCROLLOCK indicator pin as output */
+ setPinOutput(B5);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return process_record_keymap(keycode, record);
+}
+
+void led_set_user(uint8_t usb_led) {
+
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+ writePinLow(C6);
+ }
+ else {
+ writePinHigh(C6);
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ writePinLow(C7);
+ }
+ else {
+ writePinHigh(C7);
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
+ writePinLow(B5);
+ }
+ else {
+ writePinHigh(B5);
+ }
+
+ led_set_keymap(usb_led);
+}
diff --git a/keyboards/mt980/mt980.h b/keyboards/mt980/mt980.h
new file mode 100644
index 000000000..d9804b339
--- /dev/null
+++ b/keyboards/mt980/mt980.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K050, K052, K053, K054, K055, K057, K058, K118, K117, K115, K114, K113, K116, K051, K112, K111, K110, K063, \
+ K040, K041, K042, K043, K044, K045, K046, K047, K048, K108, K107, K105, K104, K103, K106, K102, K101, K100, K064, \
+ K030, K031, K032, K033, K034, K035, K036, K037, K038, K098, K097, K095, K094, K084, K096, K092, K091, K090, \
+ K020, K021, K022, K023, K024, K025, K026, K027, K028, K088, K087, K085, K093, K086, K082, K081, K080, \
+ K010, K011, K012, K013, K014, K015, K016, K017, K018, K078, K077, K075, K074, K073, K076, K072, K071, K070, \
+ K000, K001, K002, K006, K008, K007, K005, K004, K003, K066, K062, K061, K060 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
+ { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
+ { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
+ { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \
+ { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
+ { K050, K051, K052, K053, K054, K055, KC_NO, K057, K058 }, \
+ { K060, K061, K062, K063, K064, KC_NO, K066, KC_NO, KC_NO}, \
+ { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \
+ { K080, K081, K082, KC_NO, K084, K085, K086, K087, K088 }, \
+ { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \
+ { K110, K111, K112, K113, K114, K115, K116, K117, K118 } \
+}
diff --git a/keyboards/mt980/readme.md b/keyboards/mt980/readme.md
new file mode 100644
index 000000000..7bc27c93a
--- /dev/null
+++ b/keyboards/mt980/readme.md
@@ -0,0 +1,14 @@
+# mt980
+
+A mechanical keyboard PCB in the same layout as the Leopold FC980M, sold by Wheat Field Peripherals on Taobao. This PCB requires soldering, except for the arrow cluster and the Escape key switches, which use Kailh hot swap sockets.
+
+Keyboard Maintainer: [walkerstop](https://github.com/walkerstop)
+Hardware Supported: mt980
+Hardware Availability: Taobao store https://shop110310565.taobao.com
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mt980: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/mt980/rules.mk b/keyboards/mt980/rules.mk
new file mode 100644
index 000000000..9a7718aad
--- /dev/null
+++ b/keyboards/mt980/rules.mk
@@ -0,0 +1,55 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# comment out to disable the options.
+#
+
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
+KEY_LOCK_ENABLE = no
diff --git a/keyboards/mxss/keymaps/default/config.h b/keyboards/mxss/keymaps/default/config.h
index 9f8622579..bfbdb6229 100644
--- a/keyboards/mxss/keymaps/default/config.h
+++ b/keyboards/mxss/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/mxss/rgblight.h b/keyboards/mxss/rgblight.h
new file mode 100644
index 000000000..5205974f9
--- /dev/null
+++ b/keyboards/mxss/rgblight.h
@@ -0,0 +1,166 @@
+/* Copyright 2017 Yang Liu
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef RGBLIGHT_H
+#define RGBLIGHT_H
+
+#ifdef RGBLIGHT_ANIMATIONS
+ #define RGBLIGHT_MODES 35
+#else
+ #define RGBLIGHT_MODES 1
+#endif
+
+#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER
+#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7
+#endif
+
+#ifndef RGBLIGHT_EFFECT_BREATHE_MAX
+#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255
+#endif
+
+#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH
+#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
+#endif
+
+#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH
+#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
+#endif
+
+#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
+#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0
+#endif
+
+#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
+#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM
+#endif
+
+#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
+#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000
+#endif
+
+#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
+#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
+#endif
+
+#ifndef RGBLIGHT_HUE_STEP
+#define RGBLIGHT_HUE_STEP 10
+#endif
+#ifndef RGBLIGHT_SAT_STEP
+#define RGBLIGHT_SAT_STEP 17
+#endif
+#ifndef RGBLIGHT_VAL_STEP
+#define RGBLIGHT_VAL_STEP 17
+#endif
+
+#define RGBLED_TIMER_TOP F_CPU/(256*64)
+// #define RGBLED_TIMER_TOP 0xFF10
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "eeconfig.h"
+#ifndef RGBLIGHT_CUSTOM_DRIVER
+#include "ws2812.h"
+#endif
+#include "rgblight_types.h"
+#include "rgblight_list.h"
+
+extern LED_TYPE led[RGBLED_NUM];
+
+extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
+extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
+extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM;
+
+typedef union {
+ uint32_t raw;
+ struct {
+ bool enable :1;
+ uint8_t mode :6;
+ uint16_t hue :9;
+ uint8_t sat :8;
+ uint8_t val :8;
+ uint8_t speed :8;//EECONFIG needs to be increased to support this
+ };
+} rgblight_config_t;
+
+void rgblight_init(void);
+void rgblight_increase(void);
+void rgblight_decrease(void);
+void rgblight_toggle(void);
+void rgblight_enable(void);
+void rgblight_disable(void);
+void rgblight_step(void);
+void rgblight_step_reverse(void);
+uint8_t rgblight_get_mode(void);
+void rgblight_mode(uint8_t mode);
+void rgblight_set(void);
+void rgblight_update_dword(uint32_t dword);
+void rgblight_increase_hue(void);
+void rgblight_decrease_hue(void);
+void rgblight_increase_sat(void);
+void rgblight_decrease_sat(void);
+void rgblight_increase_val(void);
+void rgblight_decrease_val(void);
+void rgblight_increase_speed(void);
+void rgblight_decrease_speed(void);
+void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
+uint16_t rgblight_get_hue(void);
+uint8_t rgblight_get_sat(void);
+uint8_t rgblight_get_val(void);
+void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
+void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
+void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index);
+
+uint32_t eeconfig_read_rgblight(void);
+void eeconfig_update_rgblight(uint32_t val);
+void eeconfig_update_rgblight_default(void);
+void eeconfig_debug_rgblight(void);
+
+void rgb_matrix_increase(void);
+void rgb_matrix_decrease(void);
+
+void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
+void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
+
+void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
+void rgblight_mode_noeeprom(uint8_t mode);
+void rgblight_toggle_noeeprom(void);
+void rgblight_enable_noeeprom(void);
+void rgblight_disable_noeeprom(void);
+
+void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
+void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
+
+
+#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
+void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
+
+void rgblight_task(void);
+
+void rgblight_timer_init(void);
+void rgblight_timer_enable(void);
+void rgblight_timer_disable(void);
+void rgblight_timer_toggle(void);
+void rgblight_effect_breathing(uint8_t interval);
+void rgblight_effect_rainbow_mood(uint8_t interval);
+void rgblight_effect_rainbow_swirl(uint8_t interval);
+void rgblight_effect_snake(uint8_t interval);
+void rgblight_effect_knight(uint8_t interval);
+void rgblight_effect_christmas(void);
+void rgblight_effect_rgbtest(void);
+
+#endif
diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c
index a15800497..bf5438657 100644
--- a/keyboards/org60/keymaps/default/keymap.c
+++ b/keyboards/org60/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/org60/keymaps/jarred/keymap.c b/keyboards/org60/keymaps/jarred/keymap.c
new file mode 100644
index 000000000..3397a1909
--- /dev/null
+++ b/keyboards/org60/keymaps/jarred/keymap.c
@@ -0,0 +1,25 @@
+#include QMK_KEYBOARD_H
+
+#define _QW 0
+#define _NV 1
+
+// HHKB Layout
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QW] = 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_BSLS, KC_GRV, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
+ MO(_NV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \
+ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_ENT, \
+ XXXXXXX, KC_LCTL, KC_LGUI, KC_SPC, XXXXXXX, KC_RALT, XXXXXXX, KC_RCTL, XXXXXXX),
+
+ [_NV] = LAYOUT(
+ KC_GRV , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
+ _______, _______, _______, _______, KC_DEL ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END , KC_INS , _______, _______, _______, \
+ _______, _______, _______, KC_LSFT,KC_LCTL, KC_ENT, _______,KC_LEFT,KC_DOWN,KC_RGHT, KC_DEL , KC_DEL , _______, _______, \
+ _______, _______, _______, _______, _______,_______,_______,_______,KC_PGUP,KC_PGDN, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, RESET, _______),
+
+};
+
+
diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h
index 3df957b84..ce4538b08 100644
--- a/keyboards/orthodox/keymaps/default/config.h
+++ b/keyboards/orthodox/keymaps/default/config.h
@@ -19,10 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
/* Use I2C or Serial, not both */
@@ -44,6 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
SONG(DVORAK_SOUND) \
}
#endif
-
-
-#endif
diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h
index 51c524552..6f8dad60a 100644
--- a/keyboards/orthodox/orthodox.h
+++ b/keyboards/orthodox/orthodox.h
@@ -1,5 +1,6 @@
-#ifndef ORTHODOX_H
-#define ORTHODOX_H
+#pragma once
+
+#include "quantum.h"
#ifdef KEYBOARD_orthodox_rev1
#include "rev1.h"
@@ -25,7 +26,3 @@
{ KC_##LR18, KC_##LR17, KC_##LR16, KC_##LR15, KC_##LR14, KC_##LR13, KC_##LR12, KC_NO, KC_##LR10 }, \
{ KC_##LR28, KC_##LR27, KC_##LR26, KC_##LR25, KC_##LR24, KC_##LR23, KC_##LR22, KC_##LR21, KC_##LR20 } \
}
-
-#include "quantum.h"
-
-#endif
diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h
index f7497c09c..198fff5ac 100644
--- a/keyboards/orthodox/rev1/config.h
+++ b/keyboards/orthodox/rev1/config.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REV1_CONFIG_H
-#define REV1_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -49,6 +48,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define SOFT_SERIAL_PIN D0
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -89,5 +90,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h
index e73263fb6..783dfb34b 100644
--- a/keyboards/orthodox/rev1/rev1.h
+++ b/keyboards/orthodox/rev1/rev1.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REV1_H
-#define REV1_H
+#pragma once
#include "orthodox.h"
@@ -42,7 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \
{ R28, R27, R26, R25, R24, R23, R22, R21, R20 } \
}
-
-#endif
-
-
diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h
index d727ae674..53e5b15ae 100644
--- a/keyboards/orthodox/rev3/config.h
+++ b/keyboards/orthodox/rev3/config.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REV3_CONFIG_H
-#define REV3_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -54,6 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define SOFT_SERIAL_PIN D0
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -95,5 +96,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h
index 2be9b9605..783dfb34b 100644
--- a/keyboards/orthodox/rev3/rev3.h
+++ b/keyboards/orthodox/rev3/rev3.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REV3_H
-#define REV3_H
+#pragma once
#include "orthodox.h"
@@ -42,6 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \
{ R28, R27, R26, R25, R24, R23, R22, R21, R20 } \
}
-
-#endif
-
diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h
index 591827fb9..54cbb823e 100644
--- a/keyboards/orthodox/rev3_teensy/config.h
+++ b/keyboards/orthodox/rev3_teensy/config.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REV3_TEENSY_CONFIG_H
-#define REV3_TEENSY_CONFIG_H
+#pragma once
#include "config_common.h"
@@ -46,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define SOFT_SERIAL_PIN D0
+
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -87,5 +88,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h
index 0081a0df0..783dfb34b 100644
--- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h
+++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h
@@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef REV3_TEENSY_H
-#define REV3_TEENSY_H
+#pragma once
#include "orthodox.h"
@@ -42,6 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \
{ R28, R27, R26, R25, R24, R23, R22, R21, R20 } \
}
-
-#endif
-
diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk
index 715f25c3a..61878ea83 100644
--- a/keyboards/orthodox/rules.mk
+++ b/keyboards/orthodox/rules.mk
@@ -1,8 +1,3 @@
-SRC += matrix.c \
- i2c.c \
- split_util.c \
- serial.c
-
# MCU name
MCU = atmega32u4
@@ -40,7 +35,7 @@ F_USB = $(F_CPU)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
+# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
# Interrupt driven control endpoint task(+60)
@@ -61,12 +56,10 @@ MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-SUBPROJECT_rev1 = yes
-USE_I2C = yes
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-CUSTOM_MATRIX = yes
+SPLIT_KEYBOARD = yes
DEFAULT_FOLDER = orthodox/rev3
diff --git a/keyboards/orthodox/serial.c b/keyboards/orthodox/serial.c
deleted file mode 100644
index fea57b651..000000000
--- a/keyboards/orthodox/serial.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * WARNING: be careful changing this code, it is very timing dependent
- */
-
-#ifndef F_CPU
-#define F_CPU 16000000
-#endif
-
-#include <avr/io.h>
-#include <avr/interrupt.h>
-#include <util/delay.h>
-#include <stdbool.h>
-#include "serial.h"
-
-#ifndef USE_I2C
-
-// Serial pulse period in microseconds. Its probably a bad idea to lower this
-// value.
-#define SERIAL_DELAY 24
-
-matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
-matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
-
-#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS))
-
-#define SLAVE_DATA_CORRUPT (1<<0)
-volatile uint8_t status = 0;
-
-inline static
-void serial_delay(void) {
- _delay_us(SERIAL_DELAY);
-}
-
-inline static
-void serial_output(void) {
- SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
-}
-
-// make the serial pin an input with pull-up resistor
-inline static
-void serial_input(void) {
- SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-inline static
-matrix_row_t serial_read_pin(void) {
- return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
-}
-
-inline static
-void serial_low(void) {
- SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
-}
-
-inline static
-void serial_high(void) {
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-void serial_master_init(void) {
- serial_output();
- serial_high();
-}
-
-void serial_slave_init(void) {
- serial_input();
-
- // Enable INT0
- EIMSK |= _BV(INT0);
- // Trigger on falling edge of INT0
- EICRA &= ~(_BV(ISC00) | _BV(ISC01));
-}
-
-// Used by the master to synchronize timing with the slave.
-static
-void sync_recv(void) {
- serial_input();
- // This shouldn't hang if the slave disconnects because the
- // serial line will float to high if the slave does disconnect.
- while (!serial_read_pin());
- serial_delay();
-}
-
-// Used by the slave to send a synchronization signal to the master.
-static
-void sync_send(void) {
- serial_output();
-
- serial_low();
- serial_delay();
-
- serial_high();
-}
-
-// Reads a byte from the serial line
-static
-matrix_row_t serial_read_byte(void) {
- matrix_row_t byte = 0;
- serial_input();
- for ( uint8_t i = 0; i < MATRIX_COLS; ++i) {
- byte = (byte << 1) | serial_read_pin();
- serial_delay();
- _delay_us(1);
- }
-
- return byte;
-}
-
-// Sends a byte with MSB ordering
-static
-void serial_write_byte(matrix_row_t data) {
- matrix_row_t b = MATRIX_COLS;
- serial_output();
- while( b-- ) {
- if(data & (1UL << b)) {
- serial_high();
- } else {
- serial_low();
- }
- serial_delay();
- }
-}
-
-// interrupt handle to be used by the slave device
-ISR(SERIAL_PIN_INTERRUPT) {
- sync_send();
-
- matrix_row_t checksum = 0;
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_slave_buffer[i]);
- sync_send();
- checksum += ROW_MASK & serial_slave_buffer[i];
- }
- serial_write_byte(checksum);
- sync_send();
-
- // wait for the sync to finish sending
- serial_delay();
-
- // read the middle of pulses
- _delay_us(SERIAL_DELAY/2);
-
- matrix_row_t checksum_computed = 0;
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_master_buffer[i] = serial_read_byte();
- sync_send();
- checksum_computed += ROW_MASK & serial_master_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_send();
-
- serial_input(); // end transaction
-
- if ( checksum_computed != checksum_received ) {
- status |= SLAVE_DATA_CORRUPT;
- } else {
- status &= ~SLAVE_DATA_CORRUPT;
- }
-}
-
-inline
-bool serial_slave_DATA_CORRUPT(void) {
- return status & SLAVE_DATA_CORRUPT;
-}
-
-// Copies the serial_slave_buffer to the master and sends the
-// serial_master_buffer to the slave.
-//
-// Returns:
-// 0 => no error
-// 1 => slave did not respond
-int serial_update_buffers(void) {
- // this code is very time dependent, so we need to disable interrupts
- cli();
-
- // signal to the slave that we want to start a transaction
- serial_output();
- serial_low();
- _delay_us(1);
-
- // wait for the slaves response
- serial_input();
- serial_high();
- _delay_us(SERIAL_DELAY);
-
- // check if the slave is present
- if (serial_read_pin()) {
- // slave failed to pull the line low, assume not present
- sei();
- return 1;
- }
-
- // if the slave is present syncronize with it
- sync_recv();
-
- matrix_row_t checksum_computed = 0;
- // receive data from the slave
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_slave_buffer[i] = serial_read_byte();
- sync_recv();
- checksum_computed += ROW_MASK & serial_slave_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_recv();
-
- if (checksum_computed != checksum_received) {
- sei();
- return 1;
- }
-
- matrix_row_t checksum = 0;
- // send data to the slave
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_master_buffer[i]);
- sync_recv();
- checksum += ROW_MASK & serial_master_buffer[i];
- }
- serial_write_byte(checksum);
- sync_recv();
-
- // always, release the line when not in use
- serial_output();
- serial_high();
-
- sei();
- return 0;
-}
-
-#endif
diff --git a/keyboards/orthodox/serial.h b/keyboards/orthodox/serial.h
deleted file mode 100644
index a46a98c94..000000000
--- a/keyboards/orthodox/serial.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MY_SERIAL_H
-#define MY_SERIAL_H
-
-#include "config.h"
-#include <stdbool.h>
-#include "matrix.h"
-
-/* TODO: some defines for interrupt setup */
-#define SERIAL_PIN_DDR DDRD
-#define SERIAL_PIN_PORT PORTD
-#define SERIAL_PIN_INPUT PIND
-#define SERIAL_PIN_MASK _BV(PD0)
-#define SERIAL_PIN_INTERRUPT INT0_vect
-
-#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
-#define SERIAL_MASTER_BUFFER_LENGTH 1
-
-// Buffers for master - slave communication
-extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
-extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
-
-void serial_master_init(void);
-void serial_slave_init(void);
-int serial_update_buffers(void);
-bool serial_slave_data_corrupt(void);
-
-#endif
diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h
index 00bdbc60f..edb25ad27 100644
--- a/keyboards/panc60/config.h
+++ b/keyboards/panc60/config.h
@@ -39,5 +39,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_ANIMATIONS
-
-#define NO_UART 1
diff --git a/keyboards/panc60/i2c.c b/keyboards/panc60/i2c.c
deleted file mode 100644
index e8c4455ad..000000000
--- a/keyboards/panc60/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@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/>.
-*/
-
-// Please do not modify this file
-
-#include <avr/io.h>
-#include <util/twi.h>
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the start condition was successfully transmitted
- if ((TWSR & 0xF8) != TW_START) {
- return 1;
- }
-
- // transmit address and wait
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
- return 1;
- }
-
- return 0;
-}
-
-void i2c_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-}
-
-uint8_t i2c_write(uint8_t data) {
- TWDR = data;
-
- // transmit data and wait
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
-
- return 0;
-}
-
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
- if (i2c_start(address)) {
- return 1;
- }
-
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i])) {
- return 1;
- }
- }
-
- i2c_stop();
-
- return 0;
-}
diff --git a/keyboards/panc60/matrix.c b/keyboards/panc60/matrix.c
deleted file mode 100644
index cf0f63837..000000000
--- a/keyboards/panc60/matrix.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-Copyright 2018 Jack Humbert <jack.humb@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 <avr/io.h>
-#include <util/delay.h>
-#include <string.h>
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) { }
-
-__attribute__ ((weak))
-void matrix_scan_user(void) { }
-
-// #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 }
-// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_init(void) {
-
- // disables JTAG so we can use them as columns
- MCUCSR = (1<<JTD);
- MCUCSR = (1<<JTD);
-
- // rows (output)
- DDRB |= ((1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
- PORTB |= ((1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
-
- // cols (input)
- DDRA &= ~((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
- DDRC &= ~((1 << 7) | (1 << 6) | (1 << 5) | (1 << 4) | (1 << 3) | (1 << 2));
- DDRD &= ~((1 << 7));
-
- // pull-up cols
- PORTA |= ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
- PORTC |= ((1 << 7) | (1 << 6) | (1 << 5) | (1 << 4) | (1 << 3) | (1 << 2));
- PORTD |= ((1 << 7));
-
- // initialize matrix state: all keys off
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- matrix[row] = 0x00;
- matrix_debouncing[row] = 0x00;
- }
-
- matrix_init_quantum();
-}
-
-uint8_t matrix_scan(void) {
-
- // actual matrix scan
- for (uint8_t c = 0; c < MATRIX_ROWS; c++) {
- switch (c) {
- case 0: PORTB &= ~(1 << 3); break;
- case 1: PORTB &= ~(1 << 4); break;
- case 2: PORTB &= ~(1 << 5); break;
- case 3: PORTB &= ~(1 << 6); break;
- case 4: PORTB &= ~(1 << 7); break;
- }
- _delay_us(5);
-
- matrix_row_t current_row = (
- (((PINA & (1 << 0)) ? 0 : 1 ) << 0) |
- (((PINA & (1 << 1)) ? 0 : 1 ) << 1) |
- (((PINA & (1 << 2)) ? 0 : 1 ) << 2) |
- (((PINA & (1 << 3)) ? 0 : 1 ) << 3) |
- (((PINA & (1 << 4)) ? 0 : 1 ) << 4) |
- (((PINA & (1 << 5)) ? 0 : 1 ) << 5) |
- (((PINA & (1 << 6)) ? 0 : 1 ) << 6) |
- (((PINA & (1 << 7)) ? 0 : 1 ) << 7) |
- (((PINC & (1 << 7)) ? 0 : 1 ) << 8) |
- (((PINC & (1 << 6)) ? 0 : 1 ) << 9) |
- (((PINC & (1 << 5)) ? 0 : 1 ) << 10) |
- (((PINC & (1 << 4)) ? 0 : 1 ) << 11) |
- (((PINC & (1 << 3)) ? 0 : 1 ) << 12) |
- (((PINC & (1 << 2)) ? 0 : 1 ) << 13) |
- (((PIND & (1 << 7)) ? 0 : 1 ) << 14)
- );
-
- switch (c) {
- case 0: PORTB |= (1 << 3); break;
- case 1: PORTB |= (1 << 4); break;
- case 2: PORTB |= (1 << 5); break;
- case 3: PORTB |= (1 << 6); break;
- case 4: PORTB |= (1 << 7); break;
- }
-
- if (matrix_debouncing[c] != current_row) {
- matrix_debouncing[c] = current_row;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c
index 9ac087dbf..16674d30d 100644
--- a/keyboards/panc60/panc60.c
+++ b/keyboards/panc60/panc60.c
@@ -24,7 +24,7 @@
#include <avr/pgmspace.h>
#include "action_layer.h"
-#include "i2c.h"
+#include "i2c_master.h"
#include "quantum.h"
__attribute__ ((weak))
@@ -44,7 +44,7 @@ void rgblight_set(void) {
}
i2c_init();
- i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
}
#endif
diff --git a/keyboards/panc60/panc60.h b/keyboards/panc60/panc60.h
index 95dcb1f90..ee4569c61 100644
--- a/keyboards/panc60/panc60.h
+++ b/keyboards/panc60/panc60.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef PANC60_H
-#define PANC60_H
+#pragma once
#include "quantum.h"
@@ -67,5 +66,3 @@
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
{ KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, KC_NO, KC_NO } \
}
-
-#endif
diff --git a/keyboards/panc60/readme.md b/keyboards/panc60/readme.md
index 05ac3d72b..737f238f6 100644
--- a/keyboards/panc60/readme.md
+++ b/keyboards/panc60/readme.md
@@ -14,6 +14,8 @@ Make example for this keyboard (after setting up your build environment):
Flashing
+**Reset Key:** Hold down the key located at `K40`, commonly programmed as left control while plugging in the keyboard. You may also hold down the key located at `K00`, commonly programmed as the `Esc` key.
+
ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
To put the panc60 into reset, hold left control while plugging in.
@@ -36,9 +38,9 @@ macOS:
```
3. Install the following packages:
```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+ brew install python3
+ pip3 install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
4. Place your keyboard into reset.
5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk
index 588562a95..843875182 100644
--- a/keyboards/panc60/rules.mk
+++ b/keyboards/panc60/rules.mk
@@ -31,7 +31,7 @@ F_CPU = 12000000
BOOTLOADER = bootloadHID
# build options
-BOOTMAGIC_ENABLE = yes
+BOOTMAGIC_ENABLE = lite
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
@@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC = i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/panc60/usbconfig.h b/keyboards/panc60/usbconfig.h
index d2d848fcd..54a7d20f1 100644
--- a/keyboards/panc60/usbconfig.h
+++ b/keyboards/panc60/usbconfig.h
@@ -8,8 +8,7 @@
* This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
*/
-#ifndef __usbconfig_h_included__
-#define __usbconfig_h_included__
+#pragma once
#include "config.h"
@@ -392,5 +391,3 @@ section at the end of this file).
/* #define USB_INTR_PENDING EIFR */
#define USB_INTR_PENDING_BIT INTF1
#define USB_INTR_VECTOR INT1_vect
-
-#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/phantom/keymaps/default/config.h b/keyboards/phantom/keymaps/default/config.h
index a3828f7d5..09b8f1bc7 100644
--- a/keyboards/phantom/keymaps/default/config.h
+++ b/keyboards/phantom/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h
new file mode 100644
index 000000000..efef3ca18
--- /dev/null
+++ b/keyboards/plaid/config.h
@@ -0,0 +1,248 @@
+/*
+Copyright 2019 Takuya Urakawa (dm9records.com)
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/
+#define VENDOR_ID 0x16c0
+#define PRODUCT_ID 0x27db
+#define DEVICE_VER 0x0002
+#define MANUFACTURER dm9records
+#define PRODUCT plaid
+#define DESCRIPTION 12x4 ortholinear keyboard with through hole components
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+#define MATRIX_ROW_PINS { B4, B5, B3, D4 }
+#define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1, D0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+#define NO_UART 1
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/plaid/info.json b/keyboards/plaid/info.json
new file mode 100644
index 000000000..13bd05c14
--- /dev/null
+++ b/keyboards/plaid/info.json
@@ -0,0 +1,113 @@
+{
+ "keyboard_name": "Plaid // Through Hole",
+ "keyboard_folder": "planid",
+ "url": "https://github.com/hsgw/plaid",
+ "maintainer": "hsgw",
+ "width": 12,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_plaid_mit": {
+ "key_count": 47,
+ "layout": [
+ { "w": 1, "x": 0, "y": 0 },
+ { "w": 1, "x": 1, "y": 0 },
+ { "w": 1, "x": 2, "y": 0 },
+ { "w": 1, "x": 3, "y": 0 },
+ { "w": 1, "x": 4, "y": 0 },
+ { "w": 1, "x": 5, "y": 0 },
+ { "w": 1, "x": 6, "y": 0 },
+ { "w": 1, "x": 7, "y": 0 },
+ { "w": 1, "x": 8, "y": 0 },
+ { "w": 1, "x": 9, "y": 0 },
+ { "w": 1, "x": 10, "y": 0 },
+ { "w": 1, "x": 11, "y": 0 },
+ { "w": 1, "x": 0, "y": 1 },
+ { "w": 1, "x": 1, "y": 1 },
+ { "w": 1, "x": 2, "y": 1 },
+ { "w": 1, "x": 3, "y": 1 },
+ { "w": 1, "x": 4, "y": 1 },
+ { "w": 1, "x": 5, "y": 1 },
+ { "w": 1, "x": 6, "y": 1 },
+ { "w": 1, "x": 7, "y": 1 },
+ { "w": 1, "x": 8, "y": 1 },
+ { "w": 1, "x": 9, "y": 1 },
+ { "w": 1, "x": 10, "y": 1 },
+ { "w": 1, "x": 11, "y": 1 },
+ { "w": 1, "x": 0, "y": 2 },
+ { "w": 1, "x": 1, "y": 2 },
+ { "w": 1, "x": 2, "y": 2 },
+ { "w": 1, "x": 3, "y": 2 },
+ { "w": 1, "x": 4, "y": 2 },
+ { "w": 1, "x": 5, "y": 2 },
+ { "w": 1, "x": 6, "y": 2 },
+ { "w": 1, "x": 7, "y": 2 },
+ { "w": 1, "x": 8, "y": 2 },
+ { "w": 1, "x": 9, "y": 2 },
+ { "w": 1, "x": 10, "y": 2 },
+ { "w": 1, "x": 11, "y": 2 },
+ { "w": 1, "x": 0, "y": 3 },
+ { "w": 1, "x": 1, "y": 3 },
+ { "w": 1, "x": 2, "y": 3 },
+ { "w": 1, "x": 3, "y": 3 },
+ { "w": 1, "x": 4, "y": 3 },
+ { "w": 2, "x": 5, "y": 3 },
+ { "w": 1, "x": 7, "y": 3 },
+ { "w": 1, "x": 8, "y": 3 },
+ { "w": 1, "x": 9, "y": 3 },
+ { "w": 1, "x": 10, "y": 3 },
+ { "w": 1, "x": 11, "y": 3 } ]
+ },
+ "LAYOUT_plaid_grid": {
+ "key_count": 48,
+ "layout": [
+ { "w": 1, "x": 0, "y": 0 },
+ { "w": 1, "x": 1, "y": 0 },
+ { "w": 1, "x": 2, "y": 0 },
+ { "w": 1, "x": 3, "y": 0 },
+ { "w": 1, "x": 4, "y": 0 },
+ { "w": 1, "x": 5, "y": 0 },
+ { "w": 1, "x": 6, "y": 0 },
+ { "w": 1, "x": 7, "y": 0 },
+ { "w": 1, "x": 8, "y": 0 },
+ { "w": 1, "x": 9, "y": 0 },
+ { "w": 1, "x": 10, "y": 0 },
+ { "w": 1, "x": 11, "y": 0 },
+ { "w": 1, "x": 0, "y": 1 },
+ { "w": 1, "x": 1, "y": 1 },
+ { "w": 1, "x": 2, "y": 1 },
+ { "w": 1, "x": 3, "y": 1 },
+ { "w": 1, "x": 4, "y": 1 },
+ { "w": 1, "x": 5, "y": 1 },
+ { "w": 1, "x": 6, "y": 1 },
+ { "w": 1, "x": 7, "y": 1 },
+ { "w": 1, "x": 8, "y": 1 },
+ { "w": 1, "x": 9, "y": 1 },
+ { "w": 1, "x": 10, "y": 1 },
+ { "w": 1, "x": 11, "y": 1 },
+ { "w": 1, "x": 0, "y": 2 },
+ { "w": 1, "x": 1, "y": 2 },
+ { "w": 1, "x": 2, "y": 2 },
+ { "w": 1, "x": 3, "y": 2 },
+ { "w": 1, "x": 4, "y": 2 },
+ { "w": 1, "x": 5, "y": 2 },
+ { "w": 1, "x": 6, "y": 2 },
+ { "w": 1, "x": 7, "y": 2 },
+ { "w": 1, "x": 8, "y": 2 },
+ { "w": 1, "x": 9, "y": 2 },
+ { "w": 1, "x": 10, "y": 2 },
+ { "w": 1, "x": 11, "y": 2 },
+ { "w": 1, "x": 0, "y": 3 },
+ { "w": 1, "x": 1, "y": 3 },
+ { "w": 1, "x": 2, "y": 3 },
+ { "w": 1, "x": 3, "y": 3 },
+ { "w": 1, "x": 4, "y": 3 },
+ { "w": 1, "x": 5, "y": 3 },
+ { "w": 1, "x": 6, "y": 3 },
+ { "w": 1, "x": 7, "y": 3 },
+ { "w": 1, "x": 8, "y": 3 },
+ { "w": 1, "x": 9, "y": 3 },
+ { "w": 1, "x": 10, "y": 3 },
+ { "w": 1, "x": 11, "y": 3 } ]
+ }
+ }
+}
diff --git a/keyboards/plaid/keymaps/default/config.h b/keyboards/plaid/keymaps/default/config.h
new file mode 100644
index 000000000..5733b9e4b
--- /dev/null
+++ b/keyboards/plaid/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 Takuya Urakawa (dm9records.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c
new file mode 100644
index 000000000..f27abb0aa
--- /dev/null
+++ b/keyboards/plaid/keymaps/default/keymap.c
@@ -0,0 +1,222 @@
+/* Copyright 2019 Takuya Urakawa (dm9records.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum plaid_layers {
+ _QWERTY,
+ _COLEMAK,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _PLOVER,
+ _ADJUST
+};
+
+enum plaid_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ PLOVER,
+ EXT_PLV
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_plaid_grid(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_plaid_grid(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_plaid_grid(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
+ KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_plaid_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_plaid_grid(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+/* Plover layer (http://opensteno.org)
+ * ,-----------------------------------------------------------------------------------.
+ * | # | # | # | # | # | # | # | # | # | # | # | # |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | S | T | P | H | * | * | F | P | L | T | D |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | S | K | W | R | * | * | R | B | G | S | Z |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Exit | | | A | O | | E | U | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+
+[_PLOVER] = LAYOUT_plaid_grid(
+ KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
+ XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_plaid_grid(
+ _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case PLOVER:
+ if (record->event.pressed) {
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ layer_on(_PLOVER);
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ keymap_config.raw = eeconfig_read_keymap();
+ keymap_config.nkro = 1;
+ eeconfig_update_keymap(keymap_config.raw);
+ }
+ return false;
+ break;
+ case EXT_PLV:
+ if (record->event.pressed) {
+ layer_off(_PLOVER);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/plaid/keymaps/default/readme.md
new file mode 100644
index 000000000..6f68e46af
--- /dev/null
+++ b/keyboards/plaid/keymaps/default/readme.md
@@ -0,0 +1,2 @@
+# The default keymap for plaid
+folk from planck
diff --git a/keyboards/plaid/plaid.c b/keyboards/plaid/plaid.c
new file mode 100644
index 000000000..28f56d7f9
--- /dev/null
+++ b/keyboards/plaid/plaid.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 Takuya Urakawa (dm9records.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "plaid.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/plaid/plaid.h b/keyboards/plaid/plaid.h
new file mode 100644
index 000000000..4ebdcea11
--- /dev/null
+++ b/keyboards/plaid/plaid.h
@@ -0,0 +1,63 @@
+/* Copyright 2019 Takuya Urakawa (dm9records.com)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_plaid_mit( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \
+}
+
+#define LAYOUT_plaid_grid( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
+}
+
+// Used to create a keymap using only KC_ prefixed keys
+#define KC_KEYMAP( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+ ) \
+ LAYOUT_plaid_grid( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
+ )
+
+#define KEYMAP LAYOUT_plaid_grid
+#define LAYOUT_ortho_4x12 LAYOUT_plaid_grid
+#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
diff --git a/keyboards/plaid/readme.md b/keyboards/plaid/readme.md
new file mode 100644
index 000000000..dd49ecbdf
--- /dev/null
+++ b/keyboards/plaid/readme.md
@@ -0,0 +1,23 @@
+# plaid // Through Hole
+
+![plaid](https://i.imgur.com/tTi9yR9h.jpg)
+
+12x4 ortholinear keyboard with only through hole components.
+
+Keyboard Maintainer: [hsgw](https://github.com/hsgw)
+Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid)
+Hardware Availability: Group buy in r/mk
+
+Make example for this keyboard (after setting up your build environment):
+ make plaid:default
+
+Flash firmware:
+ // In bootloader mode
+ make plaid:default:program
+
+## Bootloader
+use usbasploader in my repository.
+https://github.com/hsgw/USBaspLoader/tree/plaid
+
+
+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/plaid/rules.mk b/keyboards/plaid/rules.mk
new file mode 100644
index 000000000..3d66334b3
--- /dev/null
+++ b/keyboards/plaid/rules.mk
@@ -0,0 +1,101 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega328p
+PROTOCOL = VUSB
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+#
+# This uses usbaspbootloader
+# BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+OPT_DEFS += -DBOOTLOADER_SIZE=2048
+
+# Flash program via avrdude, but default command is not suitable.
+# You can use plaid:default:program
+PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+
+# disable debug code
+OPT_DEFS = -DDEBUG_LEVEL=0
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+# unsupported features for now
+NO_UART = yes
+NO_SUSPEND_POWER_DOWN = yes
+
+
+LAYOUTS = ortho_4x12 planck_mit planck_grid
+LAYOUTS_HAS_RGB = no
diff --git a/keyboards/plaid/usbconfig.h b/keyboards/plaid/usbconfig.h
new file mode 100644
index 000000000..ea9fdd8ea
--- /dev/null
+++ b/keyboards/plaid/usbconfig.h
@@ -0,0 +1,397 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#ifndef __usbconfig_h_included__
+#define __usbconfig_h_included__
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT 3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT 2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC 0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT 4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER 3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT 0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE 0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL 1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED 0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+// max power draw with maxed white underglow measured at 120 mA (peaks)
+#define USB_CFG_MAX_BUS_POWER 100
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE 1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ 0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL 0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE 0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS 0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF 0
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ * in YL, TCNT0
+ * sts timer0Snapshot, YL
+ * endm
+ * #endif
+ * #define USB_SOF_HOOK myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING 0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC 0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION 0x00, 0x01
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME 'd','m','9','r','e','c','o','r','d','s'
+#define USB_CFG_VENDOR_NAME_LEN 10
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME 'P', 'l', 'a', 'i', 'd'
+#define USB_CFG_DEVICE_NAME_LEN 5
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+#define USB_CFG_SERIAL_NUMBER 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','p','1'
+#define USB_CFG_SERIAL_NUMBER_LEN 17
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS 0
+#define USB_CFG_DEVICE_SUBCLASS 0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS 3 /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
+ * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ * in static memory is in RAM, not in flash memory.
+ * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ * the driver must know the descriptor's length. The descriptor itself is
+ * found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ * char usbDescriptorDevice[];
+ * char usbDescriptorConfiguration[];
+ * char usbDescriptorHidReport[];
+ * char usbDescriptorString0[];
+ * int usbDescriptorStringVendor[];
+ * int usbDescriptorStringDevice[];
+ * int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ * USB_CFG_DESCR_PROPS_DEVICE
+ * USB_CFG_DESCR_PROPS_CONFIGURATION
+ * USB_CFG_DESCR_PROPS_STRINGS
+ * USB_CFG_DESCR_PROPS_STRING_0
+ * USB_CFG_DESCR_PROPS_STRING_VENDOR
+ * USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ * USB_CFG_DESCR_PROPS_HID
+ * USB_CFG_DESCR_PROPS_HID_REPORT
+ * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE 0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
+#define USB_CFG_DESCR_PROPS_STRINGS 0
+#define USB_CFG_DESCR_PROPS_STRING_0 0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
+#define USB_CFG_DESCR_PROPS_UNKNOWN 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG MCUCR */
+/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE GIMSK */
+/* #define USB_INTR_ENABLE_BIT INT0 */
+/* #define USB_INTR_PENDING GIFR */
+/* #define USB_INTR_PENDING_BIT INTF0 */
+/* #define USB_INTR_VECTOR INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+// /* #define USB_INTR_CFG_CLR 0 */
+// /* #define USB_INTR_ENABLE EIMSK */
+// #define USB_INTR_ENABLE_BIT INT1
+// /* #define USB_INTR_PENDING EIFR */
+// #define USB_INTR_PENDING_BIT INTF1
+// #define USB_INTR_VECTOR INT1_vect
+
+#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/planck/keymaps/callum/config.h b/keyboards/planck/keymaps/callum/config.h
new file mode 100644
index 000000000..49f61dee5
--- /dev/null
+++ b/keyboards/planck/keymaps/callum/config.h
@@ -0,0 +1,7 @@
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_INTERVAL 16
+#define MOUSEKEY_MAX_SPEED 10
+#define MOUSEKEY_TIME_TO_MAX 60
+#define MOUSEKEY_WHEEL_DELAY 0
+#define MOUSEKEY_WHEEL_MAX_SPEED 8
+#define MOUSEKEY_WHEEL_TIME_TO_MAX 60
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c
index eca83d832..02456aa7d 100644
--- a/keyboards/planck/keymaps/callum/keymap.c
+++ b/keyboards/planck/keymaps/callum/keymap.c
@@ -13,6 +13,7 @@ enum planck_layers {
_SYMB,
_MOVE,
_FUNC,
+ _MOUSE,
};
enum planck_keycodes {
@@ -21,6 +22,7 @@ enum planck_keycodes {
SYMB,
MOVE,
FUNC,
+ MOUSE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -101,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | | | | | | |
+ * | | | | | | | |Mouse| | | | |
* `-----------------------------------------------------------------------'
*/
[_SYMB] = {
@@ -122,41 +124,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
},
{
_______, _______, _______, _______,
- _______, _______, _______, _______,
+ _______, _______, _______, MOUSE,
_______, _______, _______, _______
}
},
/* MOVE
* ,-----------------------------------------------------------------------.
- * | | | | | | | |Home | Up | End | | Esc |
+ * | | | | | | |CtrUp|Home | Up | End |Caps | Esc |
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | |Left |Down |Right|Caps | Del |
+ * | | | | | | |SpaL |Left |Down |Right|SpaR | Del |
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | |PgDn |PgUp |TabL |TabR | |
+ * | | | | | | |CtrDn|PgDn |PgUp |TabL |TabR | |
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | | | | | | |
+ * | | | | |Mouse| | | | | | | |
* `-----------------------------------------------------------------------'
*/
[_MOVE] = {
{
AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D),
- AC(KC_E), AC(KC_F), XXXXXXX, KC_HOME,
- KC_UP, KC_END, XXXXXXX, KC_ESC
+ AC(KC_E), AC(KC_F), C(KC_UP), KC_HOME,
+ KC_UP, KC_END, KC_CAPS, KC_ESC
},
{
AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J),
- AC(KC_K), AC(KC_L), XXXXXXX, KC_LEFT,
- KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL
+ AC(KC_K), AC(KC_L), C(KC_LEFT), KC_LEFT,
+ KC_DOWN, KC_RGHT, C(KC_RIGHT), KC_DEL
},
{
_______, AC(KC_M), AC(KC_N), AC(KC_O),
- AC(KC_P), AC(KC_Q), XXXXXXX, KC_PGDN,
+ AC(KC_P), AC(KC_Q), C(KC_DOWN), KC_PGDN,
KC_PGUP, SC(KC_TAB), C(KC_TAB), _______
},
{
_______, _______, _______, _______,
- _______, _______, _______, _______,
+ MOUSE, _______, _______, _______,
_______, _______, _______, _______
}
},
@@ -167,7 +169,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
* |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn|
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | |TabL |TabR | | | | |Clmak|Qwrty| |
+ * | | |Home |TabL |TabR |End | | | |Clmak|Qwrty| |
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
* | | | | |Prev |Mute |Play |Next | | | | |
* `-----------------------------------------------------------------------'
@@ -184,8 +186,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_F18, KC_F19, KC_F20, KC_VOLD
},
{
- _______, XXXXXXX, XXXXXXX, SC(KC_TAB),
- C(KC_TAB), XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, KC_HOME, SC(KC_TAB),
+ C(KC_TAB), KC_END, XXXXXXX, XXXXXXX,
XXXXXXX, COLEMAK, QWERTY, _______
},
{
@@ -193,6 +195,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT,
_______, _______, _______, _______
}
+ },
+
+ /* MOUSE
+ * ,-----------------------------------------------------------------------.
+ * | | | | | | | | ScL |Up | ScR | | |
+ * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
+ * | | B4 | B3 | B2 | B1 | | |Left |Down |Right| | |
+ * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
+ * | | | Ac0 | Ac1 | Ac2 | | | ScD | ScU | | | |
+ * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------'
+ */
+ [_MOUSE] = {
+ {
+ _______, _______, C(KC_LEFT), C(KC_UP),
+ C(KC_RIGHT), _______, _______, KC_WH_L,
+ KC_MS_U, KC_WH_R, _______, _______
+ },
+ {
+ _______, KC_BTN4, KC_BTN3, KC_BTN2,
+ KC_BTN1, _______, _______, KC_MS_L,
+ KC_MS_D, KC_MS_R, _______, _______
+ },
+ {
+ _______, _______, KC_ACL0, KC_ACL1,
+ KC_ACL2, _______, _______, KC_WH_D,
+ KC_WH_U, _______, _______, _______
+ },
+ {
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ }
}
};
@@ -250,6 +286,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_FUNC);
}
return false;
+ case MOUSE:
+ if (record->event.pressed) {
+ layer_on(_MOUSE);
+ } else {
+ layer_off(_MOUSE);
+ }
+ return false;
// Override the defualt auto shifted symbols to use SEND_STRING
// See https://github.com/qmk/qmk_firmware/issues/4072
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md
index 176211cd4..99b6dfbef 100644
--- a/keyboards/planck/keymaps/callum/readme.md
+++ b/keyboards/planck/keymaps/callum/readme.md
@@ -17,68 +17,7 @@ This is a layout for the grid planck, built with a few ideals in mind:
- There should be two of every modifier (one on each side), otherwise certain
long key combinations become hard to make.
-Keys are arranged as follows. Blank keys below may actually contain
-undocumented shortcuts specific to my workflow. The base layer can be set to
-colemak or qwerty (from the function layer).
+A layout graphic can be found [here][keyboard-layout-editor] (excludes window
+management keys).
-```
-/* COLEMAK
- * ,-----------------------------------------------------------------------.
- * |Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |Bksp | A | R | S | T | D | H | N | E | I | O | ' |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |Shift| Z | X | C | V | B | K | M | , | . | / |Shift|
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |FUNC |Super| Alt |Ctrl |SYMB |Enter|Space|MOVE |Ctrl | Alt |Super|FUNC |
- * `-----------------------------------------------------------------------'
- */
-
-/* QWERTY
- * ,-----------------------------------------------------------------------.
- * |Tab | Q | W | E | R | T | Y | U | I | O | P | - |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |Bksp | A | S | D | F | G | H | J | K | L | ; | ' |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |Shift| Z | X | C | V | B | N | M | , | . | / |Shift|
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |FUNC |Super| Alt |Ctrl |SYMB |Enter|Space|MOVE |Ctrl | Alt |Super|FUNC |
- * `-----------------------------------------------------------------------'
- */
-
-/* SYMB
- * ,-----------------------------------------------------------------------.
- * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | | | | | | |
- * `-----------------------------------------------------------------------'
- */
-
-/* MOVE
- * ,-----------------------------------------------------------------------.
- * | | | | | | | |Home | Up | End | | Esc |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | |Left |Down |Right|Caps | Del |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | |PgDn |PgUp | | | |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | | | | | | | | | |
- * `-----------------------------------------------------------------------'
- */
-
-/* FUNC
- * ,-----------------------------------------------------------------------.
- * |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp|
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn|
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | F21 | F22 | F23 | F24 | | | | |COLMK|QWRTY| |
- * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
- * | | | | |Prev |Mute |Play |Next | | | | |
- * `-----------------------------------------------------------------------'
- */
- ```
+[keyboard-layout-editor]: http://www.keyboard-layout-editor.com/#/gists/ade5ec1f814bf83046489a4b632575ff
diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk
index 25d398f08..4774c2c41 100644
--- a/keyboards/planck/keymaps/callum/rules.mk
+++ b/keyboards/planck/keymaps/callum/rules.mk
@@ -3,7 +3,7 @@
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
diff --git a/keyboards/planck/keymaps/davidrambo/config.h b/keyboards/planck/keymaps/davidrambo/config.h
index 2decb3dc8..ccb18de3d 100644
--- a/keyboards/planck/keymaps/davidrambo/config.h
+++ b/keyboards/planck/keymaps/davidrambo/config.h
@@ -1,8 +1,6 @@
-#ifndef CONFIG_USER_H
+#pragma once
-#define CONFIG_USER_H
#define TAPPING_TERM 200
-#include "../../config.h"
#define PERMISSIVE_HOLD
-#endif
+
diff --git a/keyboards/planck/keymaps/davidrambo/keymap.c b/keyboards/planck/keymaps/davidrambo/keymap.c
index 2bf13f24a..b82791194 100644
--- a/keyboards/planck/keymaps/davidrambo/keymap.c
+++ b/keyboards/planck/keymaps/davidrambo/keymap.c
@@ -1,5 +1,4 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
+#include QMK_KEYBOARD_H
#define A_BSPC LALT(KC_BSPC)
#define A_LEFT LALT(KC_LEFT)
@@ -8,7 +7,7 @@
#define GSL LGUI(S(KC_LEFT))
#define GSR LGUI(S(KC_RGHT))
#define G_TAB LGUI(KC_TAB)
-#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application
+#define G_GRV LGUI(KC_GRV)
#define SftEnt SFT_T(KC_ENT)
#define NAV LT(2, KC_TAB)
@@ -21,8 +20,7 @@ enum {
SFT_LCK
};
-//alias for tapdance
-#define SftLck TD(SFT_LCK)
+#define SftLck TD(SFT_LCK) /* alias for tapdance */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -38,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt },
- {KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+[_COLEMAK] = LAYOUT_planck_grid(
+ KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt ,
+ KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Symbol
* ,-----------------------------------------------------------------------------------.
@@ -51,26 +49,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | Home | End | ScUp | ScDn | F1 | F2 | -_ |Pg Up | | / | |
+ * | | Home | End | ScUp | ScDn | BRMD | BRMU | -_ |Pg Up | | / | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | `~ | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | |
* `-----------------------------------------------------------------------------------'
*/
-[_SYMBOL] = {
- {KC_LBRC, KC_1, KC_2, KC_3, KC_4 , KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC},
- {KC_BSLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL },
- {_______, KC_HOME, KC_END, KC_WH_U, KC_WH_D,KC_F1 , KC_F2 , KC_MINS, KC_PGUP, _______, _______, _______},
- {KC_GRV, _______, _______, _______, A_BSPC, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE}
- },
+[_SYMBOL] = LAYOUT_planck_grid(
+ KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC,
+ KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL ,
+ _______, KC_HOME, KC_END , _______, _______, KC_BRMD, KC_BRMU, KC_MINS, KC_PGUP, _______, _______, _______,
+ KC_GRV, _______, _______, _______, A_BSPC , _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE
+ ),
/* Navigation*/
-[_NAVIGATION] = {
- {_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______},
- {_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______},
- {_______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______},
- {RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_NAVIGATION] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______,
+ _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______,
+ _______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______,
+ RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
// Shift vs capslock function. From bbaserdem's Planck keymap.
diff --git a/keyboards/planck/keymaps/davidrambo/rules.mk b/keyboards/planck/keymaps/davidrambo/rules.mk
index 5e5ab3845..427249395 100644
--- a/keyboards/planck/keymaps/davidrambo/rules.mk
+++ b/keyboards/planck/keymaps/davidrambo/rules.mk
@@ -1,3 +1,3 @@
TAP_DANCE_ENABLE = yes
-MOUSEKEY_ENABLE = yes
+
diff --git a/keyboards/planck/keymaps/dsanchezseco/config.h b/keyboards/planck/keymaps/dsanchezseco/config.h
new file mode 100644
index 000000000..6fa31cc8a
--- /dev/null
+++ b/keyboards/planck/keymaps/dsanchezseco/config.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+// Most tactile encoders have detents every 4 stages
+#define ENCODER_RESOLUTION 4
+
diff --git a/keyboards/planck/keymaps/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c
new file mode 100644
index 000000000..311cc110b
--- /dev/null
+++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c
@@ -0,0 +1,116 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ DVORAK,
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | / |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | - |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Lower | Space | Bksp |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_planck_grid(
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
+ KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | AltGr| | | | Del | | Play | Vol- | Vol+ | Next |
+ * `-----------------------------------------------------------------------------------'
+ * ^-- sticky
+ */
+[_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, KC_ENT,
+ _______, OSM(MOD_RALT), _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | AltGr| | | | Del | | Play | Vol- | Vol+ | Next |
+ * `-----------------------------------------------------------------------------------'
+ * ^-- sticky
+ */
+[_RAISE] = LAYOUT_planck_grid(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, KC_ENT,
+ _______, OSM(MOD_RALT), _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
diff --git a/keyboards/planck/keymaps/dsanchezseco/readme.md b/keyboards/planck/keymaps/dsanchezseco/readme.md
new file mode 100644
index 000000000..de9680b49
--- /dev/null
+++ b/keyboards/planck/keymaps/dsanchezseco/readme.md
@@ -0,0 +1,2 @@
+# The Default Planck Layout
+
diff --git a/keyboards/planck/keymaps/dsanchezseco/rules.mk b/keyboards/planck/keymaps/dsanchezseco/rules.mk
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/keyboards/planck/keymaps/dsanchezseco/rules.mk
@@ -0,0 +1 @@
+
diff --git a/keyboards/planck/keymaps/msiu/config.h b/keyboards/planck/keymaps/msiu/config.h
new file mode 100644
index 000000000..40e399a67
--- /dev/null
+++ b/keyboards/planck/keymaps/msiu/config.h
@@ -0,0 +1,40 @@
+#pragma once
+
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+// Most tactile encoders have detents every 4 stages
+#define ENCODER_RESOLUTION 4
+
diff --git a/keyboards/planck/keymaps/msiu/keymap.c b/keyboards/planck/keymaps/msiu/keymap.c
new file mode 100644
index 000000000..aea59e8d7
--- /dev/null
+++ b/keyboards/planck/keymaps/msiu/keymap.c
@@ -0,0 +1,208 @@
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+ _QWERTY,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _NUMB,
+ _FUNC,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ QWERTY = SAFE_RANGE,
+ DVORAK,
+ BACKLIT,
+ EXT_PLV
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_QWERTY] = LAYOUT_planck_grid(
+ LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[_DVORAK] = LAYOUT_planck_grid(
+ _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______,
+ _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+[_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE,
+ _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
+),
+
+[_RAISE] = LAYOUT_planck_grid(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE,
+ _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT
+),
+
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DVORAK, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,_______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
+),
+
+[_FUNC] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+[_NUMB] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC,
+ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______
+)
+
+
+};
+
+#ifdef AUDIO_ENABLE
+ float plover_song[][2] = SONG(PLOVER_SOUND);
+ float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ #ifdef KEYBOARD_planck_rev5
+ PORTE &= ~(1<<6);
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ #ifdef KEYBOARD_planck_rev5
+ PORTE |= (1<<6);
+ #endif
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+bool muse_mode = false;
+uint8_t last_muse_note = 0;
+uint16_t muse_counter = 0;
+uint8_t muse_offset = 70;
+uint16_t muse_tempo = 50;
+
+void encoder_update(bool clockwise) {
+ if (muse_mode) {
+ if (IS_LAYER_ON(_RAISE)) {
+ if (clockwise) {
+ muse_offset++;
+ } else {
+ muse_offset--;
+ }
+ } else {
+ if (clockwise) {
+ muse_tempo+=1;
+ } else {
+ muse_tempo-=1;
+ }
+ }
+ } else {
+ if (clockwise) {
+ register_code(KC_PGDN);
+ unregister_code(KC_PGDN);
+ } else {
+ register_code(KC_PGUP);
+ unregister_code(KC_PGUP);
+ }
+ }
+}
+
+void dip_update(uint8_t index, bool active) {
+ switch (index) {
+ case 0:
+ if (active) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_song);
+ #endif
+ layer_on(_ADJUST);
+ } else {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_ADJUST);
+ }
+ break;
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ #endif
+ }
+ }
+}
+
+void matrix_scan_user(void) {
+ #ifdef AUDIO_ENABLE
+ if (muse_mode) {
+ if (muse_counter == 0) {
+ uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
+ if (muse_note != last_muse_note) {
+ stop_note(compute_freq_for_midi_note(last_muse_note));
+ play_note(compute_freq_for_midi_note(muse_note), 0xF);
+ last_muse_note = muse_note;
+ }
+ }
+ muse_counter = (muse_counter + 1) % muse_tempo;
+ }
+ #endif
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
diff --git a/keyboards/planck/keymaps/msiu/readme.md b/keyboards/planck/keymaps/msiu/readme.md
new file mode 100644
index 000000000..de9680b49
--- /dev/null
+++ b/keyboards/planck/keymaps/msiu/readme.md
@@ -0,0 +1,2 @@
+# The Default Planck Layout
+
diff --git a/keyboards/planck/keymaps/msiu/rules.mk b/keyboards/planck/keymaps/msiu/rules.mk
new file mode 100644
index 000000000..dcf16bef3
--- /dev/null
+++ b/keyboards/planck/keymaps/msiu/rules.mk
@@ -0,0 +1 @@
+SRC += muse.c
diff --git a/keyboards/planck/keymaps/piemod/README.md b/keyboards/planck/keymaps/piemod/README.md
index f2a051da1..9c29e75db 100644
--- a/keyboards/planck/keymaps/piemod/README.md
+++ b/keyboards/planck/keymaps/piemod/README.md
@@ -17,10 +17,6 @@ A keymap for users that need:
Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod.
-### Keymap
-
-![PieMod Keymap](./keymap.png)
-
### TODO
- [ ] Add Emacs layer.
diff --git a/keyboards/planck/keymaps/rjhilgefort/config.h b/keyboards/planck/keymaps/rjhilgefort/config.h
new file mode 100644
index 000000000..672c5d570
--- /dev/null
+++ b/keyboards/planck/keymaps/rjhilgefort/config.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c
new file mode 100644
index 000000000..455aa5a36
--- /dev/null
+++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c
@@ -0,0 +1,153 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ // QWERTY = SAFE_RANGE,
+ BACKLIT,
+ EXT_PLV
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+#define CTRL_ESC MT(MOD_LCTL, KC_ESC)
+#define HYPER LCTL(LALT(QK_LGUI))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+* ,-------------------------------------------------------------------------------------------------------.
+* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------|
+* | Ct/Esc | A | S | D | F | G | H | J | K | L | ; | " |
+* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------|
+* | Shift | Z | X | C | V | B | N | M | , | . | / | Enter |
+* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------|
+* | | Ctrl | Raise | Alt | GUI | Space | Lowr | Hyper | | | Raise |
+* `-------------------------------------------------------------------------------------------------------'
+*/
+[_QWERTY] = LAYOUT_planck_grid(
+ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
+ {CTRL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
+ {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
+ {_______, KC_LCTL, RAISE, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, LOWER, HYPER, _______, _______, RAISE }
+),
+
+/* Lower
+* ,-----------------------------------------------------------------------------------------------------------.
+* | | \ | / | [ | ] | ~ | | | = | + | - | _ | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------|
+* | | { | } | ( | ) | ` | ← | ↓ | ↑ | → | Alt | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------|
+* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------|
+* | | | | | | | | | | | |
+* `-----------------------------------------------------------------------------------------------------------'
+*/
+[_LOWER] = LAYOUT_planck_grid(
+ {_______, KC_BSLS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TILD, KC_PIPE, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, _______},
+ {_______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LALT, _______},
+ {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+),
+
+/* Raise
+* ,----------------------------------------------------------------------------------------------------------.
+* | | | | | | | | 7 | 8 | 9 | | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+* | | VolMte | Vol - | Vol + | Ply/Pse| | | 4 | 5 | 6 | | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+* | | Trak ← | Trak → | Scrn - | Scrn + | | | 1 | 2 | 3 | | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+* | | | | | | | | 0 | . | | |
+* `----------------------------------------------------------------------------------------------------------'
+*/
+[_RAISE] = LAYOUT_planck_grid(
+ {_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______},
+ {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, KC_4, KC_5, KC_6, _______, _______},
+ {_______, KC_MRWD, KC_MFFD, KC_SLCK, KC_PAUS, _______, _______, KC_1, KC_2, KC_3, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______}
+),
+
+/* Adjust (Lower + Raise)
+ * ,----------------------------------------------------------------------------------------------------------.
+ * | | Reset | | | | | | | | | | Del |
+ * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | MuMod | AudOn | AudOff | | | Qwerty | | | | |
+ * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | Voice- | Voice+ | MusOn | Musoff | MIDIon | MIDIof | TermOn | TermOff| | | |
+ * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | |
+ * `----------------------------------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_grid(
+ {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
+ {_______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, _______, _______, _______, _______},
+ {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+)
+
+};
+
+#ifdef AUDIO_ENABLE
+ float plover_song[][2] = SONG(PLOVER_SOUND);
+ float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
+
+/*
+* Example
+* ,----------------------------------------------------------------------------------------------------------.
+* | | | | | | | | | | | | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+* | | | | | | | | | | | | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+* | | | | | | | | | | | | |
+* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+* | | | | | | | | | | | |
+* `----------------------------------------------------------------------------------------------------------'
+*
+[_EXAMPLE] = LAYOUT_planck_grid(
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
+ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
+),
+*/
diff --git a/keyboards/planck/keymaps/rjhilgefort/readme.md b/keyboards/planck/keymaps/rjhilgefort/readme.md
new file mode 100644
index 000000000..f446a7619
--- /dev/null
+++ b/keyboards/planck/keymaps/rjhilgefort/readme.md
@@ -0,0 +1,63 @@
+# [🐦 @rjhilgefort](https://twitter.com/rjhilgefort) Planck Layout
+
+A simple and practical layout featuring:
+
+- Hyper Key === CTRL + ALT + GUI
+- Ctrl/Esc key that is CTRL when held and ESC when tapped
+- Symbols layer that focuses on coding
+- Numpad + media layer
+
+![Imgur](https://i.imgur.com/elygxAb.jpg)
+
+
+## Main
+```
+,-------------------------------------------------------------------------------------------------------.
+| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------|
+| Ct/Esc | A | S | D | F | G | H | J | K | L | ; | " |
+|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------|
+| Shift | Z | X | C | V | B | N | M | , | . | / | Enter |
+|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------|
+| | Ctrl | Raise | Alt | GUI | Space | Lowr | Hyper | | | Raise |
+`-------------------------------------------------------------------------------------------------------'
+```
+
+## Lower
+```
+,-----------------------------------------------------------------------------------------------------------.
+| | \ | / | [ | ] | ~ | | | = | + | - | _ | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------|
+| | { | } | ( | ) | ` | ← | ↓ | ↑ | → | Alt | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------|
+| | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------|
+| | | | | | | | | | | |
+`-----------------------------------------------------------------------------------------------------------'
+```
+
+## Raise
+```
+,----------------------------------------------------------------------------------------------------------.
+| | | | | | | | 7 | 8 | 9 | | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
+| | VolMte | Vol - | Vol + | Ply/Pse| | | 4 | 5 | 6 | | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
+| | Trak ← | Trak → | Scrn - | Scrn + | | | 1 | 2 | 3 | | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
+| | | | | | | | 0 | . | | |
+`----------------------------------------------------------------------------------------------------------'
+```
+
+## Adjust (Lower + Raise)
+```
+,----------------------------------------------------------------------------------------------------------.
+| | Reset | | | | | | | | | | Del |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
+| | | MuMod | AudOn | AudOff | | | Qwerty | | | | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
+| | Voice- | Voice+ | MusOn | Musoff | MIDIon | MIDIof | TermOn | TermOff| | | |
+|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
+| | | | | | | | | | | |
+`----------------------------------------------------------------------------------------------------------'
+```
diff --git a/keyboards/planck/keymaps/rjhilgefort/rules.mk b/keyboards/planck/keymaps/rjhilgefort/rules.mk
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/planck/keymaps/rjhilgefort/rules.mk
diff --git a/keyboards/planck/keymaps/samuel/README.org b/keyboards/planck/keymaps/samuel/README.org
index d0750ee03..3c0f08a9d 100644
--- a/keyboards/planck/keymaps/samuel/README.org
+++ b/keyboards/planck/keymaps/samuel/README.org
@@ -5,7 +5,7 @@ This is my qmk firmware for my keyboard. I grew tired of organizing the keycode
array in plain text so I made it a literate .org file. I've never done this
before, so bear with me.
-* Keymap
+* Layers
#+BEGIN_COMMENT
#+NAME: empty-layer
@@ -19,7 +19,7 @@ before, so bear with me.
#+END_COMMENT
This is my "pretty" org mode organized table for my main dvorak layer. If you
-don't use org mode, it won't be that exiting, but if you enjoy working in org
+don't use org mode, it won't be that exciting, but if you enjoy working in org
mode, you can edit this table directly, and this file is tangled to the actual
keymap. No more organizing spaces or converting to and from comments.
@@ -31,23 +31,45 @@ keymap. No more organizing spaces or converting to and from comments.
| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | T_RGUI |
|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------|
+This qwerty layout is just so normal people can try out the board. Tap keys
+would need to be customized I think, more on that later. I also put another
+dvorak key here because I have nightmares of getting trapped in this forsaken
+layout.
+
+#+NAME: qwerty-layer
+|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------|
+| T_LRSE | Q | W | E | R | T | Y | U | I | O | P | T_RRSE |
+| T_LSFT | A | S | D | F | G | H | J | K | L | SCLN | T_RSFT |
+| T_LCTL | Z | X | C | V | B | N | M | COMM | DOT | QUOT | T_RCTL |
+| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | DVORAK |
+|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------|
+
I tried to keep my layout bare bones, just what would be available on a normal
-keyboard, minus some keys I never used. The bottom left copies a normal
+keyboard, minus some keys I never used. This one secondary layer should cover a
+majority of the keys not found on the home layer. The bottom left copies a normal
keyboards symbols from shifted numbers, and the rest is placed where convenient,
with some considerations for one handed use, hence the shortcuts in the top
left.
-#+TODO: qwerty layer for ma friends
-
#+NAME: secondary-layer
-|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----|
-| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | F11 | -- |
-| -- | ESC | CAPS | PGUP | PGDN | F4 | ASTR | 4 | 5 | 6 | 0 | -- |
-| -- | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | F12 | -- |
-| -- | -- | EZUP | EZDOWN | -- | AMPR | PIPE | -- | EZLEFT | EZRGHT | -- | -- |
-|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----|
-
-But wait, we are missing several important keys!? yes, well, the modifier keys
+|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------|
+| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | -- | -- |
+| EZSHFT | ESC | CAPS | PGUP | PGDN | HOME | ASTR | 4 | 5 | 6 | 0 | EZSHFT |
+| EZCTRL | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | COM | EZCTRL |
+| EZGUI | EZALT | EZUP | EZDOWN | SPC | AMPR | PIPE | END | EZLEFT | EZRGHT | EZALT | EZGUI |
+|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------|
+
+Basic command layer for one-shot macros and function keys.
+
+#+NAME: command-layer
+|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----|
+| -- | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -- |
+| -- | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | -- |
+| -- | F21 | F22 | F23 | F24 | QWERTY | DVORAK | USER | EMAIL | NAME | -- | -- |
+| -- | -- | -- | -- | -- | -- | -- | DIR | -- | -- | -- | -- |
+|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----|
+
+But wait, we are missing several important keys? well, yes, but the modifier keys
all do other keys when tapped. More about that in the keymap section.
* Keymap Conversion in Python
@@ -55,7 +77,7 @@ all do other keys when tapped. More about that in the keymap section.
This python can convert that table into the array needed for the keymap file. It
simply prepends every key with "KC_". I used to use a dictionary to convert some
keys from the table into qmk keycodes, but the double convertion was
-unneccessary so I simply prepended all my macros with KC and moved all the
+unneccessary so I just prepended all my macros with KC and moved all the
implementation to the `process-user-input` function.
#+NAME:layer-to-array
@@ -84,55 +106,69 @@ return results
* keymap.c
-Now that we have done all the hard work, lets layout our keymap file then define
-our macros.
-
-** Headers And Layer Declaration
+Now that we laid out our layout, lets lay out our kemap file.
#+BEGIN_SRC C :noweb yes
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
-static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-char last_mod = -1;
+#+END_SRC
-enum planck_layers {
- _DVORAK,
- _RISE
-};
+** Keycodes
+#+BEGIN_SRC C :noweb yes
// where the 'T_' communicates how the key does something different when tapped.
enum planck_keycodes {
- DVORAK = SAFE_RANGE,
- KC_T_LALT,
- KC_T_RALT,
- KC_T_LGUI,
- KC_T_RGUI,
- KC_T_LCTL,
- KC_T_RCTL,
- KC_T_LSFT,
- KC_T_RSFT,
- KC_T_LRSE,
- KC_T_RRSE,
- KC_EZRGHT,
- KC_EZLEFT,
- KC_EZUP,
- KC_EZDOWN,
- KC_EZUNDO,
- KC_EZCOPY,
- KC_EZCUT,
- KC_EZPSTE
+//DVORAK = SAFE_RANGE,
+KC_T_LALT = SAFE_RANGE,
+KC_T_RALT,
+KC_T_LGUI,
+KC_T_RGUI,
+KC_T_LCTL,
+KC_T_RCTL,
+KC_T_LSFT,
+KC_T_RSFT,
+KC_T_LRSE,
+KC_T_RRSE,
+KC_EZRGHT,
+KC_EZLEFT,
+KC_EZUP,
+KC_EZDOWN,
+KC_EZUNDO,
+KC_EZCOPY,
+KC_EZCUT,
+KC_EZPSTE,
+KC_EZSHFT,
+KC_EZCTRL,
+KC_EZGUI,
+KC_EZALT,
+KC_DVORAK,
+KC_QWERTY,
+KC_USER,
+KC_EMAIL,
+KC_NAME,
+KC_DIR,
+KC_COM
};
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
#+END_SRC
** Import Key table
#+BEGIN_SRC C :noweb yes
+enum planck_layers {
+_DVORAK,
+_QWERTY,
+_RISE,
+_COMMAND
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+#+END_SRC
+
+#+BEGIN_SRC C :noweb yes
[_DVORAK] =
#+END_SRC
@@ -143,6 +179,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#+END_SRC
#+BEGIN_SRC C :noweb yes
+[_QWERTY] =
+
+#+END_SRC
+
+#+BEGIN_SRC C :noweb yes
+<<layer-to-array(qwerty-layer)>>
+
+#+END_SRC
+
+#+BEGIN_SRC C :noweb yes
[_RISE] =
#+END_SRC
@@ -152,50 +198,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#+END_SRC
-** Process User Input
-*** Tap Key Functionality
+#+BEGIN_SRC C :noweb yes
+[_COMMAND] =
-These methods define how I implemented the tap mechanic. Basically, I believe
-that /pressing/ any other key should be grounds for the hold functionality to be
-assumed. My natuaral typing style experiences no delays from my method.
+#+END_SRC
+
+#+BEGIN_SRC C :noweb yes
+<<layer-to-array(command-layer)>>
+
+#+END_SRC
#+BEGIN_SRC C :noweb yes
};
-void mod_press(uint16_t hold_code, int id) {
- tap_timers[id] = timer_read();
- last_mod = id;
- register_code(hold_code);
+#+END_SRC
+
+** Tap Keys
+
+I don't like tap keys coming out on release. When modified, I often let go of
+the modifier too early because the tap button doesn't come out untill release. I
+guess you could save the state of the board on press and then apply it after the
+timer, but what I really want is the keys to come out on press when they can and
+when it is most useful. For me, that is when they are modified a single time. So
+I kind "locked" the board into only doing single modifiers, making them faster.
+Disadvantages are double modified keys must be done with one shot keys (its
+actually not that bad, it feels like emacs!) and triple modified keys are
+impossible at the moment.
+
+#+BEGIN_SRC C :noweb yes
+
+static uint16_t tap_timer = 0;
+char last_mod = 10;
+
+void mod_press(uint16_t tap_code, uint16_t hold_code, int id) {
+ // this first if body makes double modified keys impossible, but stops the
+ // delay when modifying a tap key which would result in the tap key not
+ // getting modified.
+ if (last_mod != id && last_mod != 10) {
+ tap_code16(tap_code);
+ last_mod = 10;
+ } else {
+ tap_timer = timer_read();
+ last_mod = id;
+ register_code(hold_code);
+ }
}
void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) {
unregister_code(hold_code);
- if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) {
- tap_code16(tap_code);
- last_mod = -1;
+ if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) {
+ tap_code16(tap_code);
+ last_mod = 10;
}
}
#+END_SRC
-*** Set DVORAK layout
-
-The function that filter's user inputs and applies macros, the begginning is
-pretty basic, setting our main layer and configuring our secondary layer.
+** Process User Input
#+BEGIN_SRC C :noweb yes
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case DVORAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_DVORAK);
- }
- return false;
- break;
+ switch (keycode) {
+#+END_SRC
+
+** Layouts
+
+Set Dvorak layout
+
+#+BEGIN_SRC C :noweb yes
+case KC_DVORAK:
+if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+}
+return true;
+break;
+
+#+END_SRC
+
+Set Qwerty layout.
+
+#+BEGIN_SRC C :noweb yes
+case KC_QWERTY:
+if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+}
+return true;
+break;
#+END_SRC
-*** Alt and ()
+** Alt and ()
Left and right alt are ( and ) when tapped. I put them on alt instead of a more
conveniant key like control because parentheses do not need to be shift modified
@@ -204,24 +296,24 @@ ever, unlike some other tap keys seen in the next sections.
#+BEGIN_SRC C :noweb yes
case KC_T_LALT:
if (record->event.pressed) {
- mod_press(KC_LALT, 0);
- } else {
- mod_lift(S(KC_9), KC_LALT, 0);
- }
+ mod_press(S(KC_9), KC_LALT, 0);
+} else {
+ mod_lift(S(KC_9), KC_LALT, 0);
+}
return false;
break;
case KC_T_RALT:
if (record->event.pressed) {
- mod_press(KC_RALT, 1);
- } else {
- mod_lift(S(KC_0), KC_RALT, 1);
- }
+ mod_press(S(KC_0), KC_RALT, 1);
+} else {
+ mod_lift(S(KC_0), KC_RALT, 1);
+}
return false;
break;
#+END_SRC
-*** Gui and `\
+** Gui and `\
I place gui in the bottom corner because I believe it is the hardest key to
reach, so gui seemed like a good fit for a dedicated key that I never want to
@@ -231,24 +323,24 @@ number pad or shifted number keys.
#+BEGIN_SRC C :noweb yes
case KC_T_LGUI:
if (record->event.pressed) {
- mod_press(KC_LGUI, 2);
- } else {
- mod_lift(KC_GRAVE, KC_LGUI, 2);
- }
+ mod_press(KC_GRAVE, KC_LGUI, 2);
+} else {
+ mod_lift(KC_GRAVE, KC_LGUI, 2);
+}
return false;
break;
case KC_T_RGUI:
if (record->event.pressed) {
- mod_press(KC_RGUI, 3);
- } else {
- mod_lift(KC_BSLASH, KC_RGUI, 3);
- }
+ mod_press(KC_BSLASH, KC_RGUI, 3);
+} else {
+ mod_lift(KC_BSLASH, KC_RGUI, 3);
+}
return false;
break;
#+END_SRC
-*** Ctrl and []
+** Ctrl and []
Left and right control are [] respectively when they are tapped, making { and }
also very convenient.
@@ -256,24 +348,24 @@ also very convenient.
#+BEGIN_SRC C :noweb yes
case KC_T_LCTL:
if (record->event.pressed) {
- mod_press(KC_LCTL, 4);
- } else {
- mod_lift(KC_LBRACKET, KC_LCTL, 4);
- }
+ mod_press(KC_LBRACKET, KC_LCTL, 4);
+} else {
+ mod_lift(KC_LBRACKET, KC_LCTL, 4);
+}
return false;
break;
case KC_T_RCTL:
if (record->event.pressed) {
- mod_press(KC_RCTL, 5);
- } else {
- mod_lift(KC_RBRACKET, KC_RCTL, 5);
- }
+ mod_press(KC_RBRACKET, KC_RCTL, 5);
+} else {
+ mod_lift(KC_RBRACKET, KC_RCTL, 5);
+}
return false;
break;
#+END_SRC
-*** Shft and =-
+** Shft and =-
I place shift on the home row, so having '-' right of my pinkie is standard, and
it only felt natural to put its opposite, '=/+' on the other side. I put an
@@ -282,24 +374,24 @@ extra one on the right side in the secondary layer for the num pad.
#+BEGIN_SRC C :noweb yes
case KC_T_LSFT:
if (record->event.pressed) {
- mod_press(KC_LSFT, 6);
- } else {
- mod_lift(KC_EQUAL, KC_LSFT, 6);
- }
+ mod_press(KC_EQUAL, KC_LSFT, 6);
+} else {
+ mod_lift(KC_EQUAL, KC_LSFT, 6);
+}
return false;
break;
case KC_T_RSFT:
if (record->event.pressed) {
- mod_press(KC_RSFT, 7);
- } else {
- mod_lift(KC_MINUS, KC_RSFT, 7);
- }
+ mod_press(KC_MINUS, KC_RSFT, 7);
+} else {
+ mod_lift(KC_MINUS, KC_RSFT, 7);
+}
return false;
break;
#+END_SRC
-*** Rise, DEL, and /
+** Rise, DEL, and /
I use the top corners as rise because I decided that I do not like using layers
with my thumbs. It feels uncomfortable to hold keys down with the side of my
@@ -315,36 +407,78 @@ corner again mimicing a standard dvorak keyboard.
#+BEGIN_SRC C :noweb yes
case KC_T_LRSE:
if (record->event.pressed) {
- tap_timers[8] = timer_read();
- last_mod = 8;
- layer_on(_RISE);
- } else {
- layer_off(_RISE);
- if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) {
- tap_code16(KC_DELETE);
- last_mod = -1;
- }
- }
+ tap_timer = timer_read();
+ last_mod = 8;
+ layer_on(_RISE);
+} else {
+ layer_off(_RISE);
+ if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) {
+ tap_code16(KC_DELETE);
+ last_mod = 10;
+ }
+}
return false;
break;
case KC_T_RRSE:
if (record->event.pressed) {
- tap_timers[9] = timer_read();
- last_mod = 9;
- layer_on(_RISE);
- } else {
- layer_off(_RISE);
- if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) {
- tap_code16(KC_SLASH);
- last_mod = -1;
- }
- }
+ tap_timer = timer_read();
+ last_mod = 9;
+ layer_on(_RISE);
+} else {
+ layer_off(_RISE);
+ if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) {
+ tap_code16(KC_SLASH);
+ last_mod = 10;
+ }
+}
return false;
break;
#+END_SRC
-*** EZ keys
+** EZ Keys
+
+EZ or "easy" keys do things that can already be done on the board, but I want an
+easier way of doing them.
+
+*** One Shot Keys
+
+Since I made modified tap keys occur on press instead of release, I need one
+shot keys to press any key with more than one modifier.
+
+#+BEGIN_SRC C :noweb yes
+case KC_EZSHFT:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LSFT);
+ last_mod = 10;
+}
+return false;
+break;
+case KC_EZCTRL:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LCTL);
+ last_mod = 10;
+}
+return false;
+break;
+case KC_EZALT:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LALT);
+ last_mod = 10;
+}
+return false;
+break;
+case KC_EZGUI:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LGUI);
+ last_mod = 10;
+}
+return false;
+break;
+
+#+END_SRC
+
+*** Arrows
I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became
lazy versions of themselves with control and shift already pressed.
@@ -355,77 +489,134 @@ left hand like on a qwerty or colemek keyboard.
#+BEGIN_SRC C :noweb yes
case KC_EZRGHT:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_RGHT));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_RGHT));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
case KC_EZLEFT:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_LEFT));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_LEFT));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
case KC_EZDOWN:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_DOWN));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_DOWN));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
case KC_EZUP:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_UP));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_UP));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
+#+END_SRC
+
+*** Undo, Copy, Cut, Paste
+
+#+BEGIN_SRC C :noweb yes
case KC_EZUNDO:
if (record->event.pressed) {
- tap_code16(C(KC_Z));
- last_mod = -1;
+ tap_code16(C(KC_Z));
+ last_mod = 10;
}
return false;
break;
case KC_EZCOPY:
if (record->event.pressed) {
- tap_code16(C(KC_C));
- last_mod = -1;
+ tap_code16(C(KC_C));
+ last_mod = 10;
}
return false;
break;
case KC_EZCUT:
if (record->event.pressed) {
- tap_code16(C(KC_X));
- last_mod = -1;
+ tap_code16(C(KC_X));
+ last_mod = 10;
}
return false;
break;
case KC_EZPSTE:
if (record->event.pressed) {
- tap_code16(C(KC_P));
- last_mod = -1;
+ tap_code16(C(KC_V));
+ last_mod = 10;
+}
+return false;
+break;
+#+END_SRC
+
+** Commands
+
+Start command layer one shot
+
+#+BEGIN_SRC C :noweb yes
+case KC_COM:
+if (record->event.pressed) {
+ layer_on(_COMMAND);
+ set_oneshot_layer(_COMMAND, ONESHOT_START);
+ last_mod = 10;
+} else {
+ clear_oneshot_layer_state (ONESHOT_PRESSED);
}
return false;
break;
#+END_SRC
-*** Standard inputs interupt tap
+Just some strings I notice that I type a lot.
+
+#+BEGIN_SRC C :noweb yes
+case KC_USER:
+if (record->event.pressed) {
+ send_string("mhostley");
+ last_mod = 10;
+}
+return true;
+break;
+case KC_EMAIL:
+if (record->event.pressed) {
+ send_string("mhostley@gmail.com");
+ last_mod = 10;
+}
+return true;
+break;
+case KC_NAME:
+if (record->event.pressed) {
+ send_string("Samuel Jahnke");
+ last_mod = 10;
+}
+return true;
+break;
+case KC_DIR:
+if (record->event.pressed) {
+ send_string("home/mhostley/");
+ last_mod = 10;
+}
+return true;
+break;
+
+#+END_SRC
+
+** Standard inputs interupt tap
Finally, if just a standard key is tapped, set the interupted flag.
+Keep this last.
#+BEGIN_SRC C :noweb yes
- }
- last_mod = -1;
- return true;
+}
+last_mod = 10;
+return true;
}
#+END_SRC
diff --git a/keyboards/planck/keymaps/samuel/keymap.c b/keyboards/planck/keymaps/samuel/keymap.c
index 53760da76..ff1424489 100644
--- a/keyboards/planck/keymaps/samuel/keymap.c
+++ b/keyboards/planck/keymaps/samuel/keymap.c
@@ -2,36 +2,45 @@
extern keymap_config_t keymap_config;
-static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-char last_mod = -1;
-
-enum planck_layers {
- _DVORAK,
- _RISE
-};
-
// where the 'T_' communicates how the key does something different when tapped.
enum planck_keycodes {
- DVORAK = SAFE_RANGE,
- KC_T_LALT,
- KC_T_RALT,
- KC_T_LGUI,
- KC_T_RGUI,
- KC_T_LCTL,
- KC_T_RCTL,
- KC_T_LSFT,
- KC_T_RSFT,
- KC_T_LRSE,
- KC_T_RRSE,
- KC_EZRGHT,
- KC_EZLEFT,
- KC_EZUP,
- KC_EZDOWN,
- KC_EZUNDO,
- KC_EZCOPY,
- KC_EZCUT,
- KC_EZPSTE
+//DVORAK = SAFE_RANGE,
+KC_T_LALT = SAFE_RANGE,
+KC_T_RALT,
+KC_T_LGUI,
+KC_T_RGUI,
+KC_T_LCTL,
+KC_T_RCTL,
+KC_T_LSFT,
+KC_T_RSFT,
+KC_T_LRSE,
+KC_T_RRSE,
+KC_EZRGHT,
+KC_EZLEFT,
+KC_EZUP,
+KC_EZDOWN,
+KC_EZUNDO,
+KC_EZCOPY,
+KC_EZCUT,
+KC_EZPSTE,
+KC_EZSHFT,
+KC_EZCTRL,
+KC_EZGUI,
+KC_EZALT,
+KC_DVORAK,
+KC_QWERTY,
+KC_USER,
+KC_EMAIL,
+KC_NAME,
+KC_DIR,
+KC_COM
+};
+
+enum planck_layers {
+_DVORAK,
+_QWERTY,
+_RISE,
+_COMMAND
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -44,202 +53,307 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI}
},
+[_QWERTY] =
+
+{{ KC_T_LRSE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_T_RRSE},
+{ KC_T_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_T_RSFT},
+{ KC_T_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_T_RCTL},
+{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_DVORAK}
+},
+
[_RISE] =
-{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_F11, KC_TRANSPARENT},
-{ KC_TRANSPARENT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_F4, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_TRANSPARENT},
-{ KC_TRANSPARENT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_F12, KC_TRANSPARENT},
-{ KC_TRANSPARENT, KC_TRANSPARENT, KC_EZUP, KC_EZDOWN, KC_TRANSPARENT, KC_AMPR, KC_PIPE, KC_TRANSPARENT, KC_EZLEFT, KC_EZRGHT, KC_TRANSPARENT, KC_TRANSPARENT}
+{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT},
+{ KC_EZSHFT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_EZSHFT},
+{ KC_EZCTRL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_COM, KC_EZCTRL},
+{ KC_EZGUI, KC_EZALT, KC_EZUP, KC_EZDOWN, KC_SPC, KC_AMPR, KC_PIPE, KC_END, KC_EZLEFT, KC_EZRGHT, KC_EZALT, KC_EZGUI}
+},
+
+[_COMMAND] =
+
+{{ KC_TRANSPARENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRANSPARENT},
+{ KC_TRANSPARENT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRANSPARENT},
+{ KC_TRANSPARENT, KC_F21, KC_F22, KC_F23, KC_F24, KC_QWERTY, KC_DVORAK, KC_USER, KC_EMAIL, KC_NAME, KC_TRANSPARENT, KC_TRANSPARENT},
+{ KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_DIR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT}
},
};
-void mod_press(uint16_t hold_code, int id) {
- tap_timers[id] = timer_read();
- last_mod = id;
- register_code(hold_code);
+static uint16_t tap_timer = 0;
+char last_mod = 10;
+
+void mod_press(uint16_t tap_code, uint16_t hold_code, int id) {
+ // this first if body makes double modified keys impossible, but stops the
+ // delay when modifying a tap key which would result in the tap key not
+ // getting modified.
+ if (last_mod != id && last_mod != 10) {
+ tap_code16(tap_code);
+ last_mod = 10;
+ } else {
+ tap_timer = timer_read();
+ last_mod = id;
+ register_code(hold_code);
+ }
}
void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) {
unregister_code(hold_code);
- if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) {
- tap_code16(tap_code);
- last_mod = -1;
+ if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) {
+ tap_code16(tap_code);
+ last_mod = 10;
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case DVORAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_DVORAK);
- }
- return false;
- break;
+ switch (keycode) {
+
+case KC_DVORAK:
+if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+}
+return true;
+break;
+
+case KC_QWERTY:
+if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+}
+return true;
+break;
case KC_T_LALT:
if (record->event.pressed) {
- mod_press(KC_LALT, 0);
- } else {
- mod_lift(S(KC_9), KC_LALT, 0);
- }
+ mod_press(S(KC_9), KC_LALT, 0);
+} else {
+ mod_lift(S(KC_9), KC_LALT, 0);
+}
return false;
break;
case KC_T_RALT:
if (record->event.pressed) {
- mod_press(KC_RALT, 1);
- } else {
- mod_lift(S(KC_0), KC_RALT, 1);
- }
+ mod_press(S(KC_0), KC_RALT, 1);
+} else {
+ mod_lift(S(KC_0), KC_RALT, 1);
+}
return false;
break;
case KC_T_LGUI:
if (record->event.pressed) {
- mod_press(KC_LGUI, 2);
- } else {
- mod_lift(KC_GRAVE, KC_LGUI, 2);
- }
+ mod_press(KC_GRAVE, KC_LGUI, 2);
+} else {
+ mod_lift(KC_GRAVE, KC_LGUI, 2);
+}
return false;
break;
case KC_T_RGUI:
if (record->event.pressed) {
- mod_press(KC_RGUI, 3);
- } else {
- mod_lift(KC_BSLASH, KC_RGUI, 3);
- }
+ mod_press(KC_BSLASH, KC_RGUI, 3);
+} else {
+ mod_lift(KC_BSLASH, KC_RGUI, 3);
+}
return false;
break;
case KC_T_LCTL:
if (record->event.pressed) {
- mod_press(KC_LCTL, 4);
- } else {
- mod_lift(KC_LBRACKET, KC_LCTL, 4);
- }
+ mod_press(KC_LBRACKET, KC_LCTL, 4);
+} else {
+ mod_lift(KC_LBRACKET, KC_LCTL, 4);
+}
return false;
break;
case KC_T_RCTL:
if (record->event.pressed) {
- mod_press(KC_RCTL, 5);
- } else {
- mod_lift(KC_RBRACKET, KC_RCTL, 5);
- }
+ mod_press(KC_RBRACKET, KC_RCTL, 5);
+} else {
+ mod_lift(KC_RBRACKET, KC_RCTL, 5);
+}
return false;
break;
case KC_T_LSFT:
if (record->event.pressed) {
- mod_press(KC_LSFT, 6);
- } else {
- mod_lift(KC_EQUAL, KC_LSFT, 6);
- }
+ mod_press(KC_EQUAL, KC_LSFT, 6);
+} else {
+ mod_lift(KC_EQUAL, KC_LSFT, 6);
+}
return false;
break;
case KC_T_RSFT:
if (record->event.pressed) {
- mod_press(KC_RSFT, 7);
- } else {
- mod_lift(KC_MINUS, KC_RSFT, 7);
- }
+ mod_press(KC_MINUS, KC_RSFT, 7);
+} else {
+ mod_lift(KC_MINUS, KC_RSFT, 7);
+}
return false;
break;
case KC_T_LRSE:
if (record->event.pressed) {
- tap_timers[8] = timer_read();
- last_mod = 8;
- layer_on(_RISE);
- } else {
- layer_off(_RISE);
- if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) {
- tap_code16(KC_DELETE);
- last_mod = -1;
- }
- }
+ tap_timer = timer_read();
+ last_mod = 8;
+ layer_on(_RISE);
+} else {
+ layer_off(_RISE);
+ if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) {
+ tap_code16(KC_DELETE);
+ last_mod = 10;
+ }
+}
return false;
break;
case KC_T_RRSE:
if (record->event.pressed) {
- tap_timers[9] = timer_read();
- last_mod = 9;
- layer_on(_RISE);
- } else {
- layer_off(_RISE);
- if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) {
- tap_code16(KC_SLASH);
- last_mod = -1;
- }
- }
+ tap_timer = timer_read();
+ last_mod = 9;
+ layer_on(_RISE);
+} else {
+ layer_off(_RISE);
+ if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) {
+ tap_code16(KC_SLASH);
+ last_mod = 10;
+ }
+}
+return false;
+break;
+
+case KC_EZSHFT:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LSFT);
+ last_mod = 10;
+}
+return false;
+break;
+case KC_EZCTRL:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LCTL);
+ last_mod = 10;
+}
+return false;
+break;
+case KC_EZALT:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LALT);
+ last_mod = 10;
+}
+return false;
+break;
+case KC_EZGUI:
+if (record->event.pressed) {
+ set_oneshot_mods(MOD_LGUI);
+ last_mod = 10;
+}
return false;
break;
case KC_EZRGHT:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_RGHT));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_RGHT));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
case KC_EZLEFT:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_LEFT));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_LEFT));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
case KC_EZDOWN:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_DOWN));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_DOWN));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
case KC_EZUP:
if (record->event.pressed) {
- register_code(KC_LCTL);
- tap_code16(S(KC_UP));
- unregister_code(KC_LCTL);
- last_mod = -1;
- }
+ register_code(KC_LCTL);
+ tap_code16(S(KC_UP));
+ unregister_code(KC_LCTL);
+ last_mod = 10;
+}
return false;
break;
+
case KC_EZUNDO:
if (record->event.pressed) {
- tap_code16(C(KC_Z));
- last_mod = -1;
+ tap_code16(C(KC_Z));
+ last_mod = 10;
}
return false;
break;
case KC_EZCOPY:
if (record->event.pressed) {
- tap_code16(C(KC_C));
- last_mod = -1;
+ tap_code16(C(KC_C));
+ last_mod = 10;
}
return false;
break;
case KC_EZCUT:
if (record->event.pressed) {
- tap_code16(C(KC_X));
- last_mod = -1;
+ tap_code16(C(KC_X));
+ last_mod = 10;
}
return false;
break;
case KC_EZPSTE:
if (record->event.pressed) {
- tap_code16(C(KC_P));
- last_mod = -1;
+ tap_code16(C(KC_V));
+ last_mod = 10;
}
return false;
break;
- }
- last_mod = -1;
- return true;
+case KC_COM:
+if (record->event.pressed) {
+ layer_on(_COMMAND);
+ set_oneshot_layer(_COMMAND, ONESHOT_START);
+ last_mod = 10;
+} else {
+ clear_oneshot_layer_state (ONESHOT_PRESSED);
+}
+return false;
+break;
+
+case KC_USER:
+if (record->event.pressed) {
+ send_string("mhostley");
+ last_mod = 10;
+}
+return true;
+break;
+case KC_EMAIL:
+if (record->event.pressed) {
+ send_string("mhostley@gmail.com");
+ last_mod = 10;
+}
+return true;
+break;
+case KC_NAME:
+if (record->event.pressed) {
+ send_string("Samuel Jahnke");
+ last_mod = 10;
+}
+return true;
+break;
+case KC_DIR:
+if (record->event.pressed) {
+ send_string("home/mhostley/");
+ last_mod = 10;
+}
+return true;
+break;
+
+}
+last_mod = 10;
+return true;
}
diff --git a/keyboards/planck/keymaps/tom/config.h b/keyboards/planck/keymaps/tom/config.h
new file mode 100644
index 000000000..6fa31cc8a
--- /dev/null
+++ b/keyboards/planck/keymaps/tom/config.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PLANCK_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+// Most tactile encoders have detents every 4 stages
+#define ENCODER_RESOLUTION 4
+
diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c
new file mode 100644
index 000000000..6e3b08938
--- /dev/null
+++ b/keyboards/planck/keymaps/tom/keymap.c
@@ -0,0 +1,264 @@
+/* Copyright 2015-2017 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+extern keymap_config_t keymap_config;
+
+enum planck_layers {
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum planck_keycodes {
+ QWERTY = SAFE_RANGE,
+ BACKLIT
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G | H | J | K | L | ; |Enter |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | Up |Shift |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_planck_grid(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+),
+
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Vol- | Vol+ |Brite-|Brite+|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUOT,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_BRMD, KC_BRMU
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | ' |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | Vol- | Vol+ |Brite-|Brite+|
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_planck_grid(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_BRMD, KC_BRMU
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_planck_grid(
+ C(G(S(KC_4))), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
+
+};
+
+#ifdef AUDIO_ENABLE
+ float plover_song[][2] = SONG(PLOVER_SOUND);
+ float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
+#endif
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ print("mode just switched to qwerty and this is a huge string\n");
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+bool muse_mode = false;
+uint8_t last_muse_note = 0;
+uint16_t muse_counter = 0;
+uint8_t muse_offset = 70;
+uint16_t muse_tempo = 50;
+
+void encoder_update(bool clockwise) {
+ if (muse_mode) {
+ if (IS_LAYER_ON(_RAISE)) {
+ if (clockwise) {
+ muse_offset++;
+ } else {
+ muse_offset--;
+ }
+ } else {
+ if (clockwise) {
+ muse_tempo+=1;
+ } else {
+ muse_tempo-=1;
+ }
+ }
+ } else {
+ if (clockwise) {
+ #ifdef MOUSEKEY_ENABLE
+ tap_code(KC_MS_WH_DOWN);
+ #else
+ tap_code(KC_PGDN);
+ #endif
+ } else {
+ #ifdef MOUSEKEY_ENABLE
+ tap_code(KC_MS_WH_UP);
+ #else
+ tap_code(KC_PGUP);
+ #endif
+ }
+ }
+}
+
+void dip_update(uint8_t index, bool active) {
+ switch (index) {
+ case 0:
+ if (active) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_song);
+ #endif
+ layer_on(_ADJUST);
+ } else {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(plover_gb_song);
+ #endif
+ layer_off(_ADJUST);
+ }
+ break;
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ #ifdef AUDIO_ENABLE
+ stop_all_notes();
+ #endif
+ }
+ }
+}
+
+void matrix_scan_user(void) {
+ #ifdef AUDIO_ENABLE
+ if (muse_mode) {
+ if (muse_counter == 0) {
+ uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
+ if (muse_note != last_muse_note) {
+ stop_note(compute_freq_for_midi_note(last_muse_note));
+ play_note(compute_freq_for_midi_note(muse_note), 0xF);
+ last_muse_note = muse_note;
+ }
+ }
+ muse_counter = (muse_counter + 1) % muse_tempo;
+ }
+ #endif
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
+
+void rgb_matrix_indicators_user(void) {
+ #ifdef RGB_MATRIX_ENABLE
+ rgb_led led;
+ switch (biton32(layer_state)) {
+ case _RAISE:
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ led = g_rgb_leds[i];
+ if ( led.modifier ) {
+ rgb_matrix_set_color(i, 0x6B, 0x00, 0x80);
+ } else {
+ rgb_matrix_set_color(i, 0x00, 0xFF, 0x00);
+ }
+ }
+ break;
+
+ case _LOWER:
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ led = g_rgb_leds[i];
+ if ( led.modifier ) {
+ rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00);
+ } else {
+ rgb_matrix_set_color(i, 0x00, 0x67, 0xC7);
+ }
+ }
+ break;
+
+ case _ADJUST:
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ rgb_matrix_set_color(i, 0xFF, 0x99, 0x00);
+ }
+ rgb_matrix_set_color(1, 0xFF, 0x00, 0x00);
+ break;
+
+ default:
+ break;
+ }
+ #endif
+}
diff --git a/keyboards/planck/keymaps/tom/readme.md b/keyboards/planck/keymaps/tom/readme.md
new file mode 100644
index 000000000..8326cc13d
--- /dev/null
+++ b/keyboards/planck/keymaps/tom/readme.md
@@ -0,0 +1,35 @@
+# tomholford's layout
+
+This layout is data-driven: I installed [WhatPulse](https://whatpulse.org/) a few months ago and generated a heatmap of the most frequently used keys. I also optimized for my most-used programming languages, and muscle memory.
+
+## Changes from Default
+
+### QWERTY
+
+- swap escape and tab
+- rearrange arrows in original layout
+- swap rshift and Enter
+- map / to original location of left arrow key
+
+### RAISE
+
+- move backslash to backspace
+- map quote to original location from qwerty layer
+- map brightness up / down to original location of left and up arrows
+- map volume up / down to original location of down and right arrows
+
+### LOWER
+
+- move pipe to backspace
+- map quote to original location from qwerty layer
+- map brightness up / down to original location of left and up arrows
+- map volume up / down to original location of down and right arrows
+
+### ADJUST
+
+- map to esc key: screenshot region to clipboard - an alias for ctrl + cmd + shift + 4
+
+
+## RGB LED
+
+- Illuminate when pressing RAISE, LOWER, or ADJUST ([source](https://www.reddit.com/r/olkb/comments/8wvk8s/custom_rgb_configuration_by_keycodelayer/))
diff --git a/keyboards/planck/keymaps/tom/rules.mk b/keyboards/planck/keymaps/tom/rules.mk
new file mode 100644
index 000000000..dcf16bef3
--- /dev/null
+++ b/keyboards/planck/keymaps/tom/rules.mk
@@ -0,0 +1 @@
+SRC += muse.c
diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h
index 205351258..40a9524b4 100644
--- a/keyboards/preonic/keymaps/default/config.h
+++ b/keyboards/preonic/keymaps/default/config.h
@@ -1,7 +1,4 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PREONIC_SOUND)
@@ -38,5 +35,3 @@
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
-
-#endif \ No newline at end of file
diff --git a/keyboards/primekb/prime_e/keymaps/default/keymap.c b/keyboards/primekb/prime_e/keymaps/default/keymap.c
index 47692c541..0aab745cd 100644
--- a/keyboards/primekb/prime_e/keymaps/default/keymap.c
+++ b/keyboards/primekb/prime_e/keymaps/default/keymap.c
@@ -44,20 +44,20 @@ void matrix_scan_user(void) {
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- writePinLow(B2);
- } else {
writePinHigh(B2);
+ } else {
+ writePinLow(B2);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- writePinLow(B1);
- } else {
writePinHigh(B1);
+ } else {
+ writePinLow(B1);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- writePinLow(B3);
- } else {
writePinHigh(B3);
+ } else {
+ writePinLow(B3);
}*/
}
@@ -66,9 +66,9 @@ void led_set_user(uint8_t usb_led) {
uint32_t layer_state_set_user(uint32_t state)
{
if (biton32(state) == 1) {
- writePinLow(B3);
+ writePinHigh(B3);
} else {
- writePinHigh(B3);
+ writePinLow(B3);
}
return state;
}
diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c
index 9cc3e2f3d..8b5b13866 100644
--- a/keyboards/primekb/prime_e/keymaps/via/keymap.c
+++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c
@@ -43,20 +43,20 @@ void matrix_scan_user(void) {
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- writePinLow(B2);
- } else {
writePinHigh(B2);
+ } else {
+ writePinLow(B2);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- writePinLow(B1);
- } else {
writePinHigh(B1);
+ } else {
+ writePinLow(B1);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- writePinLow(B3);
- } else {
writePinHigh(B3);
+ } else {
+ writePinLow(B3);
}*/
}
@@ -65,9 +65,9 @@ void led_set_user(uint8_t usb_led) {
uint32_t layer_state_set_user(uint32_t state)
{
if (biton32(state) == 1) {
- writePinLow(B3);
+ writePinHigh(B3);
} else {
- writePinHigh(B3);
+ writePinLow(B3);
}
return state;
}
diff --git a/keyboards/primekb/prime_r/keymaps/default/config.h b/keyboards/primekb/prime_r/keymaps/default/config.h
index e7ffd3aa2..a70a6b372 100644
--- a/keyboards/primekb/prime_r/keymaps/default/config.h
+++ b/keyboards/primekb/prime_r/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md
index 8399dff02..8a558b158 100644
--- a/keyboards/ps2avrGB/README.md
+++ b/keyboards/ps2avrGB/README.md
@@ -30,7 +30,7 @@ $ brew cask install crosspack-avr
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
```
-In order to use the `./program` script, which can reboot the board into
+In order to use the `./util/atmega32a_program.py` script, which can reboot the board into
the bootloader, you'll need Python 2 with PyUSB installed:
```
diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c
index 5c52e1d9b..6b3403ed7 100644
--- a/keyboards/ps2avrGB/keymaps/default/keymap.c
+++ b/keyboards/ps2avrGB/keymaps/default/keymap.c
@@ -15,7 +15,7 @@ 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 "bmini.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program
deleted file mode 100755
index b777b9110..000000000
--- a/keyboards/ps2avrGB/program
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>, Sebastian Kaim <sebb@sebb767.de>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-
-def checkForKeyboardInNormalMode():
- """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
- return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-
-def checkForKeyboardInBootloaderMode():
- """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
- return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
-
-def flashKeyboard(firmware_file):
- """Calls bootloadHID to flash the given file to the device."""
- print('Flashing firmware to device ...')
- if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
- print('\nDone!')
- else:
- print('\nbootloadHID returned an error.')
-
-def printDeviceInfo(dev):
- """Prints all infos for a given USB device"""
- print('Device Information:')
- print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
- print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
- print('Manufacturer: %s' % (dev.iManufacturer))
- print('Serial: %s' % (dev.iSerialNumber))
- print('Product: %s' % (dev.iProduct), end='\n\n')
-
-def sendDeviceToBootloaderMode(dev):
- """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
- try:
- dev.set_configuration()
-
- request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
- USBRQ_HID_SET_REPORT = 0x09
- HID_REPORT_OPTION = 0x0301
-
- dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5)
- except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-kb = checkForKeyboardInNormalMode()
-
-if kb is not None:
- print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='')
- sendDeviceToBootloaderMode(kb)
- print(' done.')
- print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
- print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
-
-attempts = 12 # 60 seconds
-found = False
-for attempt in range(1, attempts + 1):
- print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
-
- if checkForKeyboardInBootloaderMode():
- print('Found', end='\n\n')
- flashKeyboard(sys.argv[1])
- found = True
- break
- else:
- print('Nothing.', end='')
-
- if attempt != attempts: # no need to wait on the last attempt
- print(' Sleeping 5 seconds.', end='')
- time.sleep(5)
-
- # print a newline
- print()
-
-if not found:
- print("Couldn't find a flashable keyboard. Aborting.")
- sys.exit(2)
-
diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h
index e83861e1f..bf4998f0c 100644
--- a/keyboards/ps2avrGB/ps2avrGB.h
+++ b/keyboards/ps2avrGB/ps2avrGB.h
@@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KEYMAP_COMMON_H
#include "quantum.h"
-
-#ifdef KEYBOARD_ps2avrGB_bfake
- #include "bfake.h"
-#endif
-
-#ifdef KEYBOARD_ps2avrGB_bmini_x2
- #include "bmini_x2.h"
-#endif
+#include "bmini.h"
#endif
diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk
index 1be9edc24..95d287f7f 100644
--- a/keyboards/ps2avrGB/rules.mk
+++ b/keyboards/ps2avrGB/rules.mk
@@ -47,4 +47,4 @@ CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c
# programming options
-PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h
new file mode 100644
index 000000000..655314985
--- /dev/null
+++ b/keyboards/quantrik/kyuu/config.h
@@ -0,0 +1,245 @@
+/*
+Copyright 2019 mechmerlin
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Quantrik
+#define PRODUCT Kyuu
+#define DESCRIPTION A 65% keyboard with blocker
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 }
+#define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C7, C6, F0, B7, D0, D5, D3, D2, D1, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #ifdef RGB_DI_PIN
+// #define RGBLED_NUM 16
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/quantrik/kyuu/info.json b/keyboards/quantrik/kyuu/info.json
new file mode 100644
index 000000000..05c1b40b9
--- /dev/null
+++ b/keyboards/quantrik/kyuu/info.json
@@ -0,0 +1,82 @@
+{
+ "keyboard_name": "Kyuu",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 67,
+ "layout": [
+ {"label":"K00 (B6,F1)", "x":0, "y":0},
+ {"label":"K01 (B6,F4)", "x":1, "y":0},
+ {"label":"K02 (B6,F5)", "x":2, "y":0},
+ {"label":"K03 (B6,F6)", "x":3, "y":0},
+ {"label":"K04 (B6,F7)", "x":4, "y":0},
+ {"label":"K05 (B6,C7)", "x":5, "y":0},
+ {"label":"K06 (B6,C6)", "x":6, "y":0},
+ {"label":"K07 (B6,F0)", "x":7, "y":0},
+ {"label":"K08 (B6,B7)", "x":8, "y":0},
+ {"label":"K09 (B6,D0)", "x":9, "y":0},
+ {"label":"K0A (B6,D5)", "x":10, "y":0},
+ {"label":"K0B (B6,D3)", "x":11, "y":0},
+ {"label":"K0C (B6,D2)", "x":12, "y":0},
+ {"label":"K0D (B6,D1)", "x":13, "y":0},
+ {"label":"K0E (B6,B3)", "x":14, "y":0},
+ {"label":"K2E (B4,B3)", "x":15, "y":0},
+ {"label":"K10 (B5,F1)", "x":0, "y":1, "w":1.5},
+ {"label":"K11 (B5,F4)", "x":1.5, "y":1},
+ {"label":"K12 (B5,F5)", "x":2.5, "y":1},
+ {"label":"K13 (B5,F6)", "x":3.5, "y":1},
+ {"label":"K14 (B5,F7)", "x":4.5, "y":1},
+ {"label":"K15 (B5,C7)", "x":5.5, "y":1},
+ {"label":"K16 (B5,C6)", "x":6.5, "y":1},
+ {"label":"K17 (B5,F0)", "x":7.5, "y":1},
+ {"label":"K18 (B5,B7)", "x":8.5, "y":1},
+ {"label":"K19 (B5,D0)", "x":9.5, "y":1},
+ {"label":"K1A (B5,D5)", "x":10.5, "y":1},
+ {"label":"K1B (B5,D3)", "x":11.5, "y":1},
+ {"label":"K1C (B5,D2)", "x":12.5, "y":1},
+ {"label":"K1D (B5,D1)", "x":13.5, "y":1, "w":1.5},
+ {"label":"K1E (B5,B3)", "x":15, "y":1},
+ {"label":"K20 (B4,F1)", "x":0, "y":2, "w":1.75},
+ {"label":"K21 (B4,F4)", "x":1.75, "y":2},
+ {"label":"K22 (B4,F5)", "x":2.75, "y":2},
+ {"label":"K23 (B4,F6)", "x":3.75, "y":2},
+ {"label":"K24 (B4,F7)", "x":4.75, "y":2},
+ {"label":"K25 (B4,C7)", "x":5.75, "y":2},
+ {"label":"K26 (B4,C6)", "x":6.75, "y":2},
+ {"label":"K27 (B4,F0)", "x":7.75, "y":2},
+ {"label":"K28 (B4,B7)", "x":8.75, "y":2},
+ {"label":"K29 (B4,D0)", "x":9.75, "y":2},
+ {"label":"K2A (B4,D5)", "x":10.75, "y":2},
+ {"label":"K2B (B4,D3)", "x":11.75, "y":2},
+ {"label":"K2C (B4,D2)", "x":12.75, "y":2, "w":2.25},
+ {"label":"K2D (B4,D1)", "x":15, "y":2},
+ {"label":"K30 (D7,F1)", "x":0, "y":3, "w":2.25},
+ {"label":"K31 (D7,F4)", "x":2.25, "y":3},
+ {"label":"K32 (D7,F5)", "x":3.25, "y":3},
+ {"label":"K33 (D7,F6)", "x":4.25, "y":3},
+ {"label":"K34 (D7,F7)", "x":5.25, "y":3},
+ {"label":"K35 (D7,C7)", "x":6.25, "y":3},
+ {"label":"K36 (D7,C6)", "x":7.25, "y":3},
+ {"label":"K37 (D7,F0)", "x":8.25, "y":3},
+ {"label":"K38 (D7,B7)", "x":9.25, "y":3},
+ {"label":"K39 (D7,D0)", "x":10.25, "y":3},
+ {"label":"K3A (D7,D5)", "x":11.25, "y":3},
+ {"label":"K3B (D7,D3)", "x":12.25, "y":3, "w":1.75},
+ {"label":"K3C (D7,D2)", "x":14, "y":3},
+ {"label":"K3D (D7,D1)", "x":15, "y":3},
+ {"label":"K40 (D6,F1)", "x":0, "y":4, "w":1.5},
+ {"label":"K41 (D6,F4)", "x":1.5, "y":4},
+ {"label":"K42 (D6,F5)", "x":2.5, "y":4, "w":1.5},
+ {"label":"K46 (D6,C6)", "x":4, "y":4, "w":7},
+ {"label":"K4A (D6,D5)", "x":11, "y":4, "w":1.5},
+ {"label":"K4B (D6,D3)", "x":13, "y":4},
+ {"label":"K4C (D6,D2)", "x":14, "y":4},
+ {"label":"K4D (D6,D1)", "x":15, "y":4}
+ ]
+ }
+ }
+ }
+ \ No newline at end of file
diff --git a/keyboards/quantrik/kyuu/keymaps/default/config.h b/keyboards/quantrik/kyuu/keymaps/default/config.h
new file mode 100644
index 000000000..60dd02a9d
--- /dev/null
+++ b/keyboards/quantrik/kyuu/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 mechmerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/quantrik/kyuu/keymaps/default/keymap.c b/keyboards/quantrik/kyuu/keymaps/default/keymap.c
new file mode 100644
index 000000000..077d7ac5a
--- /dev/null
+++ b/keyboards/quantrik/kyuu/keymaps/default/keymap.c
@@ -0,0 +1,74 @@
+/* Copyright 2019 mechmerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+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_BSLS, KC_GRV, KC_HOME, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_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_LSFT, KC_UP, KC_END, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [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, QMKBEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
+ ),
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/quantrik/kyuu/keymaps/default/readme.md b/keyboards/quantrik/kyuu/keymaps/default/readme.md
new file mode 100644
index 000000000..f87ce36e3
--- /dev/null
+++ b/keyboards/quantrik/kyuu/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for Kyuu
diff --git a/keyboards/quantrik/kyuu/kyuu.c b/keyboards/quantrik/kyuu/kyuu.c
new file mode 100644
index 000000000..e9a72a574
--- /dev/null
+++ b/keyboards/quantrik/kyuu/kyuu.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 mechmerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "kyuu.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/quantrik/kyuu/kyuu.h b/keyboards/quantrik/kyuu/kyuu.h
new file mode 100644
index 000000000..82c024f2e
--- /dev/null
+++ b/keyboards/quantrik/kyuu/kyuu.h
@@ -0,0 +1,42 @@
+/* Copyright 2019 mechmerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k2E, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
+ k40, k41, k42, k46, k47, k4A, k4B, k4C, k4D \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \
+ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, k47, KC_NO, KC_NO, k4A, k4B, k4C, k4D, KC_NO }, \
+}
+
diff --git a/keyboards/quantrik/kyuu/readme.md b/keyboards/quantrik/kyuu/readme.md
new file mode 100644
index 000000000..2b3314098
--- /dev/null
+++ b/keyboards/quantrik/kyuu/readme.md
@@ -0,0 +1,13 @@
+# kyuu
+
+Kyuu is a 65% keyboard inspired by the TGR 910's top right blocker.
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: Quantrik 65% PCB
+Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97810.0), [quantrik.com](https://www.quantrik.com/collections/frontpage/products/kyuu-keyboard)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make quantrik/kyuu: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/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk
new file mode 100644
index 000000000..3229957d9
--- /dev/null
+++ b/keyboards/quantrik/kyuu/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/rama/koyu/config.h b/keyboards/rama/koyu/config.h
new file mode 100644
index 000000000..12dc3d02b
--- /dev/null
+++ b/keyboards/rama/koyu/config.h
@@ -0,0 +1,127 @@
+/* Copyright 2017 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "config_common.h"
+
+// USB Device descriptor parameter
+#define VENDOR_ID 0x5241 // "RW"
+#define PRODUCT_ID 0x4B59 // "KY"
+#define DEVICE_VER 0x0001
+#define MANUFACTURER RAMA.WORKS
+#define PRODUCT RAMA KOYU
+#define DESCRIPTION RAMA KOYU Keyboard
+
+
+
+// key matrix size
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+// KOYU PCB pin-out
+#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 }
+#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 }
+#define UNUSED_PINS
+
+// IS31FL3731 driver
+#define DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL 72
+
+// COL2ROW or ROW2COL
+#define DIODE_DIRECTION COL2ROW
+
+// Set 0 if debouncing isn't needed
+#define DEBOUNCING_DELAY 5
+
+// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
+#define LOCKING_SUPPORT_ENABLE
+// Locking resynchronize hack
+#define LOCKING_RESYNC_ENABLE
+
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+// disable debug print
+//#define NO_DEBUG
+
+// disable print
+//#define NO_PRINT
+
+// disable action features
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#define RGB_BACKLIGHT_ENABLED 1
+
+// This conditionally compiles the backlight code for KOYU specifics
+#define RGB_BACKLIGHT_KOYU
+
+// enable/disable LEDs based on layout
+// they aren't really used if RGB_BACKLIGHT_M60_A defined
+#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1
+#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0
+#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1
+#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1
+#define RGB_BACKLIGHT_USE_ISO_ENTER 0
+#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1
+
+// disable backlight when USB suspended (PC sleep/hibernate/shutdown)
+#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0
+
+// disable backlight after timeout in minutes, 0 = no timeout
+#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+
+// the default effect (RGB test)
+#define RGB_BACKLIGHT_EFFECT 255
+
+// These define which keys in the matrix are alphas/mods
+// Used for backlight effects so colors are different for
+// alphas vs. mods
+// Each value is for a row, bit 0 is column 0
+// Alpha=0 Mod=1
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
+#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+
+// EEPROM usage
+
+// TODO: refactor with new user EEPROM code (coming soon)
+#define EEPROM_MAGIC 0x451F
+#define EEPROM_MAGIC_ADDR 32
+// Bump this every time we change what we store
+// This will automatically reset the EEPROM with defaults
+// and avoid loading invalid data from the EEPROM
+#define EEPROM_VERSION 0x08
+#define EEPROM_VERSION_ADDR 34
+
+// Backlight config starts after EEPROM version
+#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
+// Dynamic keymap starts after backlight config (35+31)
+#define DYNAMIC_KEYMAP_EEPROM_ADDR 66
+// Dynamic macro starts after dynamic keymaps (66+(4*5*15*2)) = (66+600)
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358
+#define DYNAMIC_KEYMAP_MACRO_COUNT 16
diff --git a/keyboards/rama/koyu/info.json b/keyboards/rama/koyu/info.json
new file mode 100644
index 000000000..4b6edc7bf
--- /dev/null
+++ b/keyboards/rama/koyu/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "KOYU",
+ "url": "",
+ "maintainer": "Wilba",
+ "bootloader": "DFU",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Insert", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Home", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"/", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}]
+ }
+ }
+} \ No newline at end of file
diff --git a/keyboards/rama/koyu/keymaps/default/keymap.c b/keyboards/rama/koyu/keymaps/default/keymap.c
new file mode 100644
index 000000000..f6bc94fbd
--- /dev/null
+++ b/keyboards/rama/koyu/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ // Default layer
+ [0] = LAYOUT_all(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
+ KC_LSFT, KC_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,
+ MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT),
+
+ // Fn1 Layer
+ [1] = LAYOUT_all(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS,
+ KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ // Fn2 Layer
+ [2] = LAYOUT_all(
+ KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+ // Fn3 Layer
+ [3] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+};
diff --git a/keyboards/rama/koyu/koyu.c b/keyboards/rama/koyu/koyu.c
new file mode 100644
index 000000000..03d1e1215
--- /dev/null
+++ b/keyboards/rama/koyu/koyu.c
@@ -0,0 +1,18 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef RGB_BACKLIGHT_KOYU
+#error RGB_BACKLIGHT_KOYU not defined, you done goofed somehao, brah
+#endif
diff --git a/keyboards/rama/koyu/koyu.h b/keyboards/rama/koyu/koyu.h
new file mode 100644
index 000000000..c2aaa0273
--- /dev/null
+++ b/keyboards/rama/koyu/koyu.h
@@ -0,0 +1,42 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+#include "../../zeal60/rgb_backlight_keycodes.h"
+#include "../../zeal60/zeal60_keycodes.h"
+
+#define ____ KC_NO
+
+// Right switch of split backspace is at 2,13 and is the only switch
+// whose physical position doesn't match switch matrix position :-(
+// However, it also makes no sense to view the physical as 16 columns,
+// so the numbering goes 00 to 14. Deal with it.
+
+#define LAYOUT_all( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
+ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
+ K400, K401, K402, K407, K411, K412, K413, K414 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
+ { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
+ { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \
+}
diff --git a/keyboards/rama/koyu/readme.md b/keyboards/rama/koyu/readme.md
new file mode 100644
index 000000000..0372747f5
--- /dev/null
+++ b/keyboards/rama/koyu/readme.md
@@ -0,0 +1,23 @@
+# RAMA KOYU
+
+![RAMA KOYU](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5b8bd6e6b8a045c95eac2003/1535891375794/RW-KOYU-A-RENDER-04-TOP.1335.jpg?format=1500w)
+
+The wait for something isnt the most conscious desire, but that anticipation creates nostalgia.
+
+At Rama Works, youve embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesnt just start when you receive it. If youve ever received a Rama Works product, you know that no detail is overlooked.
+
+Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works X element personifies the understanding that taking something away doesnt necessarily make it less.
+
+This is the sound of Rama Works. Never too busya feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity.
+
+[More info at RAMA WORKS](https://rama.works/koyu/)
+
+Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582)
+Hardware Supported: RAMA KOYU PCB
+Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make rama/koyu: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). \ No newline at end of file
diff --git a/keyboards/rama/koyu/rules.mk b/keyboards/rama/koyu/rules.mk
new file mode 100644
index 000000000..5e470769d
--- /dev/null
+++ b/keyboards/rama/koyu/rules.mk
@@ -0,0 +1,80 @@
+
+
+# project specific files
+SRC = keyboards/zeal60/zeal60.c \
+ keyboards/zeal60/rgb_backlight.c \
+ quantum/color.c \
+ drivers/issi/is31fl3731.c \
+ drivers/avr/i2c_master.c
+
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Boot Section
+BOOTLOADER = atmel-dfu
+
+# Do not put the microcontroller into power saving mode
+# when we get USB suspend event. We want it to keep updating
+# backlight effects.
+OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+RAW_ENABLE = yes
+DYNAMIC_KEYMAP_ENABLE = yes
+CIE1931_CURVE = yes
+
+#LAYOUTS = ???
diff --git a/keyboards/rama/m10_b/keymaps/default/config.h b/keyboards/rama/m10_b/keymaps/default/config.h
index d150575c1..2a3bf1819 100644
--- a/keyboards/rama/m10_b/keymaps/default/config.h
+++ b/keyboards/rama/m10_b/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h
index 2b54cda79..1cbdee5ae 100644
--- a/keyboards/rama/m60_a/config.h
+++ b/keyboards/rama/m60_a/config.h
@@ -87,9 +87,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -101,6 +111,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#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 4
// EEPROM usage
diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h
index c2a225d53..0d690bffa 100644
--- a/keyboards/rama/m6_b/config.h
+++ b/keyboards/rama/m6_b/config.h
@@ -120,9 +120,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -134,6 +144,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#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 4
// EEPROM usage
diff --git a/keyboards/readme.md b/keyboards/readme.md
index 8b0c10ab4..81284755f 100644
--- a/keyboards/readme.md
+++ b/keyboards/readme.md
@@ -35,7 +35,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
* [9key](/keyboards/9key) &mdash; A 9-key minipad sold by Bishop Keyboards.
* [Alps64](/keyboards/alps64) &mdash; A 60% keyboard for Alps keyswitches.
* [AMJ60](/keyboards/amj60) &mdash; DIY/Assembled compact 60% keyboard.
-* [Arrow Pad](/keyboards/arrow_pad) &mdash; A custom creation by IBNobody.
+* [Arrow Pad](/keyboards/handwired/arrow_pad) &mdash; A custom creation by IBNobody.
* [Atreus](/keyboards/atreus) &mdash; Made by Technomancy.
* [Bantam44](/keyboards/bantam44) &mdash; It is a 44-key 40% staggered keyboard.
* [DataHand](/keyboards/handwired/datahand) &mdash; DataHand keyboard converted to use a Teensy board.
@@ -53,7 +53,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
* [The Kitten Paw](/keyboards/kitten_paw) &mdash; A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies).
* [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard.
* [Phantom](/keyboards/phantom) &mdash; A tenkeyless kit by Teel, also from Geekhack.
-* [Retro Refit](/keyboards/retro_refit) &mdash; Another creation by IBNobody.
+* [Retro Refit](/keyboards/handwired/retro_refit) &mdash; Another creation by IBNobody.
* [S60-x](/keyboards/s60_x) &mdash; DIY compact keyboard designed by VinnyCordeiro for Sentraq.
* [Satan](/keyboards/satan) &mdash; A GH60 variant.
* [SixKeyBoard](/keyboards/sixkeyboard) &mdash; A 6-key keyboard made by TechKeys.
diff --git a/keyboards/redox/keymaps/fculpo/config.h b/keyboards/redox/keymaps/fculpo/config.h
new file mode 100644
index 000000000..bff76aef2
--- /dev/null
+++ b/keyboards/redox/keymaps/fculpo/config.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2018 Mattia Dal Ben <matthewdibi@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
+
+/* Use I2C or Serial, not both */
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+#define MASTER_LEFT
+//#define MASTER_RIGHT
+//#define EE_HANDS
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 14
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/redox/keymaps/fculpo/keymap.c b/keyboards/redox/keymaps/fculpo/keymap.c
new file mode 100644
index 000000000..b5aeca99d
--- /dev/null
+++ b/keyboards/redox/keymaps/fculpo/keymap.c
@@ -0,0 +1,92 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _SYMB 1
+#define _NAV 2
+#define _ADJUST 3
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ SYMB,
+ NAV,
+ ADJUST,
+};
+
+// Shortcut to make keymap more readable
+#define SYM_L MO(_SYMB)
+
+#define KC_ALAS LALT_T(KC_PAST)
+#define KC_CTES LCTL_T(KC_ESC)
+#define KC_CTQU RCTL_T(KC_QUOT)
+
+#define KC_NAGR LT(_NAV, KC_GRV)
+#define KC_NAMI LT(_NAV, KC_MINS)
+
+#define KC_ADEN LT(_ADJUST, KC_END)
+#define KC_ADPU LT(_ADJUST, KC_PGUP)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CTQU ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ [_SYMB] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_F6 , KC_F7 ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ [_NAV] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ [_ADJUST] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ )
+
+};
diff --git a/keyboards/redox/keymaps/fculpo/keymap.json b/keyboards/redox/keymaps/fculpo/keymap.json
new file mode 100644
index 000000000..ca7905b16
--- /dev/null
+++ b/keyboards/redox/keymaps/fculpo/keymap.json
@@ -0,0 +1,399 @@
+[
+ {
+ "name": "Redox/rev1",
+ "author": "Fabien Culpo",
+ "switchMount": "cherry",
+ "plate": false,
+ "pcb": false
+ },
+ [
+ {
+ "x": 3.5
+ },
+ "#\n3",
+ {
+ "x": 10.5
+ },
+ "*\n8"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2.5
+ },
+ "@\n2",
+ {
+ "x": 1
+ },
+ "$\n4",
+ {
+ "x": 8.5
+ },
+ "&\n7",
+ {
+ "x": 1
+ },
+ "(\n9"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5.5
+ },
+ "%\n5",
+ {
+ "x": 6.5
+ },
+ "^\n6"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 0.25,
+ "a": 5,
+ "w": 1.25
+ },
+ "`\nLayer 2\n\n\n\n\n~",
+ {
+ "a": 4
+ },
+ "!\n1",
+ {
+ "x": 14.5
+ },
+ ")\n0",
+ {
+ "a": 5,
+ "w": 1.25
+ },
+ "_\nLayer 2\n\n\n\n\n-"
+ ],
+ [
+ {
+ "y": -0.625,
+ "x": 6.5
+ },
+ "Layer 1",
+ {
+ "x": 4.5
+ },
+ "Layer 1"
+ ],
+ [
+ {
+ "y": -0.75,
+ "x": 3.5,
+ "a": 4
+ },
+ "E",
+ {
+ "x": 10.5
+ },
+ "I"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2.5
+ },
+ "W",
+ {
+ "x": 1
+ },
+ "R",
+ {
+ "x": 8.5
+ },
+ "U",
+ {
+ "x": 1
+ },
+ "O"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5.5
+ },
+ "T",
+ {
+ "x": 6.5
+ },
+ "Y"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 0.25,
+ "a": 7,
+ "w": 1.25
+ },
+ "TAB",
+ {
+ "a": 4
+ },
+ "Q",
+ {
+ "x": 14.5
+ },
+ "P",
+ {
+ "a": 5,
+ "w": 1.25
+ },
+ "+\n="
+ ],
+ [
+ {
+ "y": -0.625,
+ "x": 6.5,
+ "a": 7,
+ "h": 1.5
+ },
+ "[",
+ {
+ "x": 4.5,
+ "h": 1.5
+ },
+ "]"
+ ],
+ [
+ {
+ "y": -0.75,
+ "x": 3.5,
+ "a": 4
+ },
+ "D",
+ {
+ "x": 10.5
+ },
+ "K"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2.5
+ },
+ "S",
+ {
+ "x": 1,
+ "n": true
+ },
+ "F",
+ {
+ "x": 8.5,
+ "n": true
+ },
+ "J",
+ {
+ "x": 1
+ },
+ "L"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5.5
+ },
+ "G",
+ {
+ "x": 6.5
+ },
+ "H"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 0.25,
+ "a": 5,
+ "w": 1.25
+ },
+ "ESC\nCTRL",
+ {
+ "a": 4
+ },
+ "A",
+ {
+ "x": 14.5
+ },
+ ":\n;",
+ {
+ "a": 5,
+ "w": 1.25
+ },
+ "'\nCTRL"
+ ],
+ [
+ {
+ "y": -0.375,
+ "x": 3.5,
+ "a": 4
+ },
+ "C",
+ {
+ "x": 10.5
+ },
+ "<\n,"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2.5
+ },
+ "X",
+ {
+ "x": 1
+ },
+ "V",
+ {
+ "x": 8.5
+ },
+ "M",
+ {
+ "x": 1
+ },
+ ">\n."
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 5.5
+ },
+ "B",
+ {
+ "x": 6.5
+ },
+ "N"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 0.25,
+ "a": 5,
+ "w": 1.25
+ },
+ "SHIFT",
+ {
+ "a": 4
+ },
+ "Z",
+ {
+ "x": 14.5
+ },
+ "?\n/",
+ {
+ "a": 5,
+ "w": 1.25
+ },
+ "SHIFT"
+ ],
+ [
+ {
+ "y": -0.375,
+ "x": 3.5
+ },
+ "*\nALT",
+ {
+ "x": 10.5
+ },
+ "Left"
+ ],
+ [
+ {
+ "y": -0.875,
+ "x": 2.5
+ },
+ "-",
+ {
+ "x": 12.5
+ },
+ "Down"
+ ],
+ [
+ {
+ "y": -0.75,
+ "x": 0.5
+ },
+ "|\n\n\n\n\n\n\\",
+ "+",
+ {
+ "x": 14.5
+ },
+ "Up",
+ {
+ "sb": "cherry",
+ "st": "MX1A-21xx"
+ },
+ "Right"
+ ],
+ [
+ {
+ "r": 15,
+ "y": -2.625,
+ "x": 5.75,
+ "a": 7,
+ "w": 1.25
+ },
+ "SUPER"
+ ],
+ [
+ {
+ "r": 30,
+ "rx": 6.5,
+ "ry": 4.25,
+ "y": -1,
+ "a": 5
+ },
+ "PgUp\nLay. 3",
+ {
+ "a": 7
+ },
+ "PgDn"
+ ],
+ [
+ {
+ "h": 1.5
+ },
+ "Bksp",
+ {
+ "h": 1.5
+ },
+ "Del"
+ ],
+ [
+ {
+ "r": -30,
+ "rx": 13,
+ "y": -1,
+ "x": -2
+ },
+ "Home",
+ {
+ "a": 5
+ },
+ "End\nLay. 3"
+ ],
+ [
+ {
+ "x": -2,
+ "a": 7,
+ "h": 1.5
+ },
+ "Enter",
+ {
+ "h": 1.5
+ },
+ "Space"
+ ],
+ [
+ {
+ "r": -15,
+ "rx": 0,
+ "ry": 0,
+ "y": 7.75,
+ "x": 11.75,
+ "w": 1.25
+ },
+ "ALT"
+ ]
+]
diff --git a/keyboards/redox/keymaps/fculpo/readme.md b/keyboards/redox/keymaps/fculpo/readme.md
new file mode 100644
index 000000000..1250e47b9
--- /dev/null
+++ b/keyboards/redox/keymaps/fculpo/readme.md
@@ -0,0 +1,18 @@
+# A tweaked keymap for Redox
+
+This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben.
+
+Also heavily inspired by nrichers layout.
+
+![fculpo Layout Image](https://i.imgur.com/OXT8boJ.png)
+
+## Changes to the default keymap
+
+These keymap changes are meant to improve the usability of the layout in everyday use:
+
+- Move `GUI` (`SUPER`) key to where default left `CTRL` is
+- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive
+- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?`
+- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position
+- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes
+- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)S
diff --git a/keyboards/redox/keymaps/fculpo/rules.mk b/keyboards/redox/keymaps/fculpo/rules.mk
new file mode 100644
index 000000000..a81250cdf
--- /dev/null
+++ b/keyboards/redox/keymaps/fculpo/rules.mk
@@ -0,0 +1,2 @@
+RGBLIGHT_ENABLE = yes
+
diff --git a/keyboards/redox/keymaps/finex/config.h b/keyboards/redox/keymaps/finex/config.h
index b23342ce0..8852a4cc8 100644
--- a/keyboards/redox/keymaps/finex/config.h
+++ b/keyboards/redox/keymaps/finex/config.h
@@ -32,3 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
+
+// #define PERMISSIVE_HOLD
+#define IGNORE_MOD_TAP_INTERRUPT
+#define TAPPING_TERM 200
diff --git a/keyboards/redox/keymaps/finex/keymap.c b/keyboards/redox/keymaps/finex/keymap.c
index 8b8f5f183..5a508815b 100644
--- a/keyboards/redox/keymaps/finex/keymap.c
+++ b/keyboards/redox/keymaps/finex/keymap.c
@@ -3,47 +3,161 @@
extern keymap_config_t keymap_config;
// Layer names
-#define _QWERTY 0
-#define _COLEMAKDHMK 1
-#define _QWERTY_MAC 2
-#define _COLEMAKDHMK_MAC 3
-#define _SYMB 4
-#define _ADJUST 5
+enum{
+ // - Base layers:
+ _COLEMAKDHMK,
+ _COLEMAKDHMK_MAC,
+ _QWERTY,
+ _QWERTY_MAC,
+ // - Symbols, numbers, functions and custom shifts:
+ _SYMB,
+ _NUMB,
+ _FUNC,
+ _RHSH, // Righ hand shifted keycodes
+ _LHSH, // Left hand shifted keycodes
+ // - Adjust layer:
+ _ADJUST
+};
// Custom keycodes
enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- COLEMAKDHMK,
- QWERTY_MAC,
+ COLEMAKDHMK = SAFE_RANGE,
COLEMAKDHMK_MAC,
- SYMB,
- ADJUST,
+ QWERTY,
+ QWERTY_MAC,
ASC_SAR,
ASC_DAR,
ASC_SQT,
ASC_DQT,
+ ASC_CIRC,
+ ASC_TILD,
ASC_HAP,
- ASC_SAD
+ ASC_SAD,
+ ASC_BKT,
+ ASC_CBRL,
+ ASC_CBRR
};
+// Tap dance keycodes
+enum tap_dance{
+ TD_SCLN, // ;; -> :
+ TD_LBRC, // [[ -> {
+ TD_RBRC, // ]] -> }
+ TD_QMRK // // -> ?
+};
+
+// Semicolon to Colon
+void dance_scln_finished (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ register_code (KC_SCLN);
+ } else {
+ register_code (KC_RSFT);
+ register_code (KC_SCLN);
+ }
+}
+void dance_scln_reset (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ unregister_code (KC_SCLN);
+ } else {
+ unregister_code (KC_RSFT);
+ unregister_code (KC_SCLN);
+ }
+}
+
+// Square braket to curly bracket (left)
+void dance_lbrc_finished (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ register_code (KC_LBRC);
+ } else {
+ register_code (KC_RSFT);
+ register_code (KC_LBRC);
+ }
+}
+void dance_lbrc_reset (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ unregister_code (KC_LBRC);
+ } else {
+ unregister_code (KC_RSFT);
+ unregister_code (KC_LBRC);
+ }
+}
+
+// Square braket to curly bracket (right)
+void dance_rbrc_finished (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ register_code (KC_RBRC);
+ } else {
+ register_code (KC_RSFT);
+ register_code (KC_RBRC);
+ }
+}
+void dance_rbrc_reset (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ unregister_code (KC_RBRC);
+ } else {
+ unregister_code (KC_RSFT);
+ unregister_code (KC_RBRC);
+ }
+}
+
+
+//Tap Dance Definitions
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_scln_finished, dance_scln_reset),
+ [TD_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lbrc_finished, dance_lbrc_reset),
+ [TD_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_rbrc_finished, dance_rbrc_reset)
+};
+
+
// Shortcut to make keymap more readable
-#define KC_SYQT LT(_SYMB, KC_QUOT)
-#define KC_SYGR LT(_SYMB, KC_GRV)
-#define KC_SYSP LT(_SYMB, KC_SPC)
-#define KC_ADEN LT(_ADJUST, KC_END)
-#define KC_ADPU LT(_ADJUST, KC_PGUP)
-#define KC_CESC LCTL_T(KC_ESC)
-#define KC_CBSP LCTL_T(KC_BSPC)
-#define KC_CMIN RCTL_T(KC_MINUS)
-#define KC_GBSP LGUI_T(KC_BSPC)
-#define KC_ADEL LALT_T(KC_DEL)
-#define KC_APLS RALT_T(KC_PPLS)
-#define KC_LSEN LSFT_T(KC_ENT)
-#define KC_RSEN RSFT_T(KC_ENT)
-#define FN1 QWERTY
-#define FN2 COLEMAKDHMK
-#define FN3 QWERTY_MAC
-#define FN4 COLEMAKDHMK_MAC
+
+// - Adjustment Layer:
+#define KC_ADEN LT(_ADJUST, KC_END) // End / _ADJUST layer
+#define KC_ADPU LT(_ADJUST, KC_PGUP) // Page Up / _ADJUST layer
+
+// - Custom layers:
+#define KC_SYSP LT(_SYMB, KC_SPC) // Space / _symbols
+#define KC_NUES LT(_NUMB, KC_ESC) // Esc / _numbers
+#define KC_FUTA LT(_FUNC, KC_TAB) // Tab / _functions
+#define KC_N_SH LT(_LHSH, KC_N) // Pressing N key, enable shifted keys on other half (the left one)
+#define KC_T_SH LT(_RHSH, KC_T) // Pressing T key, enable shifted keys on other half (the right one)
+
+// - Custom keys/modifiers:
+#define KC_ATAB RALT_T(KC_TAB) // - Tab / Alt Gr
+#define KC_CESC LCTL_T(KC_ESC) // - Esc / Left Ctrl
+#define KC_GSPC LGUI_T(KC_SPC) // - Space / Left GUI
+#define KC_CBSP LCTL_T(KC_BSPC) // - Backspace / Left Ctrl
+
+// -- Mac os mode:
+#define KC_CSPC LCTL_T(KC_SPC) // - Space / Left Ctrl
+#define KC_GBSP LGUI_T(KC_BSPC) // - Backspace / Left GUI
+
+
+#define KC_AEQL LALT_T(KC_EQL) // - Equals / Alt (left alt)
+#define KC_CMIN RCTL_T(KC_MINUS) // - Minus / Right Ctrl
+#define KC_ADEL RALT_T(KC_DEL) // - Del / Alt Gr
+#define KC_RSEN RSFT_T(KC_ENT) // - Enter / Right Shift (standard shift)
+#define KC_LAEN LALT_T(KC_ENT) // - Enter / Left Alt
+
+// Home row mod tap keys:
+// - Left hand
+#define KC_CT_A CTL_T(KC_A) // A / Left Ctrl
+#define KC_AL_S ALT_T(KC_S) // S / Left Alt
+// - Right hand
+#define KC_AL_E ALT_T(KC_E) // E / Left Alt
+#define KC_CT_O CTL_T(KC_O) // O / Left Ctrl
+
+// - Tap dance:
+#define KC_TDSC TD(TD_SCLN) // ;; -> :
+#define KC_TDLB TD(TD_LBRC) // [[ -> {
+#define KC_TDRB TD(TD_RBRC) // ]] -> }
+
+// - Keyboard base maps:
+#define LR1 COLEMAKDHMK
+#define LR2 COLEMAKDHMK_MAC
+#define LR3 QWERTY
+#define LR4 QWERTY_MAC
+
// Send custom strings or change default base layer
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -63,12 +177,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// SS_RALT(SS_LSFT()): Avoid sending dead key on software intl layouts
SEND_STRING(SS_RALT(SS_LSFT("\"")));
return false;
+ case ASC_CIRC:
+ // SS_RALT(): Avoid sending dead key on software intl layouts
+ SEND_STRING(SS_RALT("^"));
+ return false;
+ case ASC_TILD:
+ // SS_RALT(SS_LSFT()): Avoid sending dead key on software intl layouts
+ SEND_STRING(SS_RALT(SS_LSFT("~")));
+ return false;
case ASC_HAP:
SEND_STRING(":-) ");
return false;
case ASC_SAD:
SEND_STRING(":-( ");
return false;
+ case ASC_BKT:
+ // SS_RALT(): Avoid sending dead key on software intl layouts
+ SEND_STRING(SS_RALT("`"));
+ return false;
+ case ASC_CBRL:
+ SEND_STRING("{");
+ return false;
+ case ASC_CBRR:
+ SEND_STRING("}");
+ return false;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
@@ -98,91 +230,157 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT(
- //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_DEL , KC_BSPC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CMIN ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
- //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
- KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LGUI , KC_ADEL , KC_CBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
- //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ // Colemak DM-MK Mod
+ [_COLEMAKDHMK] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_ATAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,XXXXXXX , XXXXXXX ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_TDSC ,KC_AEQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_CESC ,KC_A ,KC_R ,KC_AL_S ,KC_T_SH ,KC_G ,KC_TDLB , KC_TDRB ,KC_M ,KC_N_SH ,KC_AL_E ,KC_I ,KC_O ,KC_CMIN ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ KC_GSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_CBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
- [_COLEMAKDHMK] = LAYOUT(
- //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_DEL , KC_BSPC ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_EQL ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_CESC ,KC_A ,KC_R ,KC_S ,KC_T ,KC_G ,KC_LBRC , KC_RBRC ,KC_M ,KC_N ,KC_E ,KC_I ,KC_O ,KC_CMIN ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
- //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
- KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LGUI , KC_ADEL , KC_CBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
- //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ // Colemak DM-MK Mod, Mac version (CTRL and GUI are swapped)
+ [_COLEMAKDHMK_MAC] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_ATAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,XXXXXXX , XXXXXXX ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_TDSC ,KC_AEQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_CESC ,KC_A ,KC_R ,KC_AL_S ,KC_T_SH ,KC_G ,KC_TDLB , KC_TDRB ,KC_M ,KC_N_SH ,KC_AL_E ,KC_I ,KC_O ,KC_CMIN ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ KC_CSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_GBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
- [_QWERTY_MAC] = LAYOUT(
- //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_DEL , KC_BSPC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CMIN ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
- //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
- KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LCTL , KC_ADEL , KC_GBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
- //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ // QWERTY
+ [_QWERTY] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_ATAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , XXXXXXX ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AEQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_TDLB , KC_TDRB ,KC_H ,KC_J ,KC_K ,KC_L ,KC_TDSC ,KC_CMIN ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ KC_GSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_CBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
- [_COLEMAKDHMK_MAC] = LAYOUT(
- //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_DEL , KC_BSPC ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_EQL ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_CESC ,KC_A ,KC_R ,KC_S ,KC_T ,KC_G ,KC_LBRC , KC_RBRC ,KC_M ,KC_N ,KC_E ,KC_I ,KC_O ,KC_CMIN ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
- //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
- KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LCTL , KC_ADEL , KC_GBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
- //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ // QWERTY, Mac version (CTRL and GUI are swapped)
+ [_QWERTY_MAC] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_ATAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , XXXXXXX ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AEQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_TDLB , KC_TDRB ,KC_H ,KC_J ,KC_K ,KC_L ,KC_TDSC ,KC_CMIN ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ KC_CSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_GBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
+ // Symbols, home row arrows, function keys and macros layer
[_SYMB] = LAYOUT(
- //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,KC_CIRC ,KC_BSLS ,KC_PMNS ,KC_UNDS ,XXXXXXX ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_F11 ,KC_APP ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,KC_PAST ,KC_PIPE ,ASC_SQT ,KC_TILD ,KC_QUOT ,ASC_SAR , ASC_DAR ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_F12 ,KC_PSCR ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- _______ ,KC_HASH ,KC_AMPR ,KC_AT ,ASC_DQT ,KC_GRV ,ASC_SAD ,ASC_HAP , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_UP ,_______ ,
- //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
- _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_PDOT ,KC_LEFT ,KC_DOWN ,KC_RGHT
- //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_EXLM ,KC_AT ,KC_HASH ,KC_DLR ,KC_PERC ,_______ , _______ ,ASC_CIRC,KC_AMPR ,KC_ASTR ,KC_PLUS ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_PIPE ,KC_PMNS ,ASC_SQT ,ASC_DQT ,KC_GRV ,ASC_SAR , ASC_DAR ,KC_QUOT ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_BSLS ,KC_UNDS ,KC_COLN ,ASC_TILD,KC_EQL ,ASC_SAD ,ASC_HAP , _______ ,_______ ,ASC_BKT ,KC_PGUP ,KC_PGDN ,KC_HOME ,KC_END ,_______ ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ // Numeric keypad layer
+ [_NUMB] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,KC_PAST ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_PPLS ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_PMNS ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_PSLS ,_______ ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , XXXXXXX , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ // Function layer and some extra keys on right hand
+ [_FUNC] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_PSCR ,KC_NLCK ,KC_INS ,KC_CAPS ,KC_APP ,_______ ,_______ , _______ ,_______ ,_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+
+ // Left hand shifted keycodes
+ [_LHSH] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,S(KC_Q) ,S(KC_W) ,S(KC_F) ,S(KC_P) ,S(KC_B) ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,S(KC_A) ,S(KC_R) ,S(KC_S) ,S(KC_T) ,S(KC_G) ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,S(KC_Z) ,S(KC_X) ,S(KC_C) ,S(KC_D) ,S(KC_V) ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , KC_TAB ,KC_BSPC , KC_ESC , _______ ,_______ ,_______ ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ // Right hand shifted keycodes
+ [_RHSH] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,S(KC_J) ,S(KC_L) ,S(KC_U) ,S(KC_Y) ,KC_COLN ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,S(KC_M) ,S(KC_N) ,S(KC_E) ,S(KC_I) ,S(KC_O) ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,S(KC_K) ,S(KC_H) ,KC_LABK ,KC_RABK ,KC_QUES ,_______ ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , KC_DEL , KC_SPC ,KC_ENT , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
+ // Adjust layer (RGB, Reset and base layer switch)
[_ADJUST] = LAYOUT(
- //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
- XXXXXXX ,FN1 ,FN2 ,FN3 ,FN4 ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- XXXXXXX ,XXXXXXX ,RGB_M_B ,RGB_M_R ,RGB_M_SW,RGB_M_SN,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
- //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
- XXXXXXX ,XXXXXXX ,RGB_M_K ,RGB_M_X ,RGB_M_G ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
- //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
- XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
- //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,LR1 ,LR2 ,LR3 ,LR4 ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,RGB_M_B ,RGB_M_R ,RGB_M_SW,RGB_M_SN,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,RGB_M_K ,RGB_M_X ,RGB_M_G ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
)
};
diff --git a/keyboards/redox/keymaps/finex/readme.md b/keyboards/redox/keymaps/finex/readme.md
index f1b6fa7c7..9b88469a1 100644
--- a/keyboards/redox/keymaps/finex/readme.md
+++ b/keyboards/redox/keymaps/finex/readme.md
@@ -4,27 +4,61 @@
## Features
- Enabled USE_SERIAL for Falba.Tech Redox keyboards.
-- PC Layouts: QWERTY, Colemak Mod DH-MK.
-- Mac Layouts: same as above with CTRL-GUI keys inverted on the bottom row.
-- Added redundant "Space", "Esc" and "Ctrl" keys.
-- Added macro to print "->" and "=>" strings.
-- Added macro to print ":-( " and ":-) " strings.
+- PC Layouts: Colemak Mod DH-MK, Qwerty.
+- Mac Layouts: same as above with CTRL-GUI keys inverted.
+- Added redundant `Space`, `Esc`, `Ctrl` and `Enter` keys. I like to have this
+ keys on both halves.
+- Added macro to print `->` and `=>` strings.
+- Added macro to print `:-( ` and `:-) ` strings.
- Added more arrows.
-- Added "(" and ")" on Shifts keys.
-- Added Shift on both ) "Enter" keys.
+- Added `(` and `)` on Shifts keys.
+- Tapdance: `:` (`;` × 2), `{` (`[` × 2), `}` (`]` × 2).
- Removed Mouse and media support.
- Added missing "Print Screen" and "Menu" keys.
- Added missing "F11" and "F12" keys.
+- Added `Alt` modifier on home row.
+- Added `Shift other half` on home keys: this allows to shift the right half
+pressing `t` on the left (or `f` using Qwerty), and the opposite pressing `n`
+(or `j` for Qwerty layout).
-## Layers
+## Description
+
+This keymap use the default one with some changes to suit my needs. Mainly
+having most used symbol on a separated layer copying the common symbols on the
+number keys on the second row and adding other symbols and ``|´` dead keys for
+accents.
+
+
+## Main Keyboard Layout
+
+[TODO]
-This keymap use the default one with some minor improvements to suit my needs.
## Changelog
- 2018/11/13
- First public release
+ First public release.
+- 2018/12/04
+ Added Caps Lock, Num Lock and Insert on Symbols Layout. Inverted KC_GRV and
+ KC_QUOT on Symbols Layout. Added "Toggle Symbols Layout" and "Momentarily
+ activates Symbols Layout" on bottom row. Added Space/Control on left bottom
+ corner: now both halves contains Enter and Space keys.
+- 2018/12/23
+ Moved around modifiers key.
+ Added MEH and HYPER keys.
+ Improved symbols layout.
+ Rearranged layers.
+- 2019/01/04
+ Added new layer with numeric keypad and rearranged symbols.
+- 2019/01/26
+ Added curly brackets on own keys (normally unused).
+ Added tap dance for testing purpose.
+ Minor fixes.
+- 2019/02/25
+ Major layouts upgrade, partially inspired by Steven Hum's Beakl layouts.
+- 2019/03/17
+ Aligned qwerty and mac to main layout.
## TODO
@@ -32,4 +66,5 @@ This keymap use the default one with some minor improvements to suit my needs.
- Bring back mouse and multimedia keys.
- Add default Colemak Mod DH layout.
- Improve top corner keys.
-- Improve bottom row keys (mostly KC_BSLS and KC_QUOT).
+- Improve bottom row keys.
+- Improve README.md
diff --git a/keyboards/redox/keymaps/finex/rules.mk b/keyboards/redox/keymaps/finex/rules.mk
index 21550e9fe..f248688fb 100644
--- a/keyboards/redox/keymaps/finex/rules.mk
+++ b/keyboards/redox/keymaps/finex/rules.mk
@@ -1,3 +1,4 @@
RGBLIGHT_ENABLE = yes
-
COMMAND_ENABLE = no
+KEY_LOCK_ENABLE = yes
+TAP_DANCE_ENABLE=yes
diff --git a/keyboards/redox/keymaps/nrichers/config.h b/keyboards/redox/keymaps/nrichers/config.h
new file mode 100755
index 000000000..a3ef209a0
--- /dev/null
+++ b/keyboards/redox/keymaps/nrichers/config.h
@@ -0,0 +1,34 @@
+/*
+Copyright 2018 Mattia Dal Ben <matthewdibi@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
+
+/* Use I2C or Serial, not both */
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 14
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/redox/keymaps/nrichers/keymap.c b/keyboards/redox/keymaps/nrichers/keymap.c
new file mode 100755
index 000000000..7434b4368
--- /dev/null
+++ b/keyboards/redox/keymaps/nrichers/keymap.c
@@ -0,0 +1,92 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QWERTY 0
+#define _SYMB 1
+#define _NAV 2
+#define _ADJUST 3
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ SYMB,
+ NAV,
+ ADJUST,
+};
+
+// Shortcut to make keymap more readable
+#define SYM_L MO(_SYMB)
+
+#define KC_ALAS LALT_T(KC_PAST)
+#define KC_CTES LCTL_T(KC_ESC)
+#define KC_CTQU RCTL_T(KC_QUOT)
+
+#define KC_NAGR LT(_NAV, KC_GRV)
+#define KC_NAMI LT(_NAV, KC_MINS)
+
+#define KC_ADEN LT(_ADJUST, KC_END)
+#define KC_ADPU LT(_ADJUST, KC_PGUP)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CTQU ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_SPC ,KC_BSPC , KC_DEL ,KC_ENT , KC_RGUI , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ [_SYMB] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,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 ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,KC_F12 ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ [_NAV] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ ),
+
+ [_ADJUST] = LAYOUT(
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
+ )
+
+};
diff --git a/keyboards/redox/keymaps/nrichers/keymap.png b/keyboards/redox/keymaps/nrichers/keymap.png
new file mode 100644
index 000000000..8ef3fe4ea
--- /dev/null
+++ b/keyboards/redox/keymaps/nrichers/keymap.png
Binary files differ
diff --git a/keyboards/redox/keymaps/nrichers/readme.md b/keyboards/redox/keymaps/nrichers/readme.md
new file mode 100755
index 000000000..6189e8e9b
--- /dev/null
+++ b/keyboards/redox/keymaps/nrichers/readme.md
@@ -0,0 +1,28 @@
+# A tweaked keymap for Redox
+
+This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben.
+
+![Modified Redox keymap](https://github.com/nrichers/qmk_firmware/blob/master/keyboards/redox/keymaps/nrichers/keymap.png)
+
+## Changes to the default keymap ![#99fcbe](https://placehold.it/15/99fcbe/000000?text=+)
+
+These keymap changes are meant to improve the usability of the layout in everyday use:
+
+- Move `GUI` (`SUPER`) key to where default left `CTRL` and right `ALT` are - gives you two frequently used `CMD` keys on macOS where my brain expects them
+- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive
+- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?`
+- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position
+- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes
+- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)
+- On thumb clusters:
+ - Left: Move `SPACE` closest to left thumb and move `BACKSPACE` to the right of that - put the key for 'getting it right' closest to your thumb and reduce usage of my right hand (purely personal preference)
+ - Right: Move `ENTER` closest to right thumb and move `DEL` to the left of that - put the key for 'getting it right' closest to your thumb
+
+## Changes to the Redox layout ![#99e6fc](https://placehold.it/15/99e6fc/000000?text=+)
+
+These are physical keycap changes on the board that make reaching the `Layer 1` keys easier and that, subjectively, look more balanced visually:
+
+- Increase the `Layer 1` key sizes from 1U to 1.25U
+- Decrease the 1.5 U key size for `[` and `]` to 1.25U
+
+You could even make `[` and `]` 1U so that you can use keycaps from a standard ANSI key set and also increase the size of the `Layer 2` keys to 1.5U.
diff --git a/keyboards/redox/keymaps/nrichers/rules.mk b/keyboards/redox/keymaps/nrichers/rules.mk
new file mode 100755
index 000000000..a81250cdf
--- /dev/null
+++ b/keyboards/redox/keymaps/nrichers/rules.mk
@@ -0,0 +1,2 @@
+RGBLIGHT_ENABLE = yes
+
diff --git a/keyboards/romac/config.h b/keyboards/romac/config.h
new file mode 100644
index 000000000..b92785fd5
--- /dev/null
+++ b/keyboards/romac/config.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER TheRoyalSweatshirt
+#define PRODUCT romac
+#define DESCRIPTION A *Plaid inspired twelve-key macropad
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 3
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
+#define MATRIX_COL_PINS { F7, B1, B3 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+
+#define BACKLIGHT_LEVELS 0
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+#define RGBLED_NUM 0
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/romac/info.json b/keyboards/romac/info.json
new file mode 100644
index 000000000..305785991
--- /dev/null
+++ b/keyboards/romac/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "RoMac",
+ "url": "",
+ "maintainer": "TheRoyalSweatshirt",
+ "width": 3,
+ "height": 4,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 12,
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}]
+ }
+ }
+}
diff --git a/keyboards/romac/keymaps/default/keymap.c b/keyboards/romac/keymaps/default/keymap.c
new file mode 100644
index 000000000..35636f36b
--- /dev/null
+++ b/keyboards/romac/keymaps/default/keymap.c
@@ -0,0 +1,37 @@
+/* Copyright 2018 Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+#define _BASE 0
+#define _FN1 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = LAYOUT(
+ KC_7, KC_8, KC_9, \
+ KC_4, KC_5, KC_6, \
+ KC_1, KC_2, KC_3, \
+ MO(_FN1), KC_0, KC_ENT \
+ ),
+
+ [_FN1] = LAYOUT(
+ KC_TRNS, KC_HOME, KC_PGUP, \
+ KC_TRNS, KC_END, KC_PGDN, \
+ KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_DOT \
+ )
+};
diff --git a/keyboards/romac/readme.md b/keyboards/romac/readme.md
new file mode 100644
index 000000000..98ed21502
--- /dev/null
+++ b/keyboards/romac/readme.md
@@ -0,0 +1,16 @@
+
+# RoMac
+
+![RoMac](https://i.imgur.com/hAOyoqj.jpg)
+
+A “Plaid” Inspired 12-Key (3x4) Macropad.
+
+- Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt)
+- Hardware Supported: RoMac rev.1, rev.2, Pro Micro, Elite-C, Proton C, BlueMicro.
+- Hardware Availability: Through GB or Direct Message (If extra stock is available).
+
+Make example for this keyboard (after setting up your build environment):
+
+ make romac: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/romac/romac.c b/keyboards/romac/romac.c
new file mode 100644
index 000000000..24f4c1633
--- /dev/null
+++ b/keyboards/romac/romac.c
@@ -0,0 +1 @@
+#include "romac.h"
diff --git a/keyboards/romac/romac.h b/keyboards/romac/romac.h
new file mode 100644
index 000000000..e6fb9694d
--- /dev/null
+++ b/keyboards/romac/romac.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K00, K01, K02, \
+ K10, K11, K12, \
+ K20, K21, K22, \
+ K30, K31, K32 \
+) \
+{ \
+ { K00, K01, K02 }, \
+ { K10, K11, K12 }, \
+ { K20, K21, K22 }, \
+ { K30, K31, K32 } \
+}
diff --git a/keyboards/romac/rules.mk b/keyboards/romac/rules.mk
new file mode 100644
index 000000000..b500f1b88
--- /dev/null
+++ b/keyboards/romac/rules.mk
@@ -0,0 +1,57 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = no
+
diff --git a/keyboards/scarletbandana/keymaps/default/config.h b/keyboards/scarletbandana/keymaps/default/config.h
index 36f483c11..8533e6f6d 100644
--- a/keyboards/scarletbandana/keymaps/default/config.h
+++ b/keyboards/scarletbandana/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/singa/keymaps/default/config.h b/keyboards/singa/keymaps/default/config.h
index 0f7563505..4496c5910 100644
--- a/keyboards/singa/keymaps/default/config.h
+++ b/keyboards/singa/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/speedo/keymaps/default/config.h b/keyboards/speedo/keymaps/default/config.h
index 112836e5e..0ab49e8bc 100644
--- a/keyboards/speedo/keymaps/default/config.h
+++ b/keyboards/speedo/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/standaside/config.h b/keyboards/standaside/config.h
new file mode 100644
index 000000000..fa3576ca5
--- /dev/null
+++ b/keyboards/standaside/config.h
@@ -0,0 +1,204 @@
+
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xF7E0
+#define PRODUCT_ID 0x0412
+#define DEVICE_VER 0x0003
+#define MANUFACTURER Fate Everywhere
+#define PRODUCT Stand Aside
+#define DESCRIPTION A compact 60% keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 8
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { D1, F4, F6, F7, B1, B3, B2, B6 }
+#define MATRIX_COL_PINS { F5, D0, D4, C6, D7, E6, B4, B5 }
+#define UNUSED_PINS {}
+
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN C7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Enable RGB Underlighting
+ */
+#define RGB_DI_PIN C7
+#define RGBLED_NUM 12
+#define RGBLIGHT_ANIMATIONS
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
diff --git a/keyboards/standaside/keymaps/default/config.h b/keyboards/standaside/keymaps/default/config.h
new file mode 100644
index 000000000..d533d806c
--- /dev/null
+++ b/keyboards/standaside/keymaps/default/config.h
@@ -0,0 +1,5 @@
+
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/standaside/keymaps/default/keymap.c b/keyboards/standaside/keymaps/default/keymap.c
new file mode 100644
index 000000000..0f13cb763
--- /dev/null
+++ b/keyboards/standaside/keymaps/default/keymap.c
@@ -0,0 +1,77 @@
+
+#include QMK_KEYBOARD_H
+
+#define _MAIN 0
+#define _RAISE 1
+#define _LOWER 2
+
+// Readability keycodes
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+/* MAIN
+ * .-----------------------------------------------------------------------------------------------------------------------------------------------.
+ * | TAB | Q | W | E | R | T | Y | U | I | O | P | Backsp | Delete | 7 | 8 | 9 |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | PgUp | 4 | 5 | 6 |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | SHIFT | Z | X | C | V | B | N | M | , | . | / | ENTER | PgDn | 1 | 2 | 3 |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | LCTRL | PAUS | GUI | ALT | Lower | Space | Space | Raise | Left | Down | Up | Right | Shift | 0 | . | ENTER |
+ * '-----------------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_MAIN] = LAYOUT_ortho_4x16(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_DEL, KC_KP_7, KC_KP_8, KC_KP_9,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_PGUP, KC_KP_4, KC_KP_5, KC_KP_6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_PGDN, KC_KP_1, KC_KP_2, KC_KP_3,
+ KC_LCTL, KC_PAUS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, KC_KP_0, KC_KP_DOT, KC_PENT
+ ),
+
+/* RAISE
+ * .-----------------------------------------------------------------------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Insert | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | - | = | [ | ] | \ | Home | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | PScr | End | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | Next | Vol- | Vol+ | Play | NumLok | | | |
+ * '-----------------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_RAISE] = LAYOUT_ortho_4x16(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_INS, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_END, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_NLCK, _______, _______, _______
+ ),
+
+/* LOWER
+ * .-----------------------------------------------------------------------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | RGBPWR | Mode | Reset |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | HUE+ | SAT+ | VAL+ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | | HUE- | SAT- | VAL- |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | Mute | | Plain | Rainbo | Larsen |
+ * '-----------------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_LOWER] = LAYOUT_ortho_4x16(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, RGB_TOG, RGB_MOD, RESET,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, RGB_HUI, RGB_SAI, RGB_VAI,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, RGB_M_P, RGB_M_R, RGB_M_K
+ ),
+
+};
+
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/standaside/readme.md b/keyboards/standaside/readme.md
new file mode 100644
index 000000000..ca1cfb276
--- /dev/null
+++ b/keyboards/standaside/readme.md
@@ -0,0 +1,15 @@
+# Stand Aside
+
+![Stand Aside](https://i.imgur.com/X6Katar.png)
+
+A compact 60% keyboard designed by Fate Everywhere. Born out of the desire for a Planck with a numpad for technical work. Available for sale (kit and completed) once the store comes up.
+
+Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere)
+Hardware Supported: Mark 3 Stand Aside.
+Hardware Availability: Seven Store (https://store.7storm.org).
+
+Make example for this keyboard (after setting up your build environment):
+
+ make standaside: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). \ No newline at end of file
diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk
new file mode 100644
index 000000000..a7ebc21fa
--- /dev/null
+++ b/keyboards/standaside/rules.mk
@@ -0,0 +1,73 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = atmel_dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+RGBLIGHT_ENABLE = yes # Enable RGB underlighting support
+
diff --git a/keyboards/standaside/standaside.c b/keyboards/standaside/standaside.c
new file mode 100644
index 000000000..904e92d33
--- /dev/null
+++ b/keyboards/standaside/standaside.c
@@ -0,0 +1,14 @@
+
+#include "standaside.h"
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/standaside/standaside.h b/keyboards/standaside/standaside.h
new file mode 100644
index 000000000..b66169639
--- /dev/null
+++ b/keyboards/standaside/standaside.h
@@ -0,0 +1,29 @@
+
+#ifndef STANDASIDE_H
+#define STANDASIDE_H
+
+#include "quantum.h"
+#define ___ KC_NO
+
+// This a shortcut to help you visually see your layout.
+// The first section contains all of the arguments
+// The second converts the arguments into a two-dimensional array
+
+#define LAYOUT_ortho_4x16( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \
+ K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \
+ K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \
+ K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \
+) \
+{ \
+ { K00, K02, K04, K06, K08, K10, K12, K14 }, \
+ { K01, K03, K05, K07, K09, K11, K13, K15 }, \
+ { K16, K18, K20, K22, K24, K26, K28, K30 }, \
+ { K17, K19, K21, K23, K25, K27, K29, K31 }, \
+ { K32, K34, K36, K38, K40, K42, K44, K46 }, \
+ { K33, K35, K37, K39, K41, K43, K45, K47 }, \
+ { K48, K50, K52, K54, K56, K58, K60, K62 }, \
+ { K49, K51, K53, K55, K57, K59, K61, K63 } \
+}
+
+#endif
diff --git a/keyboards/staryu/backlight_staryu.c b/keyboards/staryu/backlight_staryu.c
deleted file mode 100644
index 6fb9713f3..000000000
--- a/keyboards/staryu/backlight_staryu.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "backlight.h"
-#include <avr/pgmspace.h>
-
-/* backlighting */
-void init_backlight_led(void)
-{
- DDRC |= (1<<PC2 | 1<<PC7);
- DDRD |= (1<<PD5 | 1<<PD6);
- DDRB |= (1<<PB0);
-}
-
-void backlight_led_off(uint8_t index)
-{
- switch (index) {
- case 0:
- PORTC |= (1<<PC2);
- break;
- case 1:
- PORTC |= (1<<PC7);
- break;
- case 2:
- PORTD |= (1<<PD5);
- break;
- case 3:
- PORTD |= (1<<PD6);
- break;
- case 4:
- PORTB |= (1<<PB0);
- break;
- }
-}
-
-void backlight_led_on(uint8_t index)
-{
- switch (index) {
- case 0:
- PORTC &= ~(1<<PC2);
- break;
- case 1:
- PORTC &= ~(1<<PC7);
- break;
- case 2:
- PORTD &= ~(1<<PD5);
- break;
- case 3:
- PORTD &= ~(1<<PD6);
- break;
- case 4:
- PORTB &= ~(1<<PB0);
- break;
- }
-}
diff --git a/keyboards/staryu/backlight_staryu.h b/keyboards/staryu/backlight_staryu.h
index f718b970c..3272283e9 100644
--- a/keyboards/staryu/backlight_staryu.h
+++ b/keyboards/staryu/backlight_staryu.h
@@ -1,12 +1,21 @@
-#ifndef STARYU_BL
-#define STARYU_BL
+/*
+Copyright 2019
-#include <stdint.h>
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
-void init_backlight_led(void);
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
-void backlight_led_on(uint8_t index);
+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
-void backlight_led_off(uint8_t index);
-
-#endif
+// Add backwards compatibility for existing keymaps
+#define backlight_led_off(i) backlight_set_value(i, 0)
+#define backlight_led_on(i) backlight_set_value(i, 1) \ No newline at end of file
diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h
index 268fe991a..7f8b39ba7 100755
--- a/keyboards/staryu/config.h
+++ b/keyboards/staryu/config.h
@@ -14,8 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -32,43 +31,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 5
/* key matrix pins */
-#define MATRIX_ROW_PINS { }
+#define MATRIX_ROW_PINS { NO_PIN }
#define MATRIX_COL_PINS { D0, D1, D2, D3, D4 }
#define UNUSED_PINS
-// from light_ws2812_config @
-// https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/staryu
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
#define RGB_DI_PIN C6
-#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 1 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS
+// #ifdef RGB_DI_PIN
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
+#define BACKLIGHT_LEVELS 1 // either on/off
+#define RGBLIGHT_LIMIT_VAL 200
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
-
-// TODO backlighting
-#define BACKLIGHT_LEVELS 10
-// #define BACKLIGHT_PIN B7
-/*
-Backlight: C2, C7, D5, D6, B0
-switch (index) {
- case 0:
- PORTC &= ~(1<<PC2);
- break;
- case 1:
- PORTC &= ~(1<<PC7);
- break;
- case 2:
- PORTD &= ~(1<<PD5);
- break;
- case 3:
- PORTD &= ~(1<<PD6);
- break;
- case 4:
- PORTB &= ~(1<<PB0);
- break;
-*/
-
-#endif
diff --git a/keyboards/staryu/keymaps/default/keymap.c b/keyboards/staryu/keymaps/default/keymap.c
index 3dc480299..8c47ff44a 100755
--- a/keyboards/staryu/keymaps/default/keymap.c
+++ b/keyboards/staryu/keymaps/default/keymap.c
@@ -15,68 +15,90 @@ 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 "action_layer.h"
enum layers {
_LAYER0,
_LAYER1,
_LAYER2,
- _LAYER3
+ _LAYER3,
+ _LAYER4
};
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_LAYER0] = LAYOUT(
+/* ┌─────────┬─────────┬─────────┐ */
+ KC_UP, TO(_LAYER1),
+/* ├─────────┼─────────┼─────────┤ */
+ KC_LEFT, KC_DOWN, KC_RIGHT
+/* └─────────┴─────────┴─────────┘ */
+ ),
+
+ [_LAYER1] = LAYOUT(
+/* ┌─────────┬─────────┬─────────┐ */
+ KC_PGUP, TO(_LAYER2),
+/* ├─────────┼─────────┼─────────┤ */
+ KC_HOME, KC_PGDN, KC_END
+/* └─────────┴─────────┴─────────┘ */
+ ),
+
+ [_LAYER2] = LAYOUT(
+/* ┌─────────┬─────────┬─────────┐ */
+ KC_MSEL, TO(_LAYER3),
+/* ├─────────┼─────────┼─────────┤ */
+ KC_MPRV, KC_MPLY, KC_MNXT
+/* └─────────┴─────────┴─────────┘ */
+ ),
+
+ [_LAYER3] = LAYOUT(
+/* ┌─────────┬─────────┬─────────┐ */
+ KC_MS_U, TO(_LAYER4),
+/* ├─────────┼─────────┼─────────┤ */
+ KC_MS_L, KC_MS_D, KC_MS_R
+/* └─────────┴─────────┴─────────┘ */
+ ),
+
+ [_LAYER4] = LAYOUT(
+/* ┌─────────┬─────────┬─────────┐ */
+ XXXXXXX, TO(_LAYER0),
+/* ├─────────┼─────────┼─────────┤ */
+ RGB_TOG, BL_TOGG, BL_STEP
+/* └─────────┴─────────┴─────────┘ */
+ ),
-const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
- /* Keymap 0
- * ,-----------.
- * | |Up |Fn0|
- * |---+---+---|
- * |Lef|Dow|Rig|
- * `-----------'
- */
- LAYOUT( KC_UP, TO(_LAYER1), KC_LEFT,KC_DOWN,KC_RIGHT ),
- /* Keymap 1
- * ,-----------.
- * | |PgU|Fn1|
- * |---+---+---|
- * |Hom|PgD|End|
- * `-----------'
- */
- LAYOUT( KC_PGUP,TO(_LAYER2), KC_HOME,KC_PGDN,KC_END ),
- /* Keymap 2
- * ,-----------.
- * | |Sel|Fn2|
- * |---+---+---|
- * |Pre|Pla|Nex|
- * `-----------'
- */
- LAYOUT( KC_MSEL,TO(_LAYER3), KC_MPRV,KC_MPLY,KC_MNXT ),
- /* Keymap 3
- * ,-----------.
- * | |MsU|Fn3|
- * |---+---+---|
- * |MsL|MsD|MsR|
- * `-----------'
- */
- LAYOUT( KC_MS_U,TO(_LAYER0), KC_MS_L,KC_MS_D,KC_MS_R ),
- // /* Keymap 4
- // * ,-----------.
- // * | |Fn6|Fn4|
- // * |---+---+---|
- // * |Fn7|Fn5|Fn8|
- // * `-----------'
- // */
- // LAYOUT( FN6, FN4, FN7, FN5, FN8 ),
};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
- return MACRO_NONE ;
-}
+void eeconfig_init_user(void) {
+ // use the non noeeprom versions, to write these values to EEPROM too
+ rgblight_enable();
+ rgblight_mode(RGBLIGHT_MODE_BREATHING+1);
-void matrix_init_user(void) {
+ backlight_enable();
}
-void matrix_scan_user(void) {
+void keyboard_post_init_user(void) {
+ //layer_state_set_user is not called for inital state - set it here
+ rgblight_sethsv_noeeprom_white();
}
-void led_set_user(uint8_t usb_led) {
+uint32_t layer_state_set_user(uint32_t state) {
+ switch (biton32(state)) {
+ case _LAYER1:
+ rgblight_sethsv_noeeprom_cyan();
+ break;
+ case _LAYER2:
+ rgblight_sethsv_noeeprom_magenta();
+ break;
+ case _LAYER3:
+ rgblight_sethsv_noeeprom_red();
+ break;
+ case _LAYER4:
+ rgblight_sethsv_noeeprom_orange();
+ break;
+ case _LAYER0:
+ default: // for any other layers, or the default layer
+ rgblight_sethsv_noeeprom_white();
+ break;
+ }
+ return state;
}
diff --git a/keyboards/staryu/rules.mk b/keyboards/staryu/rules.mk
index 3e043bbcd..ad4873a39 100755
--- a/keyboards/staryu/rules.mk
+++ b/keyboards/staryu/rules.mk
@@ -1,10 +1,6 @@
# MCU name
MCU = atmega32u2
-BOOTLOADER = lufa-dfu
-
-SRC = backlight_staryu.c
-
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
@@ -40,21 +36,43 @@ F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = lufa-dfu
+
-# Boot Section Size in *bytes*
-OPT_DEFS += -DBOOTLOADER_SIZE=4096
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = yes # In-switch LEDs
-AUDIO_ENABLE = no # There is no available timer or pin for audio on the NovelPad
-RGBLIGHT_ENABLE = yes # RGB LEDs for underglow, installed and enabled by default for the NovelPad
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/staryu/staryu.c b/keyboards/staryu/staryu.c
index 6dcaaea0e..20334c0b7 100755
--- a/keyboards/staryu/staryu.c
+++ b/keyboards/staryu/staryu.c
@@ -15,12 +15,30 @@ 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 "staryu.h"
-#include "backlight_staryu.h"
-
-// for keyboard subdirectory level init functions
-// @Override
-void matrix_init_kb(void) {
- // call user level keymaps, if any
- init_backlight_led();
- matrix_init_user();
+
+#ifdef BACKLIGHT_ENABLE
+
+#ifdef BACKLIGHT_PIN
+ #pragma error "BACKLIGHT_PIN must stay undefined otherwise software pwm is incorrectly used"
+#endif
+
+#define BACKLIGHT_PIN_COUNT 5
+static const pin_t backlight_pins[BACKLIGHT_PIN_COUNT] = { C2, C7, D5, D6, B0 };
+
+void backlight_init_ports(void) {
+ for (uint8_t index = 0; index < BACKLIGHT_PIN_COUNT; index++) {
+ setPinOutput(backlight_pins[index]);
+ }
}
+
+void backlight_set_value(uint8_t index, uint8_t level) {
+ writePin(backlight_pins[index], !!level);
+}
+
+void backlight_set(uint8_t level) {
+ for (uint8_t index = 0; index < BACKLIGHT_PIN_COUNT; index++) {
+ backlight_set_value(index, level);
+ }
+}
+
+#endif //BACKLIGHT_ENABLE
diff --git a/keyboards/staryu/staryu.h b/keyboards/staryu/staryu.h
index 12b8be92e..f404dff28 100755
--- a/keyboards/staryu/staryu.h
+++ b/keyboards/staryu/staryu.h
@@ -14,15 +14,19 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef KB_H
-#define KB_H
+#pragma once
#include "quantum.h"
#define LAYOUT( \
- K00, K01, \
- K10, K11, K12 \
+ K00, K01, \
+ K10, K11, K12 \
) { \
{ K00, K01, K12, K11, K10 }, \
}
+
+#ifdef BACKLIGHT_ENABLE
+
+void backlight_set_value(uint8_t index, uint8_t level);
+
#endif
diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h
index 4c6158199..5352ef06c 100644
--- a/keyboards/subatomic/keymaps/default/config.h
+++ b/keyboards/subatomic/keymaps/default/config.h
@@ -1,7 +1,6 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
/*
* MIDI options
@@ -25,5 +24,3 @@
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
-
-#endif \ No newline at end of file
diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c
index 184df24d5..8def46961 100644
--- a/keyboards/subatomic/keymaps/default/keymap.c
+++ b/keyboards/subatomic/keymaps/default/keymap.c
@@ -1,9 +1,4 @@
-#include "subatomic.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
diff --git a/keyboards/sx60/keymaps/default/config.h b/keyboards/sx60/keymaps/default/config.h
index a5568e400..271f48d00 100644
--- a/keyboards/sx60/keymaps/default/config.h
+++ b/keyboards/sx60/keymaps/default/config.h
@@ -1 +1,3 @@
-#include "../../config.h"
+#pragma once
+
+// place overrides here
diff --git a/keyboards/tanuki/keymaps/default/keymap.c b/keyboards/tanuki/keymaps/default/keymap.c
index 59f5843ea..29c9071bf 100644
--- a/keyboards/tanuki/keymaps/default/keymap.c
+++ b/keyboards/tanuki/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "rgblight.h"
//Layer definitions
#define _BL 0
diff --git a/keyboards/telophase/keymaps/default/keymap.c b/keyboards/telophase/keymaps/default/keymap.c
index d4afa65f9..9cc6c1bb0 100644
--- a/keyboards/telophase/keymaps/default/keymap.c
+++ b/keyboards/telophase/keymaps/default/keymap.c
@@ -1,7 +1,7 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
-#include "telophase.h"
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@@ -15,7 +15,7 @@ enum telophase_layers
_ADJUST,
};
-enum telophase_keycodes
+enum telophase_keycodes
{
LOWER = SAFE_RANGE,
RAISE,
@@ -97,4 +97,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void matrix_scan_user(void) {
return;
};
-
diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c
index 6ce856178..0ec12435e 100644
--- a/keyboards/tetris/keymaps/default/keymap.c
+++ b/keyboards/tetris/keymaps/default/keymap.c
@@ -1,7 +1,6 @@
#include QMK_KEYBOARD_H
#ifdef AUDIO_ENABLE
- #include "audio.h"
float tone_caps[][2] = SONG( CAPS_LOCK_ON_SOUND );
float tone_taps[][2] = SONG( E__NOTE( _A6 ) );
#endif
diff --git a/keyboards/the_ruler/keymaps/default/config.h b/keyboards/the_ruler/keymaps/default/config.h
index df06a2620..271f48d00 100644
--- a/keyboards/the_ruler/keymaps/default/config.h
+++ b/keyboards/the_ruler/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif \ No newline at end of file
diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c
index cb8e8ece8..8b0f44b5e 100644
--- a/keyboards/the_ruler/keymaps/default/keymap.c
+++ b/keyboards/the_ruler/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
#include QMK_KEYBOARD_H
-#include "action_layer.h"
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h b/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h
index 060f5922f..b89b05009 100644
--- a/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h
+++ b/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/config.h b/keyboards/thevankeyboards/minivan/keymaps/default/config.h
index df06a2620..271f48d00 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/default/config.h
+++ b/keyboards/thevankeyboards/minivan/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif \ No newline at end of file
diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/config.h b/keyboards/thevankeyboards/roadkit/keymaps/default/config.h
index df06a2620..271f48d00 100644
--- a/keyboards/thevankeyboards/roadkit/keymaps/default/config.h
+++ b/keyboards/thevankeyboards/roadkit/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif \ No newline at end of file
diff --git a/keyboards/tmo50/keymaps/pyrol/keymap.c b/keyboards/tmo50/keymaps/pyrol/keymap.c
index a37370c38..f67d26092 100644
--- a/keyboards/tmo50/keymaps/pyrol/keymap.c
+++ b/keyboards/tmo50/keymaps/pyrol/keymap.c
@@ -15,37 +15,54 @@
*/
#include QMK_KEYBOARD_H
+#define CALTDEL LCA(KC_DEL)
+#define TSKMGR C(S(KC_ESC))
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
- [0] = LAYOUT(
- KC_TRNS, 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_TRNS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2),
- KC_TRNS, KC_GESC, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3)
+ [0] = LAYOUT_all(
+ KC_VOLU, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_EQL, KC_BSPC,
+ KC_VOLD, KC_LCTRL, 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_MPLY, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3),
+ KC_MUTE, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(2, KC_SPC), KC_RALT, MO(4)
),
// Fn1 layer
- [1] = LAYOUT(
- KC_VOLU, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC,
- KC_VOLD, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS,
- KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS,
- KC_MUTE, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ [1] = LAYOUT_all(
+ A(KC_TAB), KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_RBRC, KC_LBRC, KC_DEL,
+ C(KC_C), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TRNS,
+ C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS,
+ C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- // Fn2 layer
- [2] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ //Fn2 layer
+ [2] = LAYOUT_all(
+ A(KC_TAB), KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_LBRC, KC_DEL,
+ C(KC_C), KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS,
+ C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS,
+ C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
// Fn3 layer
- [3] = LAYOUT(
- RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
- KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ [3] = LAYOUT_all(
+ CALTDEL, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
+ TSKMGR, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, TO(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
-};
+ // Fn4 layer
+ [4] = LAYOUT_all(
+ RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,
+ KC_TRNS, KC_CAPS, RGB_TOG, 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, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ // Game layer!
+ [5] = LAYOUT_all(
+ KC_VOLU, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_EQL, KC_BSPC,
+ KC_VOLD, KC_LCTRL, 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_MPLY, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3),
+ KC_F12, KC_F13, KC_LALT, KC_SPC, LT(2, KC_SPC), KC_RALT, TO(0)
+ ),
+};
diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c
new file mode 100644
index 000000000..32c688e2b
--- /dev/null
+++ b/keyboards/treadstone48/common/glcdfont.c
@@ -0,0 +1,244 @@
+// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
+// See gfxfont.h for newer custom bitmap font info.
+
+#ifndef FONT5X7_H
+#define FONT5X7_H
+
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/pgmspace.h>
+#elif defined(ESP8266)
+ #include <pgmspace.h>
+#else
+ #define PROGMEM
+#endif
+
+// Standard ASCII 5x7 font
+
+static const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+ 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+ 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+ 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+ 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+ 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+ 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+ 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+ 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+ 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+ 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+ 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+ 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+ 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+ 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+ 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+ 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+ 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+ 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+ 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+ 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+ 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+ 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+ 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+ 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+ 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+ 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+ 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+ 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+ 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+ 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+ 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+ 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+ 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+ 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+ 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+ 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+ 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+ 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+ 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+ 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+ 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+ 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+ 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+ 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+ 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+ 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+ 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+ 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+ 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+ 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+ 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+ 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+ 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+ 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+ 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+ 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+ 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+ 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+ 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+ 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+ 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+ 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+ 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+ 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+ 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+ 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+ 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+ 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+ 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+ 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
+ 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+ 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+ 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+ 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+ 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
+ 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+ 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+ 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+ 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+ 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+ 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+ 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+ 0x4C, 0x10, 0x10, 0x10, 0x7C, 0x00,
+ 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+ 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+ 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+ 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+ 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+#endif // FONT5X7_H
diff --git a/keyboards/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c
new file mode 100644
index 000000000..500d3c0dc
--- /dev/null
+++ b/keyboards/treadstone48/common/oled_helper.c
@@ -0,0 +1,83 @@
+#ifdef SSD1306OLED
+#include QMK_KEYBOARD_H
+#include "ssd1306.h"
+
+void render_logo(struct CharacterMatrix *matrix) {
+
+ const char logo_buf[]={
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
+ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+ 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
+ 0};
+
+ matrix_write(matrix, logo_buf);
+}
+
+static char keylog_buf[24] = "Key state ready.";
+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 update_key_status(uint16_t keycode, keyrecord_t *record) {
+
+ if (!record->event.pressed) return;
+
+ char name = (keycode < 60) ? code_to_name[keycode] : ' ';
+ snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c",
+ record->event.key.row, record->event.key.col,
+ (uint16_t)keycode, name);
+}
+
+void render_key_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, keylog_buf);
+}
+
+static char lock_buf[24] = "Lock state ready.\n";
+void update_lock_status(void) {
+
+ uint8_t leds = host_keyboard_leds();
+ char *num_lock = (leds & (1<<USB_LED_NUM_LOCK)) ? "Num" : "";
+ char *caps_lock = (leds & (1<<USB_LED_CAPS_LOCK)) ? "Caps" : "";
+ char *scrl_lock = (leds & (1<<USB_LED_SCROLL_LOCK)) ? "Scrn" : "";
+ snprintf(lock_buf, sizeof(lock_buf) - 1, "Lock:%s %s %s\n",
+ num_lock, caps_lock, scrl_lock);
+}
+
+void render_lock_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, lock_buf);
+}
+
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+
+static char led_buf[24] = "LED state ready.\n";
+rgblight_config_t rgblight_config_bak;
+void update_led_status(void) {
+
+ if (rgblight_config_bak.enable != rgblight_config.enable ||
+ rgblight_config_bak.mode != rgblight_config.mode ||
+ rgblight_config_bak.hue != rgblight_config.hue ||
+ rgblight_config_bak.sat != rgblight_config.sat ||
+ rgblight_config_bak.val != rgblight_config.val
+ ) {
+ snprintf(led_buf, sizeof(led_buf) - 1, "LED%c:%2d hsv:%2d %2d %2d\n",
+ rgblight_config.enable ? '*' : '.', (uint8_t)rgblight_config.mode,
+ (uint8_t)(rgblight_config.hue / RGBLIGHT_HUE_STEP),
+ (uint8_t)(rgblight_config.sat / RGBLIGHT_SAT_STEP),
+ (uint8_t)(rgblight_config.val / RGBLIGHT_VAL_STEP));
+ rgblight_config_bak = rgblight_config;
+ }
+}
+
+void render_led_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, led_buf);
+}
+#endif
+#endif
diff --git a/keyboards/treadstone48/common/oled_helper.h b/keyboards/treadstone48/common/oled_helper.h
new file mode 100644
index 000000000..44628a526
--- /dev/null
+++ b/keyboards/treadstone48/common/oled_helper.h
@@ -0,0 +1,35 @@
+#ifdef SSD1306OLED
+
+void render_logo(struct CharacterMatrix *matrix);
+void update_key_status(uint16_t keycode, keyrecord_t *record);
+void render_key_status(struct CharacterMatrix *matrix);
+void update_lock_status(void);
+void render_lock_status(struct CharacterMatrix *matrix);
+
+#define RENDER_LOGO(a) render_logo(a)
+#define UPDATE_KEY_STATUS(a, b) update_key_status(a, b)
+#define RENDER_KEY_STATUS(a) render_key_status(a)
+#define UPDATE_LOCK_STATUS() update_lock_status()
+#define RENDER_LOCK_STATUS(a) render_lock_status(a)
+
+#ifdef RGBLIGHT_ENABLE
+ void update_led_status(void);
+ void render_led_status(struct CharacterMatrix *matrix);
+ #define UPDATE_LED_STATUS() update_led_status()
+ #define RENDER_LED_STATUS(a) render_led_status(a)
+#else
+ #define UPDATE_LED_STATUS()
+ #define RENDER_LED_STATUS(a)
+#endif
+
+#else
+
+#define RENDER_LOGO(a)
+#define UPDATE_KEY_STATUS(a, b)
+#define RENDER_KEY_STATUS(a)
+#define UPDATE_LOCK_STATUS()
+#define RENDER_LOCK_STATUS(a)
+#define UPDATE_LED_STATUS()
+#define RENDER_LED_STATUS(a)
+
+#endif
diff --git a/keyboards/treadstone48/config.h b/keyboards/treadstone48/config.h
new file mode 100644
index 000000000..2e571e269
--- /dev/null
+++ b/keyboards/treadstone48/config.h
@@ -0,0 +1,43 @@
+/*
+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/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+// GCC include 'config.h" sequence in qmk_firmware/keyboards/treadstone48/
+// -include keyboards/treadstone48/config.h
+// -include keyboards/treadstone48/rev?/config.h
+// -include keyboards/treadstone48/rev?/keymaps/MAPNAME/config.h
+// XXXX.c
+
+#include <serial_config.h>
+
+// GCC include search path in qmk_firmare/keyboards/treadstone48/
+// #include "..." search starts here:
+// #include <...> search starts here:
+// keyboards/treadstone48/rev?/keymaps/MAPNAME
+// keyboards/treadstone48
+// keyboards/treadstone48/rev?
+// .
+// ./tmk_core
+// ......
+
+// MACRO and FUNCTION are features that are depreciated.
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/quantum/split_common/i2c.c b/keyboards/treadstone48/i2c.c
index 45e958b39..4bee5c639 100644
--- a/quantum/split_common/i2c.c
+++ b/keyboards/treadstone48/i2c.c
@@ -5,7 +5,8 @@
#include <util/twi.h>
#include <stdbool.h>
#include "i2c.h"
-#include "split_flags.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
@@ -33,7 +34,7 @@ void i2c_delay(void) {
// _delay_us(100);
}
-// Setup twi to run at 100kHz
+// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK)
void i2c_master_init(void) {
// no prescaler
TWSR = 0;
@@ -89,22 +90,6 @@ uint8_t i2c_master_write(uint8_t data) {
return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1;
}
-uint8_t i2c_master_write_data(void *const TXdata, uint8_t dataLen) {
-
- uint8_t *data = (uint8_t *)TXdata;
- int err = 0;
-
- for (int i = 0; i < dataLen; i++) {
- err = i2c_master_write(data[i]);
-
- if ( err )
- return err;
- }
-
- return err;
-
-}
-
// 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
@@ -150,18 +135,10 @@ ISR(TWI_vect) {
if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) {
ack = 0;
slave_buffer_pos = 0;
- }
-
+ }
slave_has_register_set = true;
- } else {
+ } else {
i2c_slave_buffer[slave_buffer_pos] = TWDR;
-
- if ( slave_buffer_pos == I2C_BACKLIT_START) {
- BACKLIT_DIRTY = true;
- } else if ( slave_buffer_pos == (I2C_RGB_START+3)) {
- RGB_DIRTY = true;
- }
-
BUFFER_POS_INC();
}
break;
@@ -182,3 +159,4 @@ ISR(TWI_vect) {
// Reset everything, so we are ready for the next TWI interrupt
TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
}
+#endif
diff --git a/quantum/split_common/i2c.h b/keyboards/treadstone48/i2c.h
index 91e8e96f4..710662c7a 100644
--- a/quantum/split_common/i2c.h
+++ b/keyboards/treadstone48/i2c.h
@@ -12,30 +12,17 @@
#define I2C_ACK 1
#define I2C_NACK 0
-// Address location defines (Keymap should be last, as it's size is dynamic)
-#define I2C_BACKLIT_START 0x00
-// Need 4 bytes for RGB (32 bit)
-#define I2C_RGB_START 0x01
-#define I2C_KEYMAP_START 0x06
-
-// Slave buffer (8bit per)
-// Rows per hand + backlit space + rgb space
-// TODO : Make this dynamically sized
-#define SLAVE_BUFFER_SIZE 0x20
-
-// i2c SCL clock frequency
-#ifndef SCL_CLOCK
-#define SCL_CLOCK 100000L
-#endif
+#define SLAVE_BUFFER_SIZE 0x10
+
+// i2c SCL clock frequency 400kHz
+#define SCL_CLOCK 400000L
-// Support 8bits right now (8 cols) will need to edit to take higher (code exists in delta split?)
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_write_data(void *const TXdata, uint8_t dataLen);
uint8_t i2c_master_read(int);
void i2c_reset_state(void);
void i2c_slave_init(uint8_t address);
diff --git a/keyboards/treadstone48/keymaps/default/config.h b/keyboards/treadstone48/keymaps/default/config.h
new file mode 100644
index 000000000..3f63a0cfb
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/config.h
@@ -0,0 +1,60 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+// place overrides here
+
+#ifdef TAPPING_TERM
+#undef TAPPING_TERM
+#endif
+#define TAPPING_TERM 225
+// #define PREVENT_STUCK_MODIFIERS
+// #define IGNORE_MOD_TAP_INTERRUPT
+
+#ifdef MOUSEKEY_ENABLE
+ #undef MOUSEKEY_INTERVAL
+ #define MOUSEKEY_INTERVAL 1
+
+ #undef MOUSEKEY_TIME_TO_MAX
+ #define MOUSEKEY_TIME_TO_MAX 150
+
+ #undef MOUSEKEY_MAX_SPEED
+ #define MOUSEKEY_MAX_SPEED 3
+
+ #undef MOUSEKEY_MOVE_DELTA
+ #define MOUSEKEY_MOVE_DELTA 4
+
+ #undef MOUSEKEY_DELAY
+ #define MOUSEKEY_DELAY 0
+#endif
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ //#define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ //#define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ //#define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c
new file mode 100644
index 000000000..406f11292
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/keymap.c
@@ -0,0 +1,278 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include "../common/oled_helper.h"
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ LOWER = SAFE_RANGE,
+ RAISE,
+ ADJUST,
+ KANJI,
+ RGBRST
+};
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_SLRO,
+};
+
+// Layer Mode aliases
+#define _____ KC_TRNS
+#define XXXXX KC_NO
+
+#define KC_TBSF LSFT_T(KC_TAB)
+// #define KC_SPSF LSFT_T(KC_SPC)
+#define KC_ALAP LALT_T(KC_APP)
+#define KC_JEQL LSFT(KC_MINS)
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_SLRO TD(TD_SLRO)
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWER] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, KC_SCLN, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, XXXXX, KC_COMM, KC_DOT, KC_GRV, KC_PGUP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_RAISE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_ADJUST] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ )
+};
+
+#define L_BASE _BASE
+#define L_LOWER (1<<_LOWER)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+#ifdef SSD1306OLED
+typedef struct {
+ uint8_t state;
+ char name[8];
+}LAYER_DISPLAY_NAME;
+
+#define LAYER_DISPLAY_MAX 5
+const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
+ {L_BASE, "Base"},
+ {L_BASE + 1, "Base"},
+ {L_LOWER, "Lower"},
+ {L_RAISE, "Raise"},
+ {L_ADJUST_TRI, "Adjust"}
+};
+
+static inline const char* get_leyer_status(void) {
+
+ for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
+ if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
+
+ return layer_display_name[i].name;
+ } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
+
+ return layer_display_name[i].name;
+ }
+ }
+
+ return "?";
+}
+
+static char layer_status_buf[24] = "Layer state ready.\n";
+static inline void update_keymap_status(void) {
+
+ snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
+ keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
+}
+
+static inline void render_keymap_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, layer_status_buf);
+}
+
+#define UPDATE_KEYMAP_STATUS() update_keymap_status()
+#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
+
+#else
+
+#define UPDATE_KEYMAP_STATUS()
+#define RENDER_KEYMAP_STATUS(a)
+
+#endif
+
+static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+
+ pressed ? layer_on(layer1) : layer_off(layer1);
+ IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
+}
+
+int RGB_current_mode;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ UPDATE_KEY_STATUS(keycode, record);
+
+ bool result = false;
+ switch (keycode) {
+ case LOWER:
+ update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
+ break;
+ case RAISE:
+ update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
+ break;
+ case KANJI:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui == false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ case RGBRST:
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ #endif
+ default:
+ result = true;
+ break;
+ }
+
+ UPDATE_KEYMAP_STATUS();
+ return result;
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+static inline void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+static inline void render_status(struct CharacterMatrix *matrix) {
+
+ UPDATE_LED_STATUS();
+ RENDER_LED_STATUS(matrix);
+ RENDER_KEYMAP_STATUS(matrix);
+ UPDATE_LOCK_STATUS();
+ RENDER_LOCK_STATUS(matrix);
+ RENDER_KEY_STATUS(matrix);
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+ #if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+ #endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/treadstone48/keymaps/default/readme.md b/keyboards/treadstone48/keymaps/default/readme.md
new file mode 100644
index 000000000..bb835d169
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+# Default keymap for treadstone48
+
+## Description
+
+## How to use
diff --git a/keyboards/treadstone48/keymaps/default/readme_jp.md b/keyboards/treadstone48/keymaps/default/readme_jp.md
new file mode 100644
index 000000000..6043c93cb
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/readme_jp.md
@@ -0,0 +1,80 @@
+# US配列ライクデフォルトキーマップ
+
+## 概要
+
+ US配列ライクなデフォルトキーマップです。
+
+## キーマップの見かた
+
+qmk_firmware\tmk_core\common\keycode.h
+に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
+キーマップに書くときは「KC_」を省略して書いています。
+例:KC_A → A
+
+Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。
+
+Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
+例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
+
+Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
+例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
+
+Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。
+例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT
+
+もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
+
+## 機能
+
+ QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+ DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。
+ Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。
+ マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。
+
+## 48キー目について
+
+ このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。
+
+ 各レイヤーの最下段の
+
+```c
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+```
+
+ のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。
+
+## OS切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
+- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
+
+## NUMPADモードについて
+
+ Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。
+
+## IME切り替え方法
+
+ Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
+
+## ソフトウェアリセットについて
+
+ キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。
+
+## LEDの点灯切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- RGBRST: LEDのリセット
+- RGB_TOG: LEDのON/OFF切り替え
+- RGB_MOD: LEDの光り方の変更
+- RGB_HUI: Hue+ 色合いを変更
+- RGB_HUD: Hue- 色合いを変更
+- RGB_SAI: Saturation+ 色の濃さを変更
+- RGB_SAD: Saturation- 色の濃さを変更
+- RGB_VAI: Value+ 明るさを変更
+- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk
new file mode 100644
index 000000000..c53226431
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/default/rules.mk
@@ -0,0 +1,67 @@
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+TAP_DANCE_ENABLE = yes
+
+# If your custom treadstone48 pcb, you can rewrite to yes.
+OLED_ENABLE = no # OLED_ENABLE
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+
+# Other selectable option
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c"
+# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes.
+ANGELINA_KEYMAP = no # If Alfa verstion use set to yes.
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+ OPT_DEFS += -DLED_ANIMATIONS
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes)
+# OPT_DEFS += -DRHYMESTONE_RIGHTHAND
+# endif
+
+ifeq ($(strip $(ANGELINA_KEYMAP)), yes)
+ OPT_DEFS += -DANGELINA_KEYMAP
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./common/oled_helper.c \
diff --git a/keyboards/treadstone48/keymaps/like_jis/config.h b/keyboards/treadstone48/keymaps/like_jis/config.h
new file mode 100644
index 000000000..3f63a0cfb
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/config.h
@@ -0,0 +1,60 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+// place overrides here
+
+#ifdef TAPPING_TERM
+#undef TAPPING_TERM
+#endif
+#define TAPPING_TERM 225
+// #define PREVENT_STUCK_MODIFIERS
+// #define IGNORE_MOD_TAP_INTERRUPT
+
+#ifdef MOUSEKEY_ENABLE
+ #undef MOUSEKEY_INTERVAL
+ #define MOUSEKEY_INTERVAL 1
+
+ #undef MOUSEKEY_TIME_TO_MAX
+ #define MOUSEKEY_TIME_TO_MAX 150
+
+ #undef MOUSEKEY_MAX_SPEED
+ #define MOUSEKEY_MAX_SPEED 3
+
+ #undef MOUSEKEY_MOVE_DELTA
+ #define MOUSEKEY_MOVE_DELTA 4
+
+ #undef MOUSEKEY_DELAY
+ #define MOUSEKEY_DELAY 0
+#endif
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ //#define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ //#define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ //#define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c
new file mode 100644
index 000000000..b63b0c9f4
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c
@@ -0,0 +1,278 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include "../common/oled_helper.h"
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ LOWER = SAFE_RANGE,
+ RAISE,
+ ADJUST,
+ KANJI,
+ RGBRST
+};
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_SLRO,
+};
+
+// Layer Mode aliases
+#define _____ KC_TRNS
+#define XXXXX KC_NO
+
+#define KC_TBSF LSFT_T(KC_TAB)
+// #define KC_SPSF LSFT_T(KC_SPC)
+#define KC_ALAP LALT_T(KC_APP)
+#define KC_JEQL LSFT(KC_MINS)
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_SLRO TD(TD_SLRO)
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWER] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_RAISE] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_ADJUST] = LAYOUT_base( \
+ //,--------------------------------------------------------------------------------------------------------------------.
+ XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------|
+ XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------|
+ _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\
+ //`-------------------------------------------------------------------------------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ )
+};
+
+#define L_BASE _BASE
+#define L_LOWER (1<<_LOWER)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+#ifdef SSD1306OLED
+typedef struct {
+ uint8_t state;
+ char name[8];
+}LAYER_DISPLAY_NAME;
+
+#define LAYER_DISPLAY_MAX 5
+const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
+ {L_BASE, "Base"},
+ {L_BASE + 1, "Base"},
+ {L_LOWER, "Lower"},
+ {L_RAISE, "Raise"},
+ {L_ADJUST_TRI, "Adjust"}
+};
+
+static inline const char* get_leyer_status(void) {
+
+ for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
+ if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
+
+ return layer_display_name[i].name;
+ } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
+
+ return layer_display_name[i].name;
+ }
+ }
+
+ return "?";
+}
+
+static char layer_status_buf[24] = "Layer state ready.\n";
+static inline void update_keymap_status(void) {
+
+ snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
+ keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
+}
+
+static inline void render_keymap_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, layer_status_buf);
+}
+
+#define UPDATE_KEYMAP_STATUS() update_keymap_status()
+#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
+
+#else
+
+#define UPDATE_KEYMAP_STATUS()
+#define RENDER_KEYMAP_STATUS(a)
+
+#endif
+
+static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+
+ pressed ? layer_on(layer1) : layer_off(layer1);
+ IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
+}
+
+int RGB_current_mode;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ UPDATE_KEY_STATUS(keycode, record);
+
+ bool result = false;
+ switch (keycode) {
+ case LOWER:
+ update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
+ break;
+ case RAISE:
+ update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
+ break;
+ case KANJI:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui == false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ case RGBRST:
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ #endif
+ default:
+ result = true;
+ break;
+ }
+
+ UPDATE_KEYMAP_STATUS();
+ return result;
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+static inline void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+static inline void render_status(struct CharacterMatrix *matrix) {
+
+ UPDATE_LED_STATUS();
+ RENDER_LED_STATUS(matrix);
+ RENDER_KEYMAP_STATUS(matrix);
+ UPDATE_LOCK_STATUS();
+ RENDER_LOCK_STATUS(matrix);
+ RENDER_KEY_STATUS(matrix);
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+ #if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+ #endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis/readme.md b/keyboards/treadstone48/keymaps/like_jis/readme.md
new file mode 100644
index 000000000..796df6c4c
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/readme.md
@@ -0,0 +1,5 @@
+# The like jis type keyboard keymap for treadstone48
+
+## Description
+
+## How to use
diff --git a/keyboards/treadstone48/keymaps/like_jis/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md
new file mode 100644
index 000000000..305ded471
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md
@@ -0,0 +1,80 @@
+# JISキーボードライクなキーマップ
+
+## 概要
+
+ デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。
+
+## キーマップの見かた
+
+qmk_firmware\tmk_core\common\keycode.h
+に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
+キーマップに書くときは「KC_」を省略して書いています。
+例:KC_A → A
+
+Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。
+
+Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
+例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
+
+Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
+例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
+
+Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。
+例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT
+
+もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
+
+## 機能
+
+ QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+ DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。
+ Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。
+ マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。
+
+## 48キー目について
+
+ このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。
+
+ 各レイヤーの最下段の
+
+```c
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+```
+
+ のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。
+
+## OS切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
+- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
+
+## NUMPADモードについて
+
+ Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。
+
+## IME切り替え方法
+
+ Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
+
+## ソフトウェアリセットについて
+
+ キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。
+
+## LEDの点灯切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- RGBRST: LEDのリセット
+- RGB_TOG: LEDのON/OFF切り替え
+- RGB_MOD: LEDの光り方の変更
+- RGB_HUI: Hue+ 色合いを変更
+- RGB_HUD: Hue- 色合いを変更
+- RGB_SAI: Saturation+ 色の濃さを変更
+- RGB_SAD: Saturation- 色の濃さを変更
+- RGB_VAI: Value+ 明るさを変更
+- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk
new file mode 100644
index 000000000..c53226431
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk
@@ -0,0 +1,67 @@
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+TAP_DANCE_ENABLE = yes
+
+# If your custom treadstone48 pcb, you can rewrite to yes.
+OLED_ENABLE = no # OLED_ENABLE
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+
+# Other selectable option
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c"
+# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes.
+ANGELINA_KEYMAP = no # If Alfa verstion use set to yes.
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+ OPT_DEFS += -DLED_ANIMATIONS
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes)
+# OPT_DEFS += -DRHYMESTONE_RIGHTHAND
+# endif
+
+ifeq ($(strip $(ANGELINA_KEYMAP)), yes)
+ OPT_DEFS += -DANGELINA_KEYMAP
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./common/oled_helper.c \
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/config.h b/keyboards/treadstone48/keymaps/like_jis_rs/config.h
new file mode 100644
index 000000000..e8acd5c76
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/config.h
@@ -0,0 +1,60 @@
+/*
+This is the c configuration file for the keymap
+
+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/>.
+*/
+
+#pragma once
+
+// place overrides here
+
+#ifdef TAPPING_TERM
+#undef TAPPING_TERM
+#endif
+#define TAPPING_TERM 225
+#define PREVENT_STUCK_MODIFIERS
+#define IGNORE_MOD_TAP_INTERRUPT
+
+#ifdef MOUSEKEY_ENABLE
+ #undef MOUSEKEY_INTERVAL
+ #define MOUSEKEY_INTERVAL 1
+
+ #undef MOUSEKEY_TIME_TO_MAX
+ #define MOUSEKEY_TIME_TO_MAX 150
+
+ #undef MOUSEKEY_MAX_SPEED
+ #define MOUSEKEY_MAX_SPEED 3
+
+ #undef MOUSEKEY_MOVE_DELTA
+ #define MOUSEKEY_MOVE_DELTA 4
+
+ #undef MOUSEKEY_DELAY
+ #define MOUSEKEY_DELAY 0
+#endif
+
+// Selection of RGBLIGHT MODE to use.
+#if defined(LED_ANIMATIONS)
+ //#define RGBLIGHT_EFFECT_BREATHING
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ //#define RGBLIGHT_EFFECT_SNAKE
+ #define RGBLIGHT_EFFECT_KNIGHT
+ //#define RGBLIGHT_EFFECT_CHRISTMAS
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ //#define RGBLIGHT_EFFECT_RGB_TEST
+ //#define RGBLIGHT_EFFECT_ALTERNATING
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c
new file mode 100644
index 000000000..0e4ec063c
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c
@@ -0,0 +1,342 @@
+#include QMK_KEYBOARD_H
+#include "keymap_jp.h"
+#include "../common/oled_helper.h"
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _BASES,
+ _LOWER,
+ _LOWRS,
+ _RAISE,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ BASE = SAFE_RANGE,
+ BASES,
+ LOWER,
+ LOWRS,
+ RAISE,
+ ADJUST,
+ KANJI,
+ RGBRST
+};
+
+enum tapdances{
+ TD_SCCL = 0,
+ TD_SLRO,
+};
+
+// Layer Mode aliases
+#define _____ KC_TRNS
+#define XXXXX KC_NO
+
+#define KC_TBSF LSFT_T(KC_TAB)
+// #define KC_SPSF LSFT_T(KC_SPC)
+#define KC_ALAP LALT_T(KC_APP)
+#define KC_JEQL LSFT(KC_MINS)
+#define KC_SFUC LSFT(KC_RO)
+#define KC_RSBR LSFT(KC_8)
+#define KC_REBR LSFT(KC_9)
+
+#define KC_ZSFT LSFT_T(KC_Z)
+#define KC_ESCT LCTL_T(KC_ESC)
+#define KC_TBAL LALT_T(KC_TAB)
+#define KC_11SF LSFT_T(KC_F11)
+
+#define KC_SCCL TD(TD_SCCL)
+#define KC_SLRO TD(TD_SLRO)
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT),
+ [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_NLCK,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, LOWER, KC_P0, KC_PDOT, KC_PPLS, KC_BSPC,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWER] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_A, KC_B, KC_C, KC_JYEN, KC_HASH,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_D, KC_E, KC_F, KC_PERC, KC_SFUC,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, BASES, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_RSBR, KC_REBR, KC_RBRC, KC_QUOT, _____,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, XXXXX, KC_COMM, KC_JEQL, KC_DEL,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_BASES] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_Q, KC_W, KC_E, KC_R, KC_T,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_ZSFT, KC_X, KC_C, KC_V, KC_B,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, KC_ESCT, KC_TBAL, KC_LGUI, LOWRS, KC_BSPC,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ KC_DEL \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_LOWRS] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, KC_F11, KC_F12, BASE, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_11SF, KC_F12, BASE, KANJI, KC_ENT,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, _____, _____, _____, KC_DEL,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_RAISE] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ ),
+
+ [_ADJUST] = LAYOUT_rs( \
+ // Treadstone48 Rhymestone
+ //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------.
+ XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------|
+ XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------|
+ _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------'
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+ )
+};
+
+#define L_BASE _BASE
+#define L_BASES (1<<_BASES)
+#define L_LOWER (1<<_LOWER)
+#define L_LOWRS (1<<_LOWRS)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+
+#ifdef SSD1306OLED
+typedef struct {
+ uint8_t state;
+ char name[8];
+}LAYER_DISPLAY_NAME;
+
+#define LAYER_DISPLAY_MAX 7
+const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
+ {L_BASE, "Base"},
+ {L_BASE + 1, "Base"},
+ {L_BASES, "BaseSpl"},
+ {L_LOWER, "Lower"},
+ {L_LOWRS, "LowrSpl"},
+ {L_RAISE, "Raise"},
+ {L_ADJUST_TRI, "Adjust"}
+};
+
+static inline const char* get_leyer_status(void) {
+
+ for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
+ if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
+
+ return layer_display_name[i].name;
+ } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
+
+ return layer_display_name[i].name;
+ }
+ }
+
+ return "?";
+}
+
+static char layer_status_buf[24] = "Layer state ready.\n";
+static inline void update_keymap_status(void) {
+
+ snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
+ keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
+}
+
+static inline void render_keymap_status(struct CharacterMatrix *matrix) {
+
+ matrix_write(matrix, layer_status_buf);
+}
+
+#define UPDATE_KEYMAP_STATUS() update_keymap_status()
+#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
+
+#else
+
+#define UPDATE_KEYMAP_STATUS()
+#define RENDER_KEYMAP_STATUS(a)
+
+#endif
+
+void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+
+ pressed ? layer_on(layer1) : layer_off(layer1);
+ IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
+}
+
+int RGB_current_mode;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+
+ UPDATE_KEY_STATUS(keycode, record);
+
+ bool result = false;
+ switch (keycode) {
+ case LOWER:
+ update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
+ break;
+ case RAISE:
+ update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
+ break;
+ case BASE:
+ if (record->event.pressed) {
+ default_layer_set(L_BASE);
+ }
+ break;
+ case BASES:
+ if (record->event.pressed) {
+ default_layer_set(L_BASES);
+ }
+ break;
+ case LOWRS:
+ update_change_layer(record->event.pressed, _LOWRS, _RAISE, _ADJUST);
+ break;
+ case KANJI:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui == false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ case RGBRST:
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ break;
+ #endif
+ default:
+ result = true;
+ break;
+ }
+
+ UPDATE_KEYMAP_STATUS();
+ return result;
+}
+
+void matrix_init_user(void) {
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+static inline void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+static inline void render_status(struct CharacterMatrix *matrix) {
+
+ UPDATE_LED_STATUS();
+ RENDER_LED_STATUS(matrix);
+ RENDER_KEYMAP_STATUS(matrix);
+ UPDATE_LOCK_STATUS();
+ RENDER_LOCK_STATUS(matrix);
+ RENDER_KEY_STATUS(matrix);
+}
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+ #if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+ #endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md
new file mode 100644
index 000000000..796df6c4c
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md
@@ -0,0 +1,5 @@
+# The like jis type keyboard keymap for treadstone48
+
+## Description
+
+## How to use
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md
new file mode 100644
index 000000000..5a6fc1d73
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md
@@ -0,0 +1,84 @@
+# JISキーボードライクなキーマップ
+
+## 概要
+
+ デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。
+ オプションのRhymestone用のマップを使用するために拡張しています。RhymestoneのpromicroにもTreadstone48のキーマップを入れてください。
+ Rhymestoneは基本的には左手側を使うことを想定していますが、右手側を使用する場合はrules.mkにあるRHYMESTONE_RIGHTHAND設定をyesにすれば使えるようになります。
+
+```RHYMESTONE_RIGHTHAND=yes```
+
+## キーマップの見かた
+
+qmk_firmware\tmk_core\common\keycode.h
+に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。
+キーマップに書くときは「KC_」を省略して書いています。
+例:KC_A → A
+
+Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。
+
+Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。
+例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動
+
+Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。
+例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト
+
+Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。
+例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT
+
+もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。
+
+## 機能
+
+ QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+ DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。
+ Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。
+ マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。
+
+## 48キー目について
+
+ このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。
+
+ 各レイヤーの最下段の
+
+```c
+ XXXXX \
+ // ExtraKey: Split backspace key or it is below the enter key.
+```
+
+ のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。
+
+## OS切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です
+- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください
+
+## NUMPADモードについて
+
+ Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。
+
+## IME切り替え方法
+
+ Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。
+
+## ソフトウェアリセットについて
+
+ キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。
+ LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。
+
+## LEDの点灯切り替え方法
+
+ Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。
+
+- RGBRST: LEDのリセット
+- RGB_TOG: LEDのON/OFF切り替え
+- RGB_MOD: LEDの光り方の変更
+- RGB_HUI: Hue+ 色合いを変更
+- RGB_HUD: Hue- 色合いを変更
+- RGB_SAI: Saturation+ 色の濃さを変更
+- RGB_SAD: Saturation- 色の濃さを変更
+- RGB_VAI: Value+ 明るさを変更
+- RGB_VAD: Value- 明るさを変更
diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk
new file mode 100644
index 000000000..c34bb2e34
--- /dev/null
+++ b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk
@@ -0,0 +1,67 @@
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+TAP_DANCE_ENABLE = yes
+
+# If your custom treadstone48 pcb, you can rewrite to yes.
+OLED_ENABLE = no # OLED_ENABLE
+LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+
+# Other selectable option
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c"
+RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes.
+ANGELINA_KEYMAP = no # If Alfa verstion use set to yes.
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ # OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+ OPT_DEFS += -DLED_ANIMATIONS
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes)
+ OPT_DEFS += -DRHYMESTONE_RIGHTHAND
+endif
+
+ifeq ($(strip $(ANGELINA_KEYMAP)), yes)
+ OPT_DEFS += -DANGELINA_KEYMAP
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+# If you want to change the display of OLED, you need to change here
+SRC += ./common/oled_helper.c \
diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h
new file mode 100644
index 000000000..f9e7ed75d
--- /dev/null
+++ b/keyboards/treadstone48/pro_micro.h
@@ -0,0 +1,362 @@
+/*
+ pins_arduino.h - Pin definition functions for Arduino
+ Part of Arduino - http://www.arduino.cc/
+
+ Copyright (c) 2007 David A. Mellis
+
+ 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., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA
+
+ $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $
+*/
+
+#ifndef Pins_Arduino_h
+#define Pins_Arduino_h
+
+#include <avr/pgmspace.h>
+
+// Workaround for wrong definitions in "iom32u4.h".
+// This should be fixed in the AVR toolchain.
+#undef UHCON
+#undef UHINT
+#undef UHIEN
+#undef UHADDR
+#undef UHFNUM
+#undef UHFNUML
+#undef UHFNUMH
+#undef UHFLEN
+#undef UPINRQX
+#undef UPINTX
+#undef UPNUM
+#undef UPRST
+#undef UPCONX
+#undef UPCFG0X
+#undef UPCFG1X
+#undef UPSTAX
+#undef UPCFG2X
+#undef UPIENX
+#undef UPDATX
+#undef TCCR2A
+#undef WGM20
+#undef WGM21
+#undef COM2B0
+#undef COM2B1
+#undef COM2A0
+#undef COM2A1
+#undef TCCR2B
+#undef CS20
+#undef CS21
+#undef CS22
+#undef WGM22
+#undef FOC2B
+#undef FOC2A
+#undef TCNT2
+#undef TCNT2_0
+#undef TCNT2_1
+#undef TCNT2_2
+#undef TCNT2_3
+#undef TCNT2_4
+#undef TCNT2_5
+#undef TCNT2_6
+#undef TCNT2_7
+#undef OCR2A
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+#undef OCR2B
+#undef OCR2_0
+#undef OCR2_1
+#undef OCR2_2
+#undef OCR2_3
+#undef OCR2_4
+#undef OCR2_5
+#undef OCR2_6
+#undef OCR2_7
+
+#define NUM_DIGITAL_PINS 30
+#define NUM_ANALOG_INPUTS 12
+
+#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
+#define TXLED0 PORTD |= (1<<5)
+#define TXLED1 PORTD &= ~(1<<5)
+#define RXLED0 PORTB |= (1<<0)
+#define RXLED1 PORTB &= ~(1<<0)
+
+static const uint8_t SDA = 2;
+static const uint8_t SCL = 3;
+#define LED_BUILTIN 13
+
+// Map SPI port to 'new' pins D14..D17
+static const uint8_t SS = 17;
+static const uint8_t MOSI = 16;
+static const uint8_t MISO = 14;
+static const uint8_t SCK = 15;
+
+// Mapping of analog pins as digital I/O
+// A6-A11 share with digital pins
+static const uint8_t ADC0 = 18;
+static const uint8_t ADC1 = 19;
+static const uint8_t ADC2 = 20;
+static const uint8_t ADC3 = 21;
+static const uint8_t ADC4 = 22;
+static const uint8_t ADC5 = 23;
+static const uint8_t ADC6 = 24; // D4
+static const uint8_t ADC7 = 25; // D6
+static const uint8_t ADC8 = 26; // D8
+static const uint8_t ADC9 = 27; // D9
+static const uint8_t ADC10 = 28; // D10
+static const uint8_t ADC11 = 29; // D12
+
+#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
+#define digitalPinToPCICRbit(p) 0
+#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0))
+#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4))))))
+
+// __AVR_ATmega32U4__ has an unusual mapping of pins to channels
+extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
+#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
+
+#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT)))))
+
+#ifdef ARDUINO_MAIN
+
+// On the Arduino board, digital pins are also used
+// for the analog output (software PWM). Analog input
+// pins are a separate set.
+
+// ATMEL ATMEGA32U4 / ARDUINO LEONARDO
+//
+// D0 PD2 RXD1/INT2
+// D1 PD3 TXD1/INT3
+// D2 PD1 SDA SDA/INT1
+// D3# PD0 PWM8/SCL OC0B/SCL/INT0
+// D4 A6 PD4 ADC8
+// D5# PC6 ??? OC3A/#OC4A
+// D6# A7 PD7 FastPWM #OC4D/ADC10
+// D7 PE6 INT6/AIN0
+//
+// D8 A8 PB4 ADC11/PCINT4
+// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5
+// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6
+// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7
+// D12 A11 PD6 T1/#OC4D/ADC9
+// D13# PC7 PWM10 CLK0/OC4A
+//
+// A0 D18 PF7 ADC7
+// A1 D19 PF6 ADC6
+// A2 D20 PF5 ADC5
+// A3 D21 PF4 ADC4
+// A4 D22 PF1 ADC1
+// A5 D23 PF0 ADC0
+//
+// New pins D14..D17 to map SPI port to digital pins
+//
+// MISO D14 PB3 MISO,PCINT3
+// SCK D15 PB1 SCK,PCINT1
+// MOSI D16 PB2 MOSI,PCINT2
+// SS D17 PB0 RXLED,SS/PCINT0
+//
+// Connected LEDs on board for TX and RX
+// TXLED D24 PD5 XCK1
+// RXLED D17 PB0
+// HWB PE2 HWB
+
+// these arrays map port names (e.g. port B) to the
+// appropriate addresses for various functions (e.g. reading
+// and writing)
+const uint16_t PROGMEM port_to_mode_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &DDRB,
+ (uint16_t) &DDRC,
+ (uint16_t) &DDRD,
+ (uint16_t) &DDRE,
+ (uint16_t) &DDRF,
+};
+
+const uint16_t PROGMEM port_to_output_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &PORTB,
+ (uint16_t) &PORTC,
+ (uint16_t) &PORTD,
+ (uint16_t) &PORTE,
+ (uint16_t) &PORTF,
+};
+
+const uint16_t PROGMEM port_to_input_PGM[] = {
+ NOT_A_PORT,
+ NOT_A_PORT,
+ (uint16_t) &PINB,
+ (uint16_t) &PINC,
+ (uint16_t) &PIND,
+ (uint16_t) &PINE,
+ (uint16_t) &PINF,
+};
+
+const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
+ PD, // D0 - PD2
+ PD, // D1 - PD3
+ PD, // D2 - PD1
+ PD, // D3 - PD0
+ PD, // D4 - PD4
+ PC, // D5 - PC6
+ PD, // D6 - PD7
+ PE, // D7 - PE6
+
+ PB, // D8 - PB4
+ PB, // D9 - PB5
+ PB, // D10 - PB6
+ PB, // D11 - PB7
+ PD, // D12 - PD6
+ PC, // D13 - PC7
+
+ PB, // D14 - MISO - PB3
+ PB, // D15 - SCK - PB1
+ PB, // D16 - MOSI - PB2
+ PB, // D17 - SS - PB0
+
+ PF, // D18 - A0 - PF7
+ PF, // D19 - A1 - PF6
+ PF, // D20 - A2 - PF5
+ PF, // D21 - A3 - PF4
+ PF, // D22 - A4 - PF1
+ PF, // D23 - A5 - PF0
+
+ PD, // D24 - PD5
+ PD, // D25 / D6 - A7 - PD7
+ PB, // D26 / D8 - A8 - PB4
+ PB, // D27 / D9 - A9 - PB5
+ PB, // D28 / D10 - A10 - PB6
+ PD, // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
+ _BV(2), // D0 - PD2
+ _BV(3), // D1 - PD3
+ _BV(1), // D2 - PD1
+ _BV(0), // D3 - PD0
+ _BV(4), // D4 - PD4
+ _BV(6), // D5 - PC6
+ _BV(7), // D6 - PD7
+ _BV(6), // D7 - PE6
+
+ _BV(4), // D8 - PB4
+ _BV(5), // D9 - PB5
+ _BV(6), // D10 - PB6
+ _BV(7), // D11 - PB7
+ _BV(6), // D12 - PD6
+ _BV(7), // D13 - PC7
+
+ _BV(3), // D14 - MISO - PB3
+ _BV(1), // D15 - SCK - PB1
+ _BV(2), // D16 - MOSI - PB2
+ _BV(0), // D17 - SS - PB0
+
+ _BV(7), // D18 - A0 - PF7
+ _BV(6), // D19 - A1 - PF6
+ _BV(5), // D20 - A2 - PF5
+ _BV(4), // D21 - A3 - PF4
+ _BV(1), // D22 - A4 - PF1
+ _BV(0), // D23 - A5 - PF0
+
+ _BV(5), // D24 - PD5
+ _BV(7), // D25 / D6 - A7 - PD7
+ _BV(4), // D26 / D8 - A8 - PB4
+ _BV(5), // D27 / D9 - A9 - PB5
+ _BV(6), // D28 / D10 - A10 - PB6
+ _BV(6), // D29 / D12 - A11 - PD6
+};
+
+const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ TIMER0B, /* 3 */
+ NOT_ON_TIMER,
+ TIMER3A, /* 5 */
+ TIMER4D, /* 6 */
+ NOT_ON_TIMER,
+
+ NOT_ON_TIMER,
+ TIMER1A, /* 9 */
+ TIMER1B, /* 10 */
+ TIMER0A, /* 11 */
+
+ NOT_ON_TIMER,
+ TIMER4A, /* 13 */
+
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+ NOT_ON_TIMER,
+};
+
+const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
+ 7, // A0 PF7 ADC7
+ 6, // A1 PF6 ADC6
+ 5, // A2 PF5 ADC5
+ 4, // A3 PF4 ADC4
+ 1, // A4 PF1 ADC1
+ 0, // A5 PF0 ADC0
+ 8, // A6 D4 PD4 ADC8
+ 10, // A7 D6 PD7 ADC10
+ 11, // A8 D8 PB4 ADC11
+ 12, // A9 D9 PB5 ADC12
+ 13, // A10 D10 PB6 ADC13
+ 9 // A11 D12 PD6 ADC9
+};
+
+#endif /* ARDUINO_MAIN */
+
+// These serial port names are intended to allow libraries and architecture-neutral
+// sketches to automatically default to the correct port name for a particular type
+// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
+//
+// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+//
+// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+//
+// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+//
+// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+//
+// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+// pins are NOT connected to anything by default.
+#define SERIAL_PORT_MONITOR Serial
+#define SERIAL_PORT_USBVIRTUAL Serial
+#define SERIAL_PORT_HARDWARE Serial1
+#define SERIAL_PORT_HARDWARE_OPEN Serial1
+
+#endif /* Pins_Arduino_h */
diff --git a/keyboards/treadstone48/readme.md b/keyboards/treadstone48/readme.md
new file mode 100644
index 000000000..eef39c39b
--- /dev/null
+++ b/keyboards/treadstone48/readme.md
@@ -0,0 +1,18 @@
+# treadstone48
+
+![treadstone48](https://github.com/marksard/Keyboards/raw/master/_image/20181219-PC190003.jpg)
+
+A 47 (or 48) keys Symmetric Staggered keyboard.
+
+Keyboard Maintainer: [marksard](https://github.com/marksard)
+Hardware Supported: The PCBs, controllers supported
+Hardware Availability: links to where you can find this hardware
+
+Make example for this keyboard (after setting up your build environment):
+
+ make treadstone48: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).
+
+[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstpne48/documents/treadstone48_buildguide.md)
+[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone48)
diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h
new file mode 100644
index 000000000..d8ecf170d
--- /dev/null
+++ b/keyboards/treadstone48/rev1/config.h
@@ -0,0 +1,128 @@
+/*
+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/>.
+*/
+
+#ifndef REV1_CONFIG_H
+#define REV1_CONFIG_H
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xDFA3
+#define DEVICE_VER 0x0010
+#define MANUFACTURER marksard
+#define PRODUCT treadstone48
+#define DESCRIPTION Symmetrical staggered 47+1 Keys Keyboard
+
+#define PREVENT_STUCK_MODIFIERS
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 150
+
+/* Use I2C or Serial */
+#define USE_I2C
+#define USE_SERIAL
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+// OLED support
+// see ./rules.mk: OLED_ENABLE=yes or no
+#ifdef OLED_ENABLE
+ #define SSD1306OLED
+#endif
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 16
+#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
+
+// wiring of each half
+#define MATRIX_COLS 6
+#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 }
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+//#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+//#define LOCKING_RESYNC_ENABLE
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+#define RGBLIGHT_TIMER
+//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
+#define ws2812_PORTREG PORTD
+#define ws2812_DDRREG DDRD
+
+// treadstone48 keyboard RGB LED support
+//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
+// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
+#define RGBLED_NUM 12
+
+#ifndef IOS_DEVICE_ENABLE
+ #define RGBLIGHT_LIMIT_VAL 180
+ #define RGBLIGHT_VAL_STEP 17
+#else
+ #define RGBLIGHT_LIMIT_VAL 50
+ #define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+// USB_MAX_POWER_CONSUMPTION value for treadstone48 keyboard
+// 120 RGBoff, OLEDoff
+// 120 OLED
+// 330 RGB 6
+// 300 RGB 32
+// 310 OLED & RGB 32
+ #define USB_MAX_POWER_CONSUMPTION 400
+#else
+ // fix iPhone and iPad power adapter issue
+ // iOS device need lessthan 100
+ #define USB_MAX_POWER_CONSUMPTION 100
+#endif
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+
+#endif
diff --git a/keyboards/treadstone48/rev1/info.json b/keyboards/treadstone48/rev1/info.json
new file mode 100644
index 000000000..df9e7591b
--- /dev/null
+++ b/keyboards/treadstone48/rev1/info.json
@@ -0,0 +1,261 @@
+{
+ "keyboard_name": "Treadstone48",
+ "url": "https://github.com/marksard/Keyboards",
+ "maintainer": "marksard",
+ "width": 14.75,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_base": {
+ "layout": [
+ {
+ "label": "Esc",
+ "x": 1,
+ "y": 0
+ },
+ {
+ "label": "Q",
+ "x": 2.25,
+ "y": 0
+ },
+ {
+ "label": "W",
+ "x": 3.25,
+ "y": 0
+ },
+ {
+ "label": "E",
+ "x": 4.25,
+ "y": 0
+ },
+ {
+ "label": "R",
+ "x": 5.25,
+ "y": 0
+ },
+ {
+ "label": "T",
+ "x": 6.25,
+ "y": 0
+ },
+ {
+ "label": "Y",
+ "x": 7.75,
+ "y": 0
+ },
+ {
+ "label": "U",
+ "x": 8.75,
+ "y": 0
+ },
+ {
+ "label": "I",
+ "x": 9.75,
+ "y": 0
+ },
+ {
+ "label": "O",
+ "x": 10.75,
+ "y": 0
+ },
+ {
+ "label": "P",
+ "x": 11.75,
+ "y": 0
+ },
+ {
+ "label": "-",
+ "x": 13.75,
+ "y": 0
+ },
+ {
+ "label": "Tab",
+ "x": 1,
+ "y": 1,
+ "w": 1.5
+ },
+ {
+ "label": "A",
+ "x": 2.5,
+ "y": 1
+ },
+ {
+ "label": "S",
+ "x": 3.5,
+ "y": 1
+ },
+ {
+ "label": "D",
+ "x": 4.5,
+ "y": 1
+ },
+ {
+ "label": "F",
+ "x": 5.5,
+ "y": 1
+ },
+ {
+ "label": "G",
+ "x": 6.5,
+ "y": 1
+ },
+ {
+ "label": "H",
+ "x": 7.5,
+ "y": 1
+ },
+ {
+ "label": "J",
+ "x": 8.5,
+ "y": 1
+ },
+ {
+ "label": "K",
+ "x": 9.5,
+ "y": 1
+ },
+ {
+ "label": "L",
+ "x": 10.5,
+ "y": 1
+ },
+ {
+ "label": ":",
+ "x": 11.5,
+ "y": 1
+ },
+ {
+ "label": "Enter",
+ "x": 12.5,
+ "y": 1,
+ "w": 2.25
+ },
+ {
+ "label": "Shift",
+ "x": 0,
+ "y": 2,
+ "w": 2.25
+ },
+ {
+ "label": "Z",
+ "x": 2.25,
+ "y": 2
+ },
+ {
+ "label": "X",
+ "x": 3.25,
+ "y": 2
+ },
+ {
+ "label": "C",
+ "x": 4.25,
+ "y": 2
+ },
+ {
+ "label": "V",
+ "x": 5.25,
+ "y": 2
+ },
+ {
+ "label": "B",
+ "x": 6.25,
+ "y": 2
+ },
+ {
+ "label": "N",
+ "x": 7.75,
+ "y": 2
+ },
+ {
+ "label": "M",
+ "x": 8.75,
+ "y": 2
+ },
+ {
+ "label": "<",
+ "x": 9.75,
+ "y": 2
+ },
+ {
+ "label": ">",
+ "x": 10.75,
+ "y": 2
+ },
+ {
+ "label": "?",
+ "x": 11.75,
+ "y": 2
+ },
+ {
+ "label": "\u2191",
+ "x": 12.75,
+ "y": 2
+ },
+ {
+ "label": "Ctrl",
+ "x": 0.75,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "Win",
+ "x": 2,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "Alt",
+ "x": 3.25,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "Lower",
+ "x": 4.5,
+ "y": 3
+ },
+ {
+ "label": "BackSpace",
+ "x": 5.5,
+ "y": 3,
+ "w": 2
+ },
+ {
+ "x": 7.5,
+ "y": 3,
+ "w": 2
+ },
+ {
+ "label": "Raise",
+ "x": 9.5,
+ "y": 3
+ },
+ {
+ "label": "Menu",
+ "x": 10.5,
+ "y": 3,
+ "w": 1.25
+ },
+ {
+ "label": "\u2190",
+ "x": 11.75,
+ "y": 3
+ },
+ {
+ "label": "\u2193",
+ "x": 12.75,
+ "y": 3
+ },
+ {
+ "label": "\u2192",
+ "x": 13.75,
+ "y": 3
+ },
+ {
+ "label": "_",
+ "x": 12.75,
+ "y": 0
+ }
+ ]
+ }
+ }
+}
diff --git a/keyboards/treadstone48/rev1/matrix.c b/keyboards/treadstone48/rev1/matrix.c
new file mode 100644
index 000000000..8685a8125
--- /dev/null
+++ b/keyboards/treadstone48/rev1/matrix.c
@@ -0,0 +1,357 @@
+/*
+Copyright 2012 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/>.
+*/
+
+/*
+ * scan matrix
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include <string.h>
+#include <avr/io.h>
+#include <avr/wdt.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "split_util.h"
+#include "pro_micro.h"
+
+#ifdef USE_MATRIX_I2C
+# include "i2c.h"
+#else // USE_SERIAL
+# include "split_scomm.h"
+#endif
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+#define ERROR_DISCONNECT_COUNT 5
+
+static uint8_t debouncing = DEBOUNCE;
+static const int ROWS_PER_HAND = MATRIX_ROWS/2;
+static uint8_t error_count = 0;
+uint8_t is_master = 0 ;
+
+static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+static matrix_row_t read_cols(void);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+static uint8_t matrix_master_scan(void);
+
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+void matrix_init(void)
+{
+ debug_enable = true;
+ debug_matrix = true;
+ debug_mouse = true;
+ // initialize row and col
+ unselect_rows();
+ init_cols();
+
+ TX_RX_LED_INIT;
+ TXLED0;
+ RXLED0;
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+
+ is_master = has_usb();
+
+ matrix_init_quantum();
+}
+
+uint8_t _matrix_scan(void)
+{
+ // Right hand is stored after the left in the matirx so, we need to offset it
+ int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
+
+ for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
+ select_row(i);
+ _delay_us(30); // without this wait read unstable value.
+ matrix_row_t cols = read_cols();
+ if (matrix_debouncing[i+offset] != cols) {
+ matrix_debouncing[i+offset] = cols;
+ debouncing = DEBOUNCE;
+ }
+ unselect_rows();
+ }
+
+ if (debouncing) {
+ if (--debouncing) {
+ _delay_ms(1);
+ } else {
+ for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
+ matrix[i+offset] = matrix_debouncing[i+offset];
+ }
+ }
+ }
+
+ return 1;
+}
+
+#ifdef USE_MATRIX_I2C
+
+// Get rows from other half over i2c
+int i2c_transaction(void) {
+ int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+
+ int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) goto i2c_error;
+
+ // start of matrix stored at 0x00
+ err = i2c_master_write(0x00);
+ if (err) goto i2c_error;
+
+ // Start read
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
+ if (err) goto i2c_error;
+
+ if (!err) {
+ int i;
+ for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+ matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
+ }
+ matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
+ i2c_master_stop();
+ } else {
+i2c_error: // the cable is disconnceted, or something else went wrong
+ i2c_reset_state();
+ return err;
+ }
+
+ return 0;
+}
+
+#else // USE_SERIAL
+
+int serial_transaction(int master_changed) {
+ int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+ int ret=serial_update_buffers(master_changed);
+#else
+ int ret=serial_update_buffers();
+#endif
+ if (ret ) {
+ if(ret==2) RXLED1;
+ return 1;
+ }
+ RXLED0;
+ memcpy(&matrix[slaveOffset],
+ (void *)serial_slave_buffer, sizeof(serial_slave_buffer));
+ return 0;
+}
+#endif
+
+uint8_t matrix_scan(void)
+{
+ if (is_master) {
+ matrix_master_scan();
+ }else{
+ matrix_slave_scan();
+ int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
+ memcpy(&matrix[offset],
+ (void *)serial_master_buffer, sizeof(serial_master_buffer));
+ matrix_scan_quantum();
+ }
+ return 1;
+}
+
+
+uint8_t matrix_master_scan(void) {
+
+ int ret = _matrix_scan();
+ int mchanged = 1;
+
+ int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
+
+#ifdef USE_MATRIX_I2C
+// for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ /* i2c_slave_buffer[i] = matrix[offset+i]; */
+// i2c_slave_buffer[i] = matrix[offset+i];
+// }
+#else // USE_SERIAL
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ mchanged = memcmp((void *)serial_master_buffer,
+ &matrix[offset], sizeof(serial_master_buffer));
+ #endif
+ memcpy((void *)serial_master_buffer,
+ &matrix[offset], sizeof(serial_master_buffer));
+#endif
+
+#ifdef USE_MATRIX_I2C
+ if( i2c_transaction() ) {
+#else // USE_SERIAL
+ if( serial_transaction(mchanged) ) {
+#endif
+ // turn on the indicator led when halves are disconnected
+ TXLED1;
+
+ error_count++;
+
+ if (error_count > ERROR_DISCONNECT_COUNT) {
+ // reset other half if disconnected
+ int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[slaveOffset+i] = 0;
+ }
+ }
+ } else {
+ // turn off the indicator led on no error
+ TXLED0;
+ error_count = 0;
+ }
+ matrix_scan_quantum();
+ return ret;
+}
+
+void matrix_slave_scan(void) {
+ _matrix_scan();
+
+ int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
+
+#ifdef USE_MATRIX_I2C
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ /* i2c_slave_buffer[i] = matrix[offset+i]; */
+ i2c_slave_buffer[i] = matrix[offset+i];
+ }
+#else // USE_SERIAL
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ int change = 0;
+ #endif
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ if( serial_slave_buffer[i] != matrix[offset+i] )
+ change = 1;
+ #endif
+ serial_slave_buffer[i] = matrix[offset+i];
+ }
+ #ifdef SERIAL_USE_MULTI_TRANSACTION
+ slave_buffer_change_count += change;
+ #endif
+#endif
+}
+
+bool matrix_is_modified(void)
+{
+ if (debouncing) return false;
+ return true;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ pbin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+static void init_cols(void)
+{
+ for(int x = 0; x < MATRIX_COLS; x++) {
+ _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
+ _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
+ }
+}
+
+static matrix_row_t read_cols(void)
+{
+ matrix_row_t result = 0;
+ for(int x = 0; x < MATRIX_COLS; x++) {
+ result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
+ }
+ return result;
+}
+
+static void unselect_rows(void)
+{
+ for(int x = 0; x < ROWS_PER_HAND; x++) {
+ _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
+ _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
+ }
+}
+
+static void select_row(uint8_t row)
+{
+ _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
+ _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
+}
diff --git a/keyboards/treadstone48/rev1/rev1.c b/keyboards/treadstone48/rev1/rev1.c
new file mode 100644
index 000000000..263786427
--- /dev/null
+++ b/keyboards/treadstone48/rev1/rev1.c
@@ -0,0 +1,15 @@
+#include "treadstone48.h"
+
+
+#ifdef SSD1306OLED
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ //led_set_user(usb_led);
+}
+#endif
+
+void matrix_init_kb(void) {
+
+ matrix_init_user();
+};
+
diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h
new file mode 100644
index 000000000..c6145398d
--- /dev/null
+++ b/keyboards/treadstone48/rev1/rev1.h
@@ -0,0 +1,202 @@
+#ifndef REV1_H
+#define REV1_CONFIG_H
+
+#include "../treadstone48.h"
+
+//void promicro_bootloader_jmp(bool program);
+#include "quantum.h"
+
+#ifdef RGBLIGHT_ENABLE
+//rgb led driver
+#include "ws2812.h"
+#endif
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+ #include <avr/io.h>
+ #include <avr/interrupt.h>
+#endif
+#endif
+
+// full Keymap
+// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
+#define LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R00, R01, R02, R03, R04, R05, R40, R41, R42, R43, R44, R45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R10, R11, R12, R13, R14, R15, R50, R51, R52, R53, R54, R55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R20, R21, R22, R23, R24, R25, R60, R61, R62, R63, R64, R65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R30, R31, R32, R33, R34, R35, R70, R71, R72, R73, R74, R75 \
+ ) \
+ { \
+ { L45, L44, L43, L42, L41, L40 }, \
+ { L55, L54, L53, L52, L51, L50 }, \
+ { L65, L64, L63, L62, L61, L60 }, \
+ { L75, L74, L73, L72, L71, L70 }, \
+ { L05, L04, L03, L02, L01, L00 }, \
+ { L15, L14, L13, L12, L11, L10 }, \
+ { L25, L24, L23, L22, L21, L20 }, \
+ { L35, L34, L33, L32, L31, L30 }, \
+ { R45, R44, R43, R42, R41, R40 }, \
+ { R55, R54, R53, R52, R51, R50 }, \
+ { R65, R64, R63, R62, R61, R60 }, \
+ { R75, R74, R73, R72, R71, R70 }, \
+ { R05, R04, R03, R02, R01, R00 }, \
+ { R15, R14, R13, R12, R11, R10 }, \
+ { R25, R24, R23, R22, R21, R20 }, \
+ { R35, R34, R33, R32, R31, R30 }, \
+ }
+
+#define K_N KC_NO
+
+//////////////////////////////////////////////////////////////////////////////
+// When only use Treadstone48.
+// L75 is ExtraKey
+//////////////////////////////////////////////////////////////////////////////
+#define LAYOUT_base( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \
+ )
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_base_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \
+ ) \
+ LAYOUT_base( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \
+ )
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+// When connecting Rhymestone to Treadstone48.
+// L75 is ExtraKey
+//////////////////////////////////////////////////////////////////////////////
+#define LAYOUT_rs( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \
+ )
+
+// When use right hand side of the Rhymestone.
+#ifdef RHYMESTONE_RIGHTHAND
+#undef LAYOUT_rs
+#define LAYOUT_rs( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R70, R71, R72, R73, R74 \
+ )
+#endif
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_rs_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \
+ ) \
+ LAYOUT_rs( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \
+ )
+//////////////////////////////////////////////////////////////////////////////
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Alpha version keymap.
+// L30 is ExtraKey
+//////////////////////////////////////////////////////////////////////////////
+#ifdef ANGELINA_KEYMAP
+#undef LAYOUT_base
+#undef LAYOUT_base_kc
+#undef LAYOUT_rs
+#undef LAYOUT_rs_kc
+
+#define LAYOUT_base( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, L30 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \
+ )
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_base_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \
+ ) \
+ LAYOUT_base( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \
+ )
+
+#define LAYOUT_rs( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74, L30 \
+ ) \
+ LAYOUT_full( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \
+ )
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_rs_kc( \
+ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \
+ L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \
+ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \
+ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \
+ ) \
+ LAYOUT_rs( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \
+ )
+
+#endif
+//////////////////////////////////////////////////////////////////////////////
+
+#endif
diff --git a/keyboards/treadstone48/rev1/rules.mk b/keyboards/treadstone48/rev1/rules.mk
new file mode 100644
index 000000000..6028b5a5b
--- /dev/null
+++ b/keyboards/treadstone48/rev1/rules.mk
@@ -0,0 +1,3 @@
+SRC += rev1/matrix.c
+SRC += rev1/split_util.c
+SRC += rev1/split_scomm.c
diff --git a/keyboards/treadstone48/rev1/serial_config.h b/keyboards/treadstone48/rev1/serial_config.h
new file mode 100644
index 000000000..37135213d
--- /dev/null
+++ b/keyboards/treadstone48/rev1/serial_config.h
@@ -0,0 +1,8 @@
+//// #error rev2 serial config
+
+#ifndef SOFT_SERIAL_PIN
+/* Soft Serial defines */
+#define SOFT_SERIAL_PIN D2
+
+#define SERIAL_USE_MULTI_TRANSACTION
+#endif
diff --git a/keyboards/treadstone48/rev1/serial_config_simpleapi.h b/keyboards/treadstone48/rev1/serial_config_simpleapi.h
new file mode 100644
index 000000000..e2d22a41e
--- /dev/null
+++ b/keyboards/treadstone48/rev1/serial_config_simpleapi.h
@@ -0,0 +1,8 @@
+#ifndef SERIAL_CONFIG_SIMPLEAPI_H
+#define SERIAL_CONFIG_SIMPLEAPI_H
+
+#undef SERIAL_USE_MULTI_TRANSACTION
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
+
+#endif // SERIAL_CONFIG_SIMPLEAPI_H
diff --git a/keyboards/treadstone48/rev1/split_scomm.c b/keyboards/treadstone48/rev1/split_scomm.c
new file mode 100644
index 000000000..ada786796
--- /dev/null
+++ b/keyboards/treadstone48/rev1/split_scomm.c
@@ -0,0 +1,92 @@
+#ifdef USE_SERIAL
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE flexible API (using multi-type transaction function) --- */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <split_scomm.h>
+#include "serial.h"
+#ifdef CONSOLE_ENABLE
+ #include <print.h>
+#endif
+
+uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+uint8_t volatile status_com = 0;
+uint8_t volatile status1 = 0;
+uint8_t slave_buffer_change_count = 0;
+uint8_t s_change_old = 0xff;
+uint8_t s_change_new = 0xff;
+
+SSTD_t transactions[] = {
+#define GET_SLAVE_STATUS 0
+ /* master buffer not changed, only recive slave_buffer_change_count */
+ { (uint8_t *)&status_com,
+ 0, NULL,
+ sizeof(slave_buffer_change_count), &slave_buffer_change_count,
+ },
+#define PUT_MASTER_GET_SLAVE_STATUS 1
+ /* master buffer changed need send, and recive slave_buffer_change_count */
+ { (uint8_t *)&status_com,
+ sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
+ sizeof(slave_buffer_change_count), &slave_buffer_change_count,
+ },
+#define GET_SLAVE_BUFFER 2
+ /* recive serial_slave_buffer */
+ { (uint8_t *)&status1,
+ 0, NULL,
+ sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
+ }
+};
+
+void serial_master_init(void)
+{
+ soft_serial_initiator_init(transactions, TID_LIMIT(transactions));
+}
+
+void serial_slave_init(void)
+{
+ soft_serial_target_init(transactions, TID_LIMIT(transactions));
+}
+
+// 0 => no error
+// 1 => slave did not respond
+// 2 => checksum error
+int serial_update_buffers(int master_update)
+{
+ int status, smatstatus;
+ static int need_retry = 0;
+
+ if( s_change_old != s_change_new ) {
+ smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER);
+ if( smatstatus == TRANSACTION_END ) {
+ s_change_old = s_change_new;
+#ifdef CONSOLE_ENABLE
+ uprintf("slave matrix = %b %b %b %b %b\n",
+ serial_slave_buffer[0], serial_slave_buffer[1],
+ serial_slave_buffer[2], serial_slave_buffer[3],
+ serial_slave_buffer[4] );
+#endif
+ }
+ } else {
+ // serial_slave_buffer dosen't change
+ smatstatus = TRANSACTION_END; // dummy status
+ }
+
+ if( !master_update && !need_retry) {
+ status = soft_serial_transaction(GET_SLAVE_STATUS);
+ } else {
+ status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS);
+ }
+ if( status == TRANSACTION_END ) {
+ s_change_new = slave_buffer_change_count;
+ need_retry = 0;
+ } else {
+ need_retry = 1;
+ }
+ return smatstatus;
+}
+
+#endif // SERIAL_USE_MULTI_TRANSACTION
+#endif /* USE_SERIAL */
diff --git a/keyboards/treadstone48/rev1/split_scomm.h b/keyboards/treadstone48/rev1/split_scomm.h
new file mode 100644
index 000000000..16887eb74
--- /dev/null
+++ b/keyboards/treadstone48/rev1/split_scomm.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */
+#include "serial.h"
+
+#else
+/* --- USE flexible API (using multi-type transaction function) --- */
+// Buffers for master - slave communication
+#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
+
+extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+extern uint8_t slave_buffer_change_count;
+
+void serial_master_init(void);
+void serial_slave_init(void);
+int serial_update_buffers(int master_changed);
+
+#endif
diff --git a/keyboards/treadstone48/rev1/split_util.c b/keyboards/treadstone48/rev1/split_util.c
new file mode 100644
index 000000000..e1ff8b437
--- /dev/null
+++ b/keyboards/treadstone48/rev1/split_util.c
@@ -0,0 +1,70 @@
+#include <avr/io.h>
+#include <avr/wdt.h>
+#include <avr/power.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <avr/eeprom.h>
+#include "split_util.h"
+#include "matrix.h"
+#include "keyboard.h"
+
+#ifdef USE_MATRIX_I2C
+# include "i2c.h"
+#else
+# include "split_scomm.h"
+#endif
+
+volatile bool isLeftHand = true;
+
+static void setup_handedness(void) {
+ #ifdef EE_HANDS
+ isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
+ #else
+ // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
+ #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
+ isLeftHand = !has_usb();
+ #else
+ isLeftHand = has_usb();
+ #endif
+ #endif
+}
+
+static void keyboard_master_setup(void) {
+
+#ifdef USE_MATRIX_I2C
+ i2c_master_init();
+#else
+ serial_master_init();
+#endif
+}
+
+static void keyboard_slave_setup(void) {
+
+#ifdef USE_MATRIX_I2C
+ i2c_slave_init(SLAVE_I2C_ADDRESS);
+#else
+ serial_slave_init();
+#endif
+}
+
+bool has_usb(void) {
+ USBCON |= (1 << OTGPADE); //enables VBUS pad
+ _delay_us(5);
+ return (USBSTA & (1<<VBUS)); //checks state of VBUS
+}
+
+void split_keyboard_setup(void) {
+ setup_handedness();
+
+ if (has_usb()) {
+ keyboard_master_setup();
+ } else {
+ keyboard_slave_setup();
+ }
+ sei();
+}
+
+// this code runs before the usb and keyboard is initialized
+void matrix_setup(void) {
+ split_keyboard_setup();
+}
diff --git a/keyboards/treadstone48/rev1/split_util.h b/keyboards/treadstone48/rev1/split_util.h
new file mode 100644
index 000000000..f59304756
--- /dev/null
+++ b/keyboards/treadstone48/rev1/split_util.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <stdbool.h>
+#include "eeconfig.h"
+
+#define SLAVE_I2C_ADDRESS 0x32
+
+extern volatile bool isLeftHand;
+
+// slave version of matix scan, defined in matrix.c
+void matrix_slave_scan(void);
+
+void split_keyboard_setup(void);
+bool has_usb(void);
+
+void matrix_master_OLED_init (void);
diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk
new file mode 100644
index 000000000..6ddbdaf80
--- /dev/null
+++ b/keyboards/treadstone48/rules.mk
@@ -0,0 +1,73 @@
+SRC += i2c.c
+SRC += serial.c
+SRC += ssd1306.c
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+SUBPROJECT_rev1 = no
+USE_I2C = yes
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+CUSTOM_MATRIX = yes
+
+DEFAULT_FOLDER = treadstone48/rev1
diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c
new file mode 100644
index 000000000..6006ebf1b
--- /dev/null
+++ b/keyboards/treadstone48/serial.c
@@ -0,0 +1,590 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ *
+ * 2018-10-28 checked
+ * avr-gcc 4.9.2
+ * avr-gcc 5.4.0
+ * avr-gcc 7.3.0
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <util/delay.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include "serial.h"
+//#include <pro_micro.h>
+
+#ifdef SOFT_SERIAL_PIN
+
+#ifdef __AVR_ATmega32U4__
+ // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
+ #ifdef USE_I2C
+ #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
+ #error Using ATmega32U4 I2C, so can not use PD0, PD1
+ #endif
+ #endif
+
+ #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
+ #define SERIAL_PIN_DDR DDRD
+ #define SERIAL_PIN_PORT PORTD
+ #define SERIAL_PIN_INPUT PIND
+ #if SOFT_SERIAL_PIN == D0
+ #define SERIAL_PIN_MASK _BV(PD0)
+ #define EIMSK_BIT _BV(INT0)
+ #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
+ #define SERIAL_PIN_INTERRUPT INT0_vect
+ #elif SOFT_SERIAL_PIN == D1
+ #define SERIAL_PIN_MASK _BV(PD1)
+ #define EIMSK_BIT _BV(INT1)
+ #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
+ #define SERIAL_PIN_INTERRUPT INT1_vect
+ #elif SOFT_SERIAL_PIN == D2
+ #define SERIAL_PIN_MASK _BV(PD2)
+ #define EIMSK_BIT _BV(INT2)
+ #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
+ #define SERIAL_PIN_INTERRUPT INT2_vect
+ #elif SOFT_SERIAL_PIN == D3
+ #define SERIAL_PIN_MASK _BV(PD3)
+ #define EIMSK_BIT _BV(INT3)
+ #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
+ #define SERIAL_PIN_INTERRUPT INT3_vect
+ #endif
+ #elif SOFT_SERIAL_PIN == E6
+ #define SERIAL_PIN_DDR DDRE
+ #define SERIAL_PIN_PORT PORTE
+ #define SERIAL_PIN_INPUT PINE
+ #define SERIAL_PIN_MASK _BV(PE6)
+ #define EIMSK_BIT _BV(INT6)
+ #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
+ #define SERIAL_PIN_INTERRUPT INT6_vect
+ #else
+ #error invalid SOFT_SERIAL_PIN value
+ #endif
+
+#else
+ #error serial.c now support ATmega32U4 only
+#endif
+
+//////////////// for backward compatibility ////////////////////////////////
+#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
+/* --- USE OLD API (compatible with let's split serial.c) */
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
+ #endif
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
+ #endif
+ uint8_t volatile status0 = 0;
+
+SSTD_t transactions[] = {
+ { (uint8_t *)&status0,
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer,
+ #else
+ 0, (uint8_t *)NULL,
+ #endif
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer
+ #else
+ 0, (uint8_t *)NULL,
+ #endif
+ }
+};
+
+void serial_master_init(void)
+{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
+
+void serial_slave_init(void)
+{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
+
+// 0 => no error
+// 1 => slave did not respond
+// 2 => checksum error
+int serial_update_buffers()
+{
+ int result;
+ result = soft_serial_transaction();
+ return result;
+}
+
+#endif // end of OLD API (compatible with let's split serial.c)
+////////////////////////////////////////////////////////////////////////////
+
+#define ALWAYS_INLINE __attribute__((always_inline))
+#define NO_INLINE __attribute__((noinline))
+#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
+
+// parity check
+#define ODD_PARITY 1
+#define EVEN_PARITY 0
+#define PARITY EVEN_PARITY
+
+#ifdef SERIAL_DELAY
+ // custom setup in config.h
+ // #define TID_SEND_ADJUST 2
+ // #define SERIAL_DELAY 6 // micro sec
+ // #define READ_WRITE_START_ADJUST 30 // cycles
+ // #define READ_WRITE_WIDTH_ADJUST 8 // cycles
+#else
+// ============ Standard setups ============
+
+#ifndef SELECT_SOFT_SERIAL_SPEED
+#define SELECT_SOFT_SERIAL_SPEED 1
+// 0: about 189kbps
+// 1: about 137kbps (default)
+// 2: about 75kbps
+// 3: about 39kbps
+// 4: about 26kbps
+// 5: about 20kbps
+#endif
+
+#if __GNUC__ < 6
+ #define TID_SEND_ADJUST 14
+#else
+ #define TID_SEND_ADJUST 2
+#endif
+
+#if SELECT_SOFT_SERIAL_SPEED == 0
+ // Very High speed
+ #define SERIAL_DELAY 4 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 34 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 1
+ // High speed
+ #define SERIAL_DELAY 6 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 2
+ // Middle speed
+ #define SERIAL_DELAY 12 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 3
+ // Low speed
+ #define SERIAL_DELAY 24 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 4
+ // Very Low speed
+ #define SERIAL_DELAY 36 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 5
+ // Ultra Low speed
+ #define SERIAL_DELAY 48 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#else
+#error invalid SELECT_SOFT_SERIAL_SPEED value
+#endif /* SELECT_SOFT_SERIAL_SPEED */
+#endif /* SERIAL_DELAY */
+
+#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
+#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
+
+#define SLAVE_INT_WIDTH_US 1
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
+#else
+ #define SLAVE_INT_ACK_WIDTH_UNIT 2
+ #define SLAVE_INT_ACK_WIDTH 4
+#endif
+
+static SSTD_t *Transaction_table = NULL;
+static uint8_t Transaction_table_size = 0;
+
+inline static void serial_delay(void) ALWAYS_INLINE;
+inline static
+void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
+
+inline static void serial_delay_half1(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half1(void) {
+ _delay_us(SERIAL_DELAY_HALF1);
+}
+
+inline static void serial_delay_half2(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half2(void) {
+ _delay_us(SERIAL_DELAY_HALF2);
+}
+
+inline static void serial_output(void) ALWAYS_INLINE;
+inline static
+void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static void serial_input_with_pullup(void) ALWAYS_INLINE;
+inline static
+void serial_input_with_pullup(void) {
+ SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
+inline static
+uint8_t serial_read_pin(void) {
+ return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static void serial_low(void) ALWAYS_INLINE;
+inline static
+void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static void serial_high(void) ALWAYS_INLINE;
+inline static
+void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_output();
+ serial_high();
+}
+
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_input_with_pullup();
+
+ // Enable INT0-INT3,INT6
+ EIMSK |= EIMSK_BIT;
+#if SERIAL_PIN_MASK == _BV(PE6)
+ // Trigger on falling edge of INT6
+ EICRB &= EICRx_BIT;
+#else
+ // Trigger on falling edge of INT0-INT3
+ EICRA &= EICRx_BIT;
+#endif
+}
+
+// Used by the sender to synchronize timing with the reciver.
+static void sync_recv(void) NO_INLINE;
+static
+void sync_recv(void) {
+ for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
+ }
+ // This shouldn't hang if the target disconnects because the
+ // serial line will float to high if the target does disconnect.
+ while (!serial_read_pin());
+}
+
+// Used by the reciver to send a synchronization signal to the sender.
+static void sync_send(void) NO_INLINE;
+static
+void sync_send(void) {
+ serial_low();
+ serial_delay();
+ serial_high();
+}
+
+// Reads a byte from the serial line
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
+ uint8_t byte, i, p, pb;
+
+ _delay_sub_us(READ_WRITE_START_ADJUST);
+ for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
+ serial_delay_half1(); // read the middle of pulses
+ if( serial_read_pin() ) {
+ byte = (byte << 1) | 1; p ^= 1;
+ } else {
+ byte = (byte << 1) | 0; p ^= 0;
+ }
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+ }
+ /* recive parity bit */
+ serial_delay_half1(); // read the middle of pulses
+ pb = serial_read_pin();
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+
+ *pterrcount += (p != pb)? 1 : 0;
+
+ return byte;
+}
+
+// Sends a byte with MSB ordering
+void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
+void serial_write_chunk(uint8_t data, uint8_t bit) {
+ uint8_t b, p;
+ for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
+ if(data & b) {
+ serial_high(); p ^= 1;
+ } else {
+ serial_low(); p ^= 0;
+ }
+ serial_delay();
+ }
+ /* send parity bit */
+ if(p & 1) { serial_high(); }
+ else { serial_low(); }
+ serial_delay();
+
+ serial_low(); // sync_send() / senc_recv() need raise edge
+}
+
+static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+void serial_send_packet(uint8_t *buffer, uint8_t size) {
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ data = buffer[i];
+ sync_send();
+ serial_write_chunk(data,8);
+ }
+}
+
+static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
+ uint8_t pecount = 0;
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ sync_recv();
+ data = serial_read_chunk(&pecount, 8);
+ buffer[i] = data;
+ }
+ return pecount == 0;
+}
+
+inline static
+void change_sender2reciver(void) {
+ sync_send(); //0
+ serial_delay_half1(); //1
+ serial_low(); //2
+ serial_input_with_pullup(); //2
+ serial_delay_half1(); //3
+}
+
+inline static
+void change_reciver2sender(void) {
+ sync_recv(); //0
+ serial_delay(); //1
+ serial_low(); //3
+ serial_output(); //3
+ serial_delay_half1(); //4
+}
+
+static inline uint8_t nibble_bits_count(uint8_t bits)
+{
+ bits = (bits & 0x5) + (bits >> 1 & 0x5);
+ bits = (bits & 0x3) + (bits >> 2 & 0x3);
+ return bits;
+}
+
+// interrupt handle to be used by the target device
+ISR(SERIAL_PIN_INTERRUPT) {
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ serial_low();
+ serial_output();
+ SSTD_t *trans = Transaction_table;
+#else
+ // recive transaction table index
+ uint8_t tid, bits;
+ uint8_t pecount = 0;
+ sync_recv();
+ bits = serial_read_chunk(&pecount,7);
+ tid = bits>>3;
+ bits = (bits&7) != nibble_bits_count(tid);
+ if( bits || pecount> 0 || tid > Transaction_table_size ) {
+ return;
+ }
+ serial_delay_half1();
+
+ serial_high(); // response step1 low->high
+ serial_output();
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
+ SSTD_t *trans = &Transaction_table[tid];
+ serial_low(); // response step2 ack high->low
+#endif
+
+ // target send phase
+ if( trans->target2initiator_buffer_size > 0 )
+ serial_send_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size);
+ // target switch to input
+ change_sender2reciver();
+
+ // target recive phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size) ) {
+ *trans->status = TRANSACTION_ACCEPTED;
+ } else {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ }
+ } else {
+ *trans->status = TRANSACTION_ACCEPTED;
+ }
+
+ sync_recv(); //weit initiator output to high
+}
+
+/////////
+// start transaction by initiator
+//
+// int soft_serial_transaction(int sstd_index)
+//
+// Returns:
+// TRANSACTION_END
+// TRANSACTION_NO_RESPONSE
+// TRANSACTION_DATA_ERROR
+// this code is very time dependent, so we need to disable interrupts
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void) {
+ SSTD_t *trans = Transaction_table;
+#else
+int soft_serial_transaction(int sstd_index) {
+ if( sstd_index > Transaction_table_size )
+ return TRANSACTION_TYPE_ERROR;
+ SSTD_t *trans = &Transaction_table[sstd_index];
+#endif
+ cli();
+
+ // signal to the target that we want to start a transaction
+ serial_output();
+ serial_low();
+ _delay_us(SLAVE_INT_WIDTH_US);
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ // wait for the target response
+ serial_input_with_pullup();
+ _delay_us(SLAVE_INT_RESPONSE_TIME);
+
+ // check if the target is present
+ if (serial_read_pin()) {
+ // target failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+
+#else
+ // send transaction table index
+ int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
+ sync_send();
+ _delay_sub_us(TID_SEND_ADJUST);
+ serial_write_chunk(tid, 7);
+ serial_delay_half1();
+
+ // wait for the target response (step1 low->high)
+ serial_input_with_pullup();
+ while( !serial_read_pin() ) {
+ _delay_sub_us(2);
+ }
+
+ // check if the target is present (step2 high->low)
+ for( int i = 0; serial_read_pin(); i++ ) {
+ if (i > SLAVE_INT_ACK_WIDTH + 1) {
+ // slave failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
+ }
+#endif
+
+ // initiator recive phase
+ // if the target is present syncronize with it
+ if( trans->target2initiator_buffer_size > 0 ) {
+ if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size) ) {
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_DATA_ERROR;
+ sei();
+ return TRANSACTION_DATA_ERROR;
+ }
+ }
+
+ // initiator switch to output
+ change_reciver2sender();
+
+ // initiator send phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ serial_send_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size);
+ }
+
+ // always, release the line when not in use
+ sync_send();
+
+ *trans->status = TRANSACTION_END;
+ sei();
+ return TRANSACTION_END;
+}
+
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index) {
+ SSTD_t *trans = &Transaction_table[sstd_index];
+ cli();
+ int retval = *trans->status;
+ *trans->status = 0;;
+ sei();
+ return retval;
+}
+#endif
+
+#endif
+
+// Helix serial.c history
+// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
+// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
+// (adjusted with avr-gcc 7.3.0)
+// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
+// (adjusted with avr-gcc 5.4.0, 7.3.0)
diff --git a/keyboards/treadstone48/serial.h b/keyboards/treadstone48/serial.h
new file mode 100644
index 000000000..5deaf789e
--- /dev/null
+++ b/keyboards/treadstone48/serial.h
@@ -0,0 +1,86 @@
+#pragma once
+
+#include <stdbool.h>
+
+// /////////////////////////////////////////////////////////////////
+// Need Soft Serial defines in config.h
+// /////////////////////////////////////////////////////////////////
+// ex.
+// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
+// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
+// // 1: about 137kbps (default)
+// // 2: about 75kbps
+// // 3: about 39kbps
+// // 4: about 26kbps
+// // 5: about 20kbps
+//
+// //// USE OLD API (compatible with let's split serial.c)
+// ex.
+// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
+// #define SERIAL_MASTER_BUFFER_LENGTH 1
+//
+// //// USE NEW API
+// //// USE simple API (using signle-type transaction function)
+// #define SERIAL_USE_SINGLE_TRANSACTION
+// //// USE flexible API (using multi-type transaction function)
+// #define SERIAL_USE_MULTI_TRANSACTION
+//
+// /////////////////////////////////////////////////////////////////
+
+
+//////////////// for backward compatibility ////////////////////////////////
+#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
+/* --- USE OLD API (compatible with let's split serial.c) */
+ #if SERIAL_SLAVE_BUFFER_LENGTH > 0
+ extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
+ #endif
+ #if SERIAL_MASTER_BUFFER_LENGTH > 0
+ extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
+ #endif
+
+ void serial_master_init(void);
+ void serial_slave_init(void);
+ int serial_update_buffers(void);
+
+#endif // end of USE OLD API
+////////////////////////////////////////////////////////////////////////////
+
+// Soft Serial Transaction Descriptor
+typedef struct _SSTD_t {
+ uint8_t *status;
+ uint8_t initiator2target_buffer_size;
+ uint8_t *initiator2target_buffer;
+ uint8_t target2initiator_buffer_size;
+ uint8_t *target2initiator_buffer;
+} SSTD_t;
+#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
+
+// initiator is transaction start side
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
+// target is interrupt accept side
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
+
+// initiator resullt
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void);
+#else
+int soft_serial_transaction(int sstd_index);
+#endif
+
+// target status
+// *SSTD_t.status has
+// initiator:
+// TRANSACTION_END
+// or TRANSACTION_NO_RESPONSE
+// or TRANSACTION_DATA_ERROR
+// target:
+// TRANSACTION_DATA_ERROR
+// or TRANSACTION_ACCEPTED
+#define TRANSACTION_ACCEPTED 0x8
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index);
+#endif
diff --git a/keyboards/treadstone48/ssd1306.c b/keyboards/treadstone48/ssd1306.c
new file mode 100644
index 000000000..dd3290ba0
--- /dev/null
+++ b/keyboards/treadstone48/ssd1306.c
@@ -0,0 +1,342 @@
+
+#ifdef SSD1306OLED
+
+#include "ssd1306.h"
+#include "i2c.h"
+#include <string.h>
+#include "print.h"
+#ifndef LOCAL_GLCDFONT
+#include "common/glcdfont.c"
+#else
+#include <helixfont.h>
+#endif
+#ifdef ADAFRUIT_BLE_ENABLE
+#include "adafruit_ble.h"
+#endif
+#ifdef PROTOCOL_LUFA
+#include "lufa.h"
+#endif
+#include "sendchar.h"
+#include "timer.h"
+
+// Set this to 1 to help diagnose early startup problems
+// when testing power-on with ble. Turn it off otherwise,
+// as the latency of printing most of the debug info messes
+// with the matrix scan, causing keys to drop.
+#define DEBUG_TO_SCREEN 0
+
+//static uint16_t last_battery_update;
+//static uint32_t vbat;
+//#define BatteryUpdateInterval 10000 /* milliseconds */
+
+// 'last_flush' is declared as uint16_t,
+// so this must be less than 65535
+#define ScreenOffInterval 60000 /* milliseconds */
+#if DEBUG_TO_SCREEN
+static uint8_t displaying;
+#endif
+static uint16_t last_flush;
+
+static bool force_dirty = true;
+
+// Write command sequence.
+// Returns true on success.
+static inline bool _send_cmd1(uint8_t cmd) {
+ bool res = false;
+
+ if (i2c_start_write(SSD1306_ADDRESS)) {
+ xprintf("failed to start write to %d\n", SSD1306_ADDRESS);
+ goto done;
+ }
+
+ if (i2c_master_write(0x0 /* command byte follows */)) {
+ print("failed to write control byte\n");
+
+ goto done;
+ }
+
+ if (i2c_master_write(cmd)) {
+ xprintf("failed to write command %d\n", cmd);
+ goto done;
+ }
+ res = true;
+done:
+ i2c_master_stop();
+ return res;
+}
+
+// Write 2-byte command sequence.
+// Returns true on success
+static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) {
+ if (!_send_cmd1(cmd)) {
+ return false;
+ }
+ return _send_cmd1(opr);
+}
+
+// Write 3-byte command sequence.
+// Returns true on success
+static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) {
+ if (!_send_cmd1(cmd)) {
+ return false;
+ }
+ if (!_send_cmd1(opr1)) {
+ return false;
+ }
+ return _send_cmd1(opr2);
+}
+
+#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;}
+#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;}
+#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;}
+
+static void clear_display(void) {
+ matrix_clear(&display);
+
+ // Clear all of the display bits (there can be random noise
+ // in the RAM on startup)
+ send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1);
+ send_cmd3(ColumnAddr, 0, DisplayWidth - 1);
+
+ if (i2c_start_write(SSD1306_ADDRESS)) {
+ goto done;
+ }
+ if (i2c_master_write(0x40)) {
+ // Data mode
+ goto done;
+ }
+ for (uint8_t row = 0; row < MatrixRows; ++row) {
+ for (uint8_t col = 0; col < DisplayWidth; ++col) {
+ i2c_master_write(0);
+ }
+ }
+
+ display.dirty = false;
+
+done:
+ i2c_master_stop();
+}
+
+#if DEBUG_TO_SCREEN
+#undef sendchar
+static int8_t capture_sendchar(uint8_t c) {
+ sendchar(c);
+ iota_gfx_write_char(c);
+
+ if (!displaying) {
+ iota_gfx_flush();
+ }
+ return 0;
+}
+#endif
+
+bool iota_gfx_init(bool rotate) {
+ bool success = false;
+
+ i2c_master_init();
+ send_cmd1(DisplayOff);
+ send_cmd2(SetDisplayClockDiv, 0x80);
+ send_cmd2(SetMultiPlex, DisplayHeight - 1);
+
+ send_cmd2(SetDisplayOffset, 0);
+
+
+ send_cmd1(SetStartLine | 0x0);
+ send_cmd2(SetChargePump, 0x14 /* Enable */);
+ send_cmd2(SetMemoryMode, 0 /* horizontal addressing */);
+
+ if(rotate){
+ // the following Flip the display orientation 180 degrees
+ send_cmd1(SegRemap);
+ send_cmd1(ComScanInc);
+ }else{
+ // Flips the display orientation 0 degrees
+ send_cmd1(SegRemap | 0x1);
+ send_cmd1(ComScanDec);
+ }
+
+ send_cmd2(SetComPins, 0x2);
+ send_cmd2(SetContrast, 0x8f);
+ send_cmd2(SetPreCharge, 0xf1);
+ send_cmd2(SetVComDetect, 0x40);
+ send_cmd1(DisplayAllOnResume);
+ send_cmd1(NormalDisplay);
+ send_cmd1(DeActivateScroll);
+ send_cmd1(DisplayOn);
+
+ send_cmd2(SetContrast, 0); // Dim
+
+ clear_display();
+
+ success = true;
+
+ iota_gfx_flush();
+
+#if DEBUG_TO_SCREEN
+ print_set_sendchar(capture_sendchar);
+#endif
+
+done:
+ return success;
+}
+
+bool iota_gfx_off(void) {
+ bool success = false;
+
+ send_cmd1(DisplayOff);
+ success = true;
+
+done:
+ return success;
+}
+
+bool iota_gfx_on(void) {
+ bool success = false;
+
+ send_cmd1(DisplayOn);
+ success = true;
+
+done:
+ return success;
+}
+
+void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) {
+ *matrix->cursor = c;
+ ++matrix->cursor;
+
+ if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) {
+ // We went off the end; scroll the display upwards by one line
+ memmove(&matrix->display[0], &matrix->display[1],
+ MatrixCols * (MatrixRows - 1));
+ matrix->cursor = &matrix->display[MatrixRows - 1][0];
+ memset(matrix->cursor, ' ', MatrixCols);
+ }
+}
+
+void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) {
+ matrix->dirty = true;
+
+ if (c == '\n') {
+ // Clear to end of line from the cursor and then move to the
+ // start of the next line
+ uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols;
+
+ while (cursor_col++ < MatrixCols) {
+ matrix_write_char_inner(matrix, ' ');
+ }
+ return;
+ }
+
+ matrix_write_char_inner(matrix, c);
+}
+
+void iota_gfx_write_char(uint8_t c) {
+ matrix_write_char(&display, c);
+}
+
+void matrix_write(struct CharacterMatrix *matrix, const char *data) {
+ const char *end = data + strlen(data);
+ while (data < end) {
+ matrix_write_char(matrix, *data);
+ ++data;
+ }
+}
+
+void iota_gfx_write(const char *data) {
+ matrix_write(&display, data);
+}
+
+void matrix_write_P(struct CharacterMatrix *matrix, const char *data) {
+ while (true) {
+ uint8_t c = pgm_read_byte(data);
+ if (c == 0) {
+ return;
+ }
+ matrix_write_char(matrix, c);
+ ++data;
+ }
+}
+
+void iota_gfx_write_P(const char *data) {
+ matrix_write_P(&display, data);
+}
+
+void matrix_clear(struct CharacterMatrix *matrix) {
+ memset(matrix->display, ' ', sizeof(matrix->display));
+ matrix->cursor = &matrix->display[0][0];
+ matrix->dirty = true;
+}
+
+void iota_gfx_clear_screen(void) {
+ matrix_clear(&display);
+}
+
+void matrix_render(struct CharacterMatrix *matrix) {
+ last_flush = timer_read();
+ iota_gfx_on();
+#if DEBUG_TO_SCREEN
+ ++displaying;
+#endif
+
+ // Move to the home position
+ send_cmd3(PageAddr, 0, MatrixRows - 1);
+ send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1);
+
+ if (i2c_start_write(SSD1306_ADDRESS)) {
+ goto done;
+ }
+ if (i2c_master_write(0x40)) {
+ // Data mode
+ goto done;
+ }
+
+ for (uint8_t row = 0; row < MatrixRows; ++row) {
+ for (uint8_t col = 0; col < MatrixCols; ++col) {
+ const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth);
+
+ for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) {
+ uint8_t colBits = pgm_read_byte(glyph + glyphCol);
+ i2c_master_write(colBits);
+ }
+
+ // 1 column of space between chars (it's not included in the glyph)
+ //i2c_master_write(0);
+ }
+ }
+
+ matrix->dirty = false;
+
+done:
+ i2c_master_stop();
+#if DEBUG_TO_SCREEN
+ --displaying;
+#endif
+}
+
+void iota_gfx_flush(void) {
+ matrix_render(&display);
+}
+
+__attribute__ ((weak))
+void iota_gfx_task_user(void) {
+}
+
+void iota_gfx_task(void) {
+ iota_gfx_task_user();
+
+ if (display.dirty|| force_dirty) {
+ iota_gfx_flush();
+ force_dirty = false;
+ }
+
+ if (timer_elapsed(last_flush) > ScreenOffInterval) {
+ iota_gfx_off();
+ }
+}
+
+bool process_record_gfx(uint16_t keycode, keyrecord_t *record) {
+ force_dirty = true;
+ return true;
+}
+
+#endif
diff --git a/keyboards/treadstone48/ssd1306.h b/keyboards/treadstone48/ssd1306.h
new file mode 100644
index 000000000..49f258efa
--- /dev/null
+++ b/keyboards/treadstone48/ssd1306.h
@@ -0,0 +1,90 @@
+#pragma once
+
+#include <stdbool.h>
+#include <stdio.h>
+#include "pincontrol.h"
+#include "action.h"
+
+enum ssd1306_cmds {
+ DisplayOff = 0xAE,
+ DisplayOn = 0xAF,
+
+ SetContrast = 0x81,
+ DisplayAllOnResume = 0xA4,
+
+ DisplayAllOn = 0xA5,
+ NormalDisplay = 0xA6,
+ InvertDisplay = 0xA7,
+ SetDisplayOffset = 0xD3,
+ SetComPins = 0xda,
+ SetVComDetect = 0xdb,
+ SetDisplayClockDiv = 0xD5,
+ SetPreCharge = 0xd9,
+ SetMultiPlex = 0xa8,
+ SetLowColumn = 0x00,
+ SetHighColumn = 0x10,
+ SetStartLine = 0x40,
+
+ SetMemoryMode = 0x20,
+ ColumnAddr = 0x21,
+ PageAddr = 0x22,
+
+ ComScanInc = 0xc0,
+ ComScanDec = 0xc8,
+ SegRemap = 0xa0,
+ SetChargePump = 0x8d,
+ ExternalVcc = 0x01,
+ SwitchCapVcc = 0x02,
+
+ ActivateScroll = 0x2f,
+ DeActivateScroll = 0x2e,
+ SetVerticalScrollArea = 0xa3,
+ RightHorizontalScroll = 0x26,
+ LeftHorizontalScroll = 0x27,
+ VerticalAndRightHorizontalScroll = 0x29,
+ VerticalAndLeftHorizontalScroll = 0x2a,
+};
+
+// Controls the SSD1306 128x32 OLED display via i2c
+
+#ifndef SSD1306_ADDRESS
+#define SSD1306_ADDRESS 0x3C
+#endif
+
+#define DisplayHeight 32
+#define DisplayWidth 128
+
+#define FontHeight 8
+#define FontWidth 6
+
+#define MatrixRows (DisplayHeight / FontHeight)
+#define MatrixCols (DisplayWidth / FontWidth)
+
+struct CharacterMatrix {
+ uint8_t display[MatrixRows][MatrixCols];
+ uint8_t *cursor;
+ bool dirty;
+};
+
+struct CharacterMatrix display;
+
+bool iota_gfx_init(bool rotate);
+void iota_gfx_task(void);
+bool iota_gfx_off(void);
+bool iota_gfx_on(void);
+void iota_gfx_flush(void);
+void iota_gfx_write_char(uint8_t c);
+void iota_gfx_write(const char *data);
+void iota_gfx_write_P(const char *data);
+void iota_gfx_clear_screen(void);
+
+void iota_gfx_task_user(void);
+
+void matrix_clear(struct CharacterMatrix *matrix);
+void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c);
+void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c);
+void matrix_write(struct CharacterMatrix *matrix, const char *data);
+void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
+void matrix_render(struct CharacterMatrix *matrix);
+
+bool process_record_gfx(uint16_t keycode, keyrecord_t *record);
diff --git a/keyboards/treadstone48/treadstone48.c b/keyboards/treadstone48/treadstone48.c
new file mode 100644
index 000000000..faadb2690
--- /dev/null
+++ b/keyboards/treadstone48/treadstone48.c
@@ -0,0 +1 @@
+#include "treadstone48.h"
diff --git a/keyboards/treadstone48/treadstone48.h b/keyboards/treadstone48/treadstone48.h
new file mode 100644
index 000000000..3123d1de5
--- /dev/null
+++ b/keyboards/treadstone48/treadstone48.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#ifdef KEYBOARD_treadstone48_rev1
+ #include "rev1.h"
+#endif
+
+#include "quantum.h"
+
+#ifdef PROTOCOL_LUFA
+#include "lufa.h"
+#include "split_util.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h
index 703745d56..e3e00a9f8 100644
--- a/keyboards/v60_type_r/config.h
+++ b/keyboards/v60_type_r/config.h
@@ -1,5 +1,5 @@
/*
-Copyright 2017 REPLACE_WITH_YOUR_NAME
+Copyright 2017 benlyall, MechMerlin
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -190,5 +189,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
-
-#endif
diff --git a/keyboards/v60_type_r/keymaps/default/config.h b/keyboards/v60_type_r/keymaps/default/config.h
index 9561b0255..744bea207 100644
--- a/keyboards/v60_type_r/keymaps/default/config.h
+++ b/keyboards/v60_type_r/keymaps/default/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,14 +13,11 @@
* 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
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+// place overrides here
-#include "../../config.h"
#ifdef V60_POLESTAR
#undef V60_POLESTAR
#endif
-
-#endif
diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c
index 77546c0a6..831def078 100644
--- a/keyboards/v60_type_r/keymaps/default/keymap.c
+++ b/keyboards/v60_type_r/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/keyboards/v60_type_r/keymaps/default/readme.md b/keyboards/v60_type_r/keymaps/default/readme.md
index 57ac901ad..9b3c6f064 100644
--- a/keyboards/v60_type_r/keymaps/default/readme.md
+++ b/keyboards/v60_type_r/keymaps/default/readme.md
@@ -1,5 +1,4 @@
-KB Paradise V60 Type R Default Layout
-======================
+# KB Paradise V60 Type R Default Layout
This is the default layout as defined by the KBP V60 Type R manual/keycaps
@@ -9,4 +8,4 @@ This is the default layout as defined by the KBP V60 Type R manual/keycaps
### Build
-To build this keymap, simply run `make KEYMAP=default`. \ No newline at end of file
+To build this keymap, simply run `make v60_type_r:default`.
diff --git a/keyboards/v60_type_r/keymaps/default/rules.mk b/keyboards/v60_type_r/keymaps/default/rules.mk
new file mode 100644
index 000000000..b6c9a2580
--- /dev/null
+++ b/keyboards/v60_type_r/keymaps/default/rules.mk
@@ -0,0 +1,2 @@
+BACKLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
diff --git a/keyboards/v60_type_r/keymaps/vimouse/config.h b/keyboards/v60_type_r/keymaps/vimouse/config.h
index 3937420d0..285cb4fa2 100644
--- a/keyboards/v60_type_r/keymaps/vimouse/config.h
+++ b/keyboards/v60_type_r/keymaps/vimouse/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
#define V60_POLESTAR
@@ -27,5 +24,3 @@
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
-
-#endif
diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c
index 258668312..8b0019e7b 100644
--- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c
+++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/keyboards/v60_type_r/readme.md b/keyboards/v60_type_r/readme.md
index 06ff749b8..76cb5f39f 100644
--- a/keyboards/v60_type_r/readme.md
+++ b/keyboards/v60_type_r/readme.md
@@ -13,17 +13,6 @@ Please note that other variants of the KBP V60 are not fully programmable.
Backlight and RGB Underglow are both supported.
-To use the backlight and/or RGB underglow:
-* Create a new keymap
-* Create a rules.mk file in the keymap
-* Add RGBLIGHT_ENABLE = yes and/or BACKLIGHT_ENABLE = yes to the rules.mk
-* Setup your keymap to your preference. Use [the `vimouse` keymap](keymaps/vimouse/keymap.c) as a starting point
-* Some extra keys are defined to allow you to set the red, green and blue values of the underglow directly, rather than using the HSV spectrum. These are RGB_RI, RGB_RD, RGB_GI, RGB_GD, RGB_BI, RGB_BD for increase and decrease of the red, green and blue channels respectively.
-
-The provided `default` keymap pretty closely matches the default V60 Type R keymap, minus the backlight and underglow control keys. The `vimouse` keymap is completely customised and makes use of many of the possibilities, including mouse keys, backlighting, RGB underglow, etc.
-
-Note for those customising: The configuration used in the `vimouse` keymap results in about 93% of the available flash being utilised. Keep that in mind if you're adding functionality.
-
Note: By default the V60 Type R uses TMK. You should know what you're doing and none of this is guaranteed to work. If you want to stick with the TMK default, then the KB Paradise preferred way of creating the hex file is by using https://tkg.io/, selecting Fantastic60 and then defining your keymap.
You will then have to use tkg-toolkit to finish the flashing
@@ -40,7 +29,4 @@ or
make v60_type_r:vimouse
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
-
-
-
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk
index 7a1340a1a..54a20a781 100644
--- a/keyboards/v60_type_r/rules.mk
+++ b/keyboards/v60_type_r/rules.mk
@@ -52,21 +52,21 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes # Console for debug(+400)
-COMMAND_ENABLE ?= yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE ?= no # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
-RGBLIGHT_ENABLE ?= no # Enable the RGB Underglow
-MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
-UNICODE_ENABLE ?= no # Unicode
-BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE ?= no # Audio output on port C6
-FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable the RGB Underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
LAYOUTS = 60_ansi
diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c
index 86d87e12d..41eb75807 100644
--- a/keyboards/v60_type_r/v60_type_r.c
+++ b/keyboards/v60_type_r/v60_type_r.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h
index 3d7aef7ea..25097ed48 100644
--- a/keyboards/v60_type_r/v60_type_r.h
+++ b/keyboards/v60_type_r/v60_type_r.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 REPLACE_WITH_YOUR_NAME
+/* Copyright 2017 benlyall, MechMerlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef V60_TYPE_R_H
-#define V60_TYPE_R_H
+#pragma once
#include "quantum.h"
@@ -106,4 +105,3 @@ enum my_keycodes {
{ k40, k41, k42, k43, k44, k45, k46, k47 } \
}
-#endif
diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h
index efd43f41b..694ab6a69 100644
--- a/keyboards/vision_division/keymaps/default/config.h
+++ b/keyboards/vision_division/keymaps/default/config.h
@@ -1,7 +1,7 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
+
+// place overrides here
-#include "../../config.h"
#include "matrix_types.h"
/* USB Device descriptor parameter */
@@ -77,5 +77,3 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \
)
*/
-
-#endif \ No newline at end of file
diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c
index af60a8bd7..18fb7c16d 100644
--- a/keyboards/vision_division/keymaps/default/keymap.c
+++ b/keyboards/vision_division/keymaps/default/keymap.c
@@ -1,13 +1,6 @@
-#include "vision_division.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#include "led.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
- #include "song_list.h"
-#endif
-
enum keyboard_layers {
LAYER_QWERTY = 0,
LAYER_UPPER,
diff --git a/keyboards/westfoxtrot/cypher/config.h b/keyboards/westfoxtrot/cypher/config.h
new file mode 100644
index 000000000..48ff816f9
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/config.h
@@ -0,0 +1,66 @@
+/*
+Copyright 2019 westfoxtrot
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x21FF
+#define PRODUCT_ID 0xAA97
+#define DEVICE_VER 0x0001
+#define MANUFACTURER westfoxtrot
+#define PRODUCT cypher
+#define DESCRIPTION Cypher
+
+/* key matrix size */
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 10
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, F6, B6, B7, C6, C7 }
+#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, E6, F0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN B5
+#define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 5
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+#define GRAVE_ESC_CTRL_OVERRIDE
diff --git a/keyboards/westfoxtrot/cypher/cypher.c b/keyboards/westfoxtrot/cypher/cypher.c
new file mode 100644
index 000000000..d2407525e
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/cypher.c
@@ -0,0 +1,56 @@
+/* Copyright 2019 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "cypher.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+ writePinHigh(F4);
+ } else {
+ writePinLow(F4);
+ }
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ writePinHigh(F1);
+ } else {
+ writePinLow(F1);
+ }
+ if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
+ writePinHigh(F5);
+ } else {
+ writePinLow(F5);
+ }
+ led_set_user(usb_led);
+}
diff --git a/keyboards/westfoxtrot/cypher/cypher.h b/keyboards/westfoxtrot/cypher/cypher.h
new file mode 100644
index 000000000..fdff12e9b
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/cypher.h
@@ -0,0 +1,68 @@
+/* Copyright 2019 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#define ___ KC_NO
+
+#include "quantum.h"
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K63, K65, K66, K67, K68, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K73, K75, K76, K77, K78, \
+ K30, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \
+ K40, K41, K42, K46, K49, K90, K91, K92, K93, K95, K96, K97, K98 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \
+ { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39 }, \
+ { K40, K41, K42, ___, ___, ___, K46, ___, ___, K49 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
+ { K60, K61, K62, K63, ___, K65, K66, K67, K68 }, \
+ { K70, K71, ___, K73, ___, K75, K76, K77, K78 }, \
+ { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \
+ { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \
+}
+
+#define LAYOUT_iso( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K65, K66, K67, K68, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K72, K73, K75, K76, K77, K78, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \
+ K40, K41, K42, K46, K49, K90, K91, K92, K93, K95, K96, K97, K98 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39 }, \
+ { K40, K41, K42, ___, ___, ___, K46, ___, ___, K49 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
+ { K60, K61, K62, ___, ___, K65, K66, K67, K68 }, \
+ { K70, K71, K72, K73, ___, K75, K76, K77, K78 }, \
+ { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \
+ { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \
+}
diff --git a/keyboards/westfoxtrot/cypher/info.json b/keyboards/westfoxtrot/cypher/info.json
new file mode 100644
index 000000000..ab139aeaf
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Cypher",
+ "width": 19.5,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_ansi": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}] },
+
+ "LAYOUT_iso": {
+ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}] }
+ }
+}
diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h b/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h
new file mode 100644
index 000000000..41d70907e
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c
new file mode 100644
index 000000000..2a08ae853
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c
@@ -0,0 +1,49 @@
+/* Copyright 2019 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+#define _MA 0
+#define _F1 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_MA] = LAYOUT_iso( /* Base */
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_PEQL,\
+ 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_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC),
+
+[_F1] = LAYOUT_iso( /* Function Layer */
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,\
+ _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______,\
+ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______, _______, _______,\
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______),
+
+};
+
+void matrix_init_user(void) {
+ //user initialization
+}
+
+void matrix_scan_user(void) {
+ //user matrix
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md b/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md
new file mode 100644
index 000000000..81a4a677f
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md
@@ -0,0 +1 @@
+# The default iso keymap for cypher
diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/config.h b/keyboards/westfoxtrot/cypher/keymaps/default/config.h
new file mode 100644
index 000000000..41d70907e
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c
new file mode 100644
index 000000000..1906f9396
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c
@@ -0,0 +1,49 @@
+/* Copyright 2019 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+#define _MA 0
+#define _F1 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_MA] = LAYOUT_ansi( /* Base */
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,\
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL,\
+ 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_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC),
+
+[_F1] = LAYOUT_ansi( /* Function Layer */
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,\
+ _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\
+ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\
+ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______),
+
+};
+
+void matrix_init_user(void) {
+ //user initialization
+}
+
+void matrix_scan_user(void) {
+ //user matrix
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/readme.md b/keyboards/westfoxtrot/cypher/keymaps/default/readme.md
new file mode 100644
index 000000000..05c370026
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for cypher \ No newline at end of file
diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h b/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h
new file mode 100644
index 000000000..947e340c3
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h
@@ -0,0 +1,33 @@
+/* Copyright 2018 westfoxtrot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define RGB_DI_PIN F7
+#ifdef RGB_DI_PIN
+ #define RGBLED_NUM 15
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 15
+ #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+ #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ #define RGBLIGHT_EFFECT_KNIGHT
+ #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 5
+ #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+ #endif
+
+// place overrides here
diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c
new file mode 100644
index 000000000..2d7bf2a5e
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c
@@ -0,0 +1,79 @@
+/* Copyright 2018 westfoxtrot
+ * Copyright 2019 kwerdenker
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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_german.h"
+
+#define _DL 0
+#define _FN 1
+#define _LE 2
+
+#define SPECIAL LT(_FN, DE_CIRC) //capslock layer switch + stargate key on tap
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_DL] = LAYOUT_iso (
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, _______, KC_NLCK, KC_PSCR,KC_PSLS,KC_PAST,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_P7, KC_P8, KC_P9, KC_PMNS,
+ SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, _______, KC_LALT, KC_SPC, _______, KC_RALT, TG(_LE), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO
+ ),
+
+ [_FN] = LAYOUT_iso (
+ DE_RING, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, _______, _______, _______, _______,
+ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_LE] = LAYOUT_iso (
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,_______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+
+
+
+void matrix_init_user(void) {
+ //user initialization
+}
+
+void matrix_scan_user(void) {
+ //user matrix
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+void led_set_user(uint8_t usb_led) {
+ // Insert custom handling for CAPS_LOCK, NUM_LOCK, SCROLL_LOCK here
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+ writePinHigh(F4);
+ writePinHigh(F1);
+ writePinHigh(F5);
+ } else {
+ writePinLow(F4);
+ writePinLow(F1);
+ writePinLow(F5);
+ }
+}
diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md b/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md
new file mode 100644
index 000000000..c1a132e71
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md
@@ -0,0 +1,39 @@
+# The kwer keymap and RGB MOD for cypher
+
+![](https://i.imgur.com/b7snIju.jpg)
+
+## Hardware
+To make this mod, all you need a piece of WS2812b RGB strip (I used one with 144 LEDs per meter, so it's rather dense), some wiring (I used 0.6mm solid core wire) and steady hands for soldering to the MCU pin.
+
+**Installed mod**
+![](https://i.imgur.com/IKcFd0k.jpg)
+
+As you can see, the wiring is relatively simple. VCC and GND can be easily accessed through the ISP header on the right side of the spacebar while the DATA line can be routed relatively easy through one of the stabilizer holes. While it isn't important where exactly you solder the VCC/GND wires to their respective lines on the strip, you have to keep the direction of the data line in mind. Most strip have arrows printed on them to show you in which direction the data is shifted through the LEDs and your should always solder your DATA line on the _from_ side, as seen in the above picture.
+
+**Close-up for the VCC/GND connections**
+![](https://i.imgur.com/K0OibwW.jpg)
+
+Since there is no pinout availble for the pin we're gonna use to control the strip, the line has to be soldered to the MCU directly. While this is not a very complex process, you should have a fine tipped soldering irong and a steady hand. Make sure you do not bridge any of the neighboring pins when soldering the wire to the MCU pin. As shown in the picture below, you want to connect the DATA line to the third pin from the right on the top of the controller chip.
+
+**Close-up for the DATA connection**
+![](https://i.imgur.com/zkD3RjF.jpg)
+
+## Software
+To enable your RGB strip in QMK, you have to add change/add the following lines
+
+**rules.&#8203;mk**
+```
+[...]
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+[...]
+```
+
+**config.h**
+```
+[...]
+#define RGB_DI_PIN F7
+#define RGBLED_NUM 15 // Change this number to the amount of LEDs on the strip you soldered
+#define RGBLIGHT_ANIMATIONS
+[...]
+```
+To control the RGB color, animation, etc. you need to add the appropriate keycodes to your keymap. Either see [my keymap](./keymap.c) or the [official QMK documentation](https://docs.qmk.fm/#/feature_rgblight?id=keycodes) for references.
diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk b/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk
new file mode 100644
index 000000000..df87c59a2
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk
@@ -0,0 +1,2 @@
+# Build options override
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
diff --git a/keyboards/westfoxtrot/cypher/readme.md b/keyboards/westfoxtrot/cypher/readme.md
new file mode 100644
index 000000000..6db417fae
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/readme.md
@@ -0,0 +1,15 @@
+# cypher
+
+![cypher](https://github.com/westfoxtrot/Cypher_PCB)
+
+PCB for the cypher keyboard
+
+Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot)
+Hardware Supported: Cypher PCB
+Hardware Availability: with group buy + Files released here (https://github.com/westfoxtrot/Cypher_PCB)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make westfoxtrot/cypher: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/westfoxtrot/cypher/rules.mk b/keyboards/westfoxtrot/cypher/rules.mk
new file mode 100644
index 000000000..ab03dc9f9
--- /dev/null
+++ b/keyboards/westfoxtrot/cypher/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/winkeyless/bface/program b/keyboards/winkeyless/bface/program
deleted file mode 100755
index 298e64547..000000000
--- a/keyboards/winkeyless/bface/program
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>, Sebastian Kaim <sebb@sebb767.de>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-
-def checkForKeyboardInNormalMode():
- """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
- return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-
-def checkForKeyboardInBootloaderMode():
- """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
- return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
-
-def flashKeyboard(firmware_file):
- """Calls bootloadHID to flash the given file to the device."""
- print('Flashing firmware to device ...')
- if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
- print('\nDone!')
- else:
- print('\nbootloadHID returned an error.')
-
-def printDeviceInfo(dev):
- """Prints all infos for a given USB device"""
- print('Device Information:')
- print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
- print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
- print('Manufacturer: %s' % (dev.iManufacturer))
- print('Serial: %s' % (dev.iSerialNumber))
- print('Product: %s' % (dev.iProduct), end='\n\n')
-
-def sendDeviceToBootloaderMode(dev):
- """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
- try:
- dev.set_configuration()
-
- request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
- USBRQ_HID_SET_REPORT = 0x09
- HID_REPORT_OPTION = 0x0301
-
- dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5)
- except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-kb = checkForKeyboardInNormalMode()
-
-if kb is not None:
- print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='')
- sendDeviceToBootloaderMode(kb)
- print(' done.')
- print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
- print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
-
-attempts = 12 # 60 seconds
-found = False
-for attempt in range(1, attempts + 1):
- print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
-
- if checkForKeyboardInBootloaderMode():
- print('Found', end='\n\n')
- flashKeyboard(sys.argv[1])
- found = True
- break
- else:
- print('Nothing.', end='')
-
- if attempt != attempts: # no need to wait on the last attempt
- print(' Sleeping 5 seconds.', end='')
- time.sleep(5)
-
- # print a newline
- print()
-
-if not found:
- print("Couldn't find a flashable keyboard. Aborting.")
- sys.exit(2)
-
diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk
index 10331ef70..369ccf2ed 100644
--- a/keyboards/winkeyless/bface/rules.mk
+++ b/keyboards/winkeyless/bface/rules.mk
@@ -44,5 +44,5 @@ CUSTOM_MATRIX = yes
SRC = matrix.c i2c.c backlight_ps2avrGB.c
# programming options
-PROGRAM_CMD = ./keyboards/winkeyless/bface/program .build/$(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c
index 868ca632e..b49803fa8 100644
--- a/keyboards/xd60/keymaps/default/keymap.c
+++ b/keyboards/xd60/keymaps/default/keymap.c
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H
-#include "action_layer.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/xd75/keymaps/adi/config.h b/keyboards/xd75/keymaps/adi/config.h
index 244c75c77..08bed9ccb 100644
--- a/keyboards/xd75/keymaps/adi/config.h
+++ b/keyboards/xd75/keymaps/adi/config.h
@@ -14,12 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// Disable backlight
#undef BACKLIGHT_ENABLE
-
-#endif
diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xd75/keymaps/adi/keymap.c
index a91b7d35d..4f9e414c1 100644
--- a/keyboards/xd75/keymaps/adi/keymap.c
+++ b/keyboards/xd75/keymaps/adi/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
// Fillers to make layering more clear
#define ___T___ KC_TRNS
diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xd75/keymaps/adi/rules.mk
index 52a8f38d4..a0c4fc967 100644
--- a/keyboards/xd75/keymaps/adi/rules.mk
+++ b/keyboards/xd75/keymaps/adi/rules.mk
@@ -13,3 +13,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+BACKLIGHT_ENABLE = no
diff --git a/keyboards/xd75/keymaps/atomic_style/config.h b/keyboards/xd75/keymaps/atomic_style/config.h
index f52a97bbc..a72596783 100644
--- a/keyboards/xd75/keymaps/atomic_style/config.h
+++ b/keyboards/xd75/keymaps/atomic_style/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/atomic_style/keymap.c b/keyboards/xd75/keymaps/atomic_style/keymap.c
index d3e86b050..bdbbc4af3 100644
--- a/keyboards/xd75/keymaps/atomic_style/keymap.c
+++ b/keyboards/xd75/keymaps/atomic_style/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
// Fillers to make layering more clear
#define ___T___ KC_TRNS
diff --git a/keyboards/xd75/keymaps/bbaserdem/config.h b/keyboards/xd75/keymaps/bbaserdem/config.h
index 28d32e562..271f48d00 100644
--- a/keyboards/xd75/keymaps/bbaserdem/config.h
+++ b/keyboards/xd75/keymaps/bbaserdem/config.h
@@ -1,6 +1,3 @@
-#ifndef CONFIG_KEYMAP_H
-#define CONFIG_KEYMAP_H
+#pragma once
-#include "../../config.h"
-
-#endif
+// place overrides here
diff --git a/keyboards/xd75/keymaps/bbaserdem/keymap.c b/keyboards/xd75/keymaps/bbaserdem/keymap.c
index 68071d018..6f8576b09 100644
--- a/keyboards/xd75/keymaps/bbaserdem/keymap.c
+++ b/keyboards/xd75/keymaps/bbaserdem/keymap.c
@@ -1,4 +1,4 @@
-#include "xd75.h"
+#include QMK_KEYBOARD_H
#include "bbaserdem.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/xd75/keymaps/bramver/README.md b/keyboards/xd75/keymaps/bramver/readme.md
index 2dcac5f0e..2dcac5f0e 100644
--- a/keyboards/xd75/keymaps/bramver/README.md
+++ b/keyboards/xd75/keymaps/bramver/readme.md
diff --git a/keyboards/xd75/keymaps/c4software_bepo/config.h b/keyboards/xd75/keymaps/c4software_bepo/config.h
index 39845f15b..6605bbf93 100644
--- a/keyboards/xd75/keymaps/c4software_bepo/config.h
+++ b/keyboards/xd75/keymaps/c4software_bepo/config.h
@@ -16,4 +16,4 @@
# pragma once
-#include "../../config.h"
+// place overrides here
diff --git a/keyboards/xd75/keymaps/c4software_bepo/README.md b/keyboards/xd75/keymaps/c4software_bepo/readme.md
index b95130a31..b95130a31 100644
--- a/keyboards/xd75/keymaps/c4software_bepo/README.md
+++ b/keyboards/xd75/keymaps/c4software_bepo/readme.md
diff --git a/keyboards/xd75/keymaps/cbbrowne/config.h b/keyboards/xd75/keymaps/cbbrowne/config.h
index f6bb06f39..0ff61e1f4 100644
--- a/keyboards/xd75/keymaps/cbbrowne/config.h
+++ b/keyboards/xd75/keymaps/cbbrowne/config.h
@@ -14,9 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
+// place overrides here
#ifndef NO_DEBUG
#define NO_DEBUG
#endif
@@ -24,8 +24,6 @@
#define NO_PRINT
#endif
-#include "../../config.h"
-
#define LEADER_TIMEOUT 300
#define BACKLIGHT_BREATHING
@@ -34,10 +32,3 @@
#define randadd 53
#define randmul 181
#define randmod 167
-
-/* Filler to make layering a bit clearer *
- * borrowed from basic keymap */
-
-#define _____ KC_NO
-
-#endif
diff --git a/keyboards/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c
index b20cafabc..6c356ac80 100644
--- a/keyboards/xd75/keymaps/cbbrowne/keymap.c
+++ b/keyboards/xd75/keymaps/cbbrowne/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
/* Fillers to make layering more clear */
#define ___T___ KC_TRNS
diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk
index 0968298a0..eb2f87063 100644
--- a/keyboards/xd75/keymaps/cbbrowne/rules.mk
+++ b/keyboards/xd75/keymaps/cbbrowne/rules.mk
@@ -1,5 +1,5 @@
# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
+# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
@@ -18,7 +18,3 @@ API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
-ifndef QUANTUM_DIR
- include ../../../../Makefile
-endif
diff --git a/keyboards/xd75/keymaps/colinta/config.h b/keyboards/xd75/keymaps/colinta/config.h
index 3b39bee81..354c9c918 100644
--- a/keyboards/xd75/keymaps/colinta/config.h
+++ b/keyboards/xd75/keymaps/colinta/config.h
@@ -14,15 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
// QMK customization:
// - after 1.5s, turn off one-shot keys
#define ONESHOT_TIMEOUT 1500
// - TT(layer) only needs one press
#define TAPPING_TOGGLE 1
-
-#endif
diff --git a/keyboards/xd75/keymaps/colinta/keymap.c b/keyboards/xd75/keymaps/colinta/keymap.c
index a50a02c36..257caad33 100644
--- a/keyboards/xd75/keymaps/colinta/keymap.c
+++ b/keyboards/xd75/keymaps/colinta/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
#ifdef IS_COLINTA
#include "secrets.h"
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--/RRND----/MUTE----/FFWD-------------------------------------------------------------------------------------------------------------'
*/
- [LAYER_COLEMAK] = KEYMAP(
+ [LAYER_COLEMAK] = LAYOUT(
KC_GRV, TH_F1, TH_F2, TH_F3, TH_F4, TH_F5, MM_0, MM_1, KC_DEL, TH_F6, TH_F7, TH_F8, TH_F9, TH_F10, KC_MINS,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, MM_2, GOTO_FN, KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL,
OSCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LBRC, KC_RBRC, KC_ENT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
@@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
- [LAYER_RECORD] = KEYMAP(
+ [LAYER_RECORD] = LAYOUT(
_____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
@@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
- [LAYER_QWERTY] = KEYMAP(
+ [LAYER_QWERTY] = LAYOUT(
_____, _____, _____, _____, _____, _____, MM_0, MM_1, _____, _____, _____, _____, _____, _____, _____,
_____, KC_Q, KC_W, KC_E, KC_R, KC_T, MM_2, GOTO_FN, _____, KC_Y, KC_U, KC_I, KC_O, KC_P, _____,
MOD_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, _____, _____, _____, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _____,
@@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
- [LAYER_FN] = KEYMAP(
+ [LAYER_FN] = LAYOUT(
GOTO_CM, GOTO_QW, KC_NO, KC_NO, KC_NO, KC_NO, DYN_REC_START1, DYN_REC_START2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
diff --git a/keyboards/xd75/keymaps/davidrambo/config.h b/keyboards/xd75/keymaps/davidrambo/config.h
index f21914703..6e6349c7c 100644
--- a/keyboards/xd75/keymaps/davidrambo/config.h
+++ b/keyboards/xd75/keymaps/davidrambo/config.h
@@ -14,12 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
#define TAPPING_TERM 200
#define PERMISSIVE_HOLD
-
-#endif
diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c
index b37cad054..7be197a81 100644
--- a/keyboards/xd75/keymaps/davidrambo/keymap.c
+++ b/keyboards/xd75/keymaps/davidrambo/keymap.c
@@ -1,51 +1,53 @@
-#include "xd75.h"
+#include QMK_KEYBOARD_H
+//aliases for clarity in layering
#define A_BSPC LALT(KC_BSPC) // delete whole word in Mac
-// #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use
+#define C_BSPC LCTL(KC_BSPC) // delete whole word in PC
#define A_LEFT LALT(KC_LEFT)
#define A_RGHT LALT(KC_RGHT)
#define C_RGHT LCTL(KC_RGHT)
#define C_LEFT LCTL(KC_LEFT)
#define SftEnt SFT_T(KC_ENT)
-#define GBSPC LGUI_T(KC_BSPC)
-#define CBSPC LCTL_T(KC_BSPC)
+#define BS_GUI LGUI_T(KC_BSPC)
+#define BS_CTL LCTL_T(KC_BSPC)
-//internet browser tab shortcuts and window swapping for Mac and Win
+// internet browser tab shortcuts and window/application swapping for Mac and Win
#define GSL LGUI(S(KC_LEFT)) // back one tab in Safari
#define GSR LGUI(S(KC_RGHT)) // forward one tab in Safari
#define CTLPGDN LCTL(KC_PGDN) // back one tab on Windows
#define CTLPGUP LCTL(KC_PGUP) // forward one tab on Windows
-#define G_TAB LGUI(KC_TAB) // MAC: switch applications
-#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application
+#define G_TAB LGUI(KC_TAB) // Mac: switch applications
+#define G_GRV LGUI(KC_GRV) // Mac: switch between windows within an application
#define A_TAB LALT(KC_TAB)
#define C_TAB LCTL(KC_TAB)
-//
-#define NAV LT(3, KC_TAB)
-#define NAVPC LT(4, KC_TAB)
+// navigation layers for both Mac OS X and Windows
+#define NAV LT(4, KC_TAB)
+#define NAVPC LT(5, KC_TAB)
// Layer shorthand
#define _COLEMAK 0
#define _PC 1
-#define _SYMBOL 2 //Function keys, numbers, symbols, Backlighting
-#define _NAV 3 //Navigation Layer on Mac
-#define _NAVPC 4 //Navigation Layer on Win
+#define _GAME 2 // Gaming layer
+#define _SYMBOL 3 // Function keys, numbers, symbols, Backlighting
+#define _NAV 4 // Navigation Layer on Mac
+#define _NAVPC 5 // Navigation Layer on Win
-//tapdance declarations
+// tapdance declarations
enum {
SFT_LCK
};
-//alias for tapdance
+// alias for tapdance
#define SftLck TD(SFT_LCK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* COLEMAK
* .--------------------------------------------------------------------------------------------------------------------------------------.
- * | `~ | 1 | 2 | 3 | 4 | 5 | - | SWITCH | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
+ * | `~ | 1 | 2 | 3 | 4 | 5 | -_ | PC | =+ | 6 | 7 | 8 | 9 | 0 | BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
- * | ESC/`~ | Q | W | F | P | G | [ | \ | ] | J | L | U | Y | ; | BACKSP |
+ * | ESC/`~ | Q | W | F | P | G | [ | \| | ] | J | L | U | Y | ; | BACKSP |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
* | NAVTAB | A | S | D | F | G | PgUp |PlayPaus| ENTER | H | N | E | I | O | ' |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
@@ -55,24 +57,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
- [_COLEMAK] = { /* COLEMAK */
- { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
- { KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC },
- { NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT },
- { SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt },
- { KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(2) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP },
- },
+ [_COLEMAK] = LAYOUT_ortho_5x15( /* COLEMAK */
+ KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt ,
+ KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, BS_GUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP
+ ),
// Windows Layer: essentially swaps Control and GUI
- [_PC] = { /* WINDOWS */
- { _______, _______, _______, _______, _______, _______, _______, TG(0) , _______, _______, _______, _______, _______, _______, _______ },
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
- { NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ },
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
- { _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ },
- },
-
+ [_PC] = LAYOUT_ortho_5x15( /* WINDOWS */
+ _______, _______, _______, _______, _______, _______, _______, TG(2) , _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, BS_CTL , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______
+ ),
+
+ [_GAME] = LAYOUT_ortho_5x15( /* Gaming Layer */
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, TO(0) ,
+ KC_ESC , KC_T , KC_Q , KC_W , KC_E , KC_R , KC_F7 , KC_F8 , KC_F9 , KC_Y , KC_U , KC_I , KC_O , KC_P , _______,
+ KC_TAB , KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_F4 , KC_F5 , KC_F6 , KC_H , KC_J , KC_K , KC_L , KC_SCLN, _______,
+ KC_LALT, KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_F1 , KC_F2 , KC_F3 , KC_N , KC_M , _______, _______, _______, KC_ENT ,
+ _______, _______, _______, KC_G , KC_B , KC_SPC , KC_I , KC_M , _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______
+ ),
+
/* SYMBOL
* .--------------------------------------------------------------------------------------------------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
@@ -87,30 +97,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
- [_SYMBOL] = { /* SYMBOL */
- { _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______},
- { KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC},
- { _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL },
- { _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______},
- { _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_SYMBOL] = LAYOUT_ortho_5x15( /* SYMBOL */
+ KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 ,
+ KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC,
+ _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL ,
+ _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
- [_NAV] = { /* NAVIGATION for Mac */
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , ABSPC , KC_HOME, KC_END , G_GRV , _______},
- { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- },
-
- [_NAVPC] = { /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______},
- { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- }
+ [_NAV] = LAYOUT_ortho_5x15( /* NAVIGATION for Mac */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , A_BSPC , KC_HOME, KC_END , G_GRV , _______,
+ RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_NAVPC] = LAYOUT_ortho_5x15( /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , C_BSPC , KC_HOME, KC_END , _______, _______,
+ RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
// Shift vs capslock function. From bbaserdem's Planck keymap.
diff --git a/keyboards/xd75/keymaps/davidrambo/readme.md b/keyboards/xd75/keymaps/davidrambo/readme.md
index 17b928c50..a53abc8af 100644
--- a/keyboards/xd75/keymaps/davidrambo/readme.md
+++ b/keyboards/xd75/keymaps/davidrambo/readme.md
@@ -1,4 +1,7 @@
-# A Colemak layout for XD75 with both Mac and Windows layers.
-# These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout.
-# Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing.
-# The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file
+# XD75
+
+This is a Colemak layout for XD75 with both Mac and Windows layers.
+These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout (see planck/keymaps/davidrambo).
+Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing.
+
+The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file
diff --git a/keyboards/xd75/keymaps/default/config.h b/keyboards/xd75/keymaps/default/config.h
index 015377b5f..e6975da8a 100644
--- a/keyboards/xd75/keymaps/default/config.h
+++ b/keyboards/xd75/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c
index 03f605385..0e5c7dbaa 100644
--- a/keyboards/xd75/keymaps/default/keymap.c
+++ b/keyboards/xd75/keymaps/default/keymap.c
@@ -13,12 +13,18 @@
* 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 "xd75.h"
+#include QMK_KEYBOARD_H
// Layer shorthand
#define _QW 0
#define _FN 1
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
@@ -35,13 +41,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
- [_QW] = { /* QWERTY */
- { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
- { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT },
- { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
- { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
- { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL },
- },
+ [_QW] = LAYOUT_ortho_5x15( /* QWERTY */
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL
+ ),
/* FUNCTION
* .--------------------------------------------------------------------------------------------------------------------------------------.
@@ -56,30 +62,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
-
- [_FN] = { /* FUNCTION */
- { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
- { KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS },
- { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______ },
- { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______ },
- { _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ },
- }
+
+ [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS,
+ KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______,
+ KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______,
+ _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______
+ )
};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
- switch(id) {
- case 0:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- #ifdef BACKLIGHT_ENABLE
- backlight_step();
- #endif
- } else {
- unregister_code(KC_RSFT);
- }
- break;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
}
- return MACRO_NONE;
-};
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/xd75/keymaps/developper_bepo/config.h b/keyboards/xd75/keymaps/developper_bepo/config.h
index 78357b5bc..0183e0242 100644
--- a/keyboards/xd75/keymaps/developper_bepo/config.h
+++ b/keyboards/xd75/keymaps/developper_bepo/config.h
@@ -16,4 +16,4 @@
#pragma once
-#include "../../config.h"
+// place overrides here
diff --git a/keyboards/xd75/keymaps/developper_bepo/README.md b/keyboards/xd75/keymaps/developper_bepo/readme.md
index 7954a683a..7954a683a 100644
--- a/keyboards/xd75/keymaps/developper_bepo/README.md
+++ b/keyboards/xd75/keymaps/developper_bepo/readme.md
diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h b/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h
index 015377b5f..e6975da8a 100644
--- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h
+++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c
index 594e5c41c..cf4bfb4dc 100644
--- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c
+++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
enum planck_keycodes {
DUMMY = SAFE_RANGE,
diff --git a/keyboards/xd75/keymaps/emilyh/config.h b/keyboards/xd75/keymaps/emilyh/config.h
index f52a97bbc..a72596783 100644
--- a/keyboards/xd75/keymaps/emilyh/config.h
+++ b/keyboards/xd75/keymaps/emilyh/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/emilyh/keymap.c b/keyboards/xd75/keymaps/emilyh/keymap.c
index f597dc2b9..bea9863d5 100644
--- a/keyboards/xd75/keymaps/emilyh/keymap.c
+++ b/keyboards/xd75/keymaps/emilyh/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
#include "backlight.h"
// Fillers to make layering more clear
diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xd75/keymaps/fabian/config.h
index 59de3fa55..a72596783 100644
--- a/keyboards/xd75/keymaps/fabian/config.h
+++ b/keyboards/xd75/keymaps/fabian/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include QMK_KEYBOARD_CONFIG_H
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/french/config.h b/keyboards/xd75/keymaps/french/config.h
index 015377b5f..e6975da8a 100644
--- a/keyboards/xd75/keymaps/french/config.h
+++ b/keyboards/xd75/keymaps/french/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/french/keymap.c b/keyboards/xd75/keymaps/french/keymap.c
index 1ffec2202..547a67b6e 100644
--- a/keyboards/xd75/keymaps/french/keymap.c
+++ b/keyboards/xd75/keymaps/french/keymap.c
@@ -1,5 +1,5 @@
#include "keymap_french.c"
-#include "xd75.h"
+#include QMK_KEYBOARD_H
// Layer shorthand
diff --git a/keyboards/xd75/keymaps/french/README.md b/keyboards/xd75/keymaps/french/readme.md
index 8c5330290..8c5330290 100644
--- a/keyboards/xd75/keymaps/french/README.md
+++ b/keyboards/xd75/keymaps/french/readme.md
diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h
index dd3f32275..65ab6a0dc 100644
--- a/keyboards/xd75/keymaps/germanized/config.h
+++ b/keyboards/xd75/keymaps/germanized/config.h
@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
@@ -118,4 +115,3 @@
// Launchy
#define ALT_SPC LALT(KC_SPC)
-#endif
diff --git a/keyboards/xd75/keymaps/germanized/keymap.c b/keyboards/xd75/keymaps/germanized/keymap.c
index b7c9620c1..bba1172ec 100644
--- a/keyboards/xd75/keymaps/germanized/keymap.c
+++ b/keyboards/xd75/keymaps/germanized/keymap.c
@@ -1,6 +1,6 @@
/* Copyright 2017 Kolja Brauns
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
#ifndef KEYMAP_GERMAN
#define KEYMAP_GERMAN
diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/config.h b/keyboards/xd75/keymaps/kim-kim-xd73/config.h
index e2390f770..0c8015e22 100644
--- a/keyboards/xd75/keymaps/kim-kim-xd73/config.h
+++ b/keyboards/xd75/keymaps/kim-kim-xd73/config.h
@@ -14,12 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include QMK_KEYBOARD_CONFIG_H
+#pragma once
// place overrides here
#undef BACKLIGHT_BREATHING
-
-#endif
diff --git a/keyboards/xd75/keymaps/kim-kim/config.h b/keyboards/xd75/keymaps/kim-kim/config.h
index e2390f770..0c8015e22 100644
--- a/keyboards/xd75/keymaps/kim-kim/config.h
+++ b/keyboards/xd75/keymaps/kim-kim/config.h
@@ -14,12 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include QMK_KEYBOARD_CONFIG_H
+#pragma once
// place overrides here
#undef BACKLIGHT_BREATHING
-
-#endif
diff --git a/keyboards/xd75/keymaps/kloki/config.h b/keyboards/xd75/keymaps/kloki/config.h
index 015377b5f..e6975da8a 100644
--- a/keyboards/xd75/keymaps/kloki/config.h
+++ b/keyboards/xd75/keymaps/kloki/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/xd75/keymaps/kloki/keymap.c b/keyboards/xd75/keymaps/kloki/keymap.c
index 340d9a8dc..b9bb2c66d 100644
--- a/keyboards/xd75/keymaps/kloki/keymap.c
+++ b/keyboards/xd75/keymaps/kloki/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
// Layer shorthand
#define _WO 0
diff --git a/keyboards/xd75/keymaps/markus/config.h b/keyboards/xd75/keymaps/markus/config.h
index bde866636..4e4e6f0d7 100644
--- a/keyboards/xd75/keymaps/markus/config.h
+++ b/keyboards/xd75/keymaps/markus/config.h
@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include QMK_KEYBOARD_CONFIG_H
+#pragma once
// place overrides here
@@ -30,5 +27,3 @@
#define MOUSEKEY_TIME_TO_MAX 0
#define MOUSEKEY_WHEEL_MAX_SPEED 1
#define MOUSEKEY_WHEEL_TIME_TO_MAX 0
-
-#endif
diff --git a/keyboards/xd75/keymaps/markus/keymap.c b/keyboards/xd75/keymaps/markus/keymap.c
index e61fb09b1..eaf620151 100644
--- a/keyboards/xd75/keymaps/markus/keymap.c
+++ b/keyboards/xd75/keymaps/markus/keymap.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
#include "keymap_german.h"
#define ________ KC_TRNS
diff --git a/keyboards/xd75/keymaps/msiu/config.h b/keyboards/xd75/keymaps/msiu/config.h
new file mode 100644
index 000000000..4fbd59bec
--- /dev/null
+++ b/keyboards/xd75/keymaps/msiu/config.h
@@ -0,0 +1,18 @@
+/* Copyright 2017 Benjamin Kesselring
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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
+// place overrides here
diff --git a/keyboards/xd75/keymaps/msiu/keymap.c b/keyboards/xd75/keymaps/msiu/keymap.c
new file mode 100644
index 000000000..c4cc456a9
--- /dev/null
+++ b/keyboards/xd75/keymaps/msiu/keymap.c
@@ -0,0 +1,120 @@
+/* Copyright 2017 Benjamin Kesselring
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* What this layout is: QWERTY layout with the standard 40% layers. For easy
+ * switching between my xd75 and contra
+ */
+
+#include QMK_KEYBOARD_H
+
+// Layer shorthand
+#define _QW 0
+#define _DV 1
+#define _LW 2
+#define _RS 3
+#define _FN 4
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* QWERTY
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | - | = | \ | 6 | 7 | 8 | 9 | 0 | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | TAB | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | ESC | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ; | ' |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | LSHIFT | Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | ENTER |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | LCTRL | HYPER | LALT | LGUI | LOWER | FN | 0 | | . | SPACE | RAISE | LEFT | DOWN | UP | RIGHT |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_QW] = { /* QWERTY */
+ { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PLUS, KC_MINS, KC_ASTR, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
+ { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_9 , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL },
+ { LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_6 , KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT },
+ { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_3 , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
+ { KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, MO(_LW), MO(_FN), KC_0, _______, KC_DOT , KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT },
+ },
+
+ /* Dvorak */
+
+ [_DV] = { /* Dvorak */
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______ },
+ { _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH },
+ { _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ },
+
+
+/* LOWERED
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | ~ | ! | @ | # | $ | % | | VOLU | | ^ | & | * | ( | ) | DEL |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | F1 | F2 | F3 | F4 | F5 | PREV | PLAY | NEXT | F6 | _ | + | { | } | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | | F7 | F8 | F9 | F10 | F11 | | VOLD | | F12 | PAGEDW | PAGEUP | HOME | END | MUTE |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------|
+ * | | | | | | | | MUTE | | PLAY | | PREV | VOLD | VOLU | NEXT |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_LW] = { /* LOWERED */
+ { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL },
+ { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_VOLU, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
+ { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MPRV, KC_MPLY, KC_MNXT, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE },
+ { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_VOLD, _______, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE },
+ { _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT },
+ },
+
+/* RAISED
+ * .--------------------------------------------------------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | ` | 1 | 2 | 3 | 4 | 5 | | VOLU | | 6 | 7 | 8 | 9 | 0 | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | F1 | F2 | F3 | F4 | F5 | PREV | PLAY | NEXT | F6 | - | = | [ | ] | \ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | F7 | F8 | F9 | F10 | F11 | | VOLD | | F12 | PAGEUP | PAGEDW | HOME | END | MUTE |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | MUTE | | PLAY | | PREV | VOLD | VOLU | NEXT |
+ * '--------------------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_RS] = { /* RAISED */
+ { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL },
+ { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_VOLU, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
+ { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MPRV, KC_MPLY, KC_MNXT, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS },
+ { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_VOLD, _______, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE },
+ { _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT },
+ },
+
+/* FUNCTION */
+
+ [_FN] = { /* FUNCTION */
+ { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, KC_PSCR, _______ },
+ { _______, _______, _______, TO(_DV), TO(_QW), _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______ },
+ { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
+ },
+};
+
+
diff --git a/keyboards/xd75/keymaps/msiu/readme.md b/keyboards/xd75/keymaps/msiu/readme.md
new file mode 100644
index 000000000..d53c0f34a
--- /dev/null
+++ b/keyboards/xd75/keymaps/msiu/readme.md
@@ -0,0 +1 @@
+# The default keymap for xd75
diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h
index 7e2227c87..0ceba236f 100644
--- a/keyboards/xd75/keymaps/mtdjr/config.h
+++ b/keyboards/xd75/keymaps/mtdjr/config.h
@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
#undef MANUFACTURER
@@ -25,5 +22,3 @@
#define MANUFACTURER mtdjr
#define PRODUCT XD75
#define DESCRIPTION XD75Re
-
-#endif
diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c
index 074cf7335..e56d918fd 100644
--- a/keyboards/xd75/keymaps/mtdjr/keymap.c
+++ b/keyboards/xd75/keymaps/mtdjr/keymap.c
@@ -3,7 +3,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = KC_KEYMAP(
+ [_QWERTY] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,MPNT,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
@@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
- [_LOWER] = KC_KEYMAP(
+ [_LOWER] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,xxxx, F7 , F8 , F9 , F10, F11, F12, DEL,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
-[_RAISE] = KC_KEYMAP(
+[_RAISE] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
diff --git a/keyboards/xd75/keymaps/tdl-jturner/config.h b/keyboards/xd75/keymaps/tdl-jturner/config.h
index 985247bb2..596aaff66 100644
--- a/keyboards/xd75/keymaps/tdl-jturner/config.h
+++ b/keyboards/xd75/keymaps/tdl-jturner/config.h
@@ -16,10 +16,9 @@
// additional config optoinsa vailable at https://docs.qmk.fm/reference/config-options#the-config.h-file
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "../../config.h"
+// place overrides here
// place overrides here
//#define TAPPING_TERM 200
@@ -33,5 +32,3 @@
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
-
-#endif
diff --git a/keyboards/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xd75/keymaps/tdl-jturner/keymap.c
index 9789d9a86..593e54f14 100644
--- a/keyboards/xd75/keymaps/tdl-jturner/keymap.c
+++ b/keyboards/xd75/keymaps/tdl-jturner/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "xd75.h"
+#include QMK_KEYBOARD_H
enum xd75_layers {
_QWERTY,
diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md
index e11ce7dca..fc5b8972c 100644
--- a/keyboards/xd75/readme.md
+++ b/keyboards/xd75/readme.md
@@ -1,32 +1,25 @@
-xd75 keyboard firmware
-======================
+# XD75
-The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request!
+![XD75](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1MzOISXXXXXXgXpXXq6xXFXXXO_1024x1024.jpg)
-## Quantum MK Firmware
+The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request!
-For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm).
+Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
+Hardware Supported: XD75Re
+Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd75re-xd75am-xd75-xiudi-60-custom-keyboard-pcb), [AliExpress](https://www.aliexpress.com/item/xd75re-Custom-Mechanical-Keyboard-75-keys-TKG-TOOLS-Underglow-RGB-PCB-GH60-60-programmed-gh60-kle/32818745981.html)
-## Building
+Make example for this keyboard (after setting up your build environment):
-Download or clone the whole firmware and navigate to the
-keyboards/xd75 folder. Once your dev env is setup, you'll be able to
-type `make` to generate your .hex - you can then use the Teensy Loader
-to install the resulting .hex file, or have the `make` process install
-it using DFU.
+ make xd75:default
-### Default
+Flashing example:
-To build with the default keymap, simply run `make xd75:default` from the root directory (i.e. two levels above this file), and to install via DFU, `make xd75:default:dfu`, also from the root directory.
+ make xd75:default:dfu
-Note that DFU is likely to require root permissions, so installing the
-firmware likely requires a command line like:
+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).
-```
-$ sudo make xd75:default:dfu
-```
-### LED control
+## LED control
There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB.
@@ -65,23 +58,3 @@ GP103_LED F4
KEYCAPS_LED F5
GP100_LED F7
```
-
-### Other Keymaps
-
-The "default" keymap included is basically the OLKB Atomic keymap with
-a few buttons added for RGB underglow control. This should be usable
-as a starting point, but most people will be best served creating
-their own keymap and flashing it - more info on creating your own
-keymap is available in [the official QMK
-documentation](https://docs.qmk.fm).
-
-Keymaps follow the format **__\<name\>.c__** and are stored in
-subdirectories under `keyboards/xd75/keymaps`
-
-To build the firmware binary hex file for a specific keymap, and
-install it, using DFU, just do `make` with a keymap like this:
-
-```
-$ make xd75:[default|<name>]
-```
-
diff --git a/keyboards/xd75/xd75.h b/keyboards/xd75/xd75.h
index e27806690..c27930a84 100644
--- a/keyboards/xd75/xd75.h
+++ b/keyboards/xd75/xd75.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef XD75_H
-#define XD75_H
+#pragma once
#include "quantum.h"
@@ -22,7 +21,7 @@
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
-#define KEYMAP( \
+#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\
@@ -36,7 +35,7 @@
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \
}
-#define KC_KEYMAP( \
+#define LAYOUT_kc( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\
@@ -50,7 +49,7 @@
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
}
-#define LAYOUT_ortho_5x15 KEYMAP
+#define LAYOUT_ortho_5x15 LAYOUT
void capslock_led_init(void);
void capslock_led_off(void);
@@ -67,5 +66,3 @@ void gp103_led_on(void);
void keycaps_led_init(void);
void keycaps_led_off(void);
void keycaps_led_on(void);
-
-#endif
diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h
new file mode 100644
index 000000000..df21205f8
--- /dev/null
+++ b/keyboards/xd96/config.h
@@ -0,0 +1,244 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x4096
+#define DEVICE_VER 0x0001
+#define MANUFACTURER KPrepublic
+#define PRODUCT XD96
+#define DESCRIPTION KPrepublic XD96
+
+/* key matrix size */
+#define MATRIX_ROWS 6
+#define MATRIX_COLS 18
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+//#define MATRIX_ROW_PINS { D0, D5 }
+//#define MATRIX_COL_PINS { F1, F0, B0 }
+//#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+//#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN B5
+#define BACKLIGHT_LEVELS 10
+// #define BACKLIGHT_BREATHING
+
+#define RGB_DI_PIN C7
+#define RGBLED_NUM 16
+#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_LIMIT_VAL 50
+// #ifdef RGB_DI_PIN
+// #define RGBLIGHT_HUE_STEP 8
+// #define RGBLIGHT_SAT_STEP 8
+// #define RGBLIGHT_VAL_STEP 8
+// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+// /*== all animations enable ==*/
+// #define RGBLIGHT_ANIMATIONS
+// /*== or choose animations ==*/
+// #define RGBLIGHT_EFFECT_BREATHING
+// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
+// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+// #define RGBLIGHT_EFFECT_SNAKE
+// #define RGBLIGHT_EFFECT_KNIGHT
+// #define RGBLIGHT_EFFECT_CHRISTMAS
+// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
+// #define RGBLIGHT_EFFECT_RGB_TEST
+// #define RGBLIGHT_EFFECT_ALTERNATING
+// #endif
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
+
+// LTO options
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/xd96/custom_matrix_helper.c b/keyboards/xd96/custom_matrix_helper.c
new file mode 100644
index 000000000..a4c5b6afa
--- /dev/null
+++ b/keyboards/xd96/custom_matrix_helper.c
@@ -0,0 +1,127 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include "wait.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "debounce.h"
+#include "quantum.h"
+
+//_____COMMON__________________________________________________________________
+// user-defined overridable functions
+__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
+__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
+__attribute__((weak)) void matrix_init_user(void) {}
+__attribute__((weak)) void matrix_scan_user(void) {}
+
+
+//_____COULD BE COMMON_________________________________________________________
+/* matrix state(1:on, 0:off) */
+/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS];
+/*static*/ matrix_row_t matrix[MATRIX_ROWS];
+
+#if (MATRIX_COLS <= 8)
+# define print_matrix_header() print("\nr/c 01234567\n")
+# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop(matrix[i])
+# define ROW_SHIFTER ((uint8_t)1)
+#elif (MATRIX_COLS <= 16)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop16(matrix[i])
+# define ROW_SHIFTER ((uint16_t)1)
+#elif (MATRIX_COLS <= 32)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop32(matrix[i])
+# define ROW_SHIFTER ((uint32_t)1)
+#endif
+
+__attribute__ ((weak))
+uint8_t matrix_rows(void) {
+ return MATRIX_ROWS;
+}
+
+__attribute__ ((weak))
+uint8_t matrix_cols(void) {
+ return MATRIX_COLS;
+}
+
+__attribute__ ((weak))
+matrix_row_t matrix_get_row(uint8_t row) {
+ return matrix[row];
+}
+
+__attribute__ ((weak))
+uint8_t matrix_key_count(void) {
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += matrix_bitpop(i);
+ }
+ return count;
+}
+
+__attribute__ ((weak))
+void matrix_print(void) {
+ print_matrix_header();
+
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row); print(": ");
+ print_matrix_row(row);
+ print("\n");
+ }
+}
+
+
+//_____CUSTOM MATRIX 'LITE'____________________________________________________
+__attribute__ ((weak))
+void custom_matrix_init(void) {
+}
+
+__attribute__ ((weak))
+bool custom_matrix_scan(matrix_row_t current_matrix[]) {
+ bool changed = true;
+ return changed;
+}
+
+__attribute__ ((weak))
+void matrix_init(void) {
+
+ custom_matrix_init();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ raw_matrix[i] = 0;
+ matrix[i] = 0;
+ }
+
+ debounce_init(MATRIX_ROWS);
+
+ matrix_init_quantum();
+}
+
+__attribute__ ((weak))
+uint8_t matrix_scan(void) {
+ bool changed = custom_matrix_scan(raw_matrix);
+
+ debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
+
+ matrix_scan_quantum();
+ return 1;
+}
diff --git a/keyboards/xd96/info.json b/keyboards/xd96/info.json
new file mode 100644
index 000000000..f18068273
--- /dev/null
+++ b/keyboards/xd96/info.json
@@ -0,0 +1,17 @@
+{
+ "keyboard_name": "xd96",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 19,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_96_ansi": {
+ "key_count": 99,
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ },
+ "LAYOUT_96_iso": {
+ "key_count": 100,
+ "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}]
+ }
+ }
+}
diff --git a/keyboards/xd96/keymaps/default/keymap.c b/keyboards/xd96/keymaps/default/keymap.c
new file mode 100644
index 000000000..45588f18c
--- /dev/null
+++ b/keyboards/xd96/keymaps/default/keymap.c
@@ -0,0 +1,38 @@
+#include QMK_KEYBOARD_H
+
+#define L1_RALT LM(1, MOD_RALT)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT_96_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_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN,
+/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9,
+/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────├ ┤ */
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
+/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,
+/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, L1_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
+/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
+ ),
+
+ [1] = LAYOUT_96_ansi(
+/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────┼ ┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
+ )
+};
diff --git a/keyboards/xd96/keymaps/default_iso/keymap.c b/keyboards/xd96/keymaps/default_iso/keymap.c
new file mode 100644
index 000000000..cdd1f4967
--- /dev/null
+++ b/keyboards/xd96/keymaps/default_iso/keymap.c
@@ -0,0 +1,38 @@
+#include QMK_KEYBOARD_H
+
+#define L1_RALT LM(1, MOD_RALT)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT_96_iso(
+/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN,
+/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9,
+/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────├─────────├─────────├ ┤ */
+ 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_PPLS,
+/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, L1_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
+/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
+ ),
+
+ [1] = LAYOUT_96_iso(
+/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────├─────────├─────────┼ ┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┼─────────┼─────────┼─────────┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
+ )
+};
diff --git a/keyboards/xd96/matrix.c b/keyboards/xd96/matrix.c
new file mode 100644
index 000000000..550dae4d0
--- /dev/null
+++ b/keyboards/xd96/matrix.c
@@ -0,0 +1,96 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include <string.h>
+#include "matrix.h"
+#include "pca9555.h"
+#include "quantum.h"
+
+#include "debug.h"
+
+// PCA9555 slave addresses
+#define IC1 0x20
+#define IC2 0x21
+
+//_____Utility funcs___________________________________________________________
+
+static void init_pins(void) {
+ // init all cols high - IC2 all input
+ pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT);//same as initial state
+ pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT);//same as initial state
+ pca9555_set_config(IC1, PCA9555_PORT1, ALL_INPUT);//same as initial state
+
+ // init all rows - IC1 port0 input
+ pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT);//same as initial state
+}
+
+static void select_row(uint8_t row) {
+ // For the XD96 all rows are on the same IC and port
+ // so its safe enough to assume here row == pin
+ uint8_t pin = row;
+ uint8_t mask = 1 << pin;
+
+ pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH & (~mask));
+ pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT & (~mask));
+}
+
+static uint32_t read_cols(void) {
+ uint32_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0);
+ uint32_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1);
+ uint32_t state_3 = pca9555_readPins(IC1, PCA9555_PORT1);
+
+ // For the XD96 the pins are mapped to port expanders as follows:
+ // all 8 pins port 0 IC2, first 6 pins port 1 IC2, first 4 pins port 1 IC1
+ uint32_t state = (((state_3 & 0b00001111) << 14) | ((state_2 & 0b00111111) << 8) | state_1);
+ return (~state) & 0b111111111111111111;
+}
+
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[current_row];
+
+ // Clear data in matrix row
+ current_matrix[current_row] = 0;
+
+ // Select row and wait for row selecton to stabilize
+ select_row(current_row);
+ wait_us(30);
+
+ current_matrix[current_row] = read_cols();
+
+ // No need to Unselect row as the next `select_row` will blank everything
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________
+
+void custom_matrix_init(void) {
+ pca9555_init(IC1);
+ pca9555_init(IC2);
+
+ init_pins();
+}
+
+bool custom_matrix_scan(matrix_row_t current_matrix[]) {
+ bool changed = false;
+ for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
+ changed |= read_cols_on_row(current_matrix, current_row);
+ }
+ return changed;
+} \ No newline at end of file
diff --git a/keyboards/xd96/pca9555.c b/keyboards/xd96/pca9555.c
new file mode 100644
index 000000000..960df4f4e
--- /dev/null
+++ b/keyboards/xd96/pca9555.c
@@ -0,0 +1,78 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "i2c_master.h"
+#include "pca9555.h"
+
+#include "debug.h"
+
+#define SLAVE_TO_ADDR(n) (n<<1)
+#define TIMEOUT 100
+
+enum {
+ CMD_INPUT_0 = 0,
+ CMD_INPUT_1,
+ CMD_OUTPUT_0,
+ CMD_OUTPUT_1,
+ CMD_INVERSION_0,
+ CMD_INVERSION_1,
+ CMD_CONFIG_0,
+ CMD_CONFIG_1
+};
+
+void pca9555_init(uint8_t slave_addr) {
+ static uint8_t s_init = 0;
+ if (!s_init) {
+ i2c_init();
+
+ s_init=1;
+ }
+
+ // TODO: could check device connected
+ //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE);
+ //i2c_stop();
+}
+
+void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) {
+ uint8_t addr = SLAVE_TO_ADDR(slave_addr);
+ uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0;
+
+ i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
+ if (ret != I2C_STATUS_SUCCESS) {
+ print("pca9555_set_config::FAILED\n");
+ }
+}
+
+void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) {
+ uint8_t addr = SLAVE_TO_ADDR(slave_addr);
+ uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0;
+
+ i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
+ if (ret != I2C_STATUS_SUCCESS) {
+ print("pca9555_set_output::FAILED\n");
+ }
+}
+
+uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) {
+ uint8_t addr = SLAVE_TO_ADDR(slave_addr);
+ uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0;
+
+ uint8_t data = 0;
+ i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT);
+ if (ret != I2C_STATUS_SUCCESS) {
+ print("pca9555_readPins::FAILED\n");
+ }
+ return data;
+}
diff --git a/keyboards/xd96/pca9555.h b/keyboards/xd96/pca9555.h
new file mode 100644
index 000000000..6aaee8a6f
--- /dev/null
+++ b/keyboards/xd96/pca9555.h
@@ -0,0 +1,55 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+/*
+ PCA9555
+ ,----------.
+ SDA --| SDA P00 |-- P1
+ SCL --| SCL P01 |-- P2
+ INT --| INT P02 |-- P3
+ | P03 |-- P4
+ A0 --| A0 P04 |-- P5
+ A1 --| A1 P05 |-- P6
+ A2 --| A2 P06 |-- P7
+ | P07 |-- P8
+ | |
+ | P10 |-- P10
+ | P11 |-- P11
+ | P12 |-- P12
+ | P13 |-- P13
+ | P14 |-- P14
+ | P15 |-- P15
+ | P16 |-- P16
+ | P17 |-- P17
+ `----------'
+*/
+
+#define PCA9555_PORT0 0
+#define PCA9555_PORT1 1
+
+#define ALL_OUTPUT 0
+#define ALL_INPUT 0xFF
+#define ALL_LOW 0
+#define ALL_HIGH 0xFF
+
+void pca9555_init(uint8_t slave_addr);
+
+void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf);
+
+void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf);
+
+uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file
diff --git a/keyboards/xd96/readme.md b/keyboards/xd96/readme.md
new file mode 100644
index 000000000..237d7a051
--- /dev/null
+++ b/keyboards/xd96/readme.md
@@ -0,0 +1,22 @@
+# XD96
+
+![XD96](https://cdn.shopify.com/s/files/1/2711/4238/products/xd96_pcb_1024x1024.jpg?v=1515425370)
+
+Compact With 96 Keys & RGB LED Underglow
+- Designed by Xiudi
+- ISO and ANSI support
+- Uses Kimera core
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: XD96
+Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd96-pcb-90-custom-mechanical-keyboard-supports-tkg-tools-underglow-rgb-programmed); [AliExpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make xd96:default
+
+Install examples:
+
+ make xd96:default:dfu
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk
new file mode 100644
index 000000000..c9f804471
--- /dev/null
+++ b/keyboards/xd96/rules.mk
@@ -0,0 +1,86 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+# custom matrix setup
+CUSTOM_MATRIX = yes
+SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c
+
+EXTRAFLAGS += -flto
diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c
new file mode 100644
index 000000000..45cfb3b1f
--- /dev/null
+++ b/keyboards/xd96/xd96.c
@@ -0,0 +1,34 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "xd96.h"
+
+#define CAPS_PIN B6
+
+void keyboard_pre_init_kb(void) {
+ setPinOutput(CAPS_PIN);
+
+ keyboard_pre_init_user();
+}
+
+void led_set_kb(uint8_t usb_led) {
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ writePinLow(CAPS_PIN);
+ } else {
+ writePinHigh(CAPS_PIN);
+ }
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/xd96/xd96.h b/keyboards/xd96/xd96.h
new file mode 100644
index 000000000..04c2cc46e
--- /dev/null
+++ b/keyboards/xd96/xd96.h
@@ -0,0 +1,59 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+#define ____ KC_NO
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT_96_ansi( \
+ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \
+ K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219, \
+ K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, \
+ K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K416, K417, K418, K419, \
+ K501, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, \
+ K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \
+) { \
+ { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \
+ { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \
+ { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K419 }, \
+ { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, K414, K416, K417, K418, ____ }, \
+ { K501, ____, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \
+ { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \
+}
+
+#define LAYOUT_96_iso( \
+ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \
+ K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219, \
+ K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K316, K317, K318, \
+ K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419, \
+ K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, \
+ K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \
+) { \
+ { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \
+ { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \
+ { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, K316, K317, K318, K419 }, \
+ { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, ____ }, \
+ { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \
+ { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \
+}
diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md
index eed6ce13e..d1c4e95ae 100644
--- a/keyboards/ymd75/README.md
+++ b/keyboards/ymd75/README.md
@@ -37,7 +37,7 @@ $ brew cask install crosspack-avr
$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
```
-In order to use the `./program` script, which can reboot the board into
+In order to use the `./util/atmega32a_program.py` script, which can reboot the board into
the bootloader, you'll need Python 2 with PyUSB installed:
```
diff --git a/keyboards/ymd75/program b/keyboards/ymd75/program
deleted file mode 100644
index a88d9cd9b..000000000
--- a/keyboards/ymd75/program
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-print('Searching for ps2avrGB... ', end='')
-
-dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-if dev is None:
- raise ValueError('Device not found')
-
-print('Found', end='\n\n')
-
-print('Device Information:')
-print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
-print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
-print('Manufacturer: %s' % (dev.iManufacturer))
-print('Serial: %s' % (dev.iSerialNumber))
-print('Product: %s' % (dev.iProduct), end='\n\n')
-
-print('Transferring control to bootloader... ', end='')
-
-dev.set_configuration()
-
-request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
-USBRQ_HID_SET_REPORT = 0x09
-HID_REPORT_OPTION = 0x0301
-
-
-try:
- dev.ctrl_transfer(
- request_type,
- USBRQ_HID_SET_REPORT,
- HID_REPORT_OPTION,
- 0,
- [0, 0, 0xFF] + [0] * 5
- )
-except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-# wait a bit until bootloader starts up
-time.sleep(2)
-
-print('OK')
-print('Programming...')
-if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
- print('\nDone!')
diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk
index 9697a76f1..9d09d3da9 100644
--- a/keyboards/ymd75/rules.mk
+++ b/keyboards/ymd75/rules.mk
@@ -59,4 +59,4 @@ SRC = matrix.c i2c.c backlight.c
# programming options
-PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c
index 9d0a8261d..3d54c7395 100644
--- a/keyboards/ymd96/keymaps/default/keymap.c
+++ b/keyboards/ymd96/keymaps/default/keymap.c
@@ -16,9 +16,7 @@ You should have received a copy of the GNU General Public LicensezZZ
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ymd96.h"
-#include "action_layer.h"
-#include "rgblight.h"
+#include QMK_KEYBOARD_H
#define ______ KC_TRNS
#define _DEFLT 0
@@ -27,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KEYMAP KEYMAP_DEFAULT
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
+
/* Layer 0, default layer
* | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Print | Home | End |Insert|Delete| PgUp | 19 keys
* | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | PgDn | 18 keys
@@ -36,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys
* | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys
*/
-
+
[_DEFLT] = KEYMAP(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_INSERT, KC_DELETE, KC_PGUP, \
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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_PGDN, \
@@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | | | | |
* | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | |
* | | | | | | |MPrev | | | MNext| | | |
- */
+ */
[_RAISE] = KEYMAP(
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
@@ -61,4 +59,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, KC_MPRV, ______, ______, KC_MNXT, ______, ______ \
)
-}; \ No newline at end of file
+};
diff --git a/keyboards/ymd96/program b/keyboards/ymd96/program
deleted file mode 100644
index a88d9cd9b..000000000
--- a/keyboards/ymd96/program
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-if len(sys.argv) < 2:
- print('Usage: %s <firmware.hex>' % sys.argv[0])
- sys.exit(1)
-
-print('Searching for ps2avrGB... ', end='')
-
-dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-if dev is None:
- raise ValueError('Device not found')
-
-print('Found', end='\n\n')
-
-print('Device Information:')
-print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
-print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
-print('Manufacturer: %s' % (dev.iManufacturer))
-print('Serial: %s' % (dev.iSerialNumber))
-print('Product: %s' % (dev.iProduct), end='\n\n')
-
-print('Transferring control to bootloader... ', end='')
-
-dev.set_configuration()
-
-request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
-USBRQ_HID_SET_REPORT = 0x09
-HID_REPORT_OPTION = 0x0301
-
-
-try:
- dev.ctrl_transfer(
- request_type,
- USBRQ_HID_SET_REPORT,
- HID_REPORT_OPTION,
- 0,
- [0, 0, 0xFF] + [0] * 5
- )
-except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-# wait a bit until bootloader starts up
-time.sleep(2)
-
-print('OK')
-print('Programming...')
-if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0:
- print('\nDone!')
diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h
index e39b06cf6..a5e41116d 100644
--- a/keyboards/zeal60/config.h
+++ b/keyboards/zeal60/config.h
@@ -86,9 +86,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -100,6 +110,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#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 4
// EEPROM usage
diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c
index a965a13bb..d5f206fdc 100644
--- a/keyboards/zeal60/rgb_backlight.c
+++ b/keyboards/zeal60/rgb_backlight.c
@@ -69,15 +69,15 @@ backlight_config g_config = {
.disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS,
.disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED,
.disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT,
- .brightness = 255,
+ .brightness = RGB_BACKLIGHT_BRIGHTNESS,
.effect = RGB_BACKLIGHT_EFFECT,
- .effect_speed = 0,
- .color_1 = { .h = 0, .s = 255 },
- .color_2 = { .h = 127, .s = 255 },
- .caps_lock_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 },
- .layer_1_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 },
- .layer_2_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 },
- .layer_3_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 },
+ .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED,
+ .color_1 = RGB_BACKLIGHT_COLOR_1,
+ .color_2 = RGB_BACKLIGHT_COLOR_2,
+ .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR,
+ .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR,
+ .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR,
+ .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR,
.alphas_mods = {
RGB_BACKLIGHT_ALPHAS_MODS_ROW_0,
RGB_BACKLIGHT_ALPHAS_MODS_ROW_1,
diff --git a/keyboards/zeal60/zeal60_api.h b/keyboards/zeal60/zeal60_api.h
index 8061146fd..048344d71 100644
--- a/keyboards/zeal60/zeal60_api.h
+++ b/keyboards/zeal60/zeal60_api.h
@@ -43,6 +43,7 @@ enum zeal60_command_id
enum zeal60_keyboard_value_id
{
- id_uptime = 0x01
+ id_uptime = 0x01,
+ id_firmware_version
};
diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h
index 7406be865..224fce1f6 100644
--- a/keyboards/zeal65/config.h
+++ b/keyboards/zeal65/config.h
@@ -86,9 +86,19 @@
// disable backlight after timeout in minutes, 0 = no timeout
#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
// the default effect (RGB test)
#define RGB_BACKLIGHT_EFFECT 255
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
// These define which keys in the matrix are alphas/mods
// Used for backlight effects so colors are different for
// alphas vs. mods
@@ -100,6 +110,11 @@
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111110000000011
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#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 4
// EEPROM usage
diff --git a/keyboards/zen/keymaps/default/config.h b/keyboards/zen/keymaps/default/config.h
index 38e4d73f0..d813085e4 100644
--- a/keyboards/zen/keymaps/default/config.h
+++ b/keyboards/zen/keymaps/default/config.h
@@ -15,10 +15,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "config_common.h"
+// place overrides here
/* Use I2C or Serial, not both */
@@ -37,5 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/zen/matrix.c b/keyboards/zen/matrix.c
index 6e274d3ba..34655237b 100644
--- a/keyboards/zen/matrix.c
+++ b/keyboards/zen/matrix.c
@@ -133,7 +133,7 @@ void matrix_init(void)
matrix_debouncing[i] = 0;
}
-
+ matrix_init_quantum();
}
uint8_t _matrix_scan(void)
@@ -264,6 +264,7 @@ uint8_t matrix_scan(void)
TXLED0;
error_count = 0;
}
+ matrix_scan_quantum();
return ret;
}
diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c
index 00d6f5ede..b6e851b15 100644
--- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c
+++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c
@@ -16,24 +16,13 @@
#include QMK_KEYBOARD_H
#include "stanrc85.h"
-//Tap Dance Declarations
-enum {
- TD_WIN = 0,
- TD_ESC
-};
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK),
- [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV)
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi(
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL),
+ KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
[1] = LAYOUT_60_ansi(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
@@ -46,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_DEL,
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS,
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT_60_ansi(
diff --git a/layouts/community/60_ansi/stanrc85-ansi/readme.md b/layouts/community/60_ansi/stanrc85-ansi/readme.md
index 2df5588af..6b5b3ca9f 100644
--- a/layouts/community/60_ansi/stanrc85-ansi/readme.md
+++ b/layouts/community/60_ansi/stanrc85-ansi/readme.md
@@ -1,14 +1,48 @@
-# Stanrc85's Standard ANSI 60% Layout
+<!-- Copyright 2019 Stanrc85
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
-Shared keymap between two 60% PCB:
-- 1upkeyboards60HSE
-- DZ60 (hotswap)
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.-->
+
+# Stanrc85's Standard ANSI 60% Layout
## Keymap Notes
-- Layer 0 is custom ANSI layout with SpaceFN, CTRL/ESC on CAPS, Tap Dance on Fn1 key for CTRL+ALT+DEL and WIN+L
-- Layer 1 is default ANSI (enable with Fn2+D)
-- Layer 2 is F keys, arrows, volume controls and custom shortcuts for AHK
-- Layer 3 is RGB Underglow control and RESET
+- Layer 0 is default QWERTY layout with additional custom features:
+ - SpaceFN to function layer 2 on `Space`
+ - `CTRL` when held and `ESC` when tapped on `CAPS LOCK`
+ - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L`
+ - Tap Dance on `ESC` for `ESC` and ` ` `
+
+![Base QWERTY Layer](https://imgur.com/lGcyLJx.png)
+
+- Layer 1 is default QWERTY with no custom features used mostly for gaming
+ - Enabled by `Fn2+CAPS` from base layer
+
+![Default ANSI Layer](https://imgur.com/M7T9PNT.png)
+
+- Layer 2 is Function layer:
+ - F keys
+ - Arrows
+ - Volume and Media controls
+ - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script
+ - AHK Mic is used to mute/unmute microphone
+ - AHK Speaker switches audio output between headphones and speakers
+
+![Function Layer](https://imgur.com/YPl0JrU.png)
+
+- Layer 3 is RGB control and RESET
+ - `Fn2+CAPS` used to toggle Default QWERTY layer on and off
+
+![RGB and RESET Layer](https://imgur.com/8K7gSgh.png)
### Build
To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`.
diff --git a/layouts/community/ergodox/bepo_alt/keymap.c b/layouts/community/ergodox/bepo_alt/keymap.c
new file mode 100644
index 000000000..fc40afd87
--- /dev/null
+++ b/layouts/community/ergodox/bepo_alt/keymap.c
@@ -0,0 +1,127 @@
+/* Bepo layout for ergodox EZ by Nicolas CARPi (deltablot.com) */
+#include QMK_KEYBOARD_H
+#include "keymap_bepo.h"
+#include "keymap_french.h"
+
+#define BEPO 0 // default layer, for bepo compatible systems
+#define FNAV 1 // function / navigation / mouse layer
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: default layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | $ | " | < | > | ( | ) | @ | | + | - | - | / | * | = | % |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | TAB | B |E_ACUT| P | O |E_GRAV|Backsp| |CapsLo| ^ | V | D | L | J | Z |
+ * |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------|
+ * | W | A | U | I | E | , |------| |------| C | T | S | R | N | M |
+ * |--------+------+------+------+------+------| | | ESCAP------+------+------+------+------+--------|
+ * | SHIFT |E_CIRC | A_GRAV | Y | X | . | K | | | ' | Q | G | H | F | C_CEDIL|
+ * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
+ * |Ctrl|LSuper|LSuper| LSuper| LAlt| | PgUp | PgDwn| |BEPO| Delete | | AltGr| RSuper|RSuper|RCtrl| Enter|
+ * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
+ * | | |Insert| |L_Fnav| | |
+ * | Space|Shift |------| |------|RShift|Enter |
+ * | | |Mouse | | Fn | | |
+ * `--------------------' `--------------------'
+ * df is for temporary stuff and mo is for toggle (momentary)
+ * so mouse is to toggle the mouse mode
+ */
+[BEPO] = LAYOUT_ergodox(
+
+/* Left hand */
+BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT,
+KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC,
+BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA,
+KC_LSHIFT, BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K,
+KC_LCTL, KC_LGUI, KC_LGUI, KC_LGUI, KC_LALT,
+ KC_PGUP, KC_PGDOWN,
+ KC_INS,
+ KC_SPC, KC_LSHIFT, DF(FNAV),
+
+/* Right hand */
+ BP_PLUS, BP_MINUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, BP_PERCENT,
+ KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
+ BP_C, BP_T, BP_S, BP_R, BP_N, BP_M,
+ KC_ESC, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED,
+ KC_ALGR, KC_RGUI, KC_RGUI, KC_RCTL, KC_ENTER,
+DF(BEPO), KC_DEL,
+DF(FNAV),
+MO(FNAV), KC_RSHIFT, KC_ENTER),
+
+/* Keymap 1: function / navigation / mouse layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | F12 |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | | Next |LClick| Up |RClick| WhUp |Backspace| | | PgUp | Home | Up | End | F11 | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | Prev | Left | Down | Right|WhDown|------| |------| Left | Down | Up | Right | F12 | |
+ * |--------+------+------+------+------+------| VolUp| | |------+------+------+------+------+--------|
+ * | Shift | Undo | Cut | Copy | Paste| | | | | | | | | | |
+ * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------'
+ * | ctrl | super | super | alt | | Home | End | | | | | | Alt | | |Ctrl | |
+ * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------'
+ * | | | | | | | |
+ * | | |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+[FNAV] = LAYOUT_ergodox(
+
+/* Left hand */
+KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
+KC_NO, KC_MS_BTN5, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_BSPC,
+KC_NO, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN,
+KC_LSHIFT, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_NO, KC_VOLD,
+KC_LCTL, KC_INS, KC_LGUI, KC_LGUI, KC_LALT,
+ KC_HOME, KC_END,
+ KC_TRNS,
+ KC_NO, KC_TRNS, KC_TRNS,
+
+/* Right hand */
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F12,
+ KC_NO, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_F11, KC_NO,
+ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_F12, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_RALT, KC_TRNS, KC_TRNS, KC_RCTL, KC_NO,
+KC_TRNS, KC_TRNS,
+KC_TRNS,
+KC_TRNS, KC_TRNS, KC_NO),
+};
+
+/* helper function to switch on of the right LED ON/OFF */
+static void indicate_using_led(const uint8_t led, const bool enabled) {
+ if (enabled) {
+ ergodox_right_led_on(led);
+ } else {
+ ergodox_right_led_off(led);
+ }
+}
+
+/* Runs constantly in the background, in a loop */
+void matrix_scan_user(void) {
+
+ /* red led for shift */
+ if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
+ ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
+ indicate_using_led(1, true);
+ } else {
+ indicate_using_led(1, false);
+ }
+
+ /* green led for alt */
+ if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
+ ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
+ indicate_using_led(2, true);
+ } else {
+ indicate_using_led(2, false);
+ }
+
+ /* blue led for function mode */
+ if (IS_LAYER_ON(FNAV)) {
+ indicate_using_led(3, true);
+ } else {
+ indicate_using_led(3, false);
+ }
+};
diff --git a/layouts/community/ergodox/bepo_alt/readme.md b/layouts/community/ergodox/bepo_alt/readme.md
new file mode 100644
index 000000000..c8cc1225c
--- /dev/null
+++ b/layouts/community/ergodox/bepo_alt/readme.md
@@ -0,0 +1,66 @@
+![layer0](https://i.imgur.com/vd4QLBf.png)
+
+![layer1](https://i.imgur.com/eo101eD.png)
+
+# BEPO keymap for the ErgoDox (alternate version)
+
+This keymap has been made for the BEPO layout (https://bepo.fr), which is an ergonomic french keyboard layout based on Dvorak rules. As it's made for french people, the following of this readme will be in french.
+
+Keyboard Maintainer: [Nicolas CARPi](https://github.com/NicolasCARPi)
+
+Hardware Supported: Ergodox EZ
+
+## Disposition BÉPO pour l'ErgoDox
+
+Cette keymap a été adaptée de la keymap "bepo_csa" présente dans le dossier parent.
+
+Certaines modifications ont été apportées pour ressembler un peu plus à une clavier traditionel:
+
+* entrée sur la touche tout en bas à droite (comme la touche entrée du pavé numérique sur un clavier traditionnel)
+* plusieurs touches "Super" pour faciliter son accès
+
+Il y a deux layers, celui de base, et celui avec les flèches, les touches fonction et la souris (main gauche).
+
+## Particularités
+
+* Touches de repos des pouces : "espace" à gauche et "entrée" à droite.
+* Touche Ctrl gauche accessible avec la paume de la main.
+* Touche "w" placée sur la main gauche (j'ai toujours trouvé le "w" difficle d'accès sur un clavier bépo classique.
+* Plusieurs touches F12.
+* Les flèches sont disposées avec un déplacement à la VIM.
+* Un mode souris permet d'utiliser la souris avec le clavier.
+* Possibilité de changer de mode de manière temporaire ou permanente.
+* Les leds s'allument avec SHIFT, ALT ou la touche function.
+
+J'ai fait cette disposition pour mes besoins, à vous de la modifier pour les vôtres ;)
+
+## Utilisation
+
+### Pré-requis
+
+Pour Archlinux, il est nécessaire d'installer ces paquets au préalable:
+
+~~~bash
+sudo pacman -S avr-gcc avr-libc teensy-loader-cli
+~~~
+
+Les paquets "avr" permettent de compiler le firmware, et teensy-loader permet de le charger sur le clavier.
+
+### Compilation
+
+~~~bash
+# clone the repo
+git clone https://github.com/qmk/qmk_firmware
+# install submodules
+make git-submodule
+# compile this layout
+make ergodox_ez:bepo_alt
+~~~
+
+### Chargement
+
+~~~bash
+teensy-loader-cli -w -mmcu=atmega32u4 -v ergodox_ez_bepo_alt.hex && sleep 6 && setxkbmap fr bepo
+~~~
+
+J'ai ajouté un sleep avant la commande pour remettre en bépo afin de laisser au clavier le temps de rebooter.
diff --git a/layouts/community/ergodox/bepo_alt/rules.mk b/layouts/community/ergodox/bepo_alt/rules.mk
new file mode 100644
index 000000000..faca18b54
--- /dev/null
+++ b/layouts/community/ergodox/bepo_alt/rules.mk
@@ -0,0 +1,5 @@
+# Having a file like this allows you to override Makefile definitions
+# for your own particular keymap
+
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+COMMAND_ENABLE = no # Commands for debug and configuration
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index e0100de8f..428706e2d 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -360,15 +360,15 @@ void matrix_scan_keymap(void) { // runs frequently to update info
// Since we're not using the LEDs here for layer indication anymore,
// then lets use them for modifier indicators. Shame we don't have 4...
// Also, no "else", since we want to know each, independently.
- if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1<<USB_LED_CAPS_LOCK) || one_shot & MODS_SHIFT_MASK) {
+ if ( ( modifiers | one_shot ) & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) ) {
ergodox_right_led_2_on();
ergodox_right_led_2_set( 50 );
}
- if (modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) {
+ if ( ( modifiers | one_shot ) & MOD_MASK_CTRL) {
ergodox_right_led_1_on();
ergodox_right_led_1_set( 10 );
}
- if (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) {
+ if ( ( modifiers | one_shot ) & MOD_MASK_ALT) {
ergodox_right_led_3_on();
ergodox_right_led_3_set( 10 );
}
@@ -414,7 +414,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
}
void rgb_matrix_indicators_user(void) {
- if (g_suspend_state || !rgb_matrix_config.enable || !userspace_config.rgb_layer_change) return;
+ if (g_suspend_state || !rgb_matrix_config.enable || !userspace_config.rgb_layer_change) { return; }
switch (biton32(layer_state)) {
case _MODS:
@@ -464,20 +464,20 @@ void rgb_matrix_indicators_user(void) {
}
}
#if 0
- if (this_mod & MODS_SHIFT_MASK || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MODS_SHIFT_MASK) {
+ if (this_mod & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MOD_MASK_SHIFT) {
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
}
- if (this_mod & MODS_CTRL_MASK || this_osm & MODS_CTRL_MASK) {
+ if (this_mod & MOD_MASK_CTRL || this_osm & MOD_MASK_CTRL) {
rgb_matrix_set_color(25, 0xFF, 0x00, 0x00);
rgb_matrix_set_color(34, 0xFF, 0x00, 0x00);
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
}
- if (this_mod & MODS_GUI_MASK || this_osm & MODS_GUI_MASK) {
+ if (this_mod & MOD_MASK_GUI || this_osm & MOD_MASK_GUI) {
rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00);
}
- if (this_mod & MODS_ALT_MASK || this_osm & MODS_ALT_MASK) {
+ if (this_mod & MOD_MASK_ALT || this_osm & MOD_MASK_ALT) {
rgb_matrix_set_color(38, 0x00, 0x00, 0xFF);
}
#endif
diff --git a/layouts/community/ergodox/drashna_glow/README.md b/layouts/community/ergodox/drashna_glow/README.md
deleted file mode 100644
index 7d625a258..000000000
--- a/layouts/community/ergodox/drashna_glow/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Note: This board will not flash if the "g_rgb_leds" const is not set to weak in the ergodox_ez.c file
diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h
index 197acbc4a..a10c4bb29 100644
--- a/layouts/community/ergodox/drashna_glow/config.h
+++ b/layouts/community/ergodox/drashna_glow/config.h
@@ -8,4 +8,14 @@
#undef DEBOUNCE
#define DEBOUNCE 5
+#ifdef RGB_MATRIX_ENABLE
// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
+// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
+// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended
+// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+// #define EECONFIG_RGB_MATRIX (uint32_t *)16
+#endif
+
+#undef DEBOUNCE
+#define DEBOUNCE 1
diff --git a/layouts/community/ergodox/drashna_glow/keymap.c b/layouts/community/ergodox/drashna_glow/keymap.c
index f2fb66545..7d4bdbec5 100644
--- a/layouts/community/ergodox/drashna_glow/keymap.c
+++ b/layouts/community/ergodox/drashna_glow/keymap.c
@@ -1,67 +1,2 @@
/* placeholder file */
#include QMK_KEYBOARD_H
-
-const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
-
- /*{row | col << 4}
- | {x=0..224, y=0..64}
- | | modifier
- | | | */
- {{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right
- {{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2
- {{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3
- {{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4
- {{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5
-
- {{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6
- {{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7
- {{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8
- {{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9
- {{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10
-
- {{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11
- {{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12
- {{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13
- {{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14
- {{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15
-
- {{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16
- {{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17
- {{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18
- {{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19
- {{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20
-
- {{4|(6<<4)}, {24.9*6, 16*2}, 1}, // LED 21
- {{4|(7<<4)}, {24.9*7, 16*2}, 1}, // LED 22
- {{4|(8<<4)}, {24.9*8, 16*2}, 1}, // LED 23
- {{4|(9<<4)}, {24.9*9, 16*2}, 1}, // LED 24
-
- {{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left
- {{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2
- {{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3
- {{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4
- {{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5
-
- {{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6
- {{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7
- {{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8
- {{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9
- {{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10
-
- {{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11
- {{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12
- {{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13
- {{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14
- {{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15
-
- {{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16
- {{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17
- {{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18
- {{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19
- {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20
-
- {{4|(6<<4)}, {24.9*3, 16*2}, 1}, // LED 21
- {{4|(7<<4)}, {24.9*2, 16*2}, 1}, // LED 22
- {{4|(8<<4)}, {24.9*1, 16*2}, 1}, // LED 23
- {{4|(9<<4)}, {24.9*0, 16*2}, 1}, // LED 24
-};
diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c
index 43efc763d..41beeb7e5 100644
--- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c
+++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c
@@ -2,8 +2,9 @@
#include "debug.h"
#include "action_layer.h"
#include "version.h"
-#include "keymap_nordic.h"
-#include "keymap_norwegian.h"
+#include "keymap_swedish.h"
+//#include "keymap_nordic.h"
+//#include "keymap_norwegian.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
@@ -44,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| LT2 | | LT2 |------+------+------+------+------+--------|
* | LShift | Ö | Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
- * | CTRL | L1 |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
+ * | CTRL | L1 |Alt | Left | Right| | Up | Down | [ | ] | ~L1 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
- * | App | LGui | | Alt |Ctrl/Esc|
+ * | App | LGui | | AltShf|Ctrl/Esc|
* ,------|------|------| |------+--------+------.
* | | | Home | | PgUp | | |
* | Space|Backsp|------| |------| Tab |Enter |
@@ -62,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DELT, NO_MINS, KC_COMM, KC_DOT, KC_P, KC_Y, TG(SYMB),
KC_LGUI, KC_A, KC_O, KC_E, KC_U, KC_I,
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(MDIA),
- CTL_T(KC_NO), MO(SYMB), LALT(KC_LSFT), KC_LEFT,KC_RGHT,
+ CTL_T(KC_NO), MO(SYMB), KC_LALT, KC_LEFT,KC_RGHT,
ALT_T(KC_APP), KC_LGUI,
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
@@ -72,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_D, KC_H, KC_T, KC_N, KC_S, NO_AE,
TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT,
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB),
- KC_LALT, CTL_T(KC_ESC),
+ LALT(KC_LSFT), CTL_T(KC_ESC),
KC_PGUP,
KC_PGDN,KC_TAB, KC_ENT
),
@@ -85,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | ( | ) | \ | / |------| |------| > | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | | | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | |
+ * | | ~ | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | . | 0 | = | | |
* `----------------------------------' `----------------------------------'
@@ -103,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS,
KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH,
- KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS,
+ KC_TRNS, NO_TILD, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
@@ -165,11 +166,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
- * | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | |
+ * | | Save |Build |Debug |PrtScr| $ | | | | bool | int |string| dec | Todo | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | | | | | | |------| |------| priv | publ |shared| prot | | |
+ * | | ´ | ' | | | | £ |------| |------| priv | publ |shared| prot | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
- * | | | | | | | | | | const| dim |return|nothin| | |
+ * | | | | | | £ | | | | const| dim |return|nothin| | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
@@ -184,9 +185,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// MEDIA AND MOUSE
[DEVL] = LAYOUT_ergodox(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, ALGR(KC_4), KC_TRNS,
+ KC_TRNS, NO_ACUT, NO_APOS, NO_PIPE, KC_TRNS, ALGR(KC_3),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_5), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
diff --git a/layouts/community/ergodox/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md
index 552fa0e3a..3bedf50d7 100644
--- a/layouts/community/ergodox/dvorak_programmer_swe/readme.md
+++ b/layouts/community/ergodox/dvorak_programmer_swe/readme.md
@@ -13,14 +13,43 @@ TODO:
Known issues:
* Keymap 2 modifier has not gotten its place yet..
-* Print screen, where?
## Changelog
+* 2019-03-11
+ * Added currency $, £, € to keymap 3
+ * Added pipe character to keymap 3
+ * Added the acute accent character to keymap 3
+
+* 2019-03-08
+ * Switched position on Alt and Alt-shift
+ * Added tilde character to symbol layer
+ * Added Print Screen to keymap 3
+ * Added ' (NO_APOS) to keymap 3
+ * Added how to install help in this readme
* 2017-05-16
* Initial release
+
+# How to install - reminder
+0. Docs: https://docs.qmk.fm/#/newbs
+1. Download flashing tool - teensy (from ergodox-ez visual designer)
+2. Setup build environment: https://docs.qmk.fm/#/newbs_getting_started
+
+QUICK HOWTO WSL: (this is not supported anymore it seems, why?)
+The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
+Open "Bash On Ubuntu On Windows" from the start menu.
+Go to the directory where you cloned qmk_firmware. Note that the paths start with /mnt/ in the WSL, so you have to write for example cd /mnt/c/path/to/qmk_firmware.
+Run util/wsl_install.sh and follow the on-screen instructions.
+Close the Bash command window, and re-open it.
+You are ready to compile and flash the firmware!
+
+3. Build the firmware with:
+Run the following in the root qmk folder:
+make KEYBOARD=ergodox_ez KEYMAP=dvorak_programmer_swe
+
+
# Author
Christian Westerlund
cwesterlund @ github
diff --git a/layouts/community/ergodox/dvorak_spanish/readme.md b/layouts/community/ergodox/dvorak_spanish/readme.md
index e075e3cd7..1256c6887 100644
--- a/layouts/community/ergodox/dvorak_spanish/readme.md
+++ b/layouts/community/ergodox/dvorak_spanish/readme.md
@@ -1,5 +1,4 @@
# Ergodox Spanish Dvorak Layout
- * See spanish dvorak layout [here](http://djelibeibi.unex.es/dvorak/)
* Software layout must be set to SPANISH QWERTY to work properly
## Keymap Layers
diff --git a/layouts/community/ergodox/osx_de/readme.md b/layouts/community/ergodox/osx_de/readme.md
index 5011a9dd6..e4ccee3aa 100644
--- a/layouts/community/ergodox/osx_de/readme.md
+++ b/layouts/community/ergodox/osx_de/readme.md
@@ -1,4 +1,4 @@
-#Ergodox EZ für OSX
+# Ergodox EZ für OSX
Dies ist nur ein kleiner Tweak der bestehenden firmware für das ErgoDox-EZ-Keyboard. Leider passte das layout nicht wirklich für OSX, deswegen habe ich einige Anpassungen gemacht. Dabei wurden folgende features umgesetzt:
@@ -14,7 +14,6 @@ Dies ist nur ein kleiner Tweak der bestehenden firmware für das ErgoDox-EZ-Keyb
# Erstellt Mit Dem ErgodoxLayoutGenerator
Der ErgodoxLayoutGenerator ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein.
-Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar).
diff --git a/layouts/community/ergodox/osx_de_experimental/readme.md b/layouts/community/ergodox/osx_de_experimental/readme.md
index e6a101841..dde28eee4 100644
--- a/layouts/community/ergodox/osx_de_experimental/readme.md
+++ b/layouts/community/ergodox/osx_de_experimental/readme.md
@@ -8,7 +8,6 @@ dieses layout ist experimentell und wird im Lufe der Zeit viele Änderungen und
# Erstellt Mit Dem ErgodoxLayoutGenerator
Der ErgodoxLayoutGenerator (ELG) ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein.
-Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar).
---------------------------------------------------------------------------------------------------------------------
# Ergodox and Ergodox-EZ experimental layout
diff --git a/layouts/community/ergodox/teckinesis/readme.md b/layouts/community/ergodox/teckinesis/readme.md
index 6804bb06f..d9b22742c 100644
--- a/layouts/community/ergodox/teckinesis/readme.md
+++ b/layouts/community/ergodox/teckinesis/readme.md
@@ -1,6 +1,6 @@
# teckinesis Layout
-*A blend of TECK and Kinesis layouts, based on ["The Ordinary Layout" by Nicholas Keene](http://qmk.fm/keyboards/ergodox_ez/keymaps/ordinary/#the-ordinary-layout-a-familiar-and-powerful-layout)*
+*A blend of TECK and Kinesis layouts, based on ["The Ordinary Layout" by Nicholas Keene](/layouts/community/ergodox/ordinary)*
I love "The Ordinary Layout", but I still use a [TECK](https://www.trulyergonomic.com/store/index.php)
at the office, and I found the transition back and forth to be a bit more difficult than I expected.
diff --git a/layouts/community/ergodox/tm2030/readme.md b/layouts/community/ergodox/tm2030/readme.md
index 23746ddb7..fce0c46e7 100644
--- a/layouts/community/ergodox/tm2030/readme.md
+++ b/layouts/community/ergodox/tm2030/readme.md
@@ -55,7 +55,7 @@ As on the original TM 2030, when `num` layer is activated, holding `fn` disables
## Dvorak Layer
Same as Layer 0 but with _Dvorak_ layout, to use with QWERTY OS layout.
-Enable Dvorak layout with [`Magic`](/TMK_readme.md#magic-commands)+`1` (`LShift`+`RShift`+`1`), disable with `Magic`-`0`.
+Enable Dvorak layout with [`Magic`](/docs/feature_bootmagic.md)+`1` (`LShift`+`RShift`+`1`), disable with `Magic`-`0`.
The middle (green) led indicates when the Dvorak layer is activated.
diff --git a/layouts/community/numpad_5x6/bjohnson/config.h b/layouts/community/numpad_5x6/bjohnson/config.h
new file mode 100644
index 000000000..fe2cffec7
--- /dev/null
+++ b/layouts/community/numpad_5x6/bjohnson/config.h
@@ -0,0 +1,25 @@
+#pragma once
+
+// #define B6_AUDIO
+
+#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
+#define RGB_DI_PIN B7
+#define RGBLED_NUM 16 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS
+
+#define RGBLIGHT_HUE_STEP 12
+#define RGBLIGHT_SAT_STEP 12
+#define RGBLIGHT_VAL_STEP 12
+#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
+#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
+#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
+
+#define RGBLIGHT_SLEEP
+#endif // RGBLIGHT_ENABLE
+
+#ifdef AUDIO_ENABLE
+#ifdef RGBLIGHT_ENABLE
+#define NO_MUSIC_MODE
+#endif // RGBLIGHT_ENABLE
+#endif // AUDIO_ENABLE
+#define TAP_CODE_DELAY 10
diff --git a/layouts/community/numpad_5x6/bjohnson/keymap.c b/layouts/community/numpad_5x6/bjohnson/keymap.c
new file mode 100644
index 000000000..79e87e69f
--- /dev/null
+++ b/layouts/community/numpad_5x6/bjohnson/keymap.c
@@ -0,0 +1,51 @@
+#include QMK_KEYBOARD_H
+
+extern rgblight_config_t rgblight_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_numpad_5x6(
+ KC_F1, LT(1,KC_F2), KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_F3, KC_F4, KC_P7, KC_P8, KC_P9,
+ KC_F5, KC_F6, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_F7, KC_F8, KC_P1, KC_P2, KC_P3,
+ KC_F9, KC_F10, KC_P0, KC_PDOT, KC_PENT
+ ),
+ [1] = LAYOUT_numpad_5x6(
+ RGB_TOG, _______, _______, _______, _______, RESET,
+ RGB_MOD, RGB_RMOD, _______, _______, _______,
+ RGB_HUI, RGB_HUD, _______, _______, _______, _______,
+ RGB_SAI, RGB_SAD, _______, _______, _______,
+ RGB_VAI, RGB_VAD, _______, _______, _______
+ ),
+};
+
+
+void keyboard_post_init_user(void) {
+#ifdef RGBLIGHT_ENABLE
+ uint8_t temp_mode = rgblight_config.mode;
+ rgblight_enable_noeeprom();
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ for (uint16_t i = 360; i > 0; i--) {
+ rgblight_sethsv_noeeprom( ( i + 180) % 360, 255, 255);
+ wait_ms(8);
+ }
+ led_set_user(host_keyboard_leds());
+ rgblight_mode_noeeprom(temp_mode);
+#endif
+}
+
+void led_set_user(uint8_t usb_led) {
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+ rgblight_sethsv_noeeprom_cyan();
+ } else {
+ rgblight_sethsv_noeeprom_magenta();
+ }
+}
+
+void shutdown_user (void) {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_enable_noeeprom();
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ rgblight_setrgb_red();
+ #endif // RGBLIGHT_ENABLE
+}
diff --git a/layouts/community/numpad_5x6/bjohnson/rules.mk b/layouts/community/numpad_5x6/bjohnson/rules.mk
new file mode 100644
index 000000000..d370da7f1
--- /dev/null
+++ b/layouts/community/numpad_5x6/bjohnson/rules.mk
@@ -0,0 +1,5 @@
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
+BACKLIGHT_ENABLE = no
+NO_SECRETS = yes
+BOOTMAGIC_ENABLE = lite
diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h
new file mode 100644
index 000000000..ec66940e0
--- /dev/null
+++ b/layouts/community/numpad_5x6/drashna/config.h
@@ -0,0 +1,18 @@
+#pragma once
+
+// #define B6_AUDIO
+
+#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
+#define RGB_DI_PIN B1
+#define RGBLED_NUM 16 // Number of LEDs
+
+#define RGBLIGHT_HUE_STEP 12
+#define RGBLIGHT_SAT_STEP 12
+#define RGBLIGHT_VAL_STEP 12
+#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
+#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
+#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
+#endif // RGBLIGHT_ENABLE
+
+
+#define TAP_CODE_DELAY 10
diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c
new file mode 100644
index 000000000..646f4db33
--- /dev/null
+++ b/layouts/community/numpad_5x6/drashna/keymap.c
@@ -0,0 +1,22 @@
+#include QMK_KEYBOARD_H
+#include "drashna.h"
+
+#define F2_MCRO LT(_GAMEPAD, KC_F2)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_NUMLOCK] = LAYOUT_numpad_5x6(
+ KC_F1, F2_MCRO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_F3, KC_F4, KC_P7, KC_P8, KC_P9,
+ KC_F5, KC_F6, KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_F7, KC_F8, KC_P1, KC_P2, KC_P3,
+ KC_F9, KC_COLN, KC_P0, KC_PDOT, KC_PENT
+ ),
+
+ [_GAMEPAD] = LAYOUT_numpad_5x6(
+ RGB_TOG, _______, _______, EEP_RST, KC_MAKE, RESET,
+ RGB_MOD, RGB_RMOD, _______, _______, _______,
+ RGB_HUI, RGB_HUD, _______, _______, _______, _______,
+ RGB_SAI, RGB_SAD, _______, _______, _______,
+ RGB_VAI, RGB_VAD, _______, _______, _______
+ ),
+};
diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk
new file mode 100644
index 000000000..ed6fa8c79
--- /dev/null
+++ b/layouts/community/numpad_5x6/drashna/rules.mk
@@ -0,0 +1,9 @@
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
+BACKLIGHT_ENABLE = no
+NO_SECRETS = yes
+BOOTMAGIC_ENABLE = lite
+INDICATOR_LIGHTS = no
+RGBLIGHT_TWINKLE = yes
+MACROS_ENABLED = no
+MAKE_BOOTLOADER = yes
diff --git a/layouts/community/numpad_5x6/layout.json b/layouts/community/numpad_5x6/layout.json
new file mode 100644
index 000000000..7264cd5a6
--- /dev/null
+++ b/layouts/community/numpad_5x6/layout.json
@@ -0,0 +1,6 @@
+["","","",""],
+[{y:0.5},"","","",""],
+["","","",{h:2},""],
+["","",""],
+["","","",{h:2},""],
+[{w:2},"",""]
diff --git a/layouts/community/numpad_5x6/readme.md b/layouts/community/numpad_5x6/readme.md
new file mode 100644
index 000000000..147097c83
--- /dev/null
+++ b/layouts/community/numpad_5x6/readme.md
@@ -0,0 +1,3 @@
+# numpad_5x6
+
+ LAYOUT_numpad_5x6
diff --git a/layouts/community/ortho_4x12/bakingpy/config.h b/layouts/community/ortho_4x12/bakingpy/config.h
index b6b2ac577..a153adffb 100644
--- a/layouts/community/ortho_4x12/bakingpy/config.h
+++ b/layouts/community/ortho_4x12/bakingpy/config.h
@@ -10,6 +10,7 @@
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
+#define RGBLED_SPLIT { 6, 6 }
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
diff --git a/layouts/community/ortho_4x12/bakingpy/rules.mk b/layouts/community/ortho_4x12/bakingpy/rules.mk
index 9be2f01d4..17a589cd1 100644
--- a/layouts/community/ortho_4x12/bakingpy/rules.mk
+++ b/layouts/community/ortho_4x12/bakingpy/rules.mk
@@ -1,12 +1,13 @@
-# Enable RGB if not a Planck
-ifeq ($(LAYOUTS_HAS_RGB),yes)
+ifneq ($(LAYOUTS_HAS_RGB), no)
RGBLIGHT_ENABLE = yes
endif
AUDIO_ENABLE = no
ifeq ($(strip $(KEYBOARD)), zlant)
BACKLIGHT_ENABLE = no
else ifeq ($(strip $(KEYBOARD)), 40percentclub/4x4)
- BACKLIGHT_ENABLE = no
+ BACKLIGHT_ENABLE = no
+else ifneq (, $(findstring lets_split, $(KEYBOARD)))
+ BACKLIGHT_ENABLE = no
else
BACKLIGHT_ENABLE = yes
endif
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index 55862aec3..1858ee3a4 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -2,9 +2,9 @@
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
-#define RGB_DI_PIN D3
-#define RGBLED_NUM 16 // Number of LEDs
-
+#define RGB_DI_PIN B3
+#define RGBLED_NUM 13 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 12
#define RGBLIGHT_SAT_STEP 12
#define RGBLIGHT_VAL_STEP 12
@@ -17,10 +17,9 @@
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
-// #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
+#define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-// #define EECONFIG_RGB_MATRIX (uint32_t *)16
+#define EECONFIG_RGB_MATRIX (uint32_t *)15
#endif
#if defined(KEYBOARD_lets_split_rev2)
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index f5ead81da..28da1b204 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -19,7 +19,12 @@
#ifdef RGB_MATRIX_ENABLE
extern bool g_suspend_state;
+extern rgb_config_t rgb_matrix_config;
#endif
+#ifdef RGBLIGHT_ENABLE
+extern rgblight_config_t rgblight_config;
+#endif
+
#ifdef BACKLIGHT_ENABLE
enum planck_keycodes {
@@ -162,13 +167,13 @@ bool music_mask_user(uint16_t keycode) {
#ifdef RGB_MATRIX_ENABLE
-void suspend_power_down_keymap(void)
-{
+void suspend_power_down_keymap(void) {
rgb_matrix_set_suspend_state(true);
+ rgb_matrix_config.enable = false;
}
-void suspend_wakeup_init_keymap(void)
-{
+void suspend_wakeup_init_keymap(void) {
+ rgb_matrix_config.enable = true;
rgb_matrix_set_suspend_state(false);
}
@@ -188,7 +193,14 @@ void rgb_matrix_indicators_user(void) {
uint8_t this_mod = get_mods();
uint8_t this_led = host_keyboard_leds();
uint8_t this_osm = get_oneshot_mods();
- if (!g_suspend_state) {
+
+ if (!g_suspend_state && userspace_config.rgb_layer_change &&
+#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
+ (!rgblight_config.enable && rgb_matrix_config.enable)
+#else
+ rgb_matrix_config.enable
+#endif
+ ) {
switch (biton32(layer_state)) {
case _RAISE:
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
@@ -228,27 +240,26 @@ void rgb_matrix_indicators_user(void) {
case _WORKMAN:
rgb_matrix_set_color(42, 0xD9, 0xA5, 0x21); break;
}
-
- if (this_mod & MODS_SHIFT_MASK || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MODS_SHIFT_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK)) {
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
}
- if (this_mod & MODS_CTRL_MASK || this_osm & MODS_CTRL_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_CTRL) {
rgb_matrix_set_color(25, 0xFF, 0x00, 0x00);
rgb_matrix_set_color(34, 0xFF, 0x00, 0x00);
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
}
- if (this_mod & MODS_GUI_MASK || this_osm & MODS_GUI_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_GUI) {
rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00);
}
- if (this_mod & MODS_ALT_MASK || this_osm & MODS_ALT_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_ALT) {
rgb_matrix_set_color(38, 0x00, 0x00, 0xFF);
}
}
void matrix_init_keymap(void) {
- rgblight_mode(RGB_MATRIX_MULTISPLASH);
+ // rgblight_mode(RGB_MATRIX_MULTISPLASH);
}
#else //RGB_MATRIX_INIT
@@ -290,15 +301,13 @@ void encoder_update(bool clockwise) {
#endif // ENCODER_ENABLE
#ifdef KEYBOARD_planck_rev6
-extern audio_config_t audio_config;
-
void dip_update(uint8_t index, bool active) {
switch (index) {
case 0:
- audio_config.enable = active;
+ if(active) { audio_on(); } else { audio_off(); }
break;
case 1:
- audio_config.clicky_enable = active;
+ if(active) { clicky_on(); } else { clicky_off(); }
break;
case 2:
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active;
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk
index a5429b8ff..f88043267 100644
--- a/layouts/community/ortho_4x12/drashna/rules.mk
+++ b/layouts/community/ortho_4x12/drashna/rules.mk
@@ -12,7 +12,7 @@ ifeq (,$(findstring planck/rev6,$(KEYBOARD))) # Make sure it's NOT the Planck Re
endif
ifneq (,$(findstring planck/light,$(KEYBOARD))) # Make sure it IS the Planck Light
RGB_MATRIX_ENABLE = yes
- RGBLIGHT_ENABLE = no
+ RGBLIGHT_ENABLE = yes
endif
ifeq ($(strip $(PROTOCOL)), VUSB)
diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c
index 2c622cb95..02fc79ec7 100644
--- a/layouts/community/ortho_4x12/jotix/keymap.c
+++ b/layouts/community/ortho_4x12/jotix/keymap.c
@@ -13,16 +13,10 @@ extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
-#define _FUNCTION 3
-#define _ADJUST 4
-
-enum custom_keycodes {
- BACKLIT = SAFE_RANGE
-};
+#define _ADJUST 3
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
-#define FUNCT LT(_FUNCTION, KC_TAB)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -30,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | esc | Q | W | E | R | T | Y | U | I | O | P | bksp |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | func | A | S | D | F | G | H | J | K | L | ; | del |
+ * | tab | A | S | D | F | G | H | J | K | L | ; | ' |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
@@ -39,71 +33,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_QWERTY] = LAYOUT_ortho_4x12 (
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- FUNCT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
/* Lower
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | vol- | mute | vol+ | | | | | | | | |
+ * | | - | = | [ | ] | \ | | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | prev | play | next | | | | CapsLk | | | | |
+ * | | vol- | mute | vol+ | | | | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | | | | | | | | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
*/
[_LOWER] = LAYOUT_ortho_4x12 (
- _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ 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_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______,
_______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_CAPS, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/* Raise
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | | | | | \ | ` | - | = | [ | ] | ' |
+ * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | | | | | | | ~ | _ | + | { | } | " |
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | | | | | | | | home | pgdn | pgun | end |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
*/
[_RAISE] = LAYOUT_ortho_4x12 (
- _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
- _______, _______, _______, _______, _______, KC_BSLS, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT,
- _______, _______, _______, _______, _______, KC_PIPE, KC_TILD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DQUO,
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
-/*
- * Function
- * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | F1 | F2 | F3 | F4 | | | P7 | P8 | P9 | P- | |
- * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | F5 | F6 | F7 | F8 | | | P4 | P5 | P6 | P+ | |
- * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | F9 | F10 | F11 | F12 | | NumLck | P1 | P2 | P3 | P/ | Penter |
- * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- * | | | | | | | | | P0 | Pdot | P* | |
- * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
- */
-[_FUNCTION] = LAYOUT_ortho_4x12 (
- _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PMNS, _______,
- _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
- _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PENT,
- _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PAST, XXXXXXX
-),
-
/* Adjust */
[_ADJUST] = LAYOUT_ortho_4x12 (
- _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, BACKLIT, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
@@ -115,23 +90,3 @@ uint32_t layer_state_set_user(uint32_t state) {
void matrix_init_user(void) {
}
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
-
- case BACKLIT:
- if (record->event.pressed) {
- register_code(KC_RSFT);
- #ifdef BACKLIGHT_ENABLE
- backlight_step();
- #endif
- } else {
- unregister_code(KC_RSFT);
- }
- return false;
- break;
-
- default:
- return true;
-
- }
-}
diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md
index 608944801..11af9ed1e 100644
--- a/layouts/community/ortho_4x12/jotix/readme.md
+++ b/layouts/community/ortho_4x12/jotix/readme.md
@@ -1,8 +1,6 @@
# Jotix ortho 4x12 keymap
-![keymap](https://i.imgur.com/7hGJJPs.jpg)
-
-Tab is 'Func' on hold.
+![keymap](https://i.imgur.com/1NxoqW6.png)
Tested on:
diff --git a/layouts/community/ortho_4x12/jotix2/keymap.c b/layouts/community/ortho_4x12/jotix2/keymap.c
new file mode 100644
index 000000000..636476488
--- /dev/null
+++ b/layouts/community/ortho_4x12/jotix2/keymap.c
@@ -0,0 +1,87 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _GAME 3
+#define _ADJUST 4
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+#define GAME TG(_GAME)
+
+/* Funct
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | ' | | | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | | | | | | | | home | vol- | vol+ | end |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+#define _FUNCT LAYOUT_ortho_4x12 (\
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_QUOT, _______, _______, _______, _______,\
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_VOLD, KC_VOLU, KC_END\
+)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | tab | A | S | D | F | G | H | J | K | L | ; | del |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | lctrl | lgui | lalt | ralt | funct | space | space | funct | left | down | up | right |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+[_QWERTY] = LAYOUT_ortho_4x12 (
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[_LOWER] = _FUNCT,
+
+[_RAISE] = _FUNCT,
+
+/* Game */
+[_GAME] = LAYOUT_ortho_4x12 (
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+),
+
+/* Adjust */
+[_ADJUST] = LAYOUT_ortho_4x12 (
+ _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, GAME, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+void matrix_init_user(void) {
+}
diff --git a/layouts/community/ortho_4x12/jotix2/readme.md b/layouts/community/ortho_4x12/jotix2/readme.md
new file mode 100644
index 000000000..b023227a7
--- /dev/null
+++ b/layouts/community/ortho_4x12/jotix2/readme.md
@@ -0,0 +1,8 @@
+# Jotix2 ortho 4x12 keymap
+
+![keymap](https://i.imgur.com/WMfIpH3.jpg)
+
+Tested on:
+
+* Planck/rev4
+* Jotanck
diff --git a/lib/lib8tion/LICENSE b/lib/lib8tion/LICENSE
new file mode 100644
index 000000000..ebe476330
--- /dev/null
+++ b/lib/lib8tion/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 FastLED
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/lib/lib8tion/lib8tion.c b/lib/lib8tion/lib8tion.c
new file mode 100644
index 000000000..84b3e9c61
--- /dev/null
+++ b/lib/lib8tion/lib8tion.c
@@ -0,0 +1,242 @@
+#define FASTLED_INTERNAL
+#include <stdint.h>
+
+#define RAND16_SEED 1337
+uint16_t rand16seed = RAND16_SEED;
+
+
+// memset8, memcpy8, memmove8:
+// optimized avr replacements for the standard "C" library
+// routines memset, memcpy, and memmove.
+//
+// There are two techniques that make these routines
+// faster than the standard avr-libc routines.
+// First, the loops are unrolled 2X, meaning that
+// the average loop overhead is cut in half.
+// And second, the compare-and-branch at the bottom
+// of each loop decrements the low byte of the
+// counter, and if the carry is clear, it branches
+// back up immediately. Only if the low byte math
+// causes carry do we bother to decrement the high
+// byte and check that result for carry as well.
+// Results for a 100-byte buffer are 20-40% faster
+// than standard avr-libc, at a cost of a few extra
+// bytes of code.
+
+#if defined(__AVR__)
+//__attribute__ ((noinline))
+void * memset8 ( void * ptr, uint8_t val, uint16_t num )
+{
+ asm volatile(
+ " movw r26, %[ptr] \n\t"
+ " sbrs %A[num], 0 \n\t"
+ " rjmp Lseteven_%= \n\t"
+ " rjmp Lsetodd_%= \n\t"
+ "Lsetloop_%=: \n\t"
+ " st X+, %[val] \n\t"
+ "Lsetodd_%=: \n\t"
+ " st X+, %[val] \n\t"
+ "Lseteven_%=: \n\t"
+ " subi %A[num], 2 \n\t"
+ " brcc Lsetloop_%= \n\t"
+ " sbci %B[num], 0 \n\t"
+ " brcc Lsetloop_%= \n\t"
+ : [num] "+r" (num)
+ : [ptr] "r" (ptr),
+ [val] "r" (val)
+ : "memory"
+ );
+ return ptr;
+}
+
+
+
+//__attribute__ ((noinline))
+void * memcpy8 ( void * dst, const void* src, uint16_t num )
+{
+ asm volatile(
+ " movw r30, %[src] \n\t"
+ " movw r26, %[dst] \n\t"
+ " sbrs %A[num], 0 \n\t"
+ " rjmp Lcpyeven_%= \n\t"
+ " rjmp Lcpyodd_%= \n\t"
+ "Lcpyloop_%=: \n\t"
+ " ld __tmp_reg__, Z+ \n\t"
+ " st X+, __tmp_reg__ \n\t"
+ "Lcpyodd_%=: \n\t"
+ " ld __tmp_reg__, Z+ \n\t"
+ " st X+, __tmp_reg__ \n\t"
+ "Lcpyeven_%=: \n\t"
+ " subi %A[num], 2 \n\t"
+ " brcc Lcpyloop_%= \n\t"
+ " sbci %B[num], 0 \n\t"
+ " brcc Lcpyloop_%= \n\t"
+ : [num] "+r" (num)
+ : [src] "r" (src),
+ [dst] "r" (dst)
+ : "memory"
+ );
+ return dst;
+}
+
+//__attribute__ ((noinline))
+void * memmove8 ( void * dst, const void* src, uint16_t num )
+{
+ if( src > dst) {
+ // if src > dst then we can use the forward-stepping memcpy8
+ return memcpy8( dst, src, num);
+ } else {
+ // if src < dst then we have to step backward:
+ dst = (char*)dst + num;
+ src = (char*)src + num;
+ asm volatile(
+ " movw r30, %[src] \n\t"
+ " movw r26, %[dst] \n\t"
+ " sbrs %A[num], 0 \n\t"
+ " rjmp Lmoveven_%= \n\t"
+ " rjmp Lmovodd_%= \n\t"
+ "Lmovloop_%=: \n\t"
+ " ld __tmp_reg__, -Z \n\t"
+ " st -X, __tmp_reg__ \n\t"
+ "Lmovodd_%=: \n\t"
+ " ld __tmp_reg__, -Z \n\t"
+ " st -X, __tmp_reg__ \n\t"
+ "Lmoveven_%=: \n\t"
+ " subi %A[num], 2 \n\t"
+ " brcc Lmovloop_%= \n\t"
+ " sbci %B[num], 0 \n\t"
+ " brcc Lmovloop_%= \n\t"
+ : [num] "+r" (num)
+ : [src] "r" (src),
+ [dst] "r" (dst)
+ : "memory"
+ );
+ return dst;
+ }
+}
+
+#endif /* AVR */
+
+
+
+
+#if 0
+// TEST / VERIFICATION CODE ONLY BELOW THIS POINT
+#include <Arduino.h>
+#include "lib8tion.h"
+
+void test1abs( int8_t i)
+{
+ Serial.print("abs("); Serial.print(i); Serial.print(") = ");
+ int8_t j = abs8(i);
+ Serial.print(j); Serial.println(" ");
+}
+
+void testabs()
+{
+ delay(5000);
+ for( int8_t q = -128; q != 127; q++) {
+ test1abs(q);
+ }
+ for(;;){};
+}
+
+
+void testmul8()
+{
+ delay(5000);
+ byte r, c;
+
+ Serial.println("mul8:");
+ for( r = 0; r <= 20; r += 1) {
+ Serial.print(r); Serial.print(" : ");
+ for( c = 0; c <= 20; c += 1) {
+ byte t;
+ t = mul8( r, c);
+ Serial.print(t); Serial.print(' ');
+ }
+ Serial.println(' ');
+ }
+ Serial.println("done.");
+ for(;;){};
+}
+
+
+void testscale8()
+{
+ delay(5000);
+ byte r, c;
+
+ Serial.println("scale8:");
+ for( r = 0; r <= 240; r += 10) {
+ Serial.print(r); Serial.print(" : ");
+ for( c = 0; c <= 240; c += 10) {
+ byte t;
+ t = scale8( r, c);
+ Serial.print(t); Serial.print(' ');
+ }
+ Serial.println(' ');
+ }
+
+ Serial.println(' ');
+ Serial.println("scale8_video:");
+
+ for( r = 0; r <= 100; r += 4) {
+ Serial.print(r); Serial.print(" : ");
+ for( c = 0; c <= 100; c += 4) {
+ byte t;
+ t = scale8_video( r, c);
+ Serial.print(t); Serial.print(' ');
+ }
+ Serial.println(' ');
+ }
+
+ Serial.println("done.");
+ for(;;){};
+}
+
+
+
+void testqadd8()
+{
+ delay(5000);
+ byte r, c;
+ for( r = 0; r <= 240; r += 10) {
+ Serial.print(r); Serial.print(" : ");
+ for( c = 0; c <= 240; c += 10) {
+ byte t;
+ t = qadd8( r, c);
+ Serial.print(t); Serial.print(' ');
+ }
+ Serial.println(' ');
+ }
+ Serial.println("done.");
+ for(;;){};
+}
+
+void testnscale8x3()
+{
+ delay(5000);
+ byte r, g, b, sc;
+ for( byte z = 0; z < 10; z++) {
+ r = random8(); g = random8(); b = random8(); sc = random8();
+
+ Serial.print("nscale8x3_video( ");
+ Serial.print(r); Serial.print(", ");
+ Serial.print(g); Serial.print(", ");
+ Serial.print(b); Serial.print(", ");
+ Serial.print(sc); Serial.print(") = [ ");
+
+ nscale8x3_video( r, g, b, sc);
+
+ Serial.print(r); Serial.print(", ");
+ Serial.print(g); Serial.print(", ");
+ Serial.print(b); Serial.print("]");
+
+ Serial.println(' ');
+ }
+ Serial.println("done.");
+ for(;;){};
+}
+
+#endif
diff --git a/lib/lib8tion/lib8tion.h b/lib/lib8tion/lib8tion.h
new file mode 100644
index 000000000..d93c748e6
--- /dev/null
+++ b/lib/lib8tion/lib8tion.h
@@ -0,0 +1,934 @@
+#ifndef __INC_LIB8TION_H
+#define __INC_LIB8TION_H
+
+/*
+
+ Fast, efficient 8-bit math functions specifically
+ designed for high-performance LED programming.
+
+ Because of the AVR(Arduino) and ARM assembly language
+ implementations provided, using these functions often
+ results in smaller and faster code than the equivalent
+ program using plain "C" arithmetic and logic.
+
+
+ Included are:
+
+
+ - Saturating unsigned 8-bit add and subtract.
+ Instead of wrapping around if an overflow occurs,
+ these routines just 'clamp' the output at a maxumum
+ of 255, or a minimum of 0. Useful for adding pixel
+ values. E.g., qadd8( 200, 100) = 255.
+
+ qadd8( i, j) == MIN( (i + j), 0xFF )
+ qsub8( i, j) == MAX( (i - j), 0 )
+
+ - Saturating signed 8-bit ("7-bit") add.
+ qadd7( i, j) == MIN( (i + j), 0x7F)
+
+
+ - Scaling (down) of unsigned 8- and 16- bit values.
+ Scaledown value is specified in 1/256ths.
+ scale8( i, sc) == (i * sc) / 256
+ scale16by8( i, sc) == (i * sc) / 256
+
+ Example: scaling a 0-255 value down into a
+ range from 0-99:
+ downscaled = scale8( originalnumber, 100);
+
+ A special version of scale8 is provided for scaling
+ LED brightness values, to make sure that they don't
+ accidentally scale down to total black at low
+ dimming levels, since that would look wrong:
+ scale8_video( i, sc) = ((i * sc) / 256) +? 1
+
+ Example: reducing an LED brightness by a
+ dimming factor:
+ new_bright = scale8_video( orig_bright, dimming);
+
+
+ - Fast 8- and 16- bit unsigned random numbers.
+ Significantly faster than Arduino random(), but
+ also somewhat less random. You can add entropy.
+ random8() == random from 0..255
+ random8( n) == random from 0..(N-1)
+ random8( n, m) == random from N..(M-1)
+
+ random16() == random from 0..65535
+ random16( n) == random from 0..(N-1)
+ random16( n, m) == random from N..(M-1)
+
+ random16_set_seed( k) == seed = k
+ random16_add_entropy( k) == seed += k
+
+
+ - Absolute value of a signed 8-bit value.
+ abs8( i) == abs( i)
+
+
+ - 8-bit math operations which return 8-bit values.
+ These are provided mostly for completeness,
+ not particularly for performance.
+ mul8( i, j) == (i * j) & 0xFF
+ add8( i, j) == (i + j) & 0xFF
+ sub8( i, j) == (i - j) & 0xFF
+
+
+ - Fast 16-bit approximations of sin and cos.
+ Input angle is a uint16_t from 0-65535.
+ Output is a signed int16_t from -32767 to 32767.
+ sin16( x) == sin( (x/32768.0) * pi) * 32767
+ cos16( x) == cos( (x/32768.0) * pi) * 32767
+ Accurate to more than 99% in all cases.
+
+ - Fast 8-bit approximations of sin and cos.
+ Input angle is a uint8_t from 0-255.
+ Output is an UNsigned uint8_t from 0 to 255.
+ sin8( x) == (sin( (x/128.0) * pi) * 128) + 128
+ cos8( x) == (cos( (x/128.0) * pi) * 128) + 128
+ Accurate to within about 2%.
+
+
+ - Fast 8-bit "easing in/out" function.
+ ease8InOutCubic(x) == 3(x^i) - 2(x^3)
+ ease8InOutApprox(x) ==
+ faster, rougher, approximation of cubic easing
+ ease8InOutQuad(x) == quadratic (vs cubic) easing
+
+ - Cubic, Quadratic, and Triangle wave functions.
+ Input is a uint8_t representing phase withing the wave,
+ similar to how sin8 takes an angle 'theta'.
+ Output is a uint8_t representing the amplitude of
+ the wave at that point.
+ cubicwave8( x)
+ quadwave8( x)
+ triwave8( x)
+
+ - Square root for 16-bit integers. About three times
+ faster and five times smaller than Arduino's built-in
+ generic 32-bit sqrt routine.
+ sqrt16( uint16_t x ) == sqrt( x)
+
+ - Dimming and brightening functions for 8-bit
+ light values.
+ dim8_video( x) == scale8_video( x, x)
+ dim8_raw( x) == scale8( x, x)
+ dim8_lin( x) == (x<128) ? ((x+1)/2) : scale8(x,x)
+ brighten8_video( x) == 255 - dim8_video( 255 - x)
+ brighten8_raw( x) == 255 - dim8_raw( 255 - x)
+ brighten8_lin( x) == 255 - dim8_lin( 255 - x)
+ The dimming functions in particular are suitable
+ for making LED light output appear more 'linear'.
+
+
+ - Linear interpolation between two values, with the
+ fraction between them expressed as an 8- or 16-bit
+ fixed point fraction (fract8 or fract16).
+ lerp8by8( fromU8, toU8, fract8 )
+ lerp16by8( fromU16, toU16, fract8 )
+ lerp15by8( fromS16, toS16, fract8 )
+ == from + (( to - from ) * fract8) / 256)
+ lerp16by16( fromU16, toU16, fract16 )
+ == from + (( to - from ) * fract16) / 65536)
+ map8( in, rangeStart, rangeEnd)
+ == map( in, 0, 255, rangeStart, rangeEnd);
+
+ - Optimized memmove, memcpy, and memset, that are
+ faster than standard avr-libc 1.8.
+ memmove8( dest, src, bytecount)
+ memcpy8( dest, src, bytecount)
+ memset8( buf, value, bytecount)
+
+ - Beat generators which return sine or sawtooth
+ waves in a specified number of Beats Per Minute.
+ Sine wave beat generators can specify a low and
+ high range for the output. Sawtooth wave beat
+ generators always range 0-255 or 0-65535.
+ beatsin8( BPM, low8, high8)
+ = (sine(beatphase) * (high8-low8)) + low8
+ beatsin16( BPM, low16, high16)
+ = (sine(beatphase) * (high16-low16)) + low16
+ beatsin88( BPM88, low16, high16)
+ = (sine(beatphase) * (high16-low16)) + low16
+ beat8( BPM) = 8-bit repeating sawtooth wave
+ beat16( BPM) = 16-bit repeating sawtooth wave
+ beat88( BPM88) = 16-bit repeating sawtooth wave
+ BPM is beats per minute in either simple form
+ e.g. 120, or Q8.8 fixed-point form.
+ BPM88 is beats per minute in ONLY Q8.8 fixed-point
+ form.
+
+Lib8tion is pronounced like 'libation': lie-BAY-shun
+
+*/
+
+
+
+#include <stdint.h>
+
+#define LIB8STATIC __attribute__ ((unused)) static inline
+#define LIB8STATIC_ALWAYS_INLINE __attribute__ ((always_inline)) static inline
+
+#if !defined(__AVR__)
+#include <string.h>
+// for memmove, memcpy, and memset if not defined here
+#endif
+
+#if defined(__arm__)
+
+#if defined(FASTLED_TEENSY3)
+// Can use Cortex M4 DSP instructions
+#define QADD8_C 0
+#define QADD7_C 0
+#define QADD8_ARM_DSP_ASM 1
+#define QADD7_ARM_DSP_ASM 1
+#else
+// Generic ARM
+#define QADD8_C 1
+#define QADD7_C 1
+#endif
+
+#define QSUB8_C 1
+#define SCALE8_C 1
+#define SCALE16BY8_C 1
+#define SCALE16_C 1
+#define ABS8_C 1
+#define MUL8_C 1
+#define QMUL8_C 1
+#define ADD8_C 1
+#define SUB8_C 1
+#define EASE8_C 1
+#define AVG8_C 1
+#define AVG7_C 1
+#define AVG16_C 1
+#define AVG15_C 1
+#define BLEND8_C 1
+
+
+#elif defined(__AVR__)
+
+// AVR ATmega and friends Arduino
+
+#define QADD8_C 0
+#define QADD7_C 0
+#define QSUB8_C 0
+#define ABS8_C 0
+#define ADD8_C 0
+#define SUB8_C 0
+#define AVG8_C 0
+#define AVG7_C 0
+#define AVG16_C 0
+#define AVG15_C 0
+
+#define QADD8_AVRASM 1
+#define QADD7_AVRASM 1
+#define QSUB8_AVRASM 1
+#define ABS8_AVRASM 1
+#define ADD8_AVRASM 1
+#define SUB8_AVRASM 1
+#define AVG8_AVRASM 1
+#define AVG7_AVRASM 1
+#define AVG16_AVRASM 1
+#define AVG15_AVRASM 1
+
+// Note: these require hardware MUL instruction
+// -- sorry, ATtiny!
+#if !defined(LIB8_ATTINY)
+#define SCALE8_C 0
+#define SCALE16BY8_C 0
+#define SCALE16_C 0
+#define MUL8_C 0
+#define QMUL8_C 0
+#define EASE8_C 0
+#define BLEND8_C 0
+#define SCALE8_AVRASM 1
+#define SCALE16BY8_AVRASM 1
+#define SCALE16_AVRASM 1
+#define MUL8_AVRASM 1
+#define QMUL8_AVRASM 1
+#define EASE8_AVRASM 1
+#define CLEANUP_R1_AVRASM 1
+#define BLEND8_AVRASM 1
+#else
+// On ATtiny, we just use C implementations
+#define SCALE8_C 1
+#define SCALE16BY8_C 1
+#define SCALE16_C 1
+#define MUL8_C 1
+#define QMUL8_C 1
+#define EASE8_C 1
+#define BLEND8_C 1
+#define SCALE8_AVRASM 0
+#define SCALE16BY8_AVRASM 0
+#define SCALE16_AVRASM 0
+#define MUL8_AVRASM 0
+#define QMUL8_AVRASM 0
+#define EASE8_AVRASM 0
+#define BLEND8_AVRASM 0
+#endif
+
+#else
+
+// unspecified architecture, so
+// no ASM, everything in C
+#define QADD8_C 1
+#define QADD7_C 1
+#define QSUB8_C 1
+#define SCALE8_C 1
+#define SCALE16BY8_C 1
+#define SCALE16_C 1
+#define ABS8_C 1
+#define MUL8_C 1
+#define QMUL8_C 1
+#define ADD8_C 1
+#define SUB8_C 1
+#define EASE8_C 1
+#define AVG8_C 1
+#define AVG7_C 1
+#define AVG16_C 1
+#define AVG15_C 1
+#define BLEND8_C 1
+
+#endif
+
+///@defgroup lib8tion Fast math functions
+///A variety of functions for working with numbers.
+///@{
+
+
+///////////////////////////////////////////////////////////////////////
+//
+// typdefs for fixed-point fractional types.
+//
+// sfract7 should be interpreted as signed 128ths.
+// fract8 should be interpreted as unsigned 256ths.
+// sfract15 should be interpreted as signed 32768ths.
+// fract16 should be interpreted as unsigned 65536ths.
+//
+// Example: if a fract8 has the value "64", that should be interpreted
+// as 64/256ths, or one-quarter.
+//
+//
+// fract8 range is 0 to 0.99609375
+// in steps of 0.00390625
+//
+// sfract7 range is -0.9921875 to 0.9921875
+// in steps of 0.0078125
+//
+// fract16 range is 0 to 0.99998474121
+// in steps of 0.00001525878
+//
+// sfract15 range is -0.99996948242 to 0.99996948242
+// in steps of 0.00003051757
+//
+
+/// ANSI unsigned short _Fract. range is 0 to 0.99609375
+/// in steps of 0.00390625
+typedef uint8_t fract8; ///< ANSI: unsigned short _Fract
+
+/// ANSI: signed short _Fract. range is -0.9921875 to 0.9921875
+/// in steps of 0.0078125
+typedef int8_t sfract7; ///< ANSI: signed short _Fract
+
+/// ANSI: unsigned _Fract. range is 0 to 0.99998474121
+/// in steps of 0.00001525878
+typedef uint16_t fract16; ///< ANSI: unsigned _Fract
+
+/// ANSI: signed _Fract. range is -0.99996948242 to 0.99996948242
+/// in steps of 0.00003051757
+typedef int16_t sfract15; ///< ANSI: signed _Fract
+
+
+// accumXY types should be interpreted as X bits of integer,
+// and Y bits of fraction.
+// E.g., accum88 has 8 bits of int, 8 bits of fraction
+
+typedef uint16_t accum88; ///< ANSI: unsigned short _Accum. 8 bits int, 8 bits fraction
+typedef int16_t saccum78; ///< ANSI: signed short _Accum. 7 bits int, 8 bits fraction
+typedef uint32_t accum1616;///< ANSI: signed _Accum. 16 bits int, 16 bits fraction
+typedef int32_t saccum1516;///< ANSI: signed _Accum. 15 bits int, 16 bits fraction
+typedef uint16_t accum124; ///< no direct ANSI counterpart. 12 bits int, 4 bits fraction
+typedef int32_t saccum114;///< no direct ANSI counterpart. 1 bit int, 14 bits fraction
+
+
+
+#include "math8.h"
+#include "scale8.h"
+#include "random8.h"
+#include "trig8.h"
+
+///////////////////////////////////////////////////////////////////////
+
+
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////
+//
+// float-to-fixed and fixed-to-float conversions
+//
+// Note that anything involving a 'float' on AVR will be slower.
+
+/// sfract15ToFloat: conversion from sfract15 fixed point to
+/// IEEE754 32-bit float.
+LIB8STATIC float sfract15ToFloat( sfract15 y)
+{
+ return y / 32768.0;
+}
+
+/// conversion from IEEE754 float in the range (-1,1)
+/// to 16-bit fixed point. Note that the extremes of
+/// one and negative one are NOT representable. The
+/// representable range is basically
+LIB8STATIC sfract15 floatToSfract15( float f)
+{
+ return f * 32768.0;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////
+//
+// memmove8, memcpy8, and memset8:
+// alternatives to memmove, memcpy, and memset that are
+// faster on AVR than standard avr-libc 1.8
+
+#if defined(__AVR__)
+void * memmove8( void * dst, const void * src, uint16_t num );
+void * memcpy8 ( void * dst, const void * src, uint16_t num ) __attribute__ ((noinline));
+void * memset8 ( void * ptr, uint8_t value, uint16_t num ) __attribute__ ((noinline)) ;
+#else
+// on non-AVR platforms, these names just call standard libc.
+#define memmove8 memmove
+#define memcpy8 memcpy
+#define memset8 memset
+#endif
+
+
+///////////////////////////////////////////////////////////////////////
+//
+// linear interpolation, such as could be used for Perlin noise, etc.
+//
+
+// A note on the structure of the lerp functions:
+// The cases for b>a and b<=a are handled separately for
+// speed: without knowing the relative order of a and b,
+// the value (a-b) might be overflow the width of a or b,
+// and have to be promoted to a wider, slower type.
+// To avoid that, we separate the two cases, and are able
+// to do all the math in the same width as the arguments,
+// which is much faster and smaller on AVR.
+
+/// linear interpolation between two unsigned 8-bit values,
+/// with 8-bit fraction
+LIB8STATIC uint8_t lerp8by8( uint8_t a, uint8_t b, fract8 frac)
+{
+ uint8_t result;
+ if( b > a) {
+ uint8_t delta = b - a;
+ uint8_t scaled = scale8( delta, frac);
+ result = a + scaled;
+ } else {
+ uint8_t delta = a - b;
+ uint8_t scaled = scale8( delta, frac);
+ result = a - scaled;
+ }
+ return result;
+}
+
+/// linear interpolation between two unsigned 16-bit values,
+/// with 16-bit fraction
+LIB8STATIC uint16_t lerp16by16( uint16_t a, uint16_t b, fract16 frac)
+{
+ uint16_t result;
+ if( b > a ) {
+ uint16_t delta = b - a;
+ uint16_t scaled = scale16(delta, frac);
+ result = a + scaled;
+ } else {
+ uint16_t delta = a - b;
+ uint16_t scaled = scale16( delta, frac);
+ result = a - scaled;
+ }
+ return result;
+}
+
+/// linear interpolation between two unsigned 16-bit values,
+/// with 8-bit fraction
+LIB8STATIC uint16_t lerp16by8( uint16_t a, uint16_t b, fract8 frac)
+{
+ uint16_t result;
+ if( b > a) {
+ uint16_t delta = b - a;
+ uint16_t scaled = scale16by8( delta, frac);
+ result = a + scaled;
+ } else {
+ uint16_t delta = a - b;
+ uint16_t scaled = scale16by8( delta, frac);
+ result = a - scaled;
+ }
+ return result;
+}
+
+/// linear interpolation between two signed 15-bit values,
+/// with 8-bit fraction
+LIB8STATIC int16_t lerp15by8( int16_t a, int16_t b, fract8 frac)
+{
+ int16_t result;
+ if( b > a) {
+ uint16_t delta = b - a;
+ uint16_t scaled = scale16by8( delta, frac);
+ result = a + scaled;
+ } else {
+ uint16_t delta = a - b;
+ uint16_t scaled = scale16by8( delta, frac);
+ result = a - scaled;
+ }
+ return result;
+}
+
+/// linear interpolation between two signed 15-bit values,
+/// with 8-bit fraction
+LIB8STATIC int16_t lerp15by16( int16_t a, int16_t b, fract16 frac)
+{
+ int16_t result;
+ if( b > a) {
+ uint16_t delta = b - a;
+ uint16_t scaled = scale16( delta, frac);
+ result = a + scaled;
+ } else {
+ uint16_t delta = a - b;
+ uint16_t scaled = scale16( delta, frac);
+ result = a - scaled;
+ }
+ return result;
+}
+
+/// map8: map from one full-range 8-bit value into a narrower
+/// range of 8-bit values, possibly a range of hues.
+///
+/// E.g. map myValue into a hue in the range blue..purple..pink..red
+/// hue = map8( myValue, HUE_BLUE, HUE_RED);
+///
+/// Combines nicely with the waveform functions (like sin8, etc)
+/// to produce continuous hue gradients back and forth:
+///
+/// hue = map8( sin8( myValue), HUE_BLUE, HUE_RED);
+///
+/// Mathematically simiar to lerp8by8, but arguments are more
+/// like Arduino's "map"; this function is similar to
+///
+/// map( in, 0, 255, rangeStart, rangeEnd)
+///
+/// but faster and specifically designed for 8-bit values.
+LIB8STATIC uint8_t map8( uint8_t in, uint8_t rangeStart, uint8_t rangeEnd)
+{
+ uint8_t rangeWidth = rangeEnd - rangeStart;
+ uint8_t out = scale8( in, rangeWidth);
+ out += rangeStart;
+ return out;
+}
+
+
+///////////////////////////////////////////////////////////////////////
+//
+// easing functions; see http://easings.net
+//
+
+/// ease8InOutQuad: 8-bit quadratic ease-in / ease-out function
+/// Takes around 13 cycles on AVR
+#if EASE8_C == 1
+LIB8STATIC uint8_t ease8InOutQuad( uint8_t i)
+{
+ uint8_t j = i;
+ if( j & 0x80 ) {
+ j = 255 - j;
+ }
+ uint8_t jj = scale8( j, j);
+ uint8_t jj2 = jj << 1;
+ if( i & 0x80 ) {
+ jj2 = 255 - jj2;
+ }
+ return jj2;
+}
+
+#elif EASE8_AVRASM == 1
+// This AVR asm version of ease8InOutQuad preserves one more
+// low-bit of precision than the C version, and is also slightly
+// smaller and faster.
+LIB8STATIC uint8_t ease8InOutQuad(uint8_t val) {
+ uint8_t j=val;
+ asm volatile (
+ "sbrc %[val], 7 \n"
+ "com %[j] \n"
+ "mul %[j], %[j] \n"
+ "add r0, %[j] \n"
+ "ldi %[j], 0 \n"
+ "adc %[j], r1 \n"
+ "lsl r0 \n" // carry = high bit of low byte of mul product
+ "rol %[j] \n" // j = (j * 2) + carry // preserve add'l bit of precision
+ "sbrc %[val], 7 \n"
+ "com %[j] \n"
+ "clr __zero_reg__ \n"
+ : [j] "+&a" (j)
+ : [val] "a" (val)
+ : "r0", "r1"
+ );
+ return j;
+}
+
+#else
+#error "No implementation for ease8InOutQuad available."
+#endif
+
+/// ease16InOutQuad: 16-bit quadratic ease-in / ease-out function
+// C implementation at this point
+LIB8STATIC uint16_t ease16InOutQuad( uint16_t i)
+{
+ uint16_t j = i;
+ if( j & 0x8000 ) {
+ j = 65535 - j;
+ }
+ uint16_t jj = scale16( j, j);
+ uint16_t jj2 = jj << 1;
+ if( i & 0x8000 ) {
+ jj2 = 65535 - jj2;
+ }
+ return jj2;
+}
+
+
+/// ease8InOutCubic: 8-bit cubic ease-in / ease-out function
+/// Takes around 18 cycles on AVR
+LIB8STATIC fract8 ease8InOutCubic( fract8 i)
+{
+ uint8_t ii = scale8_LEAVING_R1_DIRTY( i, i);
+ uint8_t iii = scale8_LEAVING_R1_DIRTY( ii, i);
+
+ uint16_t r1 = (3 * (uint16_t)(ii)) - ( 2 * (uint16_t)(iii));
+
+ /* the code generated for the above *'s automatically
+ cleans up R1, so there's no need to explicitily call
+ cleanup_R1(); */
+
+ uint8_t result = r1;
+
+ // if we got "256", return 255:
+ if( r1 & 0x100 ) {
+ result = 255;
+ }
+ return result;
+}
+
+/// ease8InOutApprox: fast, rough 8-bit ease-in/ease-out function
+/// shaped approximately like 'ease8InOutCubic',
+/// it's never off by more than a couple of percent
+/// from the actual cubic S-curve, and it executes
+/// more than twice as fast. Use when the cycles
+/// are more important than visual smoothness.
+/// Asm version takes around 7 cycles on AVR.
+
+#if EASE8_C == 1
+LIB8STATIC fract8 ease8InOutApprox( fract8 i)
+{
+ if( i < 64) {
+ // start with slope 0.5
+ i /= 2;
+ } else if( i > (255 - 64)) {
+ // end with slope 0.5
+ i = 255 - i;
+ i /= 2;
+ i = 255 - i;
+ } else {
+ // in the middle, use slope 192/128 = 1.5
+ i -= 64;
+ i += (i / 2);
+ i += 32;
+ }
+
+ return i;
+}
+
+#elif EASE8_AVRASM == 1
+LIB8STATIC uint8_t ease8InOutApprox( fract8 i)
+{
+ // takes around 7 cycles on AVR
+ asm volatile (
+ " subi %[i], 64 \n\t"
+ " cpi %[i], 128 \n\t"
+ " brcc Lshift_%= \n\t"
+
+ // middle case
+ " mov __tmp_reg__, %[i] \n\t"
+ " lsr __tmp_reg__ \n\t"
+ " add %[i], __tmp_reg__ \n\t"
+ " subi %[i], 224 \n\t"
+ " rjmp Ldone_%= \n\t"
+
+ // start or end case
+ "Lshift_%=: \n\t"
+ " lsr %[i] \n\t"
+ " subi %[i], 96 \n\t"
+
+ "Ldone_%=: \n\t"
+
+ : [i] "+&a" (i)
+ :
+ : "r0", "r1"
+ );
+ return i;
+}
+#else
+#error "No implementation for ease8 available."
+#endif
+
+
+
+/// triwave8: triangle (sawtooth) wave generator. Useful for
+/// turning a one-byte ever-increasing value into a
+/// one-byte value that oscillates up and down.
+///
+/// input output
+/// 0..127 0..254 (positive slope)
+/// 128..255 254..0 (negative slope)
+///
+/// On AVR this function takes just three cycles.
+///
+LIB8STATIC uint8_t triwave8(uint8_t in)
+{
+ if( in & 0x80) {
+ in = 255 - in;
+ }
+ uint8_t out = in << 1;
+ return out;
+}
+
+
+// quadwave8 and cubicwave8: S-shaped wave generators (like 'sine').
+// Useful for turning a one-byte 'counter' value into a
+// one-byte oscillating value that moves smoothly up and down,
+// with an 'acceleration' and 'deceleration' curve.
+//
+// These are even faster than 'sin8', and have
+// slightly different curve shapes.
+//
+
+/// quadwave8: quadratic waveform generator. Spends just a little more
+/// time at the limits than 'sine' does.
+LIB8STATIC uint8_t quadwave8(uint8_t in)
+{
+ return ease8InOutQuad( triwave8( in));
+}
+
+/// cubicwave8: cubic waveform generator. Spends visibly more time
+/// at the limits than 'sine' does.
+LIB8STATIC uint8_t cubicwave8(uint8_t in)
+{
+ return ease8InOutCubic( triwave8( in));
+}
+
+/// squarewave8: square wave generator. Useful for
+/// turning a one-byte ever-increasing value
+/// into a one-byte value that is either 0 or 255.
+/// The width of the output 'pulse' is
+/// determined by the pulsewidth argument:
+///
+///~~~
+/// If pulsewidth is 255, output is always 255.
+/// If pulsewidth < 255, then
+/// if input < pulsewidth then output is 255
+/// if input >= pulsewidth then output is 0
+///~~~
+///
+/// the output looking like:
+///
+///~~~
+/// 255 +--pulsewidth--+
+/// . | |
+/// 0 0 +--------(256-pulsewidth)--------
+///~~~
+///
+/// @param in
+/// @param pulsewidth
+/// @returns square wave output
+LIB8STATIC uint8_t squarewave8( uint8_t in, uint8_t pulsewidth)
+{
+ if( in < pulsewidth || (pulsewidth == 255)) {
+ return 255;
+ } else {
+ return 0;
+ }
+}
+
+
+// Beat generators - These functions produce waves at a given
+// number of 'beats per minute'. Internally, they use
+// the Arduino function 'millis' to track elapsed time.
+// Accuracy is a bit better than one part in a thousand.
+//
+// beat8( BPM ) returns an 8-bit value that cycles 'BPM' times
+// per minute, rising from 0 to 255, resetting to zero,
+// rising up again, etc.. The output of this function
+// is suitable for feeding directly into sin8, and cos8,
+// triwave8, quadwave8, and cubicwave8.
+// beat16( BPM ) returns a 16-bit value that cycles 'BPM' times
+// per minute, rising from 0 to 65535, resetting to zero,
+// rising up again, etc. The output of this function is
+// suitable for feeding directly into sin16 and cos16.
+// beat88( BPM88) is the same as beat16, except that the BPM88 argument
+// MUST be in Q8.8 fixed point format, e.g. 120BPM must
+// be specified as 120*256 = 30720.
+// beatsin8( BPM, uint8_t low, uint8_t high) returns an 8-bit value that
+// rises and falls in a sine wave, 'BPM' times per minute,
+// between the values of 'low' and 'high'.
+// beatsin16( BPM, uint16_t low, uint16_t high) returns a 16-bit value
+// that rises and falls in a sine wave, 'BPM' times per
+// minute, between the values of 'low' and 'high'.
+// beatsin88( BPM88, ...) is the same as beatsin16, except that the
+// BPM88 argument MUST be in Q8.8 fixed point format,
+// e.g. 120BPM must be specified as 120*256 = 30720.
+//
+// BPM can be supplied two ways. The simpler way of specifying BPM is as
+// a simple 8-bit integer from 1-255, (e.g., "120").
+// The more sophisticated way of specifying BPM allows for fractional
+// "Q8.8" fixed point number (an 'accum88') with an 8-bit integer part and
+// an 8-bit fractional part. The easiest way to construct this is to multiply
+// a floating point BPM value (e.g. 120.3) by 256, (e.g. resulting in 30796
+// in this case), and pass that as the 16-bit BPM argument.
+// "BPM88" MUST always be specified in Q8.8 format.
+//
+// Originally designed to make an entire animation project pulse with brightness.
+// For that effect, add this line just above your existing call to "FastLED.show()":
+//
+// uint8_t bright = beatsin8( 60 /*BPM*/, 192 /*dimmest*/, 255 /*brightest*/ ));
+// FastLED.setBrightness( bright );
+// FastLED.show();
+//
+// The entire animation will now pulse between brightness 192 and 255 once per second.
+
+
+// The beat generators need access to a millisecond counter.
+// On Arduino, this is "millis()". On other platforms, you'll
+// need to provide a function with this signature:
+// uint32_t get_millisecond_timer();
+// that provides similar functionality.
+// You can also force use of the get_millisecond_timer function
+// by #defining USE_GET_MILLISECOND_TIMER.
+#if (defined(ARDUINO) || defined(SPARK) || defined(FASTLED_HAS_MILLIS)) && !defined(USE_GET_MILLISECOND_TIMER)
+// Forward declaration of Arduino function 'millis'.
+//uint32_t millis();
+#define GET_MILLIS millis
+#else
+uint32_t get_millisecond_timer(void);
+#define GET_MILLIS get_millisecond_timer
+#endif
+
+// beat16 generates a 16-bit 'sawtooth' wave at a given BPM,
+/// with BPM specified in Q8.8 fixed-point format; e.g.
+/// for this function, 120 BPM MUST BE specified as
+/// 120*256 = 30720.
+/// If you just want to specify "120", use beat16 or beat8.
+LIB8STATIC uint16_t beat88( accum88 beats_per_minute_88, uint32_t timebase)
+{
+ // BPM is 'beats per minute', or 'beats per 60000ms'.
+ // To avoid using the (slower) division operator, we
+ // want to convert 'beats per 60000ms' to 'beats per 65536ms',
+ // and then use a simple, fast bit-shift to divide by 65536.
+ //
+ // The ratio 65536:60000 is 279.620266667:256; we'll call it 280:256.
+ // The conversion is accurate to about 0.05%, more or less,
+ // e.g. if you ask for "120 BPM", you'll get about "119.93".
+ return (((GET_MILLIS()) - timebase) * beats_per_minute_88 * 280) >> 16;
+}
+
+/// beat16 generates a 16-bit 'sawtooth' wave at a given BPM
+LIB8STATIC uint16_t beat16( accum88 beats_per_minute, uint32_t timebase)
+{
+ // Convert simple 8-bit BPM's to full Q8.8 accum88's if needed
+ if( beats_per_minute < 256) beats_per_minute <<= 8;
+ return beat88(beats_per_minute, timebase);
+}
+
+/// beat8 generates an 8-bit 'sawtooth' wave at a given BPM
+LIB8STATIC uint8_t beat8( accum88 beats_per_minute, uint32_t timebase)
+{
+ return beat16( beats_per_minute, timebase) >> 8;
+}
+
+/// beatsin88 generates a 16-bit sine wave at a given BPM,
+/// that oscillates within a given range.
+/// For this function, BPM MUST BE SPECIFIED as
+/// a Q8.8 fixed-point value; e.g. 120BPM must be
+/// specified as 120*256 = 30720.
+/// If you just want to specify "120", use beatsin16 or beatsin8.
+LIB8STATIC uint16_t beatsin88( accum88 beats_per_minute_88, uint16_t lowest, uint16_t highest, uint32_t timebase, uint16_t phase_offset)
+{
+ uint16_t beat = beat88( beats_per_minute_88, timebase);
+ uint16_t beatsin = (sin16( beat + phase_offset) + 32768);
+ uint16_t rangewidth = highest - lowest;
+ uint16_t scaledbeat = scale16( beatsin, rangewidth);
+ uint16_t result = lowest + scaledbeat;
+ return result;
+}
+
+/// beatsin16 generates a 16-bit sine wave at a given BPM,
+/// that oscillates within a given range.
+LIB8STATIC uint16_t beatsin16(accum88 beats_per_minute, uint16_t lowest, uint16_t highest, uint32_t timebase, uint16_t phase_offset)
+{
+ uint16_t beat = beat16( beats_per_minute, timebase);
+ uint16_t beatsin = (sin16( beat + phase_offset) + 32768);
+ uint16_t rangewidth = highest - lowest;
+ uint16_t scaledbeat = scale16( beatsin, rangewidth);
+ uint16_t result = lowest + scaledbeat;
+ return result;
+}
+
+/// beatsin8 generates an 8-bit sine wave at a given BPM,
+/// that oscillates within a given range.
+LIB8STATIC uint8_t beatsin8( accum88 beats_per_minute, uint8_t lowest, uint8_t highest, uint32_t timebase, uint8_t phase_offset)
+{
+ uint8_t beat = beat8( beats_per_minute, timebase);
+ uint8_t beatsin = sin8( beat + phase_offset);
+ uint8_t rangewidth = highest - lowest;
+ uint8_t scaledbeat = scale8( beatsin, rangewidth);
+ uint8_t result = lowest + scaledbeat;
+ return result;
+}
+
+
+/// Return the current seconds since boot in a 16-bit value. Used as part of the
+/// "every N time-periods" mechanism
+LIB8STATIC uint16_t seconds16(void)
+{
+ uint32_t ms = GET_MILLIS();
+ uint16_t s16;
+ s16 = ms / 1000;
+ return s16;
+}
+
+/// Return the current minutes since boot in a 16-bit value. Used as part of the
+/// "every N time-periods" mechanism
+LIB8STATIC uint16_t minutes16(void)
+{
+ uint32_t ms = GET_MILLIS();
+ uint16_t m16;
+ m16 = (ms / (60000L)) & 0xFFFF;
+ return m16;
+}
+
+/// Return the current hours since boot in an 8-bit value. Used as part of the
+/// "every N time-periods" mechanism
+LIB8STATIC uint8_t hours8(void)
+{
+ uint32_t ms = GET_MILLIS();
+ uint8_t h8;
+ h8 = (ms / (3600000L)) & 0xFF;
+ return h8;
+}
+
+///@}
+
+#endif
diff --git a/lib/lib8tion/math8.h b/lib/lib8tion/math8.h
new file mode 100644
index 000000000..8c6b6c227
--- /dev/null
+++ b/lib/lib8tion/math8.h
@@ -0,0 +1,552 @@
+#ifndef __INC_LIB8TION_MATH_H
+#define __INC_LIB8TION_MATH_H
+
+#include "scale8.h"
+
+///@ingroup lib8tion
+
+///@defgroup Math Basic math operations
+/// Fast, efficient 8-bit math functions specifically
+/// designed for high-performance LED programming.
+///
+/// Because of the AVR(Arduino) and ARM assembly language
+/// implementations provided, using these functions often
+/// results in smaller and faster code than the equivalent
+/// program using plain "C" arithmetic and logic.
+///@{
+
+
+/// add one byte to another, saturating at 0xFF
+/// @param i - first byte to add
+/// @param j - second byte to add
+/// @returns the sum of i & j, capped at 0xFF
+LIB8STATIC_ALWAYS_INLINE uint8_t qadd8( uint8_t i, uint8_t j)
+{
+#if QADD8_C == 1
+ uint16_t t = i + j;
+ if (t > 255) t = 255;
+ return t;
+#elif QADD8_AVRASM == 1
+ asm volatile(
+ /* First, add j to i, conditioning the C flag */
+ "add %0, %1 \n\t"
+
+ /* Now test the C flag.
+ If C is clear, we branch around a load of 0xFF into i.
+ If C is set, we go ahead and load 0xFF into i.
+ */
+ "brcc L_%= \n\t"
+ "ldi %0, 0xFF \n\t"
+ "L_%=: "
+ : "+a" (i)
+ : "a" (j) );
+ return i;
+#elif QADD8_ARM_DSP_ASM == 1
+ asm volatile( "uqadd8 %0, %0, %1" : "+r" (i) : "r" (j));
+ return i;
+#else
+#error "No implementation for qadd8 available."
+#endif
+}
+
+/// Add one byte to another, saturating at 0x7F
+/// @param i - first byte to add
+/// @param j - second byte to add
+/// @returns the sum of i & j, capped at 0xFF
+LIB8STATIC_ALWAYS_INLINE int8_t qadd7( int8_t i, int8_t j)
+{
+#if QADD7_C == 1
+ int16_t t = i + j;
+ if (t > 127) t = 127;
+ return t;
+#elif QADD7_AVRASM == 1
+ asm volatile(
+ /* First, add j to i, conditioning the V flag */
+ "add %0, %1 \n\t"
+
+ /* Now test the V flag.
+ If V is clear, we branch around a load of 0x7F into i.
+ If V is set, we go ahead and load 0x7F into i.
+ */
+ "brvc L_%= \n\t"
+ "ldi %0, 0x7F \n\t"
+ "L_%=: "
+ : "+a" (i)
+ : "a" (j) );
+
+ return i;
+#elif QADD7_ARM_DSP_ASM == 1
+ asm volatile( "qadd8 %0, %0, %1" : "+r" (i) : "r" (j));
+ return i;
+#else
+#error "No implementation for qadd7 available."
+#endif
+}
+
+/// subtract one byte from another, saturating at 0x00
+/// @returns i - j with a floor of 0
+LIB8STATIC_ALWAYS_INLINE uint8_t qsub8( uint8_t i, uint8_t j)
+{
+#if QSUB8_C == 1
+ int16_t t = i - j;
+ if (t < 0) t = 0;
+ return t;
+#elif QSUB8_AVRASM == 1
+
+ asm volatile(
+ /* First, subtract j from i, conditioning the C flag */
+ "sub %0, %1 \n\t"
+
+ /* Now test the C flag.
+ If C is clear, we branch around a load of 0x00 into i.
+ If C is set, we go ahead and load 0x00 into i.
+ */
+ "brcc L_%= \n\t"
+ "ldi %0, 0x00 \n\t"
+ "L_%=: "
+ : "+a" (i)
+ : "a" (j) );
+
+ return i;
+#else
+#error "No implementation for qsub8 available."
+#endif
+}
+
+/// add one byte to another, with one byte result
+LIB8STATIC_ALWAYS_INLINE uint8_t add8( uint8_t i, uint8_t j)
+{
+#if ADD8_C == 1
+ uint16_t t = i + j;
+ return t;
+#elif ADD8_AVRASM == 1
+ // Add j to i, period.
+ asm volatile( "add %0, %1" : "+a" (i) : "a" (j));
+ return i;
+#else
+#error "No implementation for add8 available."
+#endif
+}
+
+/// add one byte to another, with one byte result
+LIB8STATIC_ALWAYS_INLINE uint16_t add8to16( uint8_t i, uint16_t j)
+{
+#if ADD8_C == 1
+ uint16_t t = i + j;
+ return t;
+#elif ADD8_AVRASM == 1
+ // Add i(one byte) to j(two bytes)
+ asm volatile( "add %A[j], %[i] \n\t"
+ "adc %B[j], __zero_reg__ \n\t"
+ : [j] "+a" (j)
+ : [i] "a" (i)
+ );
+ return i;
+#else
+#error "No implementation for add8to16 available."
+#endif
+}
+
+
+/// subtract one byte from another, 8-bit result
+LIB8STATIC_ALWAYS_INLINE uint8_t sub8( uint8_t i, uint8_t j)
+{
+#if SUB8_C == 1
+ int16_t t = i - j;
+ return t;
+#elif SUB8_AVRASM == 1
+ // Subtract j from i, period.
+ asm volatile( "sub %0, %1" : "+a" (i) : "a" (j));
+ return i;
+#else
+#error "No implementation for sub8 available."
+#endif
+}
+
+/// Calculate an integer average of two unsigned
+/// 8-bit integer values (uint8_t).
+/// Fractional results are rounded down, e.g. avg8(20,41) = 30
+LIB8STATIC_ALWAYS_INLINE uint8_t avg8( uint8_t i, uint8_t j)
+{
+#if AVG8_C == 1
+ return (i + j) >> 1;
+#elif AVG8_AVRASM == 1
+ asm volatile(
+ /* First, add j to i, 9th bit overflows into C flag */
+ "add %0, %1 \n\t"
+ /* Divide by two, moving C flag into high 8th bit */
+ "ror %0 \n\t"
+ : "+a" (i)
+ : "a" (j) );
+ return i;
+#else
+#error "No implementation for avg8 available."
+#endif
+}
+
+/// Calculate an integer average of two unsigned
+/// 16-bit integer values (uint16_t).
+/// Fractional results are rounded down, e.g. avg16(20,41) = 30
+LIB8STATIC_ALWAYS_INLINE uint16_t avg16( uint16_t i, uint16_t j)
+{
+#if AVG16_C == 1
+ return (uint32_t)((uint32_t)(i) + (uint32_t)(j)) >> 1;
+#elif AVG16_AVRASM == 1
+ asm volatile(
+ /* First, add jLo (heh) to iLo, 9th bit overflows into C flag */
+ "add %A[i], %A[j] \n\t"
+ /* Now, add C + jHi to iHi, 17th bit overflows into C flag */
+ "adc %B[i], %B[j] \n\t"
+ /* Divide iHi by two, moving C flag into high 16th bit, old 9th bit now in C */
+ "ror %B[i] \n\t"
+ /* Divide iLo by two, moving C flag into high 8th bit */
+ "ror %A[i] \n\t"
+ : [i] "+a" (i)
+ : [j] "a" (j) );
+ return i;
+#else
+#error "No implementation for avg16 available."
+#endif
+}
+
+
+/// Calculate an integer average of two signed 7-bit
+/// integers (int8_t)
+/// If the first argument is even, result is rounded down.
+/// If the first argument is odd, result is result up.
+LIB8STATIC_ALWAYS_INLINE int8_t avg7( int8_t i, int8_t j)
+{
+#if AVG7_C == 1
+ return ((i + j) >> 1) + (i & 0x1);
+#elif AVG7_AVRASM == 1
+ asm volatile(
+ "asr %1 \n\t"
+ "asr %0 \n\t"
+ "adc %0, %1 \n\t"
+ : "+a" (i)
+ : "a" (j) );
+ return i;
+#else
+#error "No implementation for avg7 available."
+#endif
+}
+
+/// Calculate an integer average of two signed 15-bit
+/// integers (int16_t)
+/// If the first argument is even, result is rounded down.
+/// If the first argument is odd, result is result up.
+LIB8STATIC_ALWAYS_INLINE int16_t avg15( int16_t i, int16_t j)
+{
+#if AVG15_C == 1
+ return ((int32_t)((int32_t)(i) + (int32_t)(j)) >> 1) + (i & 0x1);
+#elif AVG15_AVRASM == 1
+ asm volatile(
+ /* first divide j by 2, throwing away lowest bit */
+ "asr %B[j] \n\t"
+ "ror %A[j] \n\t"
+ /* now divide i by 2, with lowest bit going into C */
+ "asr %B[i] \n\t"
+ "ror %A[i] \n\t"
+ /* add j + C to i */
+ "adc %A[i], %A[j] \n\t"
+ "adc %B[i], %B[j] \n\t"
+ : [i] "+a" (i)
+ : [j] "a" (j) );
+ return i;
+#else
+#error "No implementation for avg15 available."
+#endif
+}
+
+
+/// Calculate the remainder of one unsigned 8-bit
+/// value divided by anoter, aka A % M.
+/// Implemented by repeated subtraction, which is
+/// very compact, and very fast if A is 'probably'
+/// less than M. If A is a large multiple of M,
+/// the loop has to execute multiple times. However,
+/// even in that case, the loop is only two
+/// instructions long on AVR, i.e., quick.
+LIB8STATIC_ALWAYS_INLINE uint8_t mod8( uint8_t a, uint8_t m)
+{
+#if defined(__AVR__)
+ asm volatile (
+ "L_%=: sub %[a],%[m] \n\t"
+ " brcc L_%= \n\t"
+ " add %[a],%[m] \n\t"
+ : [a] "+r" (a)
+ : [m] "r" (m)
+ );
+#else
+ while( a >= m) a -= m;
+#endif
+ return a;
+}
+
+/// Add two numbers, and calculate the modulo
+/// of the sum and a third number, M.
+/// In other words, it returns (A+B) % M.
+/// It is designed as a compact mechanism for
+/// incrementing a 'mode' switch and wrapping
+/// around back to 'mode 0' when the switch
+/// goes past the end of the available range.
+/// e.g. if you have seven modes, this switches
+/// to the next one and wraps around if needed:
+/// mode = addmod8( mode, 1, 7);
+///LIB8STATIC_ALWAYS_INLINESee 'mod8' for notes on performance.
+LIB8STATIC uint8_t addmod8( uint8_t a, uint8_t b, uint8_t m)
+{
+#if defined(__AVR__)
+ asm volatile (
+ " add %[a],%[b] \n\t"
+ "L_%=: sub %[a],%[m] \n\t"
+ " brcc L_%= \n\t"
+ " add %[a],%[m] \n\t"
+ : [a] "+r" (a)
+ : [b] "r" (b), [m] "r" (m)
+ );
+#else
+ a += b;
+ while( a >= m) a -= m;
+#endif
+ return a;
+}
+
+/// Subtract two numbers, and calculate the modulo
+/// of the difference and a third number, M.
+/// In other words, it returns (A-B) % M.
+/// It is designed as a compact mechanism for
+/// incrementing a 'mode' switch and wrapping
+/// around back to 'mode 0' when the switch
+/// goes past the end of the available range.
+/// e.g. if you have seven modes, this switches
+/// to the next one and wraps around if needed:
+/// mode = addmod8( mode, 1, 7);
+///LIB8STATIC_ALWAYS_INLINESee 'mod8' for notes on performance.
+LIB8STATIC uint8_t submod8( uint8_t a, uint8_t b, uint8_t m)
+{
+#if defined(__AVR__)
+ asm volatile (
+ " sub %[a],%[b] \n\t"
+ "L_%=: sub %[a],%[m] \n\t"
+ " brcc L_%= \n\t"
+ " add %[a],%[m] \n\t"
+ : [a] "+r" (a)
+ : [b] "r" (b), [m] "r" (m)
+ );
+#else
+ a -= b;
+ while( a >= m) a -= m;
+#endif
+ return a;
+}
+
+/// 8x8 bit multiplication, with 8 bit result
+LIB8STATIC_ALWAYS_INLINE uint8_t mul8( uint8_t i, uint8_t j)
+{
+#if MUL8_C == 1
+ return ((uint16_t)i * (uint16_t)(j) ) & 0xFF;
+#elif MUL8_AVRASM == 1
+ asm volatile(
+ /* Multiply 8-bit i * 8-bit j, giving 16-bit r1,r0 */
+ "mul %0, %1 \n\t"
+ /* Extract the LOW 8-bits (r0) */
+ "mov %0, r0 \n\t"
+ /* Restore r1 to "0"; it's expected to always be that */
+ "clr __zero_reg__ \n\t"
+ : "+a" (i)
+ : "a" (j)
+ : "r0", "r1");
+
+ return i;
+#else
+#error "No implementation for mul8 available."
+#endif
+}
+
+
+/// saturating 8x8 bit multiplication, with 8 bit result
+/// @returns the product of i * j, capping at 0xFF
+LIB8STATIC_ALWAYS_INLINE uint8_t qmul8( uint8_t i, uint8_t j)
+{
+#if QMUL8_C == 1
+ int p = ((uint16_t)i * (uint16_t)(j) );
+ if( p > 255) p = 255;
+ return p;
+#elif QMUL8_AVRASM == 1
+ asm volatile(
+ /* Multiply 8-bit i * 8-bit j, giving 16-bit r1,r0 */
+ " mul %0, %1 \n\t"
+ /* If high byte of result is zero, all is well. */
+ " tst r1 \n\t"
+ " breq Lnospill_%= \n\t"
+ /* If high byte of result > 0, saturate low byte to 0xFF */
+ " ldi %0,0xFF \n\t"
+ " rjmp Ldone_%= \n\t"
+ "Lnospill_%=: \n\t"
+ /* Extract the LOW 8-bits (r0) */
+ " mov %0, r0 \n\t"
+ "Ldone_%=: \n\t"
+ /* Restore r1 to "0"; it's expected to always be that */
+ " clr __zero_reg__ \n\t"
+ : "+a" (i)
+ : "a" (j)
+ : "r0", "r1");
+
+ return i;
+#else
+#error "No implementation for qmul8 available."
+#endif
+}
+
+
+/// take abs() of a signed 8-bit uint8_t
+LIB8STATIC_ALWAYS_INLINE int8_t abs8( int8_t i)
+{
+#if ABS8_C == 1
+ if( i < 0) i = -i;
+ return i;
+#elif ABS8_AVRASM == 1
+
+
+ asm volatile(
+ /* First, check the high bit, and prepare to skip if it's clear */
+ "sbrc %0, 7 \n"
+
+ /* Negate the value */
+ "neg %0 \n"
+
+ : "+r" (i) : "r" (i) );
+ return i;
+#else
+#error "No implementation for abs8 available."
+#endif
+}
+
+/// square root for 16-bit integers
+/// About three times faster and five times smaller
+/// than Arduino's general sqrt on AVR.
+LIB8STATIC uint8_t sqrt16(uint16_t x)
+{
+ if( x <= 1) {
+ return x;
+ }
+
+ uint8_t low = 1; // lower bound
+ uint8_t hi, mid;
+
+ if( x > 7904) {
+ hi = 255;
+ } else {
+ hi = (x >> 5) + 8; // initial estimate for upper bound
+ }
+
+ do {
+ mid = (low + hi) >> 1;
+ if ((uint16_t)(mid * mid) > x) {
+ hi = mid - 1;
+ } else {
+ if( mid == 255) {
+ return 255;
+ }
+ low = mid + 1;
+ }
+ } while (hi >= low);
+
+ return low - 1;
+}
+
+/// blend a variable proproportion(0-255) of one byte to another
+/// @param a - the starting byte value
+/// @param b - the byte value to blend toward
+/// @param amountOfB - the proportion (0-255) of b to blend
+/// @returns a byte value between a and b, inclusive
+#if (FASTLED_BLEND_FIXED == 1)
+LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB)
+{
+#if BLEND8_C == 1
+ uint16_t partial;
+ uint8_t result;
+
+ uint8_t amountOfA = 255 - amountOfB;
+
+ partial = (a * amountOfA);
+#if (FASTLED_SCALE8_FIXED == 1)
+ partial += a;
+ //partial = add8to16( a, partial);
+#endif
+
+ partial += (b * amountOfB);
+#if (FASTLED_SCALE8_FIXED == 1)
+ partial += b;
+ //partial = add8to16( b, partial);
+#endif
+
+ result = partial >> 8;
+
+ return result;
+
+#elif BLEND8_AVRASM == 1
+ uint16_t partial;
+ uint8_t result;
+
+ asm volatile (
+ /* partial = b * amountOfB */
+ " mul %[b], %[amountOfB] \n\t"
+ " movw %A[partial], r0 \n\t"
+
+ /* amountOfB (aka amountOfA) = 255 - amountOfB */
+ " com %[amountOfB] \n\t"
+
+ /* partial += a * amountOfB (aka amountOfA) */
+ " mul %[a], %[amountOfB] \n\t"
+
+ " add %A[partial], r0 \n\t"
+ " adc %B[partial], r1 \n\t"
+
+ " clr __zero_reg__ \n\t"
+
+#if (FASTLED_SCALE8_FIXED == 1)
+ /* partial += a */
+ " add %A[partial], %[a] \n\t"
+ " adc %B[partial], __zero_reg__ \n\t"
+
+ // partial += b
+ " add %A[partial], %[b] \n\t"
+ " adc %B[partial], __zero_reg__ \n\t"
+#endif
+
+ : [partial] "=r" (partial),
+ [amountOfB] "+a" (amountOfB)
+ : [a] "a" (a),
+ [b] "a" (b)
+ : "r0", "r1"
+ );
+
+ result = partial >> 8;
+
+ return result;
+
+#else
+#error "No implementation for blend8 available."
+#endif
+}
+
+#else
+LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB)
+{
+ // This version loses precision in the integer math
+ // and can actually return results outside of the range
+ // from a to b. Its use is not recommended.
+ uint8_t result;
+ uint8_t amountOfA = 255 - amountOfB;
+ result = scale8_LEAVING_R1_DIRTY( a, amountOfA)
+ + scale8_LEAVING_R1_DIRTY( b, amountOfB);
+ cleanup_R1();
+ return result;
+}
+#endif
+
+
+///@}
+#endif
diff --git a/lib/lib8tion/random8.h b/lib/lib8tion/random8.h
new file mode 100644
index 000000000..7ee67cbb3
--- /dev/null
+++ b/lib/lib8tion/random8.h
@@ -0,0 +1,94 @@
+#ifndef __INC_LIB8TION_RANDOM_H
+#define __INC_LIB8TION_RANDOM_H
+///@ingroup lib8tion
+
+///@defgroup Random Fast random number generators
+/// Fast 8- and 16- bit unsigned random numbers.
+/// Significantly faster than Arduino random(), but
+/// also somewhat less random. You can add entropy.
+///@{
+
+// X(n+1) = (2053 * X(n)) + 13849)
+#define FASTLED_RAND16_2053 ((uint16_t)(2053))
+#define FASTLED_RAND16_13849 ((uint16_t)(13849))
+
+/// random number seed
+extern uint16_t rand16seed;// = RAND16_SEED;
+
+/// Generate an 8-bit random number
+LIB8STATIC uint8_t random8(void)
+{
+ rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849;
+ // return the sum of the high and low bytes, for better
+ // mixing and non-sequential correlation
+ return (uint8_t)(((uint8_t)(rand16seed & 0xFF)) +
+ ((uint8_t)(rand16seed >> 8)));
+}
+
+/// Generate a 16 bit random number
+LIB8STATIC uint16_t random16(void)
+{
+ rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849;
+ return rand16seed;
+}
+
+/// Generate an 8-bit random number between 0 and lim
+/// @param lim the upper bound for the result
+LIB8STATIC uint8_t random8_max(uint8_t lim)
+{
+ uint8_t r = random8();
+ r = (r*lim) >> 8;
+ return r;
+}
+
+/// Generate an 8-bit random number in the given range
+/// @param min the lower bound for the random number
+/// @param lim the upper bound for the random number
+LIB8STATIC uint8_t random8_min_max(uint8_t min, uint8_t lim)
+{
+ uint8_t delta = lim - min;
+ uint8_t r = random8_max(delta) + min;
+ return r;
+}
+
+/// Generate an 16-bit random number between 0 and lim
+/// @param lim the upper bound for the result
+LIB8STATIC uint16_t random16_max(uint16_t lim)
+{
+ uint16_t r = random16();
+ uint32_t p = (uint32_t)lim * (uint32_t)r;
+ r = p >> 16;
+ return r;
+}
+
+/// Generate an 16-bit random number in the given range
+/// @param min the lower bound for the random number
+/// @param lim the upper bound for the random number
+LIB8STATIC uint16_t random16_min_max( uint16_t min, uint16_t lim)
+{
+ uint16_t delta = lim - min;
+ uint16_t r = random16_max(delta) + min;
+ return r;
+}
+
+/// Set the 16-bit seed used for the random number generator
+LIB8STATIC void random16_set_seed(uint16_t seed)
+{
+ rand16seed = seed;
+}
+
+/// Get the current seed value for the random number generator
+LIB8STATIC uint16_t random16_get_seed(void)
+{
+ return rand16seed;
+}
+
+/// Add entropy into the random number generator
+LIB8STATIC void random16_add_entropy(uint16_t entropy)
+{
+ rand16seed += entropy;
+}
+
+///@}
+
+#endif
diff --git a/lib/lib8tion/scale8.h b/lib/lib8tion/scale8.h
new file mode 100644
index 000000000..9895fd4d7
--- /dev/null
+++ b/lib/lib8tion/scale8.h
@@ -0,0 +1,542 @@
+#ifndef __INC_LIB8TION_SCALE_H
+#define __INC_LIB8TION_SCALE_H
+
+///@ingroup lib8tion
+
+///@defgroup Scaling Scaling functions
+/// Fast, efficient 8-bit scaling functions specifically
+/// designed for high-performance LED programming.
+///
+/// Because of the AVR(Arduino) and ARM assembly language
+/// implementations provided, using these functions often
+/// results in smaller and faster code than the equivalent
+/// program using plain "C" arithmetic and logic.
+///@{
+
+/// scale one byte by a second one, which is treated as
+/// the numerator of a fraction whose denominator is 256
+/// In other words, it computes i * (scale / 256)
+/// 4 clocks AVR with MUL, 2 clocks ARM
+LIB8STATIC_ALWAYS_INLINE uint8_t scale8( uint8_t i, fract8 scale)
+{
+#if SCALE8_C == 1
+#if (FASTLED_SCALE8_FIXED == 1)
+ return (((uint16_t)i) * (1+(uint16_t)(scale))) >> 8;
+#else
+ return ((uint16_t)i * (uint16_t)(scale) ) >> 8;
+#endif
+#elif SCALE8_AVRASM == 1
+#if defined(LIB8_ATTINY)
+#if (FASTLED_SCALE8_FIXED == 1)
+ uint8_t work=i;
+#else
+ uint8_t work=0;
+#endif
+ uint8_t cnt=0x80;
+ asm volatile(
+#if (FASTLED_SCALE8_FIXED == 1)
+ " inc %[scale] \n\t"
+ " breq DONE_%= \n\t"
+ " clr %[work] \n\t"
+#endif
+ "LOOP_%=: \n\t"
+ /*" sbrc %[scale], 0 \n\t"
+ " add %[work], %[i] \n\t"
+ " ror %[work] \n\t"
+ " lsr %[scale] \n\t"
+ " clc \n\t"*/
+ " sbrc %[scale], 0 \n\t"
+ " add %[work], %[i] \n\t"
+ " ror %[work] \n\t"
+ " lsr %[scale] \n\t"
+ " lsr %[cnt] \n\t"
+ "brcc LOOP_%= \n\t"
+ "DONE_%=: \n\t"
+ : [work] "+r" (work), [cnt] "+r" (cnt)
+ : [scale] "r" (scale), [i] "r" (i)
+ :
+ );
+ return work;
+#else
+ asm volatile(
+#if (FASTLED_SCALE8_FIXED==1)
+ // Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0
+ "mul %0, %1 \n\t"
+ // Add i to r0, possibly setting the carry flag
+ "add r0, %0 \n\t"
+ // load the immediate 0 into i (note, this does _not_ touch any flags)
+ "ldi %0, 0x00 \n\t"
+ // walk and chew gum at the same time
+ "adc %0, r1 \n\t"
+#else
+ /* Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 */
+ "mul %0, %1 \n\t"
+ /* Move the high 8-bits of the product (r1) back to i */
+ "mov %0, r1 \n\t"
+ /* Restore r1 to "0"; it's expected to always be that */
+#endif
+ "clr __zero_reg__ \n\t"
+
+ : "+a" (i) /* writes to i */
+ : "a" (scale) /* uses scale */
+ : "r0", "r1" /* clobbers r0, r1 */ );
+
+ /* Return the result */
+ return i;
+#endif
+#else
+#error "No implementation for scale8 available."
+#endif
+}
+
+
+/// The "video" version of scale8 guarantees that the output will
+/// be only be zero if one or both of the inputs are zero. If both
+/// inputs are non-zero, the output is guaranteed to be non-zero.
+/// This makes for better 'video'/LED dimming, at the cost of
+/// several additional cycles.
+LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video( uint8_t i, fract8 scale)
+{
+#if SCALE8_C == 1 || defined(LIB8_ATTINY)
+ uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0);
+ // uint8_t nonzeroscale = (scale != 0) ? 1 : 0;
+ // uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale;
+ return j;
+#elif SCALE8_AVRASM == 1
+ uint8_t j=0;
+ asm volatile(
+ " tst %[i]\n\t"
+ " breq L_%=\n\t"
+ " mul %[i], %[scale]\n\t"
+ " mov %[j], r1\n\t"
+ " clr __zero_reg__\n\t"
+ " cpse %[scale], r1\n\t"
+ " subi %[j], 0xFF\n\t"
+ "L_%=: \n\t"
+ : [j] "+a" (j)
+ : [i] "a" (i), [scale] "a" (scale)
+ : "r0", "r1");
+
+ return j;
+ // uint8_t nonzeroscale = (scale != 0) ? 1 : 0;
+ // asm volatile(
+ // " tst %0 \n"
+ // " breq L_%= \n"
+ // " mul %0, %1 \n"
+ // " mov %0, r1 \n"
+ // " add %0, %2 \n"
+ // " clr __zero_reg__ \n"
+ // "L_%=: \n"
+
+ // : "+a" (i)
+ // : "a" (scale), "a" (nonzeroscale)
+ // : "r0", "r1");
+
+ // // Return the result
+ // return i;
+#else
+#error "No implementation for scale8_video available."
+#endif
+}
+
+
+/// This version of scale8 does not clean up the R1 register on AVR
+/// If you are doing several 'scale8's in a row, use this, and
+/// then explicitly call cleanup_R1.
+LIB8STATIC_ALWAYS_INLINE uint8_t scale8_LEAVING_R1_DIRTY( uint8_t i, fract8 scale)
+{
+#if SCALE8_C == 1
+#if (FASTLED_SCALE8_FIXED == 1)
+ return (((uint16_t)i) * ((uint16_t)(scale)+1)) >> 8;
+#else
+ return ((int)i * (int)(scale) ) >> 8;
+#endif
+#elif SCALE8_AVRASM == 1
+ asm volatile(
+ #if (FASTLED_SCALE8_FIXED==1)
+ // Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0
+ "mul %0, %1 \n\t"
+ // Add i to r0, possibly setting the carry flag
+ "add r0, %0 \n\t"
+ // load the immediate 0 into i (note, this does _not_ touch any flags)
+ "ldi %0, 0x00 \n\t"
+ // walk and chew gum at the same time
+ "adc %0, r1 \n\t"
+ #else
+ /* Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 */
+ "mul %0, %1 \n\t"
+ /* Move the high 8-bits of the product (r1) back to i */
+ "mov %0, r1 \n\t"
+ #endif
+ /* R1 IS LEFT DIRTY HERE; YOU MUST ZERO IT OUT YOURSELF */
+ /* "clr __zero_reg__ \n\t" */
+
+ : "+a" (i) /* writes to i */
+ : "a" (scale) /* uses scale */
+ : "r0", "r1" /* clobbers r0, r1 */ );
+
+ // Return the result
+ return i;
+#else
+#error "No implementation for scale8_LEAVING_R1_DIRTY available."
+#endif
+}
+
+
+/// This version of scale8_video does not clean up the R1 register on AVR
+/// If you are doing several 'scale8_video's in a row, use this, and
+/// then explicitly call cleanup_R1.
+LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video_LEAVING_R1_DIRTY( uint8_t i, fract8 scale)
+{
+#if SCALE8_C == 1 || defined(LIB8_ATTINY)
+ uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0);
+ // uint8_t nonzeroscale = (scale != 0) ? 1 : 0;
+ // uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale;
+ return j;
+#elif SCALE8_AVRASM == 1
+ uint8_t j=0;
+ asm volatile(
+ " tst %[i]\n\t"
+ " breq L_%=\n\t"
+ " mul %[i], %[scale]\n\t"
+ " mov %[j], r1\n\t"
+ " breq L_%=\n\t"
+ " subi %[j], 0xFF\n\t"
+ "L_%=: \n\t"
+ : [j] "+a" (j)
+ : [i] "a" (i), [scale] "a" (scale)
+ : "r0", "r1");
+
+ return j;
+ // uint8_t nonzeroscale = (scale != 0) ? 1 : 0;
+ // asm volatile(
+ // " tst %0 \n"
+ // " breq L_%= \n"
+ // " mul %0, %1 \n"
+ // " mov %0, r1 \n"
+ // " add %0, %2 \n"
+ // " clr __zero_reg__ \n"
+ // "L_%=: \n"
+
+ // : "+a" (i)
+ // : "a" (scale), "a" (nonzeroscale)
+ // : "r0", "r1");
+
+ // // Return the result
+ // return i;
+#else
+#error "No implementation for scale8_video_LEAVING_R1_DIRTY available."
+#endif
+}
+
+/// Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls
+LIB8STATIC_ALWAYS_INLINE void cleanup_R1(void)
+{
+#if CLEANUP_R1_AVRASM == 1
+ // Restore r1 to "0"; it's expected to always be that
+ asm volatile( "clr __zero_reg__ \n\t" : : : "r1" );
+#endif
+}
+
+
+/// scale a 16-bit unsigned value by an 8-bit value,
+/// considered as numerator of a fraction whose denominator
+/// is 256. In other words, it computes i * (scale / 256)
+
+LIB8STATIC_ALWAYS_INLINE uint16_t scale16by8( uint16_t i, fract8 scale )
+{
+#if SCALE16BY8_C == 1
+ uint16_t result;
+#if FASTLED_SCALE8_FIXED == 1
+ result = (i * (1+((uint16_t)scale))) >> 8;
+#else
+ result = (i * scale) / 256;
+#endif
+ return result;
+#elif SCALE16BY8_AVRASM == 1
+#if FASTLED_SCALE8_FIXED == 1
+ uint16_t result = 0;
+ asm volatile(
+ // result.A = HighByte( (i.A x scale) + i.A )
+ " mul %A[i], %[scale] \n\t"
+ " add r0, %A[i] \n\t"
+ // " adc r1, [zero] \n\t"
+ // " mov %A[result], r1 \n\t"
+ " adc %A[result], r1 \n\t"
+
+ // result.A-B += i.B x scale
+ " mul %B[i], %[scale] \n\t"
+ " add %A[result], r0 \n\t"
+ " adc %B[result], r1 \n\t"
+
+ // cleanup r1
+ " clr __zero_reg__ \n\t"
+
+ // result.A-B += i.B
+ " add %A[result], %B[i] \n\t"
+ " adc %B[result], __zero_reg__ \n\t"
+
+ : [result] "+r" (result)
+ : [i] "r" (i), [scale] "r" (scale)
+ : "r0", "r1"
+ );
+ return result;
+#else
+ uint16_t result = 0;
+ asm volatile(
+ // result.A = HighByte(i.A x j )
+ " mul %A[i], %[scale] \n\t"
+ " mov %A[result], r1 \n\t"
+ //" clr %B[result] \n\t"
+
+ // result.A-B += i.B x j
+ " mul %B[i], %[scale] \n\t"
+ " add %A[result], r0 \n\t"
+ " adc %B[result], r1 \n\t"
+
+ // cleanup r1
+ " clr __zero_reg__ \n\t"
+
+ : [result] "+r" (result)
+ : [i] "r" (i), [scale] "r" (scale)
+ : "r0", "r1"
+ );
+ return result;
+#endif
+#else
+ #error "No implementation for scale16by8 available."
+#endif
+}
+
+/// scale a 16-bit unsigned value by a 16-bit value,
+/// considered as numerator of a fraction whose denominator
+/// is 65536. In other words, it computes i * (scale / 65536)
+
+LIB8STATIC uint16_t scale16( uint16_t i, fract16 scale )
+{
+ #if SCALE16_C == 1
+ uint16_t result;
+#if FASTLED_SCALE8_FIXED == 1
+ result = ((uint32_t)(i) * (1+(uint32_t)(scale))) / 65536;
+#else
+ result = ((uint32_t)(i) * (uint32_t)(scale)) / 65536;
+#endif
+ return result;
+#elif SCALE16_AVRASM == 1
+#if FASTLED_SCALE8_FIXED == 1
+ // implemented sort of like
+ // result = ((i * scale) + i ) / 65536
+ //
+ // why not like this, you may ask?
+ // result = (i * (scale+1)) / 65536
+ // the answer is that if scale is 65535, then scale+1
+ // will be zero, which is not what we want.
+ uint32_t result;
+ asm volatile(
+ // result.A-B = i.A x scale.A
+ " mul %A[i], %A[scale] \n\t"
+ // save results...
+ // basic idea:
+ //" mov %A[result], r0 \n\t"
+ //" mov %B[result], r1 \n\t"
+ // which can be written as...
+ " movw %A[result], r0 \n\t"
+ // Because we're going to add i.A-B to
+ // result.A-D, we DO need to keep both
+ // the r0 and r1 portions of the product
+ // UNlike in the 'unfixed scale8' version.
+ // So the movw here is needed.
+ : [result] "=r" (result)
+ : [i] "r" (i),
+ [scale] "r" (scale)
+ : "r0", "r1"
+ );
+
+ asm volatile(
+ // result.C-D = i.B x scale.B
+ " mul %B[i], %B[scale] \n\t"
+ //" mov %C[result], r0 \n\t"
+ //" mov %D[result], r1 \n\t"
+ " movw %C[result], r0 \n\t"
+ : [result] "+r" (result)
+ : [i] "r" (i),
+ [scale] "r" (scale)
+ : "r0", "r1"
+ );
+
+ const uint8_t zero = 0;
+ asm volatile(
+ // result.B-D += i.B x scale.A
+ " mul %B[i], %A[scale] \n\t"
+
+ " add %B[result], r0 \n\t"
+ " adc %C[result], r1 \n\t"
+ " adc %D[result], %[zero] \n\t"
+
+ // result.B-D += i.A x scale.B
+ " mul %A[i], %B[scale] \n\t"
+
+ " add %B[result], r0 \n\t"
+ " adc %C[result], r1 \n\t"
+ " adc %D[result], %[zero] \n\t"
+
+ // cleanup r1
+ " clr r1 \n\t"
+
+ : [result] "+r" (result)
+ : [i] "r" (i),
+ [scale] "r" (scale),
+ [zero] "r" (zero)
+ : "r0", "r1"
+ );
+
+ asm volatile(
+ // result.A-D += i.A-B
+ " add %A[result], %A[i] \n\t"
+ " adc %B[result], %B[i] \n\t"
+ " adc %C[result], %[zero] \n\t"
+ " adc %D[result], %[zero] \n\t"
+ : [result] "+r" (result)
+ : [i] "r" (i),
+ [zero] "r" (zero)
+ );
+
+ result = result >> 16;
+ return result;
+#else
+ uint32_t result;
+ asm volatile(
+ // result.A-B = i.A x scale.A
+ " mul %A[i], %A[scale] \n\t"
+ // save results...
+ // basic idea:
+ //" mov %A[result], r0 \n\t"
+ //" mov %B[result], r1 \n\t"
+ // which can be written as...
+ " movw %A[result], r0 \n\t"
+ // We actually don't need to do anything with r0,
+ // as result.A is never used again here, so we
+ // could just move the high byte, but movw is
+ // one clock cycle, just like mov, so might as
+ // well, in case we want to use this code for
+ // a generic 16x16 multiply somewhere.
+
+ : [result] "=r" (result)
+ : [i] "r" (i),
+ [scale] "r" (scale)
+ : "r0", "r1"
+ );
+
+ asm volatile(
+ // result.C-D = i.B x scale.B
+ " mul %B[i], %B[scale] \n\t"
+ //" mov %C[result], r0 \n\t"
+ //" mov %D[result], r1 \n\t"
+ " movw %C[result], r0 \n\t"
+ : [result] "+r" (result)
+ : [i] "r" (i),
+ [scale] "r" (scale)
+ : "r0", "r1"
+ );
+
+ const uint8_t zero = 0;
+ asm volatile(
+ // result.B-D += i.B x scale.A
+ " mul %B[i], %A[scale] \n\t"
+
+ " add %B[result], r0 \n\t"
+ " adc %C[result], r1 \n\t"
+ " adc %D[result], %[zero] \n\t"
+
+ // result.B-D += i.A x scale.B
+ " mul %A[i], %B[scale] \n\t"
+
+ " add %B[result], r0 \n\t"
+ " adc %C[result], r1 \n\t"
+ " adc %D[result], %[zero] \n\t"
+
+ // cleanup r1
+ " clr r1 \n\t"
+
+ : [result] "+r" (result)
+ : [i] "r" (i),
+ [scale] "r" (scale),
+ [zero] "r" (zero)
+ : "r0", "r1"
+ );
+
+ result = result >> 16;
+ return result;
+#endif
+#else
+ #error "No implementation for scale16 available."
+#endif
+}
+///@}
+
+///@defgroup Dimming Dimming and brightening functions
+///
+/// Dimming and brightening functions
+///
+/// The eye does not respond in a linear way to light.
+/// High speed PWM'd LEDs at 50% duty cycle appear far
+/// brighter then the 'half as bright' you might expect.
+///
+/// If you want your midpoint brightness leve (128) to
+/// appear half as bright as 'full' brightness (255), you
+/// have to apply a 'dimming function'.
+///@{
+
+/// Adjust a scaling value for dimming
+LIB8STATIC uint8_t dim8_raw( uint8_t x)
+{
+ return scale8( x, x);
+}
+
+/// Adjust a scaling value for dimming for video (value will never go below 1)
+LIB8STATIC uint8_t dim8_video( uint8_t x)
+{
+ return scale8_video( x, x);
+}
+
+/// Linear version of the dimming function that halves for values < 128
+LIB8STATIC uint8_t dim8_lin( uint8_t x )
+{
+ if( x & 0x80 ) {
+ x = scale8( x, x);
+ } else {
+ x += 1;
+ x /= 2;
+ }
+ return x;
+}
+
+/// inverse of the dimming function, brighten a value
+LIB8STATIC uint8_t brighten8_raw( uint8_t x)
+{
+ uint8_t ix = 255 - x;
+ return 255 - scale8( ix, ix);
+}
+
+/// inverse of the dimming function, brighten a value
+LIB8STATIC uint8_t brighten8_video( uint8_t x)
+{
+ uint8_t ix = 255 - x;
+ return 255 - scale8_video( ix, ix);
+}
+
+/// inverse of the dimming function, brighten a value
+LIB8STATIC uint8_t brighten8_lin( uint8_t x )
+{
+ uint8_t ix = 255 - x;
+ if( ix & 0x80 ) {
+ ix = scale8( ix, ix);
+ } else {
+ ix += 1;
+ ix /= 2;
+ }
+ return 255 - ix;
+}
+
+///@}
+#endif
diff --git a/lib/lib8tion/trig8.h b/lib/lib8tion/trig8.h
new file mode 100644
index 000000000..4907c6ff3
--- /dev/null
+++ b/lib/lib8tion/trig8.h
@@ -0,0 +1,259 @@
+#ifndef __INC_LIB8TION_TRIG_H
+#define __INC_LIB8TION_TRIG_H
+
+///@ingroup lib8tion
+
+///@defgroup Trig Fast trig functions
+/// Fast 8 and 16-bit approximations of sin(x) and cos(x).
+/// Don't use these approximations for calculating the
+/// trajectory of a rocket to Mars, but they're great
+/// for art projects and LED displays.
+///
+/// On Arduino/AVR, the 16-bit approximation is more than
+/// 10X faster than floating point sin(x) and cos(x), while
+/// the 8-bit approximation is more than 20X faster.
+///@{
+
+#if defined(__AVR__)
+#define sin16 sin16_avr
+#else
+#define sin16 sin16_C
+#endif
+
+/// Fast 16-bit approximation of sin(x). This approximation never varies more than
+/// 0.69% from the floating point value you'd get by doing
+///
+/// float s = sin(x) * 32767.0;
+///
+/// @param theta input angle from 0-65535
+/// @returns sin of theta, value between -32767 to 32767.
+LIB8STATIC int16_t sin16_avr( uint16_t theta )
+{
+ static const uint8_t data[] =
+ { 0, 0, 49, 0, 6393%256, 6393/256, 48, 0,
+ 12539%256, 12539/256, 44, 0, 18204%256, 18204/256, 38, 0,
+ 23170%256, 23170/256, 31, 0, 27245%256, 27245/256, 23, 0,
+ 30273%256, 30273/256, 14, 0, 32137%256, 32137/256, 4 /*,0*/ };
+
+ uint16_t offset = (theta & 0x3FFF);
+
+ // AVR doesn't have a multi-bit shift instruction,
+ // so if we say "offset >>= 3", gcc makes a tiny loop.
+ // Inserting empty volatile statements between each
+ // bit shift forces gcc to unroll the loop.
+ offset >>= 1; // 0..8191
+ asm volatile("");
+ offset >>= 1; // 0..4095
+ asm volatile("");
+ offset >>= 1; // 0..2047
+
+ if( theta & 0x4000 ) offset = 2047 - offset;
+
+ uint8_t sectionX4;
+ sectionX4 = offset / 256;
+ sectionX4 *= 4;
+
+ uint8_t m;
+
+ union {
+ uint16_t b;
+ struct {
+ uint8_t blo;
+ uint8_t bhi;
+ };
+ } u;
+
+ //in effect u.b = blo + (256 * bhi);
+ u.blo = data[ sectionX4 ];
+ u.bhi = data[ sectionX4 + 1];
+ m = data[ sectionX4 + 2];
+
+ uint8_t secoffset8 = (uint8_t)(offset) / 2;
+
+ uint16_t mx = m * secoffset8;
+
+ int16_t y = mx + u.b;
+ if( theta & 0x8000 ) y = -y;
+
+ return y;
+}
+
+/// Fast 16-bit approximation of sin(x). This approximation never varies more than
+/// 0.69% from the floating point value you'd get by doing
+///
+/// float s = sin(x) * 32767.0;
+///
+/// @param theta input angle from 0-65535
+/// @returns sin of theta, value between -32767 to 32767.
+LIB8STATIC int16_t sin16_C( uint16_t theta )
+{
+ static const uint16_t base[] =
+ { 0, 6393, 12539, 18204, 23170, 27245, 30273, 32137 };
+ static const uint8_t slope[] =
+ { 49, 48, 44, 38, 31, 23, 14, 4 };
+
+ uint16_t offset = (theta & 0x3FFF) >> 3; // 0..2047
+ if( theta & 0x4000 ) offset = 2047 - offset;
+
+ uint8_t section = offset / 256; // 0..7
+ uint16_t b = base[section];
+ uint8_t m = slope[section];
+
+ uint8_t secoffset8 = (uint8_t)(offset) / 2;
+
+ uint16_t mx = m * secoffset8;
+ int16_t y = mx + b;
+
+ if( theta & 0x8000 ) y = -y;
+
+ return y;
+}
+
+
+/// Fast 16-bit approximation of cos(x). This approximation never varies more than
+/// 0.69% from the floating point value you'd get by doing
+///
+/// float s = cos(x) * 32767.0;
+///
+/// @param theta input angle from 0-65535
+/// @returns sin of theta, value between -32767 to 32767.
+LIB8STATIC int16_t cos16( uint16_t theta)
+{
+ return sin16( theta + 16384);
+}
+
+///////////////////////////////////////////////////////////////////////
+
+// sin8 & cos8
+// Fast 8-bit approximations of sin(x) & cos(x).
+// Input angle is an unsigned int from 0-255.
+// Output is an unsigned int from 0 to 255.
+//
+// This approximation can vary to to 2%
+// from the floating point value you'd get by doing
+// float s = (sin( x ) * 128.0) + 128;
+//
+// Don't use this approximation for calculating the
+// "real" trigonometric calculations, but it's great
+// for art projects and LED displays.
+//
+// On Arduino/AVR, this approximation is more than
+// 20X faster than floating point sin(x) and cos(x)
+
+#if defined(__AVR__) && !defined(LIB8_ATTINY)
+#define sin8 sin8_avr
+#else
+#define sin8 sin8_C
+#endif
+
+
+const uint8_t b_m16_interleave[] = { 0, 49, 49, 41, 90, 27, 117, 10 };
+
+/// Fast 8-bit approximation of sin(x). This approximation never varies more than
+/// 2% from the floating point value you'd get by doing
+///
+/// float s = (sin(x) * 128.0) + 128;
+///
+/// @param theta input angle from 0-255
+/// @returns sin of theta, value between 0 and 255
+LIB8STATIC uint8_t sin8_avr( uint8_t theta)
+{
+ uint8_t offset = theta;
+
+ asm volatile(
+ "sbrc %[theta],6 \n\t"
+ "com %[offset] \n\t"
+ : [theta] "+r" (theta), [offset] "+r" (offset)
+ );
+
+ offset &= 0x3F; // 0..63
+
+ uint8_t secoffset = offset & 0x0F; // 0..15
+ if( theta & 0x40) secoffset++;
+
+ uint8_t m16; uint8_t b;
+
+ uint8_t section = offset >> 4; // 0..3
+ uint8_t s2 = section * 2;
+
+ const uint8_t* p = b_m16_interleave;
+ p += s2;
+ b = *p;
+ p++;
+ m16 = *p;
+
+ uint8_t mx;
+ uint8_t xr1;
+ asm volatile(
+ "mul %[m16],%[secoffset] \n\t"
+ "mov %[mx],r0 \n\t"
+ "mov %[xr1],r1 \n\t"
+ "eor r1, r1 \n\t"
+ "swap %[mx] \n\t"
+ "andi %[mx],0x0F \n\t"
+ "swap %[xr1] \n\t"
+ "andi %[xr1], 0xF0 \n\t"
+ "or %[mx], %[xr1] \n\t"
+ : [mx] "=d" (mx), [xr1] "=d" (xr1)
+ : [m16] "d" (m16), [secoffset] "d" (secoffset)
+ );
+
+ int8_t y = mx + b;
+ if( theta & 0x80 ) y = -y;
+
+ y += 128;
+
+ return y;
+}
+
+
+/// Fast 8-bit approximation of sin(x). This approximation never varies more than
+/// 2% from the floating point value you'd get by doing
+///
+/// float s = (sin(x) * 128.0) + 128;
+///
+/// @param theta input angle from 0-255
+/// @returns sin of theta, value between 0 and 255
+LIB8STATIC uint8_t sin8_C( uint8_t theta)
+{
+ uint8_t offset = theta;
+ if( theta & 0x40 ) {
+ offset = (uint8_t)255 - offset;
+ }
+ offset &= 0x3F; // 0..63
+
+ uint8_t secoffset = offset & 0x0F; // 0..15
+ if( theta & 0x40) secoffset++;
+
+ uint8_t section = offset >> 4; // 0..3
+ uint8_t s2 = section * 2;
+ const uint8_t* p = b_m16_interleave;
+ p += s2;
+ uint8_t b = *p;
+ p++;
+ uint8_t m16 = *p;
+
+ uint8_t mx = (m16 * secoffset) >> 4;
+
+ int8_t y = mx + b;
+ if( theta & 0x80 ) y = -y;
+
+ y += 128;
+
+ return y;
+}
+
+/// Fast 8-bit approximation of cos(x). This approximation never varies more than
+/// 2% from the floating point value you'd get by doing
+///
+/// float s = (cos(x) * 128.0) + 128;
+///
+/// @param theta input angle from 0-255
+/// @returns sin of theta, value between 0 and 255
+LIB8STATIC uint8_t cos8( uint8_t theta)
+{
+ return sin8( theta + 64);
+}
+
+///@}
+#endif
diff --git a/message.mk b/message.mk
index 6894dd8cb..71f37be0b 100644
--- a/message.mk
+++ b/message.mk
@@ -80,3 +80,4 @@ MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex
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) ($(FREE_SIZE) bytes free)\n
+MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n
diff --git a/quantum/api.c b/quantum/api.c
index 52dfe23e1..233f99636 100644
--- a/quantum/api.c
+++ b/quantum/api.c
@@ -67,7 +67,7 @@ void process_api(uint16_t length, uint8_t * data) {
case DT_RGBLIGHT: {
#ifdef RGBLIGHT_ENABLE
uint32_t rgblight = bytes_to_dword(data, 2);
- rgblight_update_dword(rgblight);
+ eeconfig_update_rgblight(rgblight);
#endif
break;
}
diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h
index ce8d47d1c..cd54af38d 100644
--- a/quantum/audio/musical_notes.h
+++ b/quantum/audio/musical_notes.h
@@ -26,12 +26,14 @@
// Note Types
#define MUSICAL_NOTE(note, duration) {(NOTE##note), duration}
+#define BREVE_NOTE(note) MUSICAL_NOTE(note, 128)
#define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64)
#define HALF_NOTE(note) MUSICAL_NOTE(note, 32)
#define QUARTER_NOTE(note) MUSICAL_NOTE(note, 16)
#define EIGHTH_NOTE(note) MUSICAL_NOTE(note, 8)
#define SIXTEENTH_NOTE(note) MUSICAL_NOTE(note, 4)
+#define BREVE_DOT_NOTE(note) MUSICAL_NOTE(note, 128+64)
#define WHOLE_DOT_NOTE(note) MUSICAL_NOTE(note, 64+32)
#define HALF_DOT_NOTE(note) MUSICAL_NOTE(note, 32+16)
#define QUARTER_DOT_NOTE(note) MUSICAL_NOTE(note, 16+8)
@@ -40,11 +42,13 @@
// Note Type Shortcuts
#define M__NOTE(note, duration) MUSICAL_NOTE(note, duration)
+#define B__NOTE(n) BREVE_NOTE(n)
#define W__NOTE(n) WHOLE_NOTE(n)
#define H__NOTE(n) HALF_NOTE(n)
#define Q__NOTE(n) QUARTER_NOTE(n)
#define E__NOTE(n) EIGHTH_NOTE(n)
#define S__NOTE(n) SIXTEENTH_NOTE(n)
+#define BD_NOTE(n) BREVE_DOT_NOTE(n)
#define WD_NOTE(n) WHOLE_DOT_NOTE(n)
#define HD_NOTE(n) HALF_DOT_NOTE(n)
#define QD_NOTE(n) QUARTER_DOT_NOTE(n)
diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h
index 126c0e594..1d4eec711 100644
--- a/quantum/audio/song_list.h
+++ b/quantum/audio/song_list.h
@@ -533,5 +533,263 @@
H__NOTE(_C4 ), \
W__NOTE(_REST), \
QD_NOTE(_F4 ), \
- M__NOTE(_BF4, 128),
+ M__NOTE(_BF4, 128),
+
+#define KATAWARE_DOKI \
+ W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), \
+ B__NOTE(_E5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_C5), H__NOTE(_C6), Q__NOTE(_B5), \
+ Q__NOTE(_A5), H__NOTE(_G5), Q__NOTE(_G5), Q__NOTE(_A5), W__NOTE(_G5), QD_NOTE(_E5), \
+ QD_NOTE(_F5), Q__NOTE(_E5), WD_NOTE(_D5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), \
+ H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), B__NOTE(_E5), H__NOTE(_G4), \
+ Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), \
+ Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), \
+ Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), \
+ Q__NOTE(_C5), HD_NOTE(_D5), H__NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), \
+ H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), \
+ W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), \
+ H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), Q__NOTE(_C5), HD_NOTE(_D5), \
+ HD_NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), BD_NOTE(_C5),
+
+#define CAMPANELLA \
+ Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS5), E__NOTE(_DS5), \
+ E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), \
+ Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_GS4), \
+ E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_G4), E__NOTE(_G4), E__NOTE(_DS6), Q__NOTE(_GS4), E__NOTE(_GS4), \
+ E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS6), \
+ Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_E5), E__NOTE(_E5), E__NOTE(_DS6), Q__NOTE(_DS5), \
+ E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), \
+ E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), \
+ Q__NOTE(_GS4), E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_G4), E__NOTE(_G4), E__NOTE(_DS6), Q__NOTE(_GS4), \
+ E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_DS4), E__NOTE(_DS4), \
+ E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS6), E__NOTE(_DS6), E__NOTE(_DS7), \
+ Q__NOTE(_DS6), E__NOTE(_DS6), E__NOTE(_DS7), Q__NOTE(_CS6), E__NOTE(_CS6), E__NOTE(_DS7), Q__NOTE(_B5), \
+ E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_B5), E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), \
+ E__NOTE(_DS7), Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_G5), E__NOTE(_G5), E__NOTE(_DS7), \
+ Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), E__NOTE(_DS7), Q__NOTE(_DS5), \
+ E__NOTE(_DS5), E__NOTE(_DS7), W__NOTE(_DS6), W__NOTE(_GS5),
+
+#define MEGALOVANIA \
+ Q__NOTE(_D4), Q__NOTE(_D4), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \
+ Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_C4), Q__NOTE(_C4), H__NOTE(_D5), HD_NOTE(_A4), \
+ H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), \
+ Q__NOTE(_B3), Q__NOTE(_B3), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \
+ Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_BF3), Q__NOTE(_BF3), H__NOTE(_D5), \
+ HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), \
+ Q__NOTE(_G4),
+
+#define MICHISHIRUBE \
+ W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), BD_NOTE(_CS6), W__NOTE(_E6), \
+ W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), \
+ W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), W__NOTE(_GS6), H__NOTE(_CS6), \
+ Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_A5), \
+ Q__NOTE(_B5), BD_NOTE(_A5), \
+ H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), \
+ W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), \
+ B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), \
+ H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), B__NOTE(_E6), H__NOTE(_E6), \
+ H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), \
+ W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), H__NOTE(_CS7), B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_E6), \
+ H__NOTE(_E6), H__NOTE(_E6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_CS6), Q__NOTE(_B5), \
+ BD_NOTE(_B5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), \
+ BD_NOTE(_CS6), W__NOTE(_E6), W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), \
+ H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), \
+ W__NOTE(_GS6), H__NOTE(_CS6), Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), \
+ W__NOTE(_B5), H__NOTE(_A5), Q__NOTE(_B5), BD_NOTE(_A5),
+
+#define LIEBESLEID \
+ Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_FS4), Q__NOTE(_EF4), Q__NOTE(_G4), Q__NOTE(_D4), \
+ Q__NOTE(_GS4), Q__NOTE(_CS4), W__NOTE(_A4), H__NOTE(_E5), H__NOTE(_E5), HD_NOTE(_G4), Q__NOTE(_E5), E__NOTE(_E5), \
+ E__NOTE(_F5), ED_NOTE(_E5), HD_NOTE(_D5), Q__NOTE(_E5), H__NOTE(_F5), H__NOTE(_CS5), H__NOTE(_C5), W__NOTE(_G4), \
+ H__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_D5), Q__NOTE(_D5), E__NOTE(_D5), E__NOTE(_E5), E__NOTE(_D5), HD_NOTE(_C5), \
+ Q__NOTE(_D5), H__NOTE(_E5), H__NOTE(_B4), H__NOTE(_BF4), W__NOTE(_F4), H__NOTE(_C5), H__NOTE(_C5), HD_NOTE(_EF4), \
+ Q__NOTE(_C5), E__NOTE(_C5), E__NOTE(_D5), E__NOTE(_C5), HD_NOTE(_BF4), Q__NOTE(_C5), H__NOTE(_D5), H__NOTE(_FS4), \
+ H__NOTE(_F4), HD_NOTE(_E4), Q__NOTE(_A4), HD_NOTE(_FS4), Q__NOTE(_A4), HD_NOTE(_GS4), Q__NOTE(_B4), Q__NOTE(_A4), \
+ Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_FS4), Q__NOTE(_CS4), Q__NOTE(_G4), \
+ Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4),
+
+#define MELODIES_OF_LIFE \
+ H__NOTE(_B5), W__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), W__NOTE(_E6), H__NOTE(_E6), H__NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), \
+ H__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_E6), H__NOTE(_CS6), \
+ H__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_GS6), \
+ WD_NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_B6), H__NOTE(_CS7), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), \
+ H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_A6), Q__NOTE(_GS6), Q__NOTE(_FS6), Q__NOTE(_FS6), \
+ Q__NOTE(_E6), W__NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), WD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_FS6), W__NOTE(_GS6), \
+ H__NOTE(_A6), B__NOTE(_FS6),
+
+#define EYES_ON_ME \
+ Q__NOTE(_A6), Q__NOTE(_G6), Q__NOTE(_FS6), Q__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_G5), Q__NOTE(_FS5), Q__NOTE(_D5), \
+ W__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_A5), M__NOTE(_FS5, 256), H__NOTE(_E5), \
+ H__NOTE(_FS5), B__NOTE(_D5), H__NOTE(_B4), H__NOTE(_D5), BD_NOTE(_E5), H__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), \
+ W__NOTE(_FS5), H__NOTE(_A5), BD_NOTE(_CS6), W__NOTE(_A5), H__NOTE(_CS6), H__NOTE(_D6), WD_NOTE(_B5), \
+ H__NOTE(_A5), H__NOTE(_B5), B__NOTE(_A5), WD_NOTE(_B4), W__NOTE(_CS5), WD_NOTE(_D6), H__NOTE(_D6), \
+ W__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_B5), H__NOTE(_B5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_FS5), H__NOTE(_A5), \
+ WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), W__NOTE(_FS5), WD_NOTE(_E5), \
+ H__NOTE(_CS4), H__NOTE(_E4), H__NOTE(_A4), H__NOTE(_CS5), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_G5), \
+ H__NOTE(_A5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), BD_NOTE(_FS5), W__NOTE(_E5), B__NOTE(_D5), \
+ H__NOTE(_G4), H__NOTE(_FS4), W__NOTE(_E4), BD_NOTE(_D4),
+
+#define SONG_OF_THE_ANCIENTS \
+ H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), H__NOTE(_D6), \
+ H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_G6), H__NOTE(_G5), \
+ H__NOTE(_AF5), B__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), \
+ B__NOTE(_EF6), WD_NOTE(_G5), WD_NOTE(_BF5), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), \
+ H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), WD_NOTE(_B5), WD_NOTE(_G5), WD_NOTE(_G6), W__NOTE(_G6), H__NOTE(_AF6), \
+ W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), \
+ WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), \
+ H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), BD_NOTE(_G6), WD_NOTE(_B5), WD_NOTE(_G6), \
+ W__NOTE(_G6), H__NOTE(_AF6), W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), \
+ H__NOTE(_EF6), B__NOTE(_EF6), WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), \
+ W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), H__NOTE(_G6), W__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), BD_NOTE(_EF6), \
+ WD_NOTE(_F6), WD_NOTE(_G6), BD_NOTE(_C7),
+
+#define NIER_AMUSEMENT_PARK \
+ H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), WD_NOTE(_D6), \
+ Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), W__NOTE(_EF7), \
+ H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), \
+ WD_NOTE(_D6), Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), \
+ H__NOTE(_EF7), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), \
+ H__NOTE(_EF5), WD_NOTE(_D5), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), WD_NOTE(_D5), W__NOTE(_D5), B__NOTE(_G5), \
+ H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), H__NOTE(_EF5), \
+ W__NOTE(_D5), W__NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_D5), W__NOTE(_G5), B__NOTE(_D5), B__NOTE(_E5), \
+ W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), \
+ B__NOTE(_D5), B__NOTE(_BF4), W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), \
+ H__NOTE(_EF5), H__NOTE(_F5), W__NOTE(_D5), W__NOTE(_BF5), W__NOTE(_G5), W__NOTE(_D5), W__NOTE(_EF5), QD_NOTE(_C5), \
+ QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), B__NOTE(_D5), B__NOTE(_BF4), \
+ B__NOTE(_C5), H__NOTE(_C5), H__NOTE(_D5), H__NOTE(_EF5), H__NOTE(_F5), WD_NOTE(_G5), H__NOTE(_C5), W__NOTE(_AF5), \
+ WD_NOTE(_G5),
+
+#define COPIED_CITY \
+ Q__NOTE(_F6), Q__NOTE(_BF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G6), Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), \
+ Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_D6), Q__NOTE(_C6), \
+ Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_EF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_BF4), H__NOTE(_C5), \
+ Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_G6), Q__NOTE(_EF6), Q__NOTE(_BF6), \
+ Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF6), Q__NOTE(_BF5), \
+ Q__NOTE(_B6), Q__NOTE(_DF6), Q__NOTE(_EF6), Q__NOTE(_F6), Q__NOTE(_AF6), Q__NOTE(_EF7), Q__NOTE(_F6), Q__NOTE(_C6), \
+ Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), \
+ Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_C5), Q__NOTE(_BF4), Q__NOTE(_G4), \
+ Q__NOTE(_F4), Q__NOTE(_G4), H__NOTE(_AF4), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), \
+ Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), \
+ Q__NOTE(_AF4), Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF5), Q__NOTE(_F5), \
+ Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_G6), Q__NOTE(_EF6), WD_NOTE(_F7),
+
+#define VAGUE_HOPE_COLD_RAIN \
+ HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_CS6), HD_NOTE(_D6), HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_D6), WD_NOTE(_A6), \
+ HD_NOTE(_FS6), HD_NOTE(_G6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), \
+ W__NOTE(_FS4), H__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), HD_NOTE(_CS6), HD_NOTE(_E6), HD_NOTE(_D6), Q__NOTE(_CS6), \
+ Q__NOTE(_D6), Q__NOTE(_E6), W__NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_D6), HD_NOTE(_D6), Q__NOTE(_D6), H__NOTE(_E6), \
+ WD_NOTE(_CS6), HD_NOTE(_AS5), HD_NOTE(_B5), HD_NOTE(_B5), Q__NOTE(_B4), Q__NOTE(_CS5), Q__NOTE(_D5), HD_NOTE(_A5), \
+ Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), H__NOTE(_FS4), \
+ HD_NOTE(_FS6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_CS5), Q__NOTE(_D5), Q__NOTE(_A5), \
+ HD_NOTE(_FS5), Q__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS6), HD_NOTE(_A6), Q__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), \
+ H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_CS6), H__NOTE(_FS6), E__NOTE(_FS5), E__NOTE(_CS5), Q__NOTE(_B4), H__NOTE(_AS4), \
+ W__NOTE(_FS5), HD_NOTE(_FS6), HD_NOTE(_B5), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_E6), \
+ W__NOTE(_D6), Q__NOTE(_CS6), Q__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), WD_NOTE(_B6), HD_NOTE(_E6), HD_NOTE(_FS6), \
+ HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), H__NOTE(_D6), H__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \
+ HD_NOTE(_CS6), H__NOTE(_FS6), H__NOTE(_A6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_FS6), BD_NOTE(_B6),
+
+#define KAINE_SALVATION \
+ BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), BD_NOTE(_BF4), BD_NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), \
+ W__NOTE(_D5), BD_NOTE(_C5), BD_NOTE(_F4), BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), \
+ BD_NOTE(_BF4), WD_NOTE(_EF5), WD_NOTE(_BF4), W__NOTE(_A4), W__NOTE(_BF4), W__NOTE(_C5), B__NOTE(_C5), H__NOTE(_B4), \
+ H__NOTE(_C5), BD_NOTE(_D5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \
+ H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), \
+ H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \
+ H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), \
+ BD_NOTE(_E5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \
+ H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), H__NOTE(_A5), \
+ WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \
+ H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_D6), WD_NOTE(_D6), W__NOTE(_F5), H__NOTE(_C6), H__NOTE(_C6), \
+ H__NOTE(_BF5), H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_F5), WD_NOTE(_G5), WD_NOTE(_A5), BD_NOTE(_G5),
+
+#define WEIGHT_OF_THE_WORLD \
+ H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), \
+ Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), \
+ Q__NOTE(_D6), H__NOTE(_E6), Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), \
+ H__NOTE(_D6), WD_NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), WD_NOTE(_B5), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), \
+ Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), \
+ H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), Q__NOTE(_D6), H__NOTE(_E6), \
+ Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_D6), BD_NOTE(_D6), \
+ Q__NOTE(_E6), Q__NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), Q__NOTE(_C6), H__NOTE(_C6), HD_NOTE(_C6), \
+ H__NOTE(_B5), H__NOTE(_C6), H__NOTE(_E6), H__NOTE(_G6), WD_NOTE(_G6), Q__NOTE(_C6), B__NOTE(_C6), H__NOTE(_B6), \
+ Q__NOTE(_C7), BD_NOTE(_C7),
+
+#define ISABELLAS_LULLABY \
+ W__NOTE(_BF4), B__NOTE(_D5), W__NOTE(_EF5), B__NOTE(_F5), W__NOTE(_BF5), B__NOTE(_AF5), W__NOTE(_GF5), BD_NOTE(_F5), B__NOTE(_CS5), \
+ W__NOTE(_F5), B__NOTE(_C5), W__NOTE(_EF5), BD_NOTE(_BF4), W__NOTE(_AF4), W__NOTE(_BF4), W__NOTE(_F5), W__NOTE(_GF5), \
+ WD_NOTE(_AF5), H__NOTE(_FS5), W__NOTE(_F5), B__NOTE(_EF5), W__NOTE(_C6), B__NOTE(_AF5), W__NOTE(_F5), WD_NOTE(_AF5), \
+ H__NOTE(_BF5), W__NOTE(_F5), WD_NOTE(_AF5), H__NOTE(_BF5), W__NOTE(_F5), W__NOTE(_EF5), W__NOTE(_BF4), W__NOTE(_AF5), \
+ WD_NOTE(_F5), H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_BF5), W__NOTE(_AF5), \
+ W__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_EF5), H__NOTE(_DF5), W__NOTE(_AF5), BD_NOTE(_F5), WD_NOTE(_BF4), H__NOTE(_C5), \
+ W__NOTE(_CS5), W__NOTE(_EF5), W__NOTE(_AF4), W__NOTE(_EF5), WD_NOTE(_GF5), H__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_F5), \
+ H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_CS6), W__NOTE(_EF6), W__NOTE(_AF5), \
+ W__NOTE(_EF6), WD_NOTE(_GF6), H__NOTE(_F6), W__NOTE(_EF6), B__NOTE(_DF6), H__NOTE(_GF6), H__NOTE(_AF6), BD_NOTE(_DF6), \
+ B__NOTE(_BF5), W__NOTE(_F6), BD_NOTE(_C6), W__NOTE(_AF5), WD_NOTE(_EF6), H__NOTE(_DF6), W__NOTE(_C6), B__NOTE(_BF5),
+
+#define FANTASIE_IMPROMPTU \
+ E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), \
+ E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_A4), \
+ E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), \
+ E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_A4), E__NOTE(_CS5), E__NOTE(_DS5), \
+ E__NOTE(_FS5), E__NOTE(_A5), E__NOTE(_CS6), E__NOTE(_DS6), E__NOTE(_B6), E__NOTE(_A6), E__NOTE(_GS6), E__NOTE(_FS6), \
+ E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_FS6), E__NOTE(_CS6), E__NOTE(_C5), E__NOTE(_DS6), E__NOTE(_A5), E__NOTE(_GS5), \
+ E__NOTE(_FS5), E__NOTE(_A5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_FS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_DS5), \
+ E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_B4), E__NOTE(_A4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), \
+ E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), \
+ E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_AS4), E__NOTE(_GS4), E__NOTE(_REST), \
+ E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), \
+ E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_DS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_REST), E__NOTE(_DS5), \
+ E__NOTE(_B5), E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_CS6), E__NOTE(_B5), \
+ E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_AS5), WD_NOTE(_GS5),
+
+#define TERRAS_THEME \
+ Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_B5), Q__NOTE(_EF6), BD_NOTE(_B5), Q__NOTE(_AS5), Q__NOTE(_GS5), W__NOTE(_AS5), \
+ BD_NOTE(_DS5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_B5), Q__NOTE(_DS6), BD_NOTE(_B5), \
+ Q__NOTE(_BF5), Q__NOTE(_AF5), W__NOTE(_AS5), BD_NOTE(_DS6), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_DS6), \
+ Q__NOTE(_FS6), BD_NOTE(_DS6), Q__NOTE(_CS6), Q__NOTE(_B5), W__NOTE(_CS6), BD_NOTE(_FS5), \
+ Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5),
+
+#define RENAI_CIRCULATION \
+ Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_B5), \
+ HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_GS6), Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), \
+ H__NOTE(_CS6), Q__NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \
+ H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), WD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \
+ HD_NOTE(_GS6), HD_NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \
+ HD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), \
+ Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_A6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), \
+ H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), \
+ H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), Q__NOTE(_GS6), H__NOTE(_E6), \
+ H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), Q__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), \
+ Q__NOTE(_E6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), W__NOTE(_B6), W__NOTE(_GS6), \
+ W__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_FS6), B__NOTE(_GS6), H__NOTE(_GS6), \
+ W__NOTE(_CS7), W__NOTE(_GS6), W__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), \
+ H__NOTE(_FS6), WD_NOTE(_E6),
+
+#define PLATINUM_DISCO \
+ H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), H__NOTE(_FS6), \
+ H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS6), H__NOTE(_FS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), H__NOTE(_FS6), \
+ H__NOTE(_AS6), W__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), Q__NOTE(_GS6), Q__NOTE(_AS6), \
+ Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_DS6), Q__NOTE(_FS6), Q__NOTE(_CS6), Q__NOTE(_DS6), Q__NOTE(_AS5), Q__NOTE(_CS6), \
+ H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), \
+ H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_GS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), \
+ H__NOTE(_FS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_CS6), \
+ Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), WD_NOTE(_FS7), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), \
+ WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), \
+ WD_NOTE(_GS6), H__NOTE(_FS6), WD_NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), \
+ WD_NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), \
+ H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_AS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_DS6), W__NOTE(_FS6), \
+ H__NOTE(_CS6), H__NOTE(_DS6), W__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), \
+ B__NOTE(_FS6),
+
+#define NOCTURNE_OP_9_NO_1 \
+ H__NOTE(_BF5), H__NOTE(_C6), H__NOTE(_DF6), H__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_GF5), W__NOTE(_F5), W__NOTE(_F5), W__NOTE(_F5), \
+ W__NOTE(_F5), H__NOTE(_GF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_C5), B__NOTE(_DF5), W__NOTE(_BF4), Q__NOTE(_BF5), \
+ Q__NOTE(_C6), Q__NOTE(_DF6), Q__NOTE(_A5), Q__NOTE(_BF5), Q__NOTE(_A5), Q__NOTE(_GS5), Q__NOTE(_A5), Q__NOTE(_C6), \
+ Q__NOTE(_BF5), Q__NOTE(_GF5), Q__NOTE(_F5), Q__NOTE(_GF5), Q__NOTE(_E5), Q__NOTE(_F5), Q__NOTE(_BF5), Q__NOTE(_A5), \
+ Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_GF5), Q__NOTE(_F5), Q__NOTE(_E5), Q__NOTE(_EF5), Q__NOTE(_D5), Q__NOTE(_DF5), \
+ Q__NOTE(_C5), Q__NOTE(_DF5), Q__NOTE(_C5), Q__NOTE(_B4), Q__NOTE(_C5), Q__NOTE(_F5), Q__NOTE(_E5), Q__NOTE(_EF5), \
+ B__NOTE(_DF5), W__NOTE(_BF4), W__NOTE(_BF5), W__NOTE(_BF5), W__NOTE(_BF5), BD_NOTE(_AF5), W__NOTE(_DF5), H__NOTE(_BF4), \
+ H__NOTE(_C5), H__NOTE(_DF5), H__NOTE(_GF5), H__NOTE(_GF5), BD_NOTE(_F5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), \
+ H__NOTE(_DF5), H__NOTE(_A4), B__NOTE(_AF4), W__NOTE(_DF5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_DF5), \
+ H__NOTE(_EF5), BD_NOTE(_F5),
+
#endif
diff --git a/quantum/color.c b/quantum/color.c
index 8ede053e7..c49877592 100644
--- a/quantum/color.c
+++ b/quantum/color.c
@@ -78,9 +78,11 @@ RGB hsv_to_rgb( HSV hsv )
break;
}
+#ifdef USE_CIE1931_CURVE
rgb.r = pgm_read_byte( &CIE1931_CURVE[rgb.r] );
rgb.g = pgm_read_byte( &CIE1931_CURVE[rgb.g] );
rgb.b = pgm_read_byte( &CIE1931_CURVE[rgb.b] );
+#endif
return rgb;
}
diff --git a/quantum/config_common.h b/quantum/config_common.h
index 0b2e408a4..c489e1407 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -59,6 +59,11 @@
#define PINC_ADDRESS 0x3
#define PINB_ADDRESS 0x6
#define PINA_ADDRESS 0x9
+ #elif defined(__AVR_ATmega328P__)
+ #define ADDRESS_BASE 0x00
+ #define PINB_ADDRESS 0x3
+ #define PINC_ADDRESS 0x6
+ #define PIND_ADDRESS 0x9
#else
#error "Pins are not defined"
#endif
diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/eager_pr.c
new file mode 100644
index 000000000..9eb9480a7
--- /dev/null
+++ b/quantum/debounce/eager_pr.c
@@ -0,0 +1,100 @@
+/*
+Copyright 2019 Alex Ong<the.onga@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/>.
+*/
+
+/*
+Basic per-row algorithm. Uses an 8-bit counter per row.
+After pressing a key, it immediately changes state, and sets a counter.
+No further inputs are accepted until DEBOUNCE milliseconds have occurred.
+*/
+
+#include "matrix.h"
+#include "timer.h"
+#include "quantum.h"
+#include <stdlib.h>
+
+#ifndef DEBOUNCE
+ #define DEBOUNCE 5
+#endif
+
+
+#define debounce_counter_t uint8_t
+
+static debounce_counter_t *debounce_counters;
+
+#define DEBOUNCE_ELAPSED 251
+#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
+
+void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
+void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+
+//we use num_rows rather than MATRIX_ROWS to support split keyboards
+void debounce_init(uint8_t num_rows)
+{
+ debounce_counters = (debounce_counter_t*)malloc(num_rows*sizeof(debounce_counter_t));
+ for (uint8_t r = 0; r < num_rows; r++)
+ {
+ debounce_counters[r] = DEBOUNCE_ELAPSED;
+ }
+}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed)
+{
+ uint8_t current_time = timer_read() % MAX_DEBOUNCE;
+ update_debounce_counters(num_rows, current_time);
+ transfer_matrix_values(raw, cooked, num_rows, current_time);
+}
+
+//If the current time is > debounce counter, set the counter to enable input.
+void update_debounce_counters(uint8_t num_rows, uint8_t current_time)
+{
+ debounce_counter_t *debounce_pointer = debounce_counters;
+ for (uint8_t row = 0; row < num_rows; row++)
+ {
+ if (*debounce_pointer != DEBOUNCE_ELAPSED)
+ {
+ if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ *debounce_pointer = DEBOUNCE_ELAPSED;
+ }
+ }
+ debounce_pointer++;
+ }
+}
+
+// upload from raw_matrix to final matrix;
+void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time)
+{
+ debounce_counter_t *debounce_pointer = debounce_counters;
+ for (uint8_t row = 0; row < num_rows; row++)
+ {
+ matrix_row_t existing_row = cooked[row];
+ matrix_row_t raw_row = raw[row];
+
+ //determine new value basd on debounce pointer + raw value
+ if (*debounce_pointer == DEBOUNCE_ELAPSED &&
+ (existing_row != raw_row))
+ {
+ *debounce_pointer = current_time;
+ existing_row = raw_row;
+ }
+ cooked[row] = existing_row;
+
+ debounce_pointer++;
+ }
+}
+
+bool debounce_active(void)
+{
+ return true;
+}
+
diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md
index 5b318d845..f77f78c76 100644
--- a/quantum/debounce/readme.md
+++ b/quantum/debounce/readme.md
@@ -22,7 +22,7 @@ Here are a few that could be implemented:
sym_g.c
sym_pk.c
sym_pr.c
-sym_pr_cycles.c //currently used in ergo-dox
+sym_pr_cycles.c
eager_g.c
eager_pk.c
eager_pr.c //could be used in ergo-dox!
diff --git a/quantum/encoder.c b/quantum/encoder.c
index 6629a098b..ddf6234ab 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -17,6 +17,10 @@
#include "encoder.h"
+// for memcpy
+#include <string.h>
+
+
#ifndef ENCODER_RESOLUTION
#define ENCODER_RESOLUTION 4
#endif
@@ -35,7 +39,13 @@ static pin_t encoders_pad_b[NUMBER_OF_ENCODERS] = ENCODERS_PAD_B;
static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 };
static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
+
+#ifdef SPLIT_KEYBOARD
+// slave half encoders come over as second set of encoders
+static int8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0};
+#else
static int8_t encoder_value[NUMBER_OF_ENCODERS] = {0};
+#endif
__attribute__ ((weak))
void encoder_update_user(int8_t index, bool clockwise) { }
@@ -60,11 +70,30 @@ void encoder_read(void) {
encoder_state[i] |= (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1);
encoder_value[i] += encoder_LUT[encoder_state[i] & 0xF];
if (encoder_value[i] >= ENCODER_RESOLUTION) {
- encoder_update_kb(i, COUNTRECLOCKWISE);
+ encoder_update_kb(i, false);
}
if (encoder_value[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
- encoder_update_kb(i, CLOCKWISE);
+ encoder_update_kb(i, true);
}
encoder_value[i] %= ENCODER_RESOLUTION;
}
}
+
+#ifdef SPLIT_KEYBOARD
+void encoder_state_raw(uint8_t* slave_state) {
+ memcpy(slave_state, encoder_state, sizeof(encoder_state));
+}
+
+void encoder_update_raw(uint8_t* slave_state) {
+ for (int i = 0; i < NUMBER_OF_ENCODERS; i++) {
+ encoder_value[NUMBER_OF_ENCODERS + i] += encoder_LUT[slave_state[i] & 0xF];
+ if (encoder_value[NUMBER_OF_ENCODERS + i] >= ENCODER_RESOLUTION) {
+ encoder_update_kb(NUMBER_OF_ENCODERS + i, false);
+ }
+ if (encoder_value[NUMBER_OF_ENCODERS + i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
+ encoder_update_kb(NUMBER_OF_ENCODERS + i, true);
+ }
+ encoder_value[NUMBER_OF_ENCODERS + i] %= ENCODER_RESOLUTION;
+ }
+}
+#endif
diff --git a/quantum/encoder.h b/quantum/encoder.h
index 2024fa303..ec09a8cc4 100644
--- a/quantum/encoder.h
+++ b/quantum/encoder.h
@@ -19,11 +19,13 @@
#include "quantum.h"
-#define COUNTRECLOCKWISE 0
-#define CLOCKWISE 1
-
void encoder_init(void);
void encoder_read(void);
void encoder_update_kb(int8_t index, bool clockwise);
void encoder_update_user(int8_t index, bool clockwise);
+
+#ifdef SPLIT_KEYBOARD
+void encoder_state_raw(uint8_t* slave_state);
+void encoder_update_raw(uint8_t* slave_state);
+#endif
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 9d2d331ce..eef739a14 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -29,10 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "backlight.h"
#include "quantum.h"
-#ifdef SPLIT_KEYBOARD
- #include "split_flags.h"
-#endif
-
#ifdef MIDI_ENABLE
#include "process_midi.h"
#endif
@@ -138,39 +134,21 @@ action_t action_for_key(uint8_t layer, keypos_t key)
#ifdef BACKLIGHT_ENABLE
case BL_ON:
action.code = ACTION_BACKLIGHT_ON();
- #ifdef SPLIT_KEYBOARD
- BACKLIT_DIRTY = true;
- #endif
break;
case BL_OFF:
action.code = ACTION_BACKLIGHT_OFF();
- #ifdef SPLIT_KEYBOARD
- BACKLIT_DIRTY = true;
- #endif
break;
case BL_DEC:
action.code = ACTION_BACKLIGHT_DECREASE();
- #ifdef SPLIT_KEYBOARD
- BACKLIT_DIRTY = true;
- #endif
break;
case BL_INC:
action.code = ACTION_BACKLIGHT_INCREASE();
- #ifdef SPLIT_KEYBOARD
- BACKLIT_DIRTY = true;
- #endif
break;
case BL_TOGG:
action.code = ACTION_BACKLIGHT_TOGGLE();
- #ifdef SPLIT_KEYBOARD
- BACKLIT_DIRTY = true;
- #endif
break;
case BL_STEP:
action.code = ACTION_BACKLIGHT_STEP();
- #ifdef SPLIT_KEYBOARD
- BACKLIT_DIRTY = true;
- #endif
break;
#endif
#ifdef SWAP_HANDS_ENABLE
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c
index b64feb700..d0a9cf232 100644
--- a/quantum/process_keycode/process_unicode_common.c
+++ b/quantum/process_keycode/process_unicode_common.c
@@ -118,6 +118,9 @@ void unicode_input_finish(void) {
case UC_WIN:
unregister_code(KC_LALT);
break;
+ case UC_WINC:
+ tap_code(KC_ENTER);
+ break;
}
set_mods(saved_mods); // Reregister previously set mods
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 96760de87..a62368ded 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -225,27 +225,39 @@ static uint16_t scs_timer[2] = {0, 0};
*/
static bool grave_esc_was_shifted = false;
-bool process_record_quantum(keyrecord_t *record) {
+/* Convert record into usable keycode via the contained event. */
+uint16_t get_record_keycode(keyrecord_t *record) {
+ return get_event_keycode(record->event);
+}
- /* This gets the keycode from the key pressed */
- keypos_t key = record->event.key;
- uint16_t keycode;
+
+/* Convert event into usable keycode. Checks the layer cache to ensure that it
+ * retains the correct keycode after a layer change, if the key is still pressed.
+ */
+uint16_t get_event_keycode(keyevent_t event) {
#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
/* TODO: Use store_or_get_action() or a similar function. */
if (!disable_action_cache) {
uint8_t layer;
- if (record->event.pressed) {
- layer = layer_switch_get_layer(key);
- update_source_layers_cache(key, layer);
+ if (event.pressed) {
+ layer = layer_switch_get_layer(event.key);
+ update_source_layers_cache(event.key, layer);
} else {
- layer = read_source_layers_cache(key);
+ layer = read_source_layers_cache(event.key);
}
- keycode = keymap_key_to_keycode(layer, key);
+ return keymap_key_to_keycode(layer, event.key);
} else
#endif
- keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key);
+ return keymap_key_to_keycode(layer_switch_get_layer(event.key), event.key);
+}
+
+/* Main keycode processing function. Hands off handling to other functions,
+ * then processes internal Quantum keycodes, then processes ACTIONs.
+ */
+bool process_record_quantum(keyrecord_t *record) {
+ uint16_t keycode = get_record_keycode(record);
// This is how you use actions here
// if (keycode == KC_LEAD) {
@@ -274,10 +286,10 @@ bool process_record_quantum(keyrecord_t *record) {
#ifdef HAPTIC_ENABLE
process_haptic(keycode, record) &&
#endif //HAPTIC_ENABLE
- process_record_kb(keycode, record) &&
- #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES)
+ #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYREACTIVE_ENABLED)
process_rgb_matrix(keycode, record) &&
#endif
+ process_record_kb(keycode, record) &&
#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED)
process_midi(keycode, record) &&
#endif
@@ -360,9 +372,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_toggle();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_MODE_FORWARD:
@@ -374,9 +383,6 @@ bool process_record_quantum(keyrecord_t *record) {
else {
rgblight_step();
}
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_MODE_REVERSE:
@@ -388,9 +394,6 @@ bool process_record_quantum(keyrecord_t *record) {
else {
rgblight_step_reverse();
}
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_HUI:
@@ -401,9 +404,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_increase_hue();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_HUD:
@@ -414,9 +414,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_decrease_hue();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_SAI:
@@ -427,9 +424,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_increase_sat();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_SAD:
@@ -440,9 +434,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_decrease_sat();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_VAI:
@@ -453,9 +444,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_increase_val();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_VAD:
@@ -466,9 +454,6 @@ bool process_record_quantum(keyrecord_t *record) {
if (!record->event.pressed) {
#endif
rgblight_decrease_val();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_SPI:
@@ -484,9 +469,6 @@ bool process_record_quantum(keyrecord_t *record) {
case RGB_MODE_PLAIN:
if (record->event.pressed) {
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
return false;
case RGB_MODE_BREATHE:
@@ -1079,12 +1061,6 @@ void matrix_init_quantum() {
matrix_init_kb();
}
-uint8_t rgb_matrix_task_counter = 0;
-
-#ifndef RGB_MATRIX_SKIP_FRAMES
- #define RGB_MATRIX_SKIP_FRAMES 1
-#endif
-
void matrix_scan_quantum() {
#if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE)
matrix_scan_music();
@@ -1108,10 +1084,6 @@ void matrix_scan_quantum() {
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_task();
- if (rgb_matrix_task_counter == 0) {
- rgb_matrix_update_pwm_buffers();
- }
- rgb_matrix_task_counter = ((rgb_matrix_task_counter + 1) % (RGB_MATRIX_SKIP_FRAMES + 1));
#endif
#ifdef ENCODER_ENABLE
diff --git a/quantum/quantum.h b/quantum/quantum.h
index e1e20a760..c7fce9a0f 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -44,10 +44,6 @@
#endif
#endif
-#ifdef SPLIT_KEYBOARD
- #include "split_flags.h"
-#endif
-
#ifdef RGB_MATRIX_ENABLE
#include "rgb_matrix.h"
#endif
@@ -232,6 +228,8 @@ void matrix_init_kb(void);
void matrix_scan_kb(void);
void matrix_init_user(void);
void matrix_scan_user(void);
+uint16_t get_record_keycode(keyrecord_t *record);
+uint16_t get_event_keycode(keyevent_t event);
bool process_action_kb(keyrecord_t *record);
bool process_record_kb(uint16_t keycode, keyrecord_t *record);
bool process_record_user(uint16_t keycode, keyrecord_t *record);
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 2ed36304d..a1193d4c0 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -24,77 +24,96 @@
#include <string.h>
#include <math.h>
-rgb_config_t rgb_matrix_config;
+#include "lib/lib8tion/lib8tion.h"
+
+#include "rgb_matrix_animations/solid_color_anim.h"
+#include "rgb_matrix_animations/alpha_mods_anim.h"
+#include "rgb_matrix_animations/dual_beacon_anim.h"
+#include "rgb_matrix_animations/gradient_up_down_anim.h"
+#include "rgb_matrix_animations/raindrops_anim.h"
+#include "rgb_matrix_animations/cycle_all_anim.h"
+#include "rgb_matrix_animations/cycle_left_right_anim.h"
+#include "rgb_matrix_animations/cycle_up_down_anim.h"
+#include "rgb_matrix_animations/rainbow_beacon_anim.h"
+#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
+#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
+#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
+#include "rgb_matrix_animations/digital_rain_anim.h"
+#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
+#include "rgb_matrix_animations/solid_reactive_anim.h"
+#include "rgb_matrix_animations/splash_anim.h"
+#include "rgb_matrix_animations/solid_splash_anim.h"
+#include "rgb_matrix_animations/breathing_anim.h"
-#ifndef MAX
- #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
+#ifndef RGB_DISABLE_AFTER_TIMEOUT
+ #define RGB_DISABLE_AFTER_TIMEOUT 0
#endif
-#ifndef MIN
- #define MIN(a,b) ((a) < (b)? (a): (b))
+#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED false
#endif
-#ifndef RGB_DISABLE_AFTER_TIMEOUT
- #define RGB_DISABLE_AFTER_TIMEOUT 0
+#ifndef EECONFIG_RGB_MATRIX
+ #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT
#endif
-#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
- #define RGB_DISABLE_WHEN_USB_SUSPENDED false
+#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
+ #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
#endif
-#ifndef EECONFIG_RGB_MATRIX
- #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT
+#if !defined(RGB_MATRIX_HUE_STEP)
+ #define RGB_MATRIX_HUE_STEP 8
#endif
-#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > 255
- #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#if !defined(RGB_MATRIX_SAT_STEP)
+ #define RGB_MATRIX_SAT_STEP 16
#endif
-#ifndef RGB_DIGITAL_RAIN_DROPS
- // lower the number for denser effect/wider keyboard
- #define RGB_DIGITAL_RAIN_DROPS 24
+#if !defined(RGB_MATRIX_VAL_STEP)
+ #define RGB_MATRIX_VAL_STEP 16
#endif
-#if !defined(DISABLE_RGB_MATRIX_RAINDROPS) || !defined(DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS) || !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
- #define TRACK_PREVIOUS_EFFECT
+#if !defined(RGB_MATRIX_SPD_STEP)
+ #define RGB_MATRIX_SPD_STEP 16
#endif
bool g_suspend_state = false;
-// Global tick at 20 Hz
-uint32_t g_tick = 0;
-
-// Ticks since this key was last hit.
-uint8_t g_key_hit[DRIVER_LED_TOTAL];
+rgb_config_t rgb_matrix_config;
-// Ticks since any key was last hit.
-uint32_t g_any_key_hit = 0;
+rgb_counters_t g_rgb_counters;
+static uint32_t rgb_counters_buffer;
-#ifndef PI
-#define PI 3.14159265
-#endif
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ last_hit_t g_last_hit_tracker;
+ static last_hit_t last_hit_buffer;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
uint32_t eeconfig_read_rgb_matrix(void) {
return eeprom_read_dword(EECONFIG_RGB_MATRIX);
}
+
void eeconfig_update_rgb_matrix(uint32_t val) {
eeprom_update_dword(EECONFIG_RGB_MATRIX, val);
}
+
void eeconfig_update_rgb_matrix_default(void) {
dprintf("eeconfig_update_rgb_matrix_default\n");
rgb_matrix_config.enable = 1;
-#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
+#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT;
#else
// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
rgb_matrix_config.mode = RGB_MATRIX_SOLID_COLOR;
#endif
rgb_matrix_config.hue = 0;
- rgb_matrix_config.sat = 255;
+ rgb_matrix_config.sat = UINT8_MAX;
rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
- rgb_matrix_config.speed = 0;
+ rgb_matrix_config.speed = UINT8_MAX / 2;
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
+
void eeconfig_debug_rgb_matrix(void) {
dprintf("rgb_matrix_config eprom\n");
dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable);
@@ -105,691 +124,347 @@ void eeconfig_debug_rgb_matrix(void) {
dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
}
-// Last led hit
-#define LED_HITS_TO_REMEMBER 8
-uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255};
-uint8_t g_last_led_count = 0;
-
-void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) {
- rgb_led led;
- *led_count = 0;
-
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- // map_index_to_led(i, &led);
- led = g_rgb_leds[i];
- if (row == led.matrix_co.row && column == led.matrix_co.col) {
- led_i[*led_count] = i;
- (*led_count)++;
- }
+uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
+ // TODO: This is kinda expensive, fix this soonish
+ uint8_t led_count = 0;
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) {
+ matrix_co_t matrix_co = g_rgb_leds[i].matrix_co;
+ if (row == matrix_co.row && column == matrix_co.col) {
+ led_i[led_count] = i;
+ led_count++;
}
+ }
+ return led_count;
}
void rgb_matrix_update_pwm_buffers(void) {
- rgb_matrix_driver.flush();
+ rgb_matrix_driver.flush();
}
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) {
- rgb_matrix_driver.set_color(index, red, green, blue);
+#ifdef RGB_MATRIX_EXTRA_TOG
+ const bool is_key = g_rgb_leds[index].matrix_co.raw != 0xff;
+ if (
+ (rgb_matrix_config.enable == RGB_ZONE_KEYS && !is_key) ||
+ (rgb_matrix_config.enable == RGB_ZONE_UNDER && is_key)
+ ) {
+ rgb_matrix_driver.set_color(index, 0, 0, 0);
+ return;
+ }
+#endif
+
+ rgb_matrix_driver.set_color(index, red, green, blue);
}
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) {
- rgb_matrix_driver.set_color_all(red, green, blue);
+#ifdef RGB_MATRIX_EXTRA_TOG
+ for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ rgb_matrix_set_color(i, red, green, blue);
+ }
+#else
+ rgb_matrix_driver.set_color_all(red, green, blue);
+#endif
}
bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
- if ( record->event.pressed ) {
- uint8_t led[8], led_count;
- map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count);
- if (led_count > 0) {
- for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) {
- g_last_led_hit[i - 1] = g_last_led_hit[i - 2];
- }
- g_last_led_hit[0] = led[0];
- g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1);
- }
- for(uint8_t i = 0; i < led_count; i++)
- g_key_hit[led[i]] = 0;
- g_any_key_hit = 0;
- } else {
- #ifdef RGB_MATRIX_KEYRELEASES
- uint8_t led[8], led_count;
- map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count);
- for(uint8_t i = 0; i < led_count; i++)
- g_key_hit[led[i]] = 255;
-
- g_any_key_hit = 255;
- #endif
- }
- return true;
-}
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = 0;
+
+#if defined(RGB_MATRIX_KEYRELEASES)
+ if (!record->event.pressed) {
+ led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led);
+ g_rgb_counters.any_key_hit = 0;
+ }
+#elif defined(RGB_MATRIX_KEYPRESSES)
+ if (record->event.pressed) {
+ led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led);
+ g_rgb_counters.any_key_hit = 0;
+ }
+#endif // defined(RGB_MATRIX_KEYRELEASES)
+
+ if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) {
+ memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
+ memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
+ last_hit_buffer.count--;
+ }
-void rgb_matrix_set_suspend_state(bool state) {
- g_suspend_state = state;
+ for(uint8_t i = 0; i < led_count; i++) {
+ uint8_t index = last_hit_buffer.count;
+ last_hit_buffer.x[index] = g_rgb_leds[led[i]].point.x;
+ last_hit_buffer.y[index] = g_rgb_leds[led[i]].point.y;
+ last_hit_buffer.index[index] = led[i];
+ last_hit_buffer.tick[index] = 0;
+ last_hit_buffer.count++;
+ }
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+ return true;
}
void rgb_matrix_test(void) {
- // Mask out bits 4 and 5
- // Increase the factor to make the test animation slower (and reduce to make it faster)
- uint8_t factor = 10;
- switch ( (g_tick & (0b11 << factor)) >> factor )
- {
- case 0:
- {
- rgb_matrix_set_color_all( 20, 0, 0 );
- break;
- }
- case 1:
- {
- rgb_matrix_set_color_all( 0, 20, 0 );
- break;
- }
- case 2:
- {
- rgb_matrix_set_color_all( 0, 0, 20 );
- break;
- }
- case 3:
- {
- rgb_matrix_set_color_all( 20, 20, 20 );
- break;
- }
- }
-}
-
-// All LEDs off
-void rgb_matrix_all_off(void) {
- rgb_matrix_set_color_all( 0, 0, 0 );
-}
-
-// Solid color
-void rgb_matrix_solid_color(void) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color_all( rgb.r, rgb.g, rgb.b );
-}
-
-void rgb_matrix_solid_reactive(void) {
- // Relies on hue being 8-bit and wrapping
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- uint16_t offset2 = g_key_hit[i]<<2;
- offset2 = (offset2<=130) ? (130-offset2) : 0;
-
- HSV hsv = { .h = rgb_matrix_config.hue+offset2, .s = 255, .v = rgb_matrix_config.val };
- RGB rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
-}
-
-// alphas = color1, mods = color2
-void rgb_matrix_alphas_mods(void) {
-
- RGB rgb1 = hsv_to_rgb( (HSV){ .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val } );
- RGB rgb2 = hsv_to_rgb( (HSV){ .h = (rgb_matrix_config.hue + 180) % 360, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val } );
-
- rgb_led led;
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- if ( led.matrix_co.raw < 0xFF ) {
- if ( led.modifier )
- {
- rgb_matrix_set_color( i, rgb2.r, rgb2.g, rgb2.b );
- }
- else
- {
- rgb_matrix_set_color( i, rgb1.r, rgb1.g, rgb1.b );
- }
- }
- }
-}
-
-void rgb_matrix_gradient_up_down(void) {
- int16_t h1 = rgb_matrix_config.hue;
- int16_t h2 = (rgb_matrix_config.hue + 180) % 360;
- int16_t deltaH = h2 - h1;
-
- // Take the shortest path between hues
- if ( deltaH > 127 )
- {
- deltaH -= 256;
- }
- else if ( deltaH < -127 )
- {
- deltaH += 256;
+ // Mask out bits 4 and 5
+ // Increase the factor to make the test animation slower (and reduce to make it faster)
+ uint8_t factor = 10;
+ switch ( (g_rgb_counters.tick & (0b11 << factor)) >> factor )
+ {
+ case 0: {
+ rgb_matrix_set_color_all( 20, 0, 0 );
+ break;
}
- // Divide delta by 4, this gives the delta per row
- deltaH /= 4;
-
- int16_t s1 = rgb_matrix_config.sat;
- int16_t s2 = rgb_matrix_config.hue;
- int16_t deltaS = ( s2 - s1 ) / 4;
-
- HSV hsv = { .h = 0, .s = 255, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- // map_led_to_point( i, &point );
- point = g_rgb_leds[i].point;
- // The y range will be 0..64, map this to 0..4
- uint8_t y = (point.y>>4);
- // Relies on hue being 8-bit and wrapping
- hsv.h = rgb_matrix_config.hue + ( deltaH * y );
- hsv.s = rgb_matrix_config.sat + ( deltaS * y );
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
+ case 1: {
+ rgb_matrix_set_color_all( 0, 20, 0 );
+ break;
}
-}
-
-void rgb_matrix_raindrops(bool initialize) {
- int16_t h1 = rgb_matrix_config.hue;
- int16_t h2 = (rgb_matrix_config.hue + 180) % 360;
- int16_t deltaH = h2 - h1;
- deltaH /= 4;
-
- // Take the shortest path between hues
- if ( deltaH > 127 )
- {
- deltaH -= 256;
- }
- else if ( deltaH < -127 )
- {
- deltaH += 256;
- }
-
- int16_t s1 = rgb_matrix_config.sat;
- int16_t s2 = rgb_matrix_config.sat;
- int16_t deltaS = ( s2 - s1 ) / 4;
-
- HSV hsv;
- RGB rgb;
-
- // Change one LED every tick, make sure speed is not 0
- uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255;
-
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- // If initialize, all get set to random colors
- // If not, all but one will stay the same as before.
- if ( initialize || i == led_to_change )
- {
- hsv.h = h1 + ( deltaH * ( rand() & 0x03 ) );
- hsv.s = s1 + ( deltaS * ( rand() & 0x03 ) );
- // Override brightness with global brightness control
- hsv.v = rgb_matrix_config.val;
-
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
- }
-}
-
-void rgb_matrix_cycle_all(void) {
- uint8_t offset = ( g_tick << rgb_matrix_config.speed ) & 0xFF;
-
- rgb_led led;
-
- // Relies on hue being 8-bit and wrapping
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- // map_index_to_led(i, &led);
- led = g_rgb_leds[i];
- if (led.matrix_co.raw < 0xFF) {
- uint16_t offset2 = g_key_hit[i]<<2;
- offset2 = (offset2<=63) ? (63-offset2) : 0;
-
- HSV hsv = { .h = offset+offset2, .s = 255, .v = rgb_matrix_config.val };
- RGB rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
+ case 2: {
+ rgb_matrix_set_color_all( 0, 0, 20 );
+ break;
}
-}
-
-void rgb_matrix_cycle_left_right(void) {
- uint8_t offset = ( g_tick << rgb_matrix_config.speed ) & 0xFF;
- HSV hsv = { .h = 0, .s = 255, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- rgb_led led;
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- // map_index_to_led(i, &led);
- led = g_rgb_leds[i];
- if (led.matrix_co.raw < 0xFF) {
- uint16_t offset2 = g_key_hit[i]<<2;
- offset2 = (offset2<=63) ? (63-offset2) : 0;
-
- // map_led_to_point( i, &point );
- point = g_rgb_leds[i].point;
- // Relies on hue being 8-bit and wrapping
- hsv.h = point.x + offset + offset2;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
- }
-}
-
-void rgb_matrix_cycle_up_down(void) {
- uint8_t offset = ( g_tick << rgb_matrix_config.speed ) & 0xFF;
- HSV hsv = { .h = 0, .s = 255, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- rgb_led led;
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- // map_index_to_led(i, &led);
- led = g_rgb_leds[i];
- if (led.matrix_co.raw < 0xFF) {
- uint16_t offset2 = g_key_hit[i]<<2;
- offset2 = (offset2<=63) ? (63-offset2) : 0;
-
- // map_led_to_point( i, &point );
- point = g_rgb_leds[i].point;
- // Relies on hue being 8-bit and wrapping
- hsv.h = point.y + offset + offset2;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
+ case 3: {
+ rgb_matrix_set_color_all( 20, 20, 20 );
+ break;
}
+ }
}
+static bool rgb_matrix_none(effect_params_t* params) {
+ if (!params->init) {
+ return false;
+ }
-void rgb_matrix_dual_beacon(void) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- double cos_value = cos(g_tick * PI / 128) / 32;
- double sin_value = sin(g_tick * PI / 128) / 112;
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- point = g_rgb_leds[i].point;
- hsv.h = ((point.y - 32.0)* cos_value + (point.x - 112.0) * sin_value) * (180) + rgb_matrix_config.hue;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, 0, 0, 0);
+ }
+ return led_max < DRIVER_LED_TOTAL;
}
-void rgb_matrix_rainbow_beacon(void) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- double cos_value = cos(g_tick * PI / 128);
- double sin_value = sin(g_tick * PI / 128);
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- point = g_rgb_leds[i].point;
- hsv.h = (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.y - 32.0)* cos_value + (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.x - 112.0) * sin_value + rgb_matrix_config.hue;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
-}
+static uint8_t rgb_last_enable = UINT8_MAX;
+static uint8_t rgb_last_effect = UINT8_MAX;
+static effect_params_t rgb_effect_params = { 0, 0 };
+static rgb_task_states rgb_task_state = SYNCING;
-void rgb_matrix_rainbow_pinwheels(void) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- double cos_value = cos(g_tick * PI / 128);
- double sin_value = sin(g_tick * PI / 128);
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- point = g_rgb_leds[i].point;
- hsv.h = (2 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.y - 32.0)* cos_value + (2 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (66 - abs(point.x - 112.0)) * sin_value + rgb_matrix_config.hue;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
+static void rgb_task_timers(void) {
+ // Update double buffer timers
+ uint16_t deltaTime = timer_elapsed32(rgb_counters_buffer);
+ rgb_counters_buffer = timer_read32();
+ if (g_rgb_counters.any_key_hit < UINT32_MAX) {
+ if (UINT32_MAX - deltaTime < g_rgb_counters.any_key_hit) {
+ g_rgb_counters.any_key_hit = UINT32_MAX;
+ } else {
+ g_rgb_counters.any_key_hit += deltaTime;
}
-}
+ }
-void rgb_matrix_rainbow_moving_chevron(void) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb;
- Point point;
- uint8_t r = 128;
- double cos_value = cos(r * PI / 128);
- double sin_value = sin(r * PI / 128);
- double multiplier = (g_tick / 256.0 * 224);
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- point = g_rgb_leds[i].point;
- hsv.h = (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * abs(point.y - 32.0)* sin_value + (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.x - multiplier) * cos_value + rgb_matrix_config.hue;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
+ // Update double buffer last hit timers
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t count = last_hit_buffer.count;
+ for (uint8_t i = 0; i < count; ++i) {
+ if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) {
+ last_hit_buffer.count--;
+ continue;
}
-}
-
-
-void rgb_matrix_jellybean_raindrops( bool initialize ) {
- HSV hsv;
- RGB rgb;
+ last_hit_buffer.tick[i] += deltaTime;
+ }
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+}
+
+static void rgb_task_sync(void) {
+ // next task
+ if (timer_elapsed32(g_rgb_counters.tick) >= RGB_MATRIX_LED_FLUSH_LIMIT)
+ rgb_task_state = STARTING;
+}
+
+static void rgb_task_start(void) {
+ // reset iter
+ rgb_effect_params.iter = 0;
+
+ // update double buffers
+ g_rgb_counters.tick = rgb_counters_buffer;
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker = last_hit_buffer;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+ // next task
+ rgb_task_state = RENDERING;
+}
+
+static void rgb_task_render(uint8_t effect) {
+ bool rendering = false;
+ rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable);
+
+ // each effect can opt to do calculations
+ // and/or request PWM buffer updates.
+ switch (effect) {
+ case RGB_MATRIX_NONE:
+ rendering = rgb_matrix_none(&rgb_effect_params);
+ break;
+
+ case RGB_MATRIX_SOLID_COLOR:
+ rendering = rgb_matrix_solid_color(&rgb_effect_params); // Max 1ms Avg 0ms
+ break;
+#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
+ case RGB_MATRIX_ALPHAS_MODS:
+ rendering = rgb_matrix_alphas_mods(&rgb_effect_params); // Max 2ms Avg 1ms
+ break;
+#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
+#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+ case RGB_MATRIX_GRADIENT_UP_DOWN:
+ rendering = rgb_matrix_gradient_up_down(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#ifndef DISABLE_RGB_MATRIX_BREATHING
+ case RGB_MATRIX_BREATHING:
+ rendering = rgb_matrix_breathing(&rgb_effect_params); // Max 1ms Avg 0ms
+ break;
+#endif // DISABLE_RGB_MATRIX_BREATHING
+#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
+ case RGB_MATRIX_CYCLE_ALL:
+ rendering = rgb_matrix_cycle_all(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
+#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+ case RGB_MATRIX_CYCLE_LEFT_RIGHT:
+ rendering = rgb_matrix_cycle_left_right(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+ case RGB_MATRIX_CYCLE_UP_DOWN:
+ rendering = rgb_matrix_cycle_up_down(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+ case RGB_MATRIX_RAINBOW_MOVING_CHEVRON:
+ rendering = rgb_matrix_rainbow_moving_chevron(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
+ case RGB_MATRIX_DUAL_BEACON:
+ rendering = rgb_matrix_dual_beacon(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
+ case RGB_MATRIX_RAINBOW_BEACON:
+ rendering = rgb_matrix_rainbow_beacon(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+ case RGB_MATRIX_RAINBOW_PINWHEELS:
+ rendering = rgb_matrix_rainbow_pinwheels(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#ifndef DISABLE_RGB_MATRIX_RAINDROPS
+ case RGB_MATRIX_RAINDROPS:
+ rendering = rgb_matrix_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms
+ break;
+#endif // DISABLE_RGB_MATRIX_RAINDROPS
+#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+ case RGB_MATRIX_JELLYBEAN_RAINDROPS:
+ rendering = rgb_matrix_jellybean_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms
+ break;
+#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
+ case RGB_MATRIX_DIGITAL_RAIN:
+ rendering = rgb_matrix_digital_rain(&rgb_effect_params); // Max 9ms Avg 8ms | this is expensive, fix it
+ break;
+#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+ case RGB_MATRIX_SOLID_REACTIVE_SIMPLE:
+ rendering = rgb_matrix_solid_reactive_simple(&rgb_effect_params);// Max 4ms Avg 3ms
+ break;
+#endif
+#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
+ case RGB_MATRIX_SOLID_REACTIVE:
+ rendering = rgb_matrix_solid_reactive(&rgb_effect_params); // Max 4ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
+#ifndef DISABLE_RGB_MATRIX_SPLASH
+ case RGB_MATRIX_SPLASH:
+ rendering = rgb_matrix_splash(&rgb_effect_params); // Max 5ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_SPLASH
+#ifndef DISABLE_RGB_MATRIX_MULTISPLASH
+ case RGB_MATRIX_MULTISPLASH:
+ rendering = rgb_matrix_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms
+ break;
+#endif // DISABLE_RGB_MATRIX_MULTISPLASH
+#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
+ case RGB_MATRIX_SOLID_SPLASH:
+ rendering = rgb_matrix_solid_splash(&rgb_effect_params); // Max 5ms Avg 3ms
+ break;
+#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH
+#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+ case RGB_MATRIX_SOLID_MULTISPLASH:
+ rendering = rgb_matrix_solid_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms
+ break;
+#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
- // Change one LED every tick, make sure speed is not 0
- uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255;
+ // Factory default magic value
+ case UINT8_MAX: {
+ rgb_matrix_test();
+ rgb_task_state = FLUSHING;
+ }
+ return;
+ }
- for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
- {
- // If initialize, all get set to random colors
- // If not, all but one will stay the same as before.
- if ( initialize || i == led_to_change )
- {
- hsv.h = rand() & 0xFF;
- hsv.s = rand() & 0xFF;
- // Override brightness with global brightness control
- hsv.v = rgb_matrix_config.val;
+ rgb_effect_params.iter++;
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
+ // next task
+ if (!rendering) {
+ rgb_task_state = FLUSHING;
+ if (!rgb_effect_params.init && effect == RGB_MATRIX_NONE) {
+ // We only need to flush once if we are RGB_MATRIX_NONE
+ rgb_task_state = SYNCING;
}
+ }
}
-void rgb_matrix_digital_rain( const bool initialize ) {
- // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
- const uint8_t drop_ticks = 28;
- const uint8_t pure_green_intensity = 0xd0;
- const uint8_t max_brightness_boost = 0xc0;
- const uint8_t max_intensity = 0xff;
+static void rgb_task_flush(uint8_t effect) {
+ // update last trackers after the first full render so we can init over several frames
+ rgb_last_effect = effect;
+ rgb_last_enable = rgb_matrix_config.enable;
- static uint8_t map[MATRIX_COLS][MATRIX_ROWS] = {{0}};
- static uint8_t drop = 0;
-
- if (initialize) {
- rgb_matrix_set_color_all(0, 0, 0);
- memset(map, 0, sizeof map);
- drop = 0;
- }
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
- // top row, pixels have just fallen and we're
- // making a new rain drop in this column
- map[col][row] = max_intensity;
- }
- else if (map[col][row] > 0 && map[col][row] < max_intensity) {
- // neither fully bright nor dark, decay it
- map[col][row]--;
- }
- // set the pixel colour
- uint8_t led, led_count;
- map_row_column_to_led(row, col, &led, &led_count);
-
- if (map[col][row] > pure_green_intensity) {
- const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost
- * (map[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity));
- rgb_matrix_set_color(led, boost, max_intensity, boost);
- }
- else {
- const uint8_t green = (uint8_t) ((uint16_t) max_intensity * map[col][row] / pure_green_intensity);
- rgb_matrix_set_color(led, 0, green, 0);
- }
- }
- }
- if (++drop > drop_ticks) {
- // reset drop timer
- drop = 0;
- for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- // if ths is on the bottom row and bright allow decay
- if (row == MATRIX_ROWS - 1 && map[col][row] == max_intensity) {
- map[col][row]--;
- }
- // check if the pixel above is bright
- if (map[col][row - 1] == max_intensity) {
- // allow old bright pixel to decay
- map[col][row - 1]--;
- // make this pixel bright
- map[col][row] = max_intensity;
- }
- }
- }
- }
-}
+ // update pwm buffers
+ rgb_matrix_update_pwm_buffers();
-void rgb_matrix_multisplash(void) {
- // if (g_any_key_hit < 0xFF) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb;
- rgb_led led;
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- uint16_t c = 0, d = 0;
- rgb_led last_led;
- // if (g_last_led_count) {
- for (uint8_t last_i = 0; last_i < g_last_led_count; last_i++) {
- last_led = g_rgb_leds[g_last_led_hit[last_i]];
- uint16_t dist = (uint16_t)sqrt(pow(led.point.x - last_led.point.x, 2) + pow(led.point.y - last_led.point.y, 2));
- uint16_t effect = (g_key_hit[g_last_led_hit[last_i]] << 2) - dist;
- c += MIN(MAX(effect, 0), 255);
- d += 255 - MIN(MAX(effect, 0), 255);
- }
- // } else {
- // d = 255;
- // }
- hsv.h = (rgb_matrix_config.hue + c) % 256;
- hsv.v = MAX(MIN(d, 255), 0);
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
- // } else {
- // rgb_matrix_set_color_all( 0, 0, 0 );
- // }
-}
-
-
-void rgb_matrix_splash(void) {
- g_last_led_count = MIN(g_last_led_count, 1);
- rgb_matrix_multisplash();
-}
-
-
-void rgb_matrix_solid_multisplash(void) {
- // if (g_any_key_hit < 0xFF) {
- HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val };
- RGB rgb;
- rgb_led led;
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
- led = g_rgb_leds[i];
- uint16_t d = 0;
- rgb_led last_led;
- // if (g_last_led_count) {
- for (uint8_t last_i = 0; last_i < g_last_led_count; last_i++) {
- last_led = g_rgb_leds[g_last_led_hit[last_i]];
- uint16_t dist = (uint16_t)sqrt(pow(led.point.x - last_led.point.x, 2) + pow(led.point.y - last_led.point.y, 2));
- uint16_t effect = (g_key_hit[g_last_led_hit[last_i]] << 2) - dist;
- d += 255 - MIN(MAX(effect, 0), 255);
- }
- // } else {
- // d = 255;
- // }
- hsv.v = MAX(MIN(d, 255), 0);
- rgb = hsv_to_rgb( hsv );
- rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
- }
- // } else {
- // rgb_matrix_set_color_all( 0, 0, 0 );
- // }
-}
-
-
-void rgb_matrix_solid_splash(void) {
- g_last_led_count = MIN(g_last_led_count, 1);
- rgb_matrix_solid_multisplash();
-}
-
-
-// Needs eeprom access that we don't have setup currently
-
-void rgb_matrix_custom(void) {
-// HSV hsv;
-// RGB rgb;
-// for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
-// {
-// backlight_get_key_color(i, &hsv);
-// // Override brightness with global brightness control
-// hsv.v = rgb_matrix_config.val;
-// rgb = hsv_to_rgb( hsv );
-// rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
-// }
+ // next task
+ rgb_task_state = SYNCING;
}
void rgb_matrix_task(void) {
- #ifdef TRACK_PREVIOUS_EFFECT
- static uint8_t toggle_enable_last = 255;
- #endif
- if (!rgb_matrix_config.enable) {
- rgb_matrix_all_off();
- rgb_matrix_indicators();
- #ifdef TRACK_PREVIOUS_EFFECT
- toggle_enable_last = rgb_matrix_config.enable;
- #endif
- return;
- }
- // delay 1 second before driving LEDs or doing anything else
- static uint8_t startup_tick = 0;
- if ( startup_tick < 20 ) {
- startup_tick++;
- return;
- }
-
- g_tick++;
-
- if ( g_any_key_hit < 0xFFFFFFFF ) {
- g_any_key_hit++;
- }
-
- for ( int led = 0; led < DRIVER_LED_TOTAL; led++ ) {
- if ( g_key_hit[led] < 255 ) {
- if (g_key_hit[led] == 254)
- g_last_led_count = MAX(g_last_led_count - 1, 0);
- g_key_hit[led]++;
- }
- }
-
- // Factory default magic value
- if ( rgb_matrix_config.mode == 255 ) {
- rgb_matrix_test();
- return;
- }
-
- // Ideally we would also stop sending zeros to the LED driver PWM buffers
- // while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight = ((g_suspend_state && RGB_DISABLE_WHEN_USB_SUSPENDED) ||
- (RGB_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20));
- uint8_t effect = suspend_backlight ? 0 : rgb_matrix_config.mode;
-
- #ifdef TRACK_PREVIOUS_EFFECT
- // Keep track of the effect used last time,
- // detect change in effect, so each effect can
- // have an optional initialization.
-
- static uint8_t effect_last = 255;
- bool initialize = (effect != effect_last) || (rgb_matrix_config.enable != toggle_enable_last);
- effect_last = effect;
- toggle_enable_last = rgb_matrix_config.enable;
- #endif
-
- // this gets ticked at 20 Hz.
- // each effect can opt to do calculations
- // and/or request PWM buffer updates.
- switch ( effect ) {
- case RGB_MATRIX_SOLID_COLOR:
- rgb_matrix_solid_color();
- break;
- #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
- case RGB_MATRIX_ALPHAS_MODS:
- rgb_matrix_alphas_mods();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
- case RGB_MATRIX_DUAL_BEACON:
- rgb_matrix_dual_beacon();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
- case RGB_MATRIX_GRADIENT_UP_DOWN:
- rgb_matrix_gradient_up_down();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_RAINDROPS
- case RGB_MATRIX_RAINDROPS:
- rgb_matrix_raindrops( initialize );
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
- case RGB_MATRIX_CYCLE_ALL:
- rgb_matrix_cycle_all();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
- case RGB_MATRIX_CYCLE_LEFT_RIGHT:
- rgb_matrix_cycle_left_right();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
- case RGB_MATRIX_CYCLE_UP_DOWN:
- rgb_matrix_cycle_up_down();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
- case RGB_MATRIX_RAINBOW_BEACON:
- rgb_matrix_rainbow_beacon();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
- case RGB_MATRIX_RAINBOW_PINWHEELS:
- rgb_matrix_rainbow_pinwheels();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
- case RGB_MATRIX_RAINBOW_MOVING_CHEVRON:
- rgb_matrix_rainbow_moving_chevron();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
- case RGB_MATRIX_JELLYBEAN_RAINDROPS:
- rgb_matrix_jellybean_raindrops( initialize );
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
- case RGB_MATRIX_DIGITAL_RAIN:
- rgb_matrix_digital_rain( initialize );
- break;
- #endif
- #ifdef RGB_MATRIX_KEYPRESSES
- #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
- case RGB_MATRIX_SOLID_REACTIVE:
- rgb_matrix_solid_reactive();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_SPLASH
- case RGB_MATRIX_SPLASH:
- rgb_matrix_splash();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_MULTISPLASH
- case RGB_MATRIX_MULTISPLASH:
- rgb_matrix_multisplash();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
- case RGB_MATRIX_SOLID_SPLASH:
- rgb_matrix_solid_splash();
- break;
- #endif
- #ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
- case RGB_MATRIX_SOLID_MULTISPLASH:
- rgb_matrix_solid_multisplash();
- break;
- #endif
- #endif
- default:
- rgb_matrix_custom();
- break;
- }
-
- if ( ! suspend_backlight ) {
- rgb_matrix_indicators();
- }
+ rgb_task_timers();
+
+ // Ideally we would also stop sending zeros to the LED driver PWM buffers
+ // while suspended and just do a software shutdown. This is a cheap hack for now.
+ bool suspend_backlight = ((g_suspend_state && RGB_DISABLE_WHEN_USB_SUSPENDED) || (RGB_DISABLE_AFTER_TIMEOUT > 0 && g_rgb_counters.any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20));
+ uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode;
+
+ switch (rgb_task_state) {
+ case STARTING:
+ rgb_task_start();
+ break;
+ case RENDERING:
+ rgb_task_render(effect);
+ break;
+ case FLUSHING:
+ rgb_task_flush(effect);
+ break;
+ case SYNCING:
+ rgb_task_sync();
+ break;
+ }
+ if (!suspend_backlight) {
+ rgb_matrix_indicators();
+ }
}
void rgb_matrix_indicators(void) {
- rgb_matrix_indicators_kb();
- rgb_matrix_indicators_user();
+ rgb_matrix_indicators_kb();
+ rgb_matrix_indicators_user();
}
__attribute__((weak))
@@ -798,103 +473,54 @@ void rgb_matrix_indicators_kb(void) {}
__attribute__((weak))
void rgb_matrix_indicators_user(void) {}
-
-// void rgb_matrix_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column )
-// {
-// if ( row >= MATRIX_ROWS )
-// {
-// // Special value, 255=none, 254=all
-// *index = row;
-// }
-// else
-// {
-// // This needs updated to something like
-// // uint8_t led[8], led_count;
-// // map_row_column_to_led(row,column,led,&led_count);
-// // for(uint8_t i = 0; i < led_count; i++)
-// map_row_column_to_led( row, column, index );
-// }
-// }
-
void rgb_matrix_init(void) {
rgb_matrix_driver.init();
// TODO: put the 1 second startup delay here?
- // clear the key hits
- for ( int led=0; led<DRIVER_LED_TOTAL; led++ ) {
- g_key_hit[led] = 255;
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ g_last_hit_tracker.tick[i] = UINT16_MAX;
}
+ last_hit_buffer.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ last_hit_buffer.tick[i] = UINT16_MAX;
+ }
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
if (!eeconfig_is_enabled()) {
- dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
- eeconfig_init();
- eeconfig_update_rgb_matrix_default();
+ dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
+ eeconfig_init();
+ eeconfig_update_rgb_matrix_default();
}
+
rgb_matrix_config.raw = eeconfig_read_rgb_matrix();
+ rgb_matrix_config.speed = UINT8_MAX / 2; //EECONFIG needs to be increased to support this
if (!rgb_matrix_config.mode) {
- dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");
- eeconfig_update_rgb_matrix_default();
- rgb_matrix_config.raw = eeconfig_read_rgb_matrix();
+ dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");
+ eeconfig_update_rgb_matrix_default();
+ rgb_matrix_config.raw = eeconfig_read_rgb_matrix();
}
eeconfig_debug_rgb_matrix(); // display current eeprom values
}
-// Deals with the messy details of incrementing an integer
-static uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
- int16_t new_value = value;
- new_value += step;
- return MIN( MAX( new_value, min ), max );
-}
-
-static uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) {
- int16_t new_value = value;
- new_value -= step;
- return MIN( MAX( new_value, min ), max );
-}
-
-// void *backlight_get_custom_key_color_eeprom_address( uint8_t led )
-// {
-// // 3 bytes per color
-// return EECONFIG_RGB_MATRIX + ( led * 3 );
-// }
-
-// void backlight_get_key_color( uint8_t led, HSV *hsv )
-// {
-// void *address = backlight_get_custom_key_color_eeprom_address( led );
-// hsv->h = eeprom_read_byte(address);
-// hsv->s = eeprom_read_byte(address+1);
-// hsv->v = eeprom_read_byte(address+2);
-// }
-
-// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv )
-// {
-// uint8_t led[8], led_count;
-// map_row_column_to_led(row,column,led,&led_count);
-// for(uint8_t i = 0; i < led_count; i++) {
-// if ( led[i] < DRIVER_LED_TOTAL )
-// {
-// void *address = backlight_get_custom_key_color_eeprom_address(led[i]);
-// eeprom_update_byte(address, hsv.h);
-// eeprom_update_byte(address+1, hsv.s);
-// eeprom_update_byte(address+2, hsv.v);
-// }
-// }
-// }
-
-uint32_t rgb_matrix_get_tick(void) {
- return g_tick;
+void rgb_matrix_set_suspend_state(bool state) {
+ g_suspend_state = state;
}
void rgb_matrix_toggle(void) {
- rgb_matrix_config.enable ^= 1;
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.enable++;
+ if (!rgb_matrix_config.enable) {
+ rgb_task_state = STARTING;
+ }
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_enable(void) {
rgb_matrix_config.enable = 1;
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_enable_noeeprom(void) {
@@ -903,7 +529,7 @@ void rgb_matrix_enable_noeeprom(void) {
void rgb_matrix_disable(void) {
rgb_matrix_config.enable = 0;
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_disable_noeeprom(void) {
@@ -911,76 +537,79 @@ void rgb_matrix_disable_noeeprom(void) {
}
void rgb_matrix_step(void) {
- rgb_matrix_config.mode++;
- if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX)
- rgb_matrix_config.mode = 1;
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.mode++;
+ if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX)
+ rgb_matrix_config.mode = 1;
+ rgb_task_state = STARTING;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_step_reverse(void) {
- rgb_matrix_config.mode--;
- if (rgb_matrix_config.mode < 1)
- rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1;
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.mode--;
+ if (rgb_matrix_config.mode < 1)
+ rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1;
+ rgb_task_state = STARTING;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_increase_hue(void) {
- rgb_matrix_config.hue = increment( rgb_matrix_config.hue, 8, 0, 255 );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.hue += RGB_MATRIX_HUE_STEP;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_decrease_hue(void) {
- rgb_matrix_config.hue = decrement( rgb_matrix_config.hue, 8, 0, 255 );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.hue -= RGB_MATRIX_HUE_STEP;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_increase_sat(void) {
- rgb_matrix_config.sat = increment( rgb_matrix_config.sat, 8, 0, 255 );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.sat = qadd8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_decrease_sat(void) {
- rgb_matrix_config.sat = decrement( rgb_matrix_config.sat, 8, 0, 255 );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.sat = qsub8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_increase_val(void) {
- rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.val = qadd8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP);
+ if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS)
+ rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_decrease_val(void) {
- rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.val = qsub8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_increase_speed(void) {
- rgb_matrix_config.speed = increment( rgb_matrix_config.speed, 1, 0, 3 );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this
+ rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this
}
void rgb_matrix_decrease_speed(void) {
- rgb_matrix_config.speed = decrement( rgb_matrix_config.speed, 1, 0, 3 );
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this
+ rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP);
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this
}
void rgb_matrix_mode(uint8_t mode) {
- rgb_matrix_config.mode = mode;
- eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
+ rgb_matrix_config.mode = mode;
+ rgb_task_state = STARTING;
+ eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
void rgb_matrix_mode_noeeprom(uint8_t mode) {
- rgb_matrix_config.mode = mode;
+ rgb_matrix_config.mode = mode;
}
uint8_t rgb_matrix_get_mode(void) {
- return rgb_matrix_config.mode;
+ return rgb_matrix_config.mode;
}
void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) {
- rgb_matrix_config.hue = hue;
- rgb_matrix_config.sat = sat;
- rgb_matrix_config.val = val;
+ rgb_matrix_sethsv_noeeprom(hue, sat, val);
eeconfig_update_rgb_matrix(rgb_matrix_config.raw);
}
@@ -988,4 +617,6 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) {
rgb_matrix_config.hue = hue;
rgb_matrix_config.sat = sat;
rgb_matrix_config.val = val;
+ if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS)
+ rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS;
}
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
index e43532d11..855ea0323 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix.h
@@ -21,32 +21,33 @@
#include <stdint.h>
#include <stdbool.h>
+#include "rgb_matrix_types.h"
#include "color.h"
#include "quantum.h"
#ifdef IS31FL3731
- #include "is31fl3731.h"
+ #include "is31fl3731.h"
#elif defined (IS31FL3733)
- #include "is31fl3733.h"
+ #include "is31fl3733.h"
#endif
-typedef struct Point {
- uint8_t x;
- uint8_t y;
-} __attribute__((packed)) Point;
+#ifndef RGB_MATRIX_LED_FLUSH_LIMIT
+ #define RGB_MATRIX_LED_FLUSH_LIMIT 16
+#endif
-typedef struct rgb_led {
- union {
- uint8_t raw;
- struct {
- uint8_t row:4; // 16 max
- uint8_t col:4; // 16 max
- };
- } matrix_co;
- Point point;
- uint8_t modifier:1;
-} __attribute__((packed)) rgb_led;
+#ifndef RGB_MATRIX_LED_PROCESS_LIMIT
+ #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
+#endif
+#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+#define RGB_MATRIX_USE_LIMITS(min, max) uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \
+ uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \
+ if (max > DRIVER_LED_TOTAL) \
+ max = DRIVER_LED_TOTAL;
+#else
+#define RGB_MATRIX_USE_LIMITS(min, max) uint8_t min = 0; \
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
@@ -56,76 +57,73 @@ typedef struct
uint8_t index;
} rgb_indicator;
-typedef union {
- uint32_t raw;
- struct {
- bool enable :1;
- uint8_t mode :6;
- uint16_t hue :9;
- uint8_t sat :8;
- uint8_t val :8;
- uint8_t speed :8;//EECONFIG needs to be increased to support this
- };
-} rgb_config_t;
-
enum rgb_matrix_effects {
+ RGB_MATRIX_NONE = 0,
RGB_MATRIX_SOLID_COLOR = 1,
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
- RGB_MATRIX_ALPHAS_MODS,
-#endif
-#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
- RGB_MATRIX_DUAL_BEACON,
-#endif
+ RGB_MATRIX_ALPHAS_MODS,
+#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
- RGB_MATRIX_GRADIENT_UP_DOWN,
-#endif
-#ifndef DISABLE_RGB_MATRIX_RAINDROPS
- RGB_MATRIX_RAINDROPS,
-#endif
+ RGB_MATRIX_GRADIENT_UP_DOWN,
+#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#ifndef DISABLE_RGB_MATRIX_BREATHING
+ RGB_MATRIX_BREATHING,
+#endif // DISABLE_RGB_MATRIX_BREATHING
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
- RGB_MATRIX_CYCLE_ALL,
-#endif
+ RGB_MATRIX_CYCLE_ALL,
+#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
- RGB_MATRIX_CYCLE_LEFT_RIGHT,
-#endif
+ RGB_MATRIX_CYCLE_LEFT_RIGHT,
+#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
- RGB_MATRIX_CYCLE_UP_DOWN,
-#endif
+ RGB_MATRIX_CYCLE_UP_DOWN,
+#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+ RGB_MATRIX_RAINBOW_MOVING_CHEVRON,
+#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
+ RGB_MATRIX_DUAL_BEACON,
+#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
- RGB_MATRIX_RAINBOW_BEACON,
-#endif
+ RGB_MATRIX_RAINBOW_BEACON,
+#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
- RGB_MATRIX_RAINBOW_PINWHEELS,
-#endif
-#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
- RGB_MATRIX_RAINBOW_MOVING_CHEVRON,
-#endif
+ RGB_MATRIX_RAINBOW_PINWHEELS,
+#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+#ifndef DISABLE_RGB_MATRIX_RAINDROPS
+ RGB_MATRIX_RAINDROPS,
+#endif // DISABLE_RGB_MATRIX_RAINDROPS
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
- RGB_MATRIX_JELLYBEAN_RAINDROPS,
-#endif
+ RGB_MATRIX_JELLYBEAN_RAINDROPS,
+#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
- RGB_MATRIX_DIGITAL_RAIN,
-#endif
-#ifdef RGB_MATRIX_KEYPRESSES
- #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
- RGB_MATRIX_SOLID_REACTIVE,
- #endif
- #ifndef DISABLE_RGB_MATRIX_SPLASH
- RGB_MATRIX_SPLASH,
- #endif
- #ifndef DISABLE_RGB_MATRIX_MULTISPLASH
- RGB_MATRIX_MULTISPLASH,
- #endif
- #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
- RGB_MATRIX_SOLID_SPLASH,
- #endif
- #ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
- RGB_MATRIX_SOLID_MULTISPLASH,
- #endif
-#endif
- RGB_MATRIX_EFFECT_MAX
+ RGB_MATRIX_DIGITAL_RAIN,
+#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+ RGB_MATRIX_SOLID_REACTIVE_SIMPLE,
+#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
+ RGB_MATRIX_SOLID_REACTIVE,
+#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
+#ifndef DISABLE_RGB_MATRIX_SPLASH
+ RGB_MATRIX_SPLASH,
+#endif // DISABLE_RGB_MATRIX_SPLASH
+#ifndef DISABLE_RGB_MATRIX_MULTISPLASH
+ RGB_MATRIX_MULTISPLASH,
+#endif // DISABLE_RGB_MATRIX_MULTISPLASH
+#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
+ RGB_MATRIX_SOLID_SPLASH,
+#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH
+#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+ RGB_MATRIX_SOLID_MULTISPLASH,
+#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+ RGB_MATRIX_EFFECT_MAX
};
+uint8_t rgb_matrix_map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i);
+
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue );
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
@@ -159,8 +157,6 @@ void rgb_matrix_decrease(void);
// void backlight_get_key_color( uint8_t led, HSV *hsv );
// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv );
-uint32_t rgb_matrix_get_tick(void);
-
void rgb_matrix_toggle(void);
void rgb_matrix_enable(void);
void rgb_matrix_enable_noeeprom(void);
@@ -209,7 +205,6 @@ uint8_t rgb_matrix_get_mode(void);
typedef struct {
/* Perform any initialisation required for the other driver functions to work. */
void (*init)(void);
-
/* Set the colour of a single LED in the buffer. */
void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b);
/* Set the colour of all LEDS on the keyboard in the buffer. */
diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h
new file mode 100644
index 000000000..cc1914d7f
--- /dev/null
+++ b/quantum/rgb_matrix_animations/alpha_mods_anim.h
@@ -0,0 +1,26 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
+
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+// alphas = color1, mods = color2
+bool rgb_matrix_alphas_mods(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
+ RGB rgb1 = hsv_to_rgb(hsv);
+ hsv.h += rgb_matrix_config.speed;
+ RGB rgb2 = hsv_to_rgb(hsv);
+
+ for (uint8_t i = led_min; i < led_max; i++) {
+ if (g_rgb_leds[i].modifier) {
+ rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
+ } else {
+ rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h
new file mode 100644
index 000000000..4a9a1dcdb
--- /dev/null
+++ b/quantum/rgb_matrix_animations/breathing_anim.h
@@ -0,0 +1,20 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_BREATHING
+
+extern rgb_counters_t g_rgb_counters;
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_breathing(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8);
+ uint8_t val = scale8(abs8(sin8(time) - 128) * 2, rgb_matrix_config.val);
+ HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val };
+ RGB rgb = hsv_to_rgb(hsv);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_BREATHING
diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h
new file mode 100644
index 000000000..5c18cfa0c
--- /dev/null
+++ b/quantum/rgb_matrix_animations/cycle_all_anim.h
@@ -0,0 +1,21 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_cycle_all(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ hsv.h = time;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h
new file mode 100644
index 000000000..f519aeb47
--- /dev/null
+++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h
@@ -0,0 +1,22 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_cycle_left_right(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ hsv.h = point.x - time;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h
new file mode 100644
index 000000000..8b91d890d
--- /dev/null
+++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h
@@ -0,0 +1,22 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_cycle_up_down(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ hsv.h = point.y - time;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h
new file mode 100644
index 000000000..4ba3c1c87
--- /dev/null
+++ b/quantum/rgb_matrix_animations/digital_rain_anim.h
@@ -0,0 +1,74 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
+
+#ifndef RGB_DIGITAL_RAIN_DROPS
+ // lower the number for denser effect/wider keyboard
+ #define RGB_DIGITAL_RAIN_DROPS 24
+#endif
+
+bool rgb_matrix_digital_rain(effect_params_t* params) {
+ // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
+ const uint8_t drop_ticks = 28;
+ const uint8_t pure_green_intensity = 0xd0;
+ const uint8_t max_brightness_boost = 0xc0;
+ const uint8_t max_intensity = 0xff;
+
+ static uint8_t map[MATRIX_COLS][MATRIX_ROWS] = {{0}};
+ static uint8_t drop = 0;
+
+ if (params->init) {
+ rgb_matrix_set_color_all(0, 0, 0);
+ memset(map, 0, sizeof map);
+ drop = 0;
+ }
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
+ // top row, pixels have just fallen and we're
+ // making a new rain drop in this column
+ map[col][row] = max_intensity;
+ }
+ else if (map[col][row] > 0 && map[col][row] < max_intensity) {
+ // neither fully bright nor dark, decay it
+ map[col][row]--;
+ }
+ // set the pixel colour
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led);
+
+ // TODO: multiple leds are supported mapped to the same row/column
+ if (led_count > 0) {
+ if (map[col][row] > pure_green_intensity) {
+ const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (map[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity));
+ rgb_matrix_set_color(led[0], boost, max_intensity, boost);
+ }
+ else {
+ const uint8_t green = (uint8_t) ((uint16_t) max_intensity * map[col][row] / pure_green_intensity);
+ rgb_matrix_set_color(led[0], 0, green, 0);
+ }
+ }
+ }
+ }
+ if (++drop > drop_ticks) {
+ // reset drop timer
+ drop = 0;
+ for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ // if ths is on the bottom row and bright allow decay
+ if (row == MATRIX_ROWS - 1 && map[col][row] == max_intensity) {
+ map[col][row]--;
+ }
+ // check if the pixel above is bright
+ if (map[col][row - 1] == max_intensity) {
+ // allow old bright pixel to decay
+ map[col][row - 1]--;
+ // make this pixel bright
+ map[col][row] = max_intensity;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h
new file mode 100644
index 000000000..dda315780
--- /dev/null
+++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h
@@ -0,0 +1,24 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_dual_beacon(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ int8_t cos_value = cos8(time) - 128;
+ int8_t sin_value = sin8(time) - 128;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h
new file mode 100644
index 000000000..11498e22f
--- /dev/null
+++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h
@@ -0,0 +1,22 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_gradient_up_down(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint8_t scale = scale8(64, rgb_matrix_config.speed);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ // The y range will be 0..64, map this to 0..4
+ // Relies on hue being 8-bit and wrapping
+ hsv.h = rgb_matrix_config.hue + scale * (point.y >> 4);
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
new file mode 100644
index 000000000..01ff5c230
--- /dev/null
+++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
@@ -0,0 +1,30 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+static void jellybean_raindrops_set_color(int i) {
+ HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val };
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+}
+
+bool rgb_matrix_jellybean_raindrops(effect_params_t* params) {
+ if (!params->init) {
+ // Change one LED every tick, make sure speed is not 0
+ if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) {
+ jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL);
+ }
+ return false;
+ }
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (int i = led_min; i < led_max; i++) {
+ jellybean_raindrops_set_color(i);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h
new file mode 100644
index 000000000..3c15e64ab
--- /dev/null
+++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h
@@ -0,0 +1,24 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ int16_t cos_value = 2 * (cos8(time) - 128);
+ int16_t sin_value = 2 * (sin8(time) - 128);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h
new file mode 100644
index 000000000..0d11d5280
--- /dev/null
+++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h
@@ -0,0 +1,22 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h
new file mode 100644
index 000000000..d7cd42cbe
--- /dev/null
+++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h
@@ -0,0 +1,24 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+
+extern rgb_counters_t g_rgb_counters;
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
+ uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
+ int16_t cos_value = 3 * (cos8(time) - 128);
+ int16_t sin_value = 3 * (sin8(time) - 128);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ point_t point = g_rgb_leds[i].point;
+ hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue;
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h
new file mode 100644
index 000000000..fc721375b
--- /dev/null
+++ b/quantum/rgb_matrix_animations/raindrops_anim.h
@@ -0,0 +1,40 @@
+#pragma once
+#ifndef DISABLE_RGB_MATRIX_RAINDROPS
+#include "rgb_matrix_types.h"
+
+extern rgb_counters_t g_rgb_counters;
+extern rgb_config_t rgb_matrix_config;
+
+static void raindrops_set_color(int i) {
+ HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val };
+
+ // Take the shortest path between hues
+ int16_t deltaH = ((rgb_matrix_config.hue + 180) % 360 - rgb_matrix_config.hue) / 4;
+ if (deltaH > 127) {
+ deltaH -= 256;
+ } else if (deltaH < -127) {
+ deltaH += 256;
+ }
+
+ hsv.h = rgb_matrix_config.hue + (deltaH * (rand() & 0x03));
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+}
+
+bool rgb_matrix_raindrops(effect_params_t* params) {
+ if (!params->init) {
+ // Change one LED every tick, make sure speed is not 0
+ if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
+ raindrops_set_color(rand() % DRIVER_LED_TOTAL);
+ }
+ return false;
+ }
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (int i = led_min; i < led_max; i++) {
+ raindrops_set_color(i);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_RAINDROPS
diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h
new file mode 100644
index 000000000..24a197beb
--- /dev/null
+++ b/quantum/rgb_matrix_animations/solid_color_anim.h
@@ -0,0 +1,14 @@
+#pragma once
+
+extern rgb_config_t rgb_matrix_config;
+
+bool rgb_matrix_solid_color(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
+ RGB rgb = hsv_to_rgb(hsv);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h
new file mode 100644
index 000000000..220e54233
--- /dev/null
+++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h
@@ -0,0 +1,33 @@
+#pragma once
+#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED)
+#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
+
+extern rgb_config_t rgb_matrix_config;
+extern last_hit_t g_last_hit_tracker;
+
+bool rgb_matrix_solid_reactive(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { rgb_matrix_config.hue, 255, rgb_matrix_config.val };
+ // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255
+ uint16_t max_tick = 65535 / rgb_matrix_config.speed;
+ // Relies on hue being 8-bit and wrapping
+ for (uint8_t i = led_min; i < led_max; i++) {
+ uint16_t tick = max_tick;
+ for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) {
+ if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
+ tick = g_last_hit_tracker.tick[j];
+ break;
+ }
+ }
+
+ uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
+ hsv.h = rgb_matrix_config.hue + qsub8(130, offset);
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED)
diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h
new file mode 100644
index 000000000..e84cd6939
--- /dev/null
+++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h
@@ -0,0 +1,32 @@
+#pragma once
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+
+extern rgb_config_t rgb_matrix_config;
+extern last_hit_t g_last_hit_tracker;
+
+bool rgb_matrix_solid_reactive_simple(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 };
+ // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255
+ uint16_t max_tick = 65535 / rgb_matrix_config.speed;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ uint16_t tick = max_tick;
+ for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) {
+ if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
+ tick = g_last_hit_tracker.tick[j];
+ break;
+ }
+ }
+
+ uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
+ hsv.v = scale8(255 - offset, rgb_matrix_config.val);
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h
new file mode 100644
index 000000000..82ac055b8
--- /dev/null
+++ b/quantum/rgb_matrix_animations/solid_splash_anim.h
@@ -0,0 +1,42 @@
+#pragma once
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+#if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH)
+
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+extern last_hit_t g_last_hit_tracker;
+
+static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 };
+ uint8_t count = g_last_hit_tracker.count;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ hsv.v = 0;
+ point_t point = g_rgb_leds[i].point;
+ for (uint8_t j = start; j < count; j++) {
+ int16_t dx = point.x - g_last_hit_tracker.x[j];
+ int16_t dy = point.y - g_last_hit_tracker.y[j];
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist;
+ if (effect > 255)
+ effect = 255;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ }
+ hsv.v = scale8(hsv.v, rgb_matrix_config.val);
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+bool rgb_matrix_solid_multisplash(effect_params_t* params) {
+ return rgb_matrix_solid_multisplash_range(0, params);
+}
+
+bool rgb_matrix_solid_splash(effect_params_t* params) {
+ return rgb_matrix_solid_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params);
+}
+
+#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h
new file mode 100644
index 000000000..829d30eef
--- /dev/null
+++ b/quantum/rgb_matrix_animations/splash_anim.h
@@ -0,0 +1,44 @@
+#pragma once
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
+
+extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+extern rgb_config_t rgb_matrix_config;
+extern last_hit_t g_last_hit_tracker;
+
+static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = { 0, rgb_matrix_config.sat, 0 };
+ uint8_t count = g_last_hit_tracker.count;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ hsv.h = rgb_matrix_config.hue;
+ hsv.v = 0;
+ point_t point = g_rgb_leds[i].point;
+ for (uint8_t j = start; j < count; j++) {
+ int16_t dx = point.x - g_last_hit_tracker.x[j];
+ int16_t dy = point.y - g_last_hit_tracker.y[j];
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist;
+ if (effect > 255)
+ effect = 255;
+ hsv.h += effect;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ }
+ hsv.v = scale8(hsv.v, rgb_matrix_config.val);
+ RGB rgb = hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+bool rgb_matrix_multisplash(effect_params_t* params) {
+ return rgb_matrix_multisplash_range(0, params);
+}
+
+bool rgb_matrix_splash(effect_params_t* params) {
+ return rgb_matrix_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params);
+}
+
+#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h
new file mode 100644
index 000000000..908e96da5
--- /dev/null
+++ b/quantum/rgb_matrix_types.h
@@ -0,0 +1,97 @@
+#pragma once
+
+#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
+
+#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
+ #define RGB_MATRIX_KEYREACTIVE_ENABLED
+#endif
+
+// Last led hit
+#ifndef LED_HITS_TO_REMEMBER
+ #define LED_HITS_TO_REMEMBER 8
+#endif // LED_HITS_TO_REMEMBER
+
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+typedef struct PACKED {
+ uint8_t count;
+ uint8_t x[LED_HITS_TO_REMEMBER];
+ uint8_t y[LED_HITS_TO_REMEMBER];
+ uint8_t index[LED_HITS_TO_REMEMBER];
+ uint16_t tick[LED_HITS_TO_REMEMBER];
+} last_hit_t;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+typedef enum rgb_task_states {
+ STARTING,
+ RENDERING,
+ FLUSHING,
+ SYNCING
+} rgb_task_states;
+
+typedef uint8_t led_flags_t;
+
+typedef struct PACKED {
+ uint8_t iter;
+ led_flags_t flags;
+ bool init;
+} effect_params_t;
+
+typedef struct PACKED {
+ // Global tick at 20 Hz
+ uint32_t tick;
+ // Ticks since this key was last hit.
+ uint32_t any_key_hit;
+} rgb_counters_t;
+
+typedef struct PACKED {
+ uint8_t x;
+ uint8_t y;
+} point_t;
+
+typedef union {
+ uint8_t raw;
+ struct {
+ uint8_t row:4; // 16 max
+ uint8_t col:4; // 16 max
+ };
+} matrix_co_t;
+
+typedef struct PACKED {
+ matrix_co_t matrix_co;
+ point_t point;
+ uint8_t modifier:1;
+} rgb_led;
+
+typedef enum {
+ RGB_ZONE_OFF = 0,
+ RGB_ZONE_ALL,
+ RGB_ZONE_KEYS,
+ RGB_ZONE_UNDER,
+} rgb_zone_t;
+
+typedef union {
+ uint32_t raw;
+ struct PACKED {
+ uint8_t enable :2;
+ uint8_t mode :6;
+ uint8_t hue :8;
+ uint8_t sat :8;
+ uint8_t val :8;
+ uint8_t speed :8;//EECONFIG needs to be increased to support this
+ };
+} rgb_config_t;
+
+#if defined(_MSC_VER)
+#pragma pack( pop )
+#endif
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 52e0be8ba..08515564b 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -51,6 +51,10 @@ static inline int is_static_effect(uint8_t mode) {
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
+#ifdef RGBLIGHT_LED_MAP
+const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP;
+#endif
+
#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
__attribute__ ((weak))
const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
@@ -62,6 +66,15 @@ bool is_rgblight_initialized = false;
LED_TYPE led[RGBLED_NUM];
bool rgblight_timer_enabled = false;
+static uint8_t clipping_start_pos = 0;
+static uint8_t clipping_num_leds = RGBLED_NUM;
+
+void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
+ clipping_start_pos = start_pos;
+ clipping_num_leds = num_leds;
+}
+
+
void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
uint8_t r = 0, g = 0, b = 0, base, color;
@@ -225,11 +238,14 @@ void rgblight_init(void) {
}
+uint32_t rgblight_read_dword(void) {
+ return rgblight_config.raw;
+}
+
void rgblight_update_dword(uint32_t dword) {
rgblight_config.raw = dword;
- eeconfig_update_rgblight(rgblight_config.raw);
if (rgblight_config.enable)
- rgblight_mode(rgblight_config.mode);
+ rgblight_mode_noeeprom(rgblight_config.mode);
else {
#ifdef RGBLIGHT_USE_TIMER
rgblight_timer_disable();
@@ -614,7 +630,7 @@ void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) {
|| defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT)
static uint8_t get_interval_time(const uint8_t* default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) {
- return
+ return
#ifdef VELOCIKEY_ENABLE
velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) :
#endif
@@ -661,11 +677,20 @@ void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val) {
#ifndef RGBLIGHT_CUSTOM_DRIVER
void rgblight_set(void) {
+ LED_TYPE *start_led = led + clipping_start_pos;
+ uint16_t num_leds = clipping_num_leds;
if (rgblight_config.enable) {
+ #ifdef RGBLIGHT_LED_MAP
+ LED_TYPE led0[RGBLED_NUM];
+ for(uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led0[i] = led[pgm_read_byte(&led_map[i])];
+ }
+ start_led = led0 + clipping_start_pos;
+ #endif
#ifdef RGBW
- ws2812_setleds_rgbw(led, RGBLED_NUM);
+ ws2812_setleds_rgbw(start_led, num_leds);
#else
- ws2812_setleds(led, RGBLED_NUM);
+ ws2812_setleds(start_led, num_leds);
#endif
} else {
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
@@ -674,9 +699,9 @@ void rgblight_set(void) {
led[i].b = 0;
}
#ifdef RGBW
- ws2812_setleds_rgbw(led, RGBLED_NUM);
+ ws2812_setleds_rgbw(start_led, num_leds);
#else
- ws2812_setleds(led, RGBLED_NUM);
+ ws2812_setleds(start_led, num_leds);
#endif
}
}
@@ -796,7 +821,7 @@ void rgblight_effect_breathing(uint8_t interval) {
float val;
uint8_t interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[interval], 1, 100);
-
+
if (timer_elapsed(last_timer) < interval_time) {
return;
}
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index f92388c96..1769f719d 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -174,6 +174,7 @@ void rgblight_step_reverse(void);
uint8_t rgblight_get_mode(void);
void rgblight_mode(uint8_t mode);
void rgblight_set(void);
+uint32_t rgblight_read_dword(void);
void rgblight_update_dword(uint32_t dword);
void rgblight_increase_hue(void);
void rgblight_decrease_hue(void);
@@ -196,6 +197,7 @@ void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val);
void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val);
+void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds);
uint32_t eeconfig_read_rgblight(void);
void eeconfig_update_rgblight(uint32_t val);
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index f2a277c69..eb110bd23 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -25,11 +25,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "matrix.h"
#include "split_util.h"
#include "config.h"
-#include "split_flags.h"
#include "quantum.h"
#include "debounce.h"
#include "transport.h"
+#ifdef ENCODER_ENABLE
+ #include "encoder.h"
+#endif
+
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
@@ -321,6 +324,9 @@ uint8_t matrix_scan(void) {
matrix_scan_quantum();
} else {
transport_slave(matrix + thisHand);
+#ifdef ENCODER_ENABLE
+ encoder_read();
+#endif
matrix_slave_scan_user();
}
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 5095cb8fd..09a307b8e 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -3,7 +3,6 @@
#include "keyboard.h"
#include "config.h"
#include "timer.h"
-#include "split_flags.h"
#include "transport.h"
#include "quantum.h"
@@ -12,25 +11,25 @@
# include "eeconfig.h"
#endif
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT)
+#include "rgblight.h"
+#endif
+
volatile bool isLeftHand = true;
__attribute__((weak))
bool is_keyboard_left(void) {
- #ifdef SPLIT_HAND_PIN
+ #if defined(SPLIT_HAND_PIN)
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
setPinInput(SPLIT_HAND_PIN);
return readPin(SPLIT_HAND_PIN);
- #else
- #ifdef EE_HANDS
- return eeprom_read_byte(EECONFIG_HANDEDNESS);
- #else
- #ifdef MASTER_RIGHT
- return !is_keyboard_master();
- #else
- return is_keyboard_master();
- #endif
- #endif
+ #elif defined(EE_HANDS)
+ return eeprom_read_byte(EECONFIG_HANDEDNESS);
+ #elif defined(MASTER_RIGHT)
+ return !is_keyboard_master();
#endif
+
+ return is_keyboard_master();
}
bool is_keyboard_master(void)
@@ -60,10 +59,6 @@ static void keyboard_master_setup(void) {
#endif
#endif
transport_master_init();
-
- // For master the Backlight info needs to be sent on startup
- // Otherwise the salve won't start with the proper info until an update
- BACKLIT_DIRTY = true;
}
static void keyboard_slave_setup(void)
@@ -76,6 +71,16 @@ void matrix_setup(void)
{
isLeftHand = is_keyboard_left();
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT)
+ uint8_t num_rgb_leds_split[2] = RGBLED_SPLIT;
+ if (isLeftHand) {
+ rgblight_set_clipping_range(0, num_rgb_leds_split[0]);
+ }
+ else {
+ rgblight_set_clipping_range(num_rgb_leds_split[0], num_rgb_leds_split[1]);
+ }
+#endif
+
if (is_keyboard_master())
{
keyboard_master_setup();
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 95738530e..ab055ee65 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -1,189 +1,170 @@
+#include <string.h>
+#include <stddef.h>
#include "config.h"
#include "matrix.h"
#include "quantum.h"
-#define ROWS_PER_HAND (MATRIX_ROWS/2)
+#define ROWS_PER_HAND (MATRIX_ROWS / 2)
#ifdef RGBLIGHT_ENABLE
-# include "rgblight.h"
+# include "rgblight.h"
#endif
#ifdef BACKLIGHT_ENABLE
-# include "backlight.h"
- extern backlight_config_t backlight_config;
+# include "backlight.h"
+extern backlight_config_t backlight_config;
+#endif
+
+#ifdef ENCODER_ENABLE
+# include "encoder.h"
#endif
#if defined(USE_I2C) || defined(EH)
-#include "i2c.h"
+# include "i2c_master.h"
+# include "i2c_slave.h"
-#ifndef SLAVE_I2C_ADDRESS
-# define SLAVE_I2C_ADDRESS 0x32
+typedef struct __attribute__ ((__packed__)) {
+#ifdef BACKLIGHT_ENABLE
+ uint8_t backlight_level;
#endif
-
-#if (MATRIX_COLS > 8)
-# error "Currently only supports 8 COLS"
+#ifdef RGBLIGHT_ENABLE
+ uint32_t rgb_settings;
+#endif
+#ifdef ENCODER_ENABLE
+ uint8_t encoder_state[NUMBER_OF_ENCODERS];
#endif
+ // Keep matrix last, we are only using this for it's offset
+ uint8_t matrix_start[0];
+} transport_values_t;
-// Get rows from other half over i2c
-bool transport_master(matrix_row_t matrix[]) {
- int err = 0;
+__attribute__ ((unused))
+static transport_values_t transport_values;
- // write backlight info
#ifdef BACKLIGHT_ENABLE
- if (BACKLIT_DIRTY) {
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
- if (err) { goto i2c_error; }
-
- // Backlight location
- err = i2c_master_write(I2C_BACKLIT_START);
- if (err) { goto i2c_error; }
+# define I2C_BACKLIT_START (uint8_t)offsetof(transport_values_t, backlight_level)
+#endif
- // Write backlight
- i2c_master_write(get_backlight_level());
+#ifdef RGBLIGHT_ENABLE
+# define I2C_RGB_START (uint8_t)offsetof(transport_values_t, rgb_settings)
+#endif
- BACKLIT_DIRTY = false;
- }
+#ifdef ENCODER_ENABLE
+# define I2C_ENCODER_START (uint8_t)offsetof(transport_values_t, encoder_state)
#endif
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
- if (err) { goto i2c_error; }
+#define I2C_KEYMAP_START (uint8_t)offsetof(transport_values_t, matrix_start)
+
+# define TIMEOUT 100
- // start of matrix stored at I2C_KEYMAP_START
- err = i2c_master_write(I2C_KEYMAP_START);
- if (err) { goto i2c_error; }
+# ifndef SLAVE_I2C_ADDRESS
+# define SLAVE_I2C_ADDRESS 0x32
+# endif
- // Start read
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
- if (err) { goto i2c_error; }
+// Get rows from other half over i2c
+bool transport_master(matrix_row_t matrix[]) {
+ i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_START, (void *)matrix, ROWS_PER_HAND * sizeof(matrix_row_t), TIMEOUT);
- if (!err) {
- int i;
- for (i = 0; i < ROWS_PER_HAND-1; ++i) {
- matrix[i] = i2c_master_read(I2C_ACK);
+ // write backlight info
+# ifdef BACKLIGHT_ENABLE
+ uint8_t level = get_backlight_level();
+ if (level != transport_values.backlight_level) {
+ if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) {
+ transport_values.backlight_level = level;
}
- matrix[i] = i2c_master_read(I2C_NACK);
- i2c_master_stop();
- } else {
-i2c_error: // the cable is disconnceted, or something else went wrong
- i2c_reset_state();
- return false;
}
+# endif
-#ifdef RGBLIGHT_ENABLE
- if (RGB_DIRTY) {
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
- if (err) { goto i2c_error; }
-
- // RGB Location
- err = i2c_master_write(I2C_RGB_START);
- if (err) { goto i2c_error; }
-
- uint32_t dword = eeconfig_read_rgblight();
-
- // Write RGB
- err = i2c_master_write_data(&dword, 4);
- if (err) { goto i2c_error; }
-
- RGB_DIRTY = false;
- i2c_master_stop();
+# ifdef RGBLIGHT_ENABLE
+ uint32_t rgb = rgblight_read_dword();
+ if (rgb != transport_values.rgb_settings) {
+ if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgb, sizeof(rgb), TIMEOUT) >= 0) {
+ transport_values.rgb_settings = rgb;
+ }
}
-#endif
+# endif
+
+# ifdef ENCODER_ENABLE
+ i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)transport_values.encoder_state, sizeof(transport_values.encoder_state), TIMEOUT);
+ encoder_update_raw(&transport_values.encoder_state[0]);
+# endif
return true;
}
void transport_slave(matrix_row_t matrix[]) {
-
- for (int i = 0; i < ROWS_PER_HAND; ++i)
- {
- i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i];
- }
- // Read Backlight Info
- #ifdef BACKLIGHT_ENABLE
- if (BACKLIT_DIRTY)
- {
- backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]);
- BACKLIT_DIRTY = false;
- }
- #endif
- #ifdef RGBLIGHT_ENABLE
- if (RGB_DIRTY)
- {
- // Disable interupts (RGB data is big)
- cli();
- // Create new DWORD for RGB data
- uint32_t dword;
-
- // Fill the new DWORD with the data that was sent over
- uint8_t * dword_dat = (uint8_t *)(&dword);
- for (int i = 0; i < 4; i++)
- {
- dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i];
- }
-
- // Update the RGB now with the new data and set RGB_DIRTY to false
- rgblight_update_dword(dword);
- RGB_DIRTY = false;
- // Re-enable interupts now that RGB is set
- sei();
- }
- #endif
+ // Copy matrix to I2C buffer
+ memcpy((void*)(i2c_slave_reg + I2C_KEYMAP_START), (void *)matrix, ROWS_PER_HAND * sizeof(matrix_row_t) );
+
+// Read Backlight Info
+# ifdef BACKLIGHT_ENABLE
+ backlight_set(i2c_slave_reg[I2C_BACKLIT_START]);
+# endif
+
+# ifdef RGBLIGHT_ENABLE
+ uint32_t rgb = *(uint32_t *)(i2c_slave_reg + I2C_RGB_START);
+ // Update the RGB with the new data
+ rgblight_update_dword(rgb);
+# endif
+
+# ifdef ENCODER_ENABLE
+ encoder_state_raw((uint8_t*)(i2c_slave_reg + I2C_ENCODER_START));
+# endif
}
-void transport_master_init(void) {
- i2c_master_init();
-}
+void transport_master_init(void) { i2c_init(); }
-void transport_slave_init(void) {
- i2c_slave_init(SLAVE_I2C_ADDRESS);
-}
+void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-#else // USE_SERIAL
+#else // USE_SERIAL
-#include "serial.h"
+# include "serial.h"
-typedef struct _Serial_s2m_buffer_t {
+typedef struct __attribute__ ((__packed__)) {
+# ifdef ENCODER_ENABLE
+ uint8_t encoder_state[NUMBER_OF_ENCODERS];
+# endif
// TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
matrix_row_t smatrix[ROWS_PER_HAND];
} Serial_s2m_buffer_t;
-typedef struct _Serial_m2s_buffer_t {
-#ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-#endif
-#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- rgblight_config_t rgblight_config; //not yet use
- //
- // When MCUs on both sides drive their respective RGB LED chains,
- // it is necessary to synchronize, so it is necessary to communicate RGB information.
- // In that case, define the RGBLIGHT_SPLIT macro.
- //
- // Otherwise, if the master side MCU drives both sides RGB LED chains,
- // there is no need to communicate.
-#endif
+typedef struct __attribute__ ((__packed__)) {
+# ifdef BACKLIGHT_ENABLE
+ uint8_t backlight_level;
+# endif
+# if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT)
+ rgblight_config_t rgblight_config; // not yet use
+ //
+ // When MCUs on both sides drive their respective RGB LED chains,
+ // it is necessary to synchronize, so it is necessary to communicate RGB
+ // information. In that case, define RGBLED_SPLIT with info on the number
+ // of LEDs on each half.
+ //
+ // Otherwise, if the master side MCU drives both sides RGB LED chains,
+ // there is no need to communicate.
+# endif
} Serial_m2s_buffer_t;
volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
-uint8_t volatile status0 = 0;
+uint8_t volatile status0 = 0;
SSTD_t transactions[] = {
- { (uint8_t *)&status0,
- sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer,
- sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer
- }
+ {
+ (uint8_t *)&status0,
+ sizeof(serial_m2s_buffer),
+ (uint8_t *)&serial_m2s_buffer,
+ sizeof(serial_s2m_buffer),
+ (uint8_t *)&serial_s2m_buffer,
+ },
};
-void transport_master_init(void)
-{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
+void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
-void transport_slave_init(void)
-{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
+void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
bool transport_master(matrix_row_t matrix[]) {
-
if (soft_serial_transaction()) {
return false;
}
@@ -193,32 +174,43 @@ bool transport_master(matrix_row_t matrix[]) {
matrix[i] = serial_s2m_buffer.smatrix[i];
}
- #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- // Code to send RGB over serial goes here (not implemented yet)
- #endif
+# ifdef BACKLIGHT_ENABLE
+ // Write backlight level for slave to read
+ serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0;
+# endif
+
+# if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT)
+ static rgblight_config_t prev_rgb = {~0};
+ uint32_t rgb = rgblight_read_dword();
+ if (rgb != prev_rgb.raw) {
+ serial_m2s_buffer.rgblight_config.raw = rgb;
+ prev_rgb.raw = rgb;
+ }
+# endif
- #ifdef BACKLIGHT_ENABLE
- // Write backlight level for slave to read
- serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0;
- #endif
+# ifdef ENCODER_ENABLE
+ encoder_update_raw((uint8_t*)&serial_s2m_buffer.encoder_state);
+# endif
return true;
}
void transport_slave(matrix_row_t matrix[]) {
-
// TODO: if MATRIX_COLS > 8 change to pack()
- for (int i = 0; i < ROWS_PER_HAND; ++i)
- {
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_s2m_buffer.smatrix[i] = matrix[i];
}
- #ifdef BACKLIGHT_ENABLE
- backlight_set(serial_m2s_buffer.backlight_level);
- #endif
- #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- // Add serial implementation for RGB here
- #endif
-
+# ifdef BACKLIGHT_ENABLE
+ backlight_set(serial_m2s_buffer.backlight_level);
+# endif
+# if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT)
+ // Update RGB config with the new data
+ rgblight_update_dword(serial_m2s_buffer.rgblight_config.raw);
+# endif
+
+# ifdef ENCODER_ENABLE
+ encoder_state_raw((uint8_t*)&serial_s2m_buffer.encoder_state);
+# endif
}
#endif
diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c
index 1e4ce26cd..86dc69abc 100644
--- a/quantum/template/avr/template.c
+++ b/quantum/template/avr/template.c
@@ -15,29 +15,37 @@
*/
#include "%KEYBOARD%.h"
+// Optional override functions below.
+// You can leave any or all of these undefined.
+// These are only required if you want to perform custom actions.
+
+/*
+
void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
- matrix_init_user();
+ matrix_init_user();
}
void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
- matrix_scan_user();
+ matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- // put your per-action keyboard code here
- // runs for every action, just before processing by the firmware
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
- return process_record_user(keycode, record);
+ return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- led_set_user(usb_led);
+ led_set_user(usb_led);
}
+
+*/
diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h
index 01cdf932e..8d9a993cf 100644
--- a/quantum/template/ps2avrgb/config.h
+++ b/quantum/template/ps2avrgb/config.h
@@ -21,17 +21,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
+#define DEVICE_VER 0x0001
#define MANUFACTURER You
#define PRODUCT %KEYBOARD%
+#define DESCRIPTION A custom keyboard
#define RGBLED_NUM 16
-#define MATRIX_ROWS 2
-#define MATRIX_COLS 3
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 11
-#define MATRIX_ROW_PINS { D0, D5 }
-#define MATRIX_COL_PINS { F1, F0, B0 }
-#define UNUSED_PINS
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
+#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 }
+// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, D7 }
+#define UNUSED_PINS {}
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5
diff --git a/quantum/template/ps2avrgb/i2c.c b/quantum/template/ps2avrgb/i2c.c
deleted file mode 100644
index e8c4455ad..000000000
--- a/quantum/template/ps2avrgb/i2c.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-Copyright 2016 Luiz Ribeiro <luizribeiro@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/>.
-*/
-
-// Please do not modify this file
-
-#include <avr/io.h>
-#include <util/twi.h>
-
-#include "i2c.h"
-
-void i2c_set_bitrate(uint16_t bitrate_khz) {
- uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz);
- if (bitrate_div >= 16) {
- bitrate_div = (bitrate_div - 16) / 2;
- }
- TWBR = bitrate_div;
-}
-
-void i2c_init(void) {
- // set pull-up resistors on I2C bus pins
- PORTC |= 0b11;
-
- i2c_set_bitrate(400);
-
- // enable TWI (two-wire interface)
- TWCR |= (1 << TWEN);
-
- // enable TWI interrupt and slave address ACK
- TWCR |= (1 << TWIE);
- TWCR |= (1 << TWEA);
-}
-
-uint8_t i2c_start(uint8_t address) {
- // reset TWI control register
- TWCR = 0;
-
- // begin transmission and wait for it to end
- TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the start condition was successfully transmitted
- if ((TWSR & 0xF8) != TW_START) {
- return 1;
- }
-
- // transmit address and wait
- TWDR = address;
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- // check if the device has acknowledged the READ / WRITE mode
- uint8_t twst = TW_STATUS & 0xF8;
- if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
- return 1;
- }
-
- return 0;
-}
-
-void i2c_stop(void) {
- TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
-}
-
-uint8_t i2c_write(uint8_t data) {
- TWDR = data;
-
- // transmit data and wait
- TWCR = (1<<TWINT) | (1<<TWEN);
- while (!(TWCR & (1<<TWINT)));
-
- if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
- return 1;
- }
-
- return 0;
-}
-
-uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
- if (i2c_start(address)) {
- return 1;
- }
-
- for (uint16_t i = 0; i < length; i++) {
- if (i2c_write(data[i])) {
- return 1;
- }
- }
-
- i2c_stop();
-
- return 0;
-}
diff --git a/quantum/template/ps2avrgb/matrix.c b/quantum/template/ps2avrgb/matrix.c
deleted file mode 100644
index 245813dfd..000000000
--- a/quantum/template/ps2avrgb/matrix.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-Copyright 2017 Luiz Ribeiro <luizribeiro@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 <avr/io.h>
-#include <util/delay.h>
-
-#include "matrix.h"
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-void matrix_set_row_status(uint8_t row);
-uint8_t bit_reverse(uint8_t x);
-
-void matrix_init(void) {
- // all outputs for rows high
- DDRB = 0xFF;
- PORTB = 0xFF;
- // all inputs for columns
- DDRA = 0x00;
- DDRC &= ~(0x111111<<2);
- DDRD &= ~(1<<PIND7);
- // all columns are pulled-up
- PORTA = 0xFF;
- PORTC |= (0b111111<<2);
- PORTD |= (1<<PIND7);
-
- // initialize matrix state: all keys off
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- matrix[row] = 0x00;
- matrix_debouncing[row] = 0x00;
- }
-
- matrix_init_quantum();
-}
-
-uint8_t matrix_scan(void) {
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- matrix_set_row_status(row);
- _delay_us(5);
-
- matrix_row_t cols = (
- // cols 0..7, PORTA 0 -> 7
- (~PINA) & 0xFF
- ) | (
- // cols 8..13, PORTC 7 -> 0
- bit_reverse((~PINC) & 0xFF) << 8
- ) | (
- // col 14, PORTD 7
- ((~PIND) & (1 << PIND7)) << 7
- );
-
- if (matrix_debouncing[row] != cols) {
- matrix_debouncing[row] = cols;
- debouncing = DEBOUNCE;
- }
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-// declarations
-void matrix_set_row_status(uint8_t row) {
- DDRB = (1 << row);
- PORTB = ~(1 << row);
-}
-
-uint8_t bit_reverse(uint8_t x) {
- x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
- return x;
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
-}
diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk
index bcd7dff99..191a13844 100644
--- a/quantum/template/ps2avrgb/rules.mk
+++ b/quantum/template/ps2avrgb/rules.mk
@@ -42,9 +42,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes
OPT_DEFS = -DDEBUG_LEVEL=0
-# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c
+SRC += i2c_master.c
# programming options
PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c
index 08156c562..3f920de48 100644
--- a/quantum/template/ps2avrgb/template.c
+++ b/quantum/template/ps2avrgb/template.c
@@ -13,13 +13,78 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include "%KEYBOARD%.h"
-#include <avr/pgmspace.h>
-#include "action_layer.h"
-#include "i2c.h"
-#include "quantum.h"
+#ifdef RGBLIGHT_ENABLE
+
+#include <string.h>
+#include "i2c_master.h"
+#include "rgblight.h"
+
+extern rgblight_config_t rgblight_config;
+
+void matrix_init_kb(void) {
+ i2c_init();
+ // call user level keymaps, if any
+ matrix_init_user();
+}
+
+// custom RGB driver
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ memset(led, 0, 3 * RGBLED_NUM);
+ }
+
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+}
+
+bool rgb_init = false;
+
+void matrix_scan_kb(void) {
+ // if LEDs were previously on before poweroff, turn them back on
+ if (rgb_init == false && rgblight_config.enable) {
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+ rgb_init = true;
+ }
+
+ rgblight_task();
+ matrix_scan_user();
+}
+
+#endif
-__attribute__ ((weak))
-void matrix_scan_user(void) {
+// Optional override functions below.
+// You can leave any or all of these undefined.
+// These are only required if you want to perform custom actions.
+
+/*
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
+
+*/
diff --git a/quantum/visualizer/readme.md b/quantum/visualizer/readme.md
index 545ba2270..298efb742 100644
--- a/quantum/visualizer/readme.md
+++ b/quantum/visualizer/readme.md
@@ -1,7 +1,7 @@
# A visualization library for the TMK keyboard firmware
This library is designed to work together with the [TMK keyboard firmware](https://github.com/tmk/tmk_keyboard). Currently it only works for [Chibios](http://www.chibios.org/)
- flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](http://www.ugfx.org/).
+ flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](https://ugfx.io/).
## To use this library as a user
You can and should modify the visualizer\_user.c file. Check the comments in the file for more information.
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index d22c3bbca..f6af3f5e2 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -194,7 +194,7 @@ dfu-split-right: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size
$(DFU_PROGRAMMER) $(MCU) flash --eeprom $(QUANTUM_PATH)/split_common/eeprom-righthand.eep;\
else\
$(DFU_PROGRAMMER) $(MCU) erase;\
- $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/eeprom-rightand.eep;\
+ $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/eeprom-righthand.eep;\
fi
$(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex
$(DFU_PROGRAMMER) $(MCU) reset
@@ -214,13 +214,20 @@ define EXEC_AVRDUDE
mv /tmp/2 /tmp/1; \
done; \
echo ""; \
- echo "Detected controller on USB port at $$USB"; \
+ echo "Device $$USB has appeared; assuming it is the controller."; \
if $(GREP) -q -s 'MINGW\|MSYS' /proc/version; then \
USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \
echo "Remapped MSYS2 USB port to $$USB"; \
+ sleep 1; \
+ else \
+ printf "Waiting for $$USB to become writable."; \
+ while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \
fi; \
- sleep 1; \
- avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
+ if [ -z "$(1)" ]; then \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
+ else \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \
+ fi \
fi
endef
@@ -229,9 +236,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
while true; do \
- $(call EXEC_AVRDUDE) ; \
+ $(call EXEC_AVRDUDE) ; \
done
+avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
+ $(call EXEC_AVRDUDE,eeprom-lefthand.eep)
+
+avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
+ $(call EXEC_AVRDUDE,eeprom-righthand.eep)
+
# Convert hex to bin.
bin: $(BUILD_DIR)/$(TARGET).hex
$(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c
index 8adf013e1..3b67ed152 100644
--- a/tmk_core/common/action_tapping.c
+++ b/tmk_core/common/action_tapping.c
@@ -18,8 +18,17 @@
#define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed)
#define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed)
#define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k)))
-#define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM)
+__attribute__ ((weak))
+uint16_t get_tapping_term(uint16_t keycode) {
+ return TAPPING_TERM;
+}
+
+#ifdef TAPPING_TERM_PER_KEY
+#define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event)))
+#else
+#define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM)
+#endif
static keyrecord_t tapping_key = {};
static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {};
@@ -100,12 +109,17 @@ bool process_tapping(keyrecord_t *keyp)
// enqueue
return false;
}
-#if TAPPING_TERM >= 500 || defined PERMISSIVE_HOLD
/* Process a key typed within TAPPING_TERM
* This can register the key before settlement of tapping,
* useful for long TAPPING_TERM but may prevent fast typing.
*/
- else if (IS_RELEASED(event) && waiting_buffer_typed(event)) {
+#if defined(TAPPING_TERM_PER_KEY) || (!defined(PER_KEY_TAPPING_TERM) && TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD)
+#ifdef TAPPING_TERM_PER_KEY
+ else if ( ( get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && IS_RELEASED(event) && waiting_buffer_typed(event))
+#else
+ else if ( IS_RELEASED(event) && waiting_buffer_typed(event))
+#endif
+ {
debug("Tapping: End. No tap. Interfered by typing key\n");
process_record(&tapping_key);
tapping_key = (keyrecord_t){};
diff --git a/tmk_core/common/action_tapping.h b/tmk_core/common/action_tapping.h
index 2f143ae8b..1db43a442 100644
--- a/tmk_core/common/action_tapping.h
+++ b/tmk_core/common/action_tapping.h
@@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NO_ACTION_TAPPING
+uint16_t get_event_keycode(keyevent_t event);
+uint16_t get_tapping_term(uint16_t keycode);
void action_tapping_process(keyrecord_t record);
#endif
diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c
index e34965df6..9c2c47d56 100644
--- a/tmk_core/common/arm_atsam/suspend.c
+++ b/tmk_core/common/arm_atsam/suspend.c
@@ -35,7 +35,9 @@ void suspend_power_down_kb(void) {
*/
void suspend_power_down(void)
{
+#ifdef RGB_MATRIX_ENABLE
I2C3733_Control_Set(0); //Disable LED driver
+#endif
suspend_power_down_kb();
}
@@ -75,10 +77,9 @@ void suspend_wakeup_init_kb(void) {
* FIXME: needs doc
*/
void suspend_wakeup_init(void) {
- /* If LEDs are set to enabled, enable the hardware */
- if (led_enabled) {
- I2C3733_Control_Set(1);
- }
+#ifdef RGB_MATRIX_ENABLE
+ I2C3733_Control_Set(1);
+#endif
suspend_wakeup_init_kb();
}
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index b29447ac4..2259201b5 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -11,9 +11,6 @@
#include "led.h"
#include "host.h"
#include "rgblight_reconfig.h"
-#ifdef SPLIT_KEYBOARD
- #include "split_flags.h"
-#endif
#ifdef PROTOCOL_LUFA
#include "lufa.h"
@@ -135,9 +132,6 @@ static void power_down(uint8_t wdto) {
is_suspended = true;
rgblight_enabled = rgblight_config.enable;
rgblight_disable_noeeprom();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
#endif
suspend_power_down_kb();
@@ -216,9 +210,6 @@ void suspend_wakeup_init(void) {
wait_ms(10);
#endif
rgblight_enable_noeeprom();
- #ifdef SPLIT_KEYBOARD
- RGB_DIRTY = true;
- #endif
}
#ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_enable();
diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c
index 581e7b8a0..87239fbb7 100644
--- a/tmk_core/common/mousekey.c
+++ b/tmk_core/common/mousekey.c
@@ -23,13 +23,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "mousekey.h"
+inline int8_t times_inv_sqrt2(int8_t x) {
+ // 181/256 is pretty close to 1/sqrt(2)
+ // 0.70703125 0.707106781
+ // 1 too small for x=99 and x=198
+ // This ends up being a mult and discard lower 8 bits
+ return (x * 181) >> 8;
+}
-
-static report_mouse_t mouse_report = {};
-static uint8_t mousekey_repeat = 0;
+static report_mouse_t mouse_report = {0};
+static void mousekey_debug(void);
static uint8_t mousekey_accel = 0;
+static uint8_t mousekey_repeat = 0;
+static uint16_t last_timer = 0;
+
+
+
+#ifndef MK_3_SPEED
-static void mousekey_debug(void);
/*
@@ -52,155 +63,256 @@ uint8_t mk_time_to_max = MOUSEKEY_TIME_TO_MAX;
uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED;
uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX;
+static uint8_t move_unit(void) {
+ uint16_t unit;
+ if (mousekey_accel & (1<<0)) {
+ unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4;
+ } else if (mousekey_accel & (1<<1)) {
+ unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2;
+ } else if (mousekey_accel & (1<<2)) {
+ unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed);
+ } else if (mousekey_repeat == 0) {
+ unit = MOUSEKEY_MOVE_DELTA;
+ } else if (mousekey_repeat >= mk_time_to_max) {
+ unit = MOUSEKEY_MOVE_DELTA * mk_max_speed;
+ } else {
+ unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max;
+ }
+ return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit));
+}
-static uint16_t last_timer = 0;
+static uint8_t wheel_unit(void) {
+ uint16_t unit;
+ if (mousekey_accel & (1<<0)) {
+ unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4;
+ } else if (mousekey_accel & (1<<1)) {
+ unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2;
+ } else if (mousekey_accel & (1<<2)) {
+ unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed);
+ } else if (mousekey_repeat == 0) {
+ unit = MOUSEKEY_WHEEL_DELTA;
+ } else if (mousekey_repeat >= mk_wheel_time_to_max) {
+ unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed;
+ } else {
+ unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max;
+ }
+ return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit));
+}
-inline int8_t times_inv_sqrt2(int8_t x)
-{
- // 181/256 is pretty close to 1/sqrt(2)
- // 0.70703125 0.707106781
- // 1 too small for x=99 and x=198
- // This ends up being a mult and discard lower 8 bits
- return (x * 181) >> 8;
+void mousekey_task(void) {
+ if (timer_elapsed(last_timer) < (mousekey_repeat ? mk_interval : mk_delay*10)) {
+ return;
+ }
+ if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) {
+ return;
+ }
+ if (mousekey_repeat != UINT8_MAX) mousekey_repeat++;
+ if (mouse_report.x > 0) mouse_report.x = move_unit();
+ if (mouse_report.x < 0) mouse_report.x = move_unit() * -1;
+ if (mouse_report.y > 0) mouse_report.y = move_unit();
+ if (mouse_report.y < 0) mouse_report.y = move_unit() * -1;
+ /* diagonal move [1/sqrt(2)] */
+ if (mouse_report.x && mouse_report.y) {
+ mouse_report.x = times_inv_sqrt2(mouse_report.x);
+ mouse_report.y = times_inv_sqrt2(mouse_report.y);
+ }
+ if (mouse_report.v > 0) mouse_report.v = wheel_unit();
+ if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1;
+ if (mouse_report.h > 0) mouse_report.h = wheel_unit();
+ if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1;
+ mousekey_send();
}
-static uint8_t move_unit(void)
-{
- uint16_t unit;
- if (mousekey_accel & (1<<0)) {
- unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4;
- } else if (mousekey_accel & (1<<1)) {
- unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2;
- } else if (mousekey_accel & (1<<2)) {
- unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed);
- } else if (mousekey_repeat == 0) {
- unit = MOUSEKEY_MOVE_DELTA;
- } else if (mousekey_repeat >= mk_time_to_max) {
- unit = MOUSEKEY_MOVE_DELTA * mk_max_speed;
- } else {
- unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max;
- }
- return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit));
+void mousekey_on(uint8_t code) {
+ if (code == KC_MS_UP) mouse_report.y = move_unit() * -1;
+ else if (code == KC_MS_DOWN) mouse_report.y = move_unit();
+ else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1;
+ else if (code == KC_MS_RIGHT) mouse_report.x = move_unit();
+ else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit();
+ else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1;
+ else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1;
+ else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit();
+ else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1;
+ else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2;
+ else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3;
+ else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4;
+ else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5;
+ else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0);
+ else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1);
+ else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2);
}
-static uint8_t wheel_unit(void)
-{
- uint16_t unit;
- if (mousekey_accel & (1<<0)) {
- unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4;
- } else if (mousekey_accel & (1<<1)) {
- unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2;
- } else if (mousekey_accel & (1<<2)) {
- unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed);
- } else if (mousekey_repeat == 0) {
- unit = MOUSEKEY_WHEEL_DELTA;
- } else if (mousekey_repeat >= mk_wheel_time_to_max) {
- unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed;
- } else {
- unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max;
- }
- return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit));
+void mousekey_off(uint8_t code) {
+ if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0;
+ else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0;
+ else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0;
+ else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0;
+ else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0;
+ else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0;
+ else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0;
+ else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0;
+ else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1;
+ else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2;
+ else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3;
+ else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4;
+ else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5;
+ else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0);
+ else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1);
+ else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2);
+ if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0)
+ mousekey_repeat = 0;
}
-void mousekey_task(void)
-{
- if (timer_elapsed(last_timer) < (mousekey_repeat ? mk_interval : mk_delay*10))
- return;
- if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0)
- return;
- if (mousekey_repeat != UINT8_MAX)
- mousekey_repeat++;
+
+#else /* #ifndef MK_3_SPEED */
- if (mouse_report.x > 0) mouse_report.x = move_unit();
- if (mouse_report.x < 0) mouse_report.x = move_unit() * -1;
- if (mouse_report.y > 0) mouse_report.y = move_unit();
- if (mouse_report.y < 0) mouse_report.y = move_unit() * -1;
- /* diagonal move [1/sqrt(2)] */
- if (mouse_report.x && mouse_report.y) {
- mouse_report.x = times_inv_sqrt2(mouse_report.x);
- mouse_report.x = mouse_report.x == 0 ? 1 : mouse_report.x;
- mouse_report.y = times_inv_sqrt2(mouse_report.y);
- mouse_report.y = mouse_report.y == 0 ? 1 : mouse_report.y;
- }
+enum {
+ mkspd_slow,
+ mkspd_med,
+ mkspd_fast,
+ mkspd_COUNT
+};
+static uint8_t mk_speed = mkspd_med;
+#ifdef MK_MOMENTARY_ACCEL
+static uint8_t mkspd_DEFAULT = mkspd_med;
+#endif
+static uint16_t last_timer_c = 0;
+static uint16_t last_timer_w = 0;
+uint16_t c_offsets[mkspd_COUNT] = {
+ MK_C_OFFSET_SLOW, MK_C_OFFSET_MED, MK_C_OFFSET_FAST
+};
+uint16_t c_intervals[mkspd_COUNT] = {
+ MK_C_INTERVAL_SLOW, MK_C_INTERVAL_MED, MK_C_INTERVAL_FAST
+};
+uint16_t w_offsets[mkspd_COUNT] = {
+ MK_W_OFFSET_SLOW, MK_W_OFFSET_MED, MK_W_OFFSET_FAST
+};
+uint16_t w_intervals[mkspd_COUNT] = {
+ MK_W_INTERVAL_SLOW, MK_W_INTERVAL_MED, MK_W_INTERVAL_FAST
+};
- if (mouse_report.v > 0) mouse_report.v = wheel_unit();
- if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1;
- if (mouse_report.h > 0) mouse_report.h = wheel_unit();
- if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1;
- mousekey_send();
+void mousekey_task(void) {
+ // report cursor and scroll movement independently
+ report_mouse_t const tmpmr = mouse_report;
+ if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) {
+ mouse_report.h = 0;
+ mouse_report.v = 0;
+ mousekey_send();
+ last_timer_c = last_timer;
+ mouse_report = tmpmr;
+ }
+ if ((mouse_report.h || mouse_report.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) {
+ mouse_report.x = 0;
+ mouse_report.y = 0;
+ mousekey_send();
+ last_timer_w = last_timer;
+ mouse_report = tmpmr;
+ }
}
-void mousekey_on(uint8_t code)
-{
- if (code == KC_MS_UP) mouse_report.y = move_unit() * -1;
- else if (code == KC_MS_DOWN) mouse_report.y = move_unit();
- else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1;
- else if (code == KC_MS_RIGHT) mouse_report.x = move_unit();
- else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit();
- else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1;
- else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1;
- else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit();
- else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1;
- else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2;
- else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3;
- else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4;
- else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5;
- else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0);
- else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1);
- else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2);
+void adjust_speed(void) {
+ uint16_t const c_offset = c_offsets[mk_speed];
+ uint16_t const w_offset = w_offsets[mk_speed];
+ if (mouse_report.x > 0) mouse_report.x = c_offset;
+ if (mouse_report.x < 0) mouse_report.x = c_offset * -1;
+ if (mouse_report.y > 0) mouse_report.y = c_offset;
+ if (mouse_report.y < 0) mouse_report.y = c_offset * -1;
+ if (mouse_report.h > 0) mouse_report.h = w_offset;
+ if (mouse_report.h < 0) mouse_report.h = w_offset * -1;
+ if (mouse_report.v > 0) mouse_report.v = w_offset;
+ if (mouse_report.v < 0) mouse_report.v = w_offset * -1;
+ // adjust for diagonals
+ if (mouse_report.x && mouse_report.y) {
+ mouse_report.x = times_inv_sqrt2(mouse_report.x);
+ mouse_report.y = times_inv_sqrt2(mouse_report.y);
+ }
+ if (mouse_report.h && mouse_report.v) {
+ mouse_report.h = times_inv_sqrt2(mouse_report.h);
+ mouse_report.v = times_inv_sqrt2(mouse_report.v);
+ }
}
-void mousekey_off(uint8_t code)
-{
- if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0;
- else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0;
- else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0;
- else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0;
- else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0;
- else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0;
- else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0;
- else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0;
- else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1;
- else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2;
- else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3;
- else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4;
- else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5;
- else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0);
- else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1);
- else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2);
-
- if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0)
- mousekey_repeat = 0;
+void mousekey_on(uint8_t code) {
+ uint16_t const c_offset = c_offsets[mk_speed];
+ uint16_t const w_offset = w_offsets[mk_speed];
+ uint8_t const old_speed = mk_speed;
+ if (code == KC_MS_UP) mouse_report.y = c_offset * -1;
+ else if (code == KC_MS_DOWN) mouse_report.y = c_offset;
+ else if (code == KC_MS_LEFT) mouse_report.x = c_offset * -1;
+ else if (code == KC_MS_RIGHT) mouse_report.x = c_offset;
+ else if (code == KC_MS_WH_UP) mouse_report.v = w_offset;
+ else if (code == KC_MS_WH_DOWN) mouse_report.v = w_offset * -1;
+ else if (code == KC_MS_WH_LEFT) mouse_report.h = w_offset * -1;
+ else if (code == KC_MS_WH_RIGHT) mouse_report.h = w_offset;
+ else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1;
+ else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2;
+ else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3;
+ else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4;
+ else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5;
+ else if (code == KC_MS_ACCEL0) mk_speed = mkspd_slow;
+ else if (code == KC_MS_ACCEL1) mk_speed = mkspd_med;
+ else if (code == KC_MS_ACCEL2) mk_speed = mkspd_fast;
+ if (mk_speed != old_speed) adjust_speed();
}
-void mousekey_send(void)
-{
- mousekey_debug();
- host_mouse_send(&mouse_report);
- last_timer = timer_read();
+void mousekey_off(uint8_t code) {
+#ifdef MK_MOMENTARY_ACCEL
+ uint8_t const old_speed = mk_speed;
+#endif
+ if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0;
+ else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0;
+ else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0;
+ else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0;
+ else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0;
+ else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0;
+ else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0;
+ else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0;
+ else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1;
+ else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2;
+ else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3;
+ else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4;
+ else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5;
+#ifdef MK_MOMENTARY_ACCEL
+ else if (code == KC_MS_ACCEL0) mk_speed = mkspd_DEFAULT;
+ else if (code == KC_MS_ACCEL1) mk_speed = mkspd_DEFAULT;
+ else if (code == KC_MS_ACCEL2) mk_speed = mkspd_DEFAULT;
+ if (mk_speed != old_speed) adjust_speed();
+#endif
}
-void mousekey_clear(void)
-{
- mouse_report = (report_mouse_t){};
- mousekey_repeat = 0;
- mousekey_accel = 0;
+
+
+
+#endif /* #ifndef MK_3_SPEED */
+
+
+
+
+void mousekey_send(void) {
+ mousekey_debug();
+ host_mouse_send(&mouse_report);
+ last_timer = timer_read();
+}
+
+void mousekey_clear(void) {
+ mouse_report = (report_mouse_t){};
+ mousekey_repeat = 0;
+ mousekey_accel = 0;
}
-static void mousekey_debug(void)
-{
- if (!debug_mouse) return;
- print("mousekey [btn|x y v h](rep/acl): [");
- phex(mouse_report.buttons); print("|");
- print_decs(mouse_report.x); print(" ");
- print_decs(mouse_report.y); print(" ");
- print_decs(mouse_report.v); print(" ");
- print_decs(mouse_report.h); print("](");
- print_dec(mousekey_repeat); print("/");
- print_dec(mousekey_accel); print(")\n");
+static void mousekey_debug(void) {
+ if (!debug_mouse) return;
+ print("mousekey [btn|x y v h](rep/acl): [");
+ phex(mouse_report.buttons); print("|");
+ print_decs(mouse_report.x); print(" ");
+ print_decs(mouse_report.y); print(" ");
+ print_decs(mouse_report.v); print(" ");
+ print_decs(mouse_report.h); print("](");
+ print_dec(mousekey_repeat); print("/");
+ print_dec(mousekey_accel); print(")\n");
}
diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h
index 9338d0af7..ce3501b23 100644
--- a/tmk_core/common/mousekey.h
+++ b/tmk_core/common/mousekey.h
@@ -16,23 +16,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MOUSEKEY_H
-#define MOUSEKEY_H
+#define MOUSEKEY_H
+#endif
#include <stdbool.h>
#include "host.h"
+#ifndef MK_3_SPEED
/* max value on report descriptor */
#ifndef MOUSEKEY_MOVE_MAX
- #define MOUSEKEY_MOVE_MAX 127
+ #define MOUSEKEY_MOVE_MAX 127
#elif MOUSEKEY_MOVE_MAX > 127
- #error MOUSEKEY_MOVE_MAX needs to be smaller than 127
+ #error MOUSEKEY_MOVE_MAX needs to be smaller than 127
#endif
#ifndef MOUSEKEY_WHEEL_MAX
- #define MOUSEKEY_WHEEL_MAX 127
+ #define MOUSEKEY_WHEEL_MAX 127
#elif MOUSEKEY_WHEEL_MAX > 127
- #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127
+ #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127
#endif
#ifndef MOUSEKEY_MOVE_DELTA
@@ -60,6 +62,47 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
#endif
+#else /* #ifndef MK_3_SPEED */
+
+#ifndef MK_C_OFFSET_SLOW
+#define MK_C_OFFSET_SLOW 1
+#endif
+#ifndef MK_C_INTERVAL_SLOW
+#define MK_C_INTERVAL_SLOW 100
+#endif
+#ifndef MK_C_OFFSET_MED
+#define MK_C_OFFSET_MED 4
+#endif
+#ifndef MK_C_INTERVAL_MED
+#define MK_C_INTERVAL_MED 16
+#endif
+#ifndef MK_C_OFFSET_FAST
+#define MK_C_OFFSET_FAST 12
+#endif
+#ifndef MK_C_INTERVAL_FAST
+#define MK_C_INTERVAL_FAST 16
+#endif
+
+#ifndef MK_W_OFFSET_SLOW
+#define MK_W_OFFSET_SLOW 1
+#endif
+#ifndef MK_W_INTERVAL_SLOW
+#define MK_W_INTERVAL_SLOW 400
+#endif
+#ifndef MK_W_OFFSET_MED
+#define MK_W_OFFSET_MED 1
+#endif
+#ifndef MK_W_INTERVAL_MED
+#define MK_W_INTERVAL_MED 200
+#endif
+#ifndef MK_W_OFFSET_FAST
+#define MK_W_OFFSET_FAST 1
+#endif
+#ifndef MK_W_INTERVAL_FAST
+#define MK_W_INTERVAL_FAST 100
+#endif
+
+#endif /* #ifndef MK_3_SPEED */
#ifdef __cplusplus
extern "C" {
@@ -72,7 +115,6 @@ extern uint8_t mk_time_to_max;
extern uint8_t mk_wheel_max_speed;
extern uint8_t mk_wheel_time_to_max;
-
void mousekey_task(void);
void mousekey_on(uint8_t code);
void mousekey_off(uint8_t code);
@@ -82,5 +124,3 @@ void mousekey_send(void);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/tmk_core/protocol/arm_atsam.mk b/tmk_core/protocol/arm_atsam.mk
index 04e02790a..8d6f724f0 100644
--- a/tmk_core/protocol/arm_atsam.mk
+++ b/tmk_core/protocol/arm_atsam.mk
@@ -4,7 +4,10 @@ SRC += $(ARM_ATSAM_DIR)/adc.c
SRC += $(ARM_ATSAM_DIR)/clks.c
SRC += $(ARM_ATSAM_DIR)/d51_util.c
SRC += $(ARM_ATSAM_DIR)/i2c_master.c
-SRC += $(ARM_ATSAM_DIR)/led_matrix.c
+ifeq ($(RGB_MATRIX_ENABLE),custom)
+ SRC += $(ARM_ATSAM_DIR)/led_matrix_programs.c
+ SRC += $(ARM_ATSAM_DIR)/led_matrix.c
+endif
SRC += $(ARM_ATSAM_DIR)/main_arm_atsam.c
SRC += $(ARM_ATSAM_DIR)/spi.c
SRC += $(ARM_ATSAM_DIR)/startup.c
diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h
index 928af8c7e..88109186a 100644
--- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h
+++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h
@@ -34,7 +34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef MD_BOOTLOADER
#include "main_arm_atsam.h"
+#ifdef RGB_MATRIX_ENABLE
#include "led_matrix.h"
+#include "rgb_matrix.h"
+#endif
#include "issi3733_driver.h"
#include "./usb/compiler.h"
#include "./usb/udc.h"
diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c
index d91a851f3..1741d9ac5 100644
--- a/tmk_core/protocol/arm_atsam/i2c_master.c
+++ b/tmk_core/protocol/arm_atsam/i2c_master.c
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "arm_atsam_protocol.h"
-#ifndef MD_BOOTLOADER
+#if !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE)
#include <string.h>
@@ -37,7 +37,7 @@ static uint8_t dma_sendbuf[I2C_DMA_MAX_SEND]; //Data being written to I2C
volatile uint8_t i2c_led_q_running;
-#endif //MD_BOOTLOADER
+#endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE)
void i2c0_init(void)
{
@@ -112,7 +112,7 @@ void i2c0_stop(void)
}
}
-#ifndef MD_BOOTLOADER
+#if !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE)
void i2c1_init(void)
{
DBGC(DC_I2C1_INIT_BEGIN);
@@ -583,4 +583,4 @@ uint8_t i2c_led_q_run(void)
return 1;
}
-#endif //MD_BOOTLOADER
+#endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE)
diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c
index 04d05af6d..e29fb6587 100644
--- a/tmk_core/protocol/arm_atsam/led_matrix.c
+++ b/tmk_core/protocol/arm_atsam/led_matrix.c
@@ -17,9 +17,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "arm_atsam_protocol.h"
#include "tmk_core/common/led.h"
+#include "rgb_matrix.h"
#include <string.h>
#include <math.h>
+#ifdef USE_MASSDROP_CONFIGURATOR
+__attribute__((weak))
+led_instruction_t led_instructions[] = { { .end = 1 } };
+static void led_matrix_massdrop_config_override(int i);
+#endif // USE_MASSDROP_CONFIGURATOR
+
+extern rgb_config_t rgb_matrix_config;
+extern rgb_counters_t g_rgb_counters;
+
void SERCOM1_0_Handler( void )
{
if (SERCOM1->I2CM.INTFLAG.bit.ERROR)
@@ -51,14 +61,17 @@ void DMAC_0_Handler( void )
issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT];
-issi3733_led_t led_map[ISSI3733_LED_COUNT+1] = ISSI3733_LED_MAP;
-issi3733_led_t *lede = led_map + ISSI3733_LED_COUNT; //End pointer of mapping
+issi3733_led_t led_map[ISSI3733_LED_COUNT] = ISSI3733_LED_MAP;
+RGB led_buffer[ISSI3733_LED_COUNT];
uint8_t gcr_desired;
-uint8_t gcr_breathe;
-uint8_t gcr_use;
uint8_t gcr_actual;
uint8_t gcr_actual_last;
+#ifdef USE_MASSDROP_CONFIGURATOR
+uint8_t gcr_breathe;
+float breathe_mult;
+float pomod;
+#endif
#define ACT_GCR_NONE 0
#define ACT_GCR_INC 1
@@ -73,11 +86,14 @@ static uint8_t v_5v_cat_hit;
void gcr_compute(void)
{
uint8_t action = ACT_GCR_NONE;
+ uint8_t gcr_use = gcr_desired;
+#ifdef USE_MASSDROP_CONFIGURATOR
if (led_animation_breathing)
+ {
gcr_use = gcr_breathe;
- else
- gcr_use = gcr_desired;
+ }
+#endif
//If the 5v takes a catastrophic hit, disable the LED drivers briefly, assert auto gcr mode, min gcr and let the auto take over
if (v_5v < V5_CAT)
@@ -151,6 +167,7 @@ void gcr_compute(void)
gcr_actual -= LED_GCR_STEP_AUTO;
gcr_min_counter = 0;
+#ifdef USE_MASSDROP_CONFIGURATOR
//If breathe mode is active, the top end can fluctuate if the host can not supply enough current
//So set the breathe GCR to where it becomes stable
if (led_animation_breathing == 1)
@@ -160,12 +177,11 @@ void gcr_compute(void)
// and the same would happen maybe one or two more times. Therefore I'm favoring
// powering through one full breathe and letting gcr settle completely
}
+#endif
}
}
}
-led_disp_t disp;
-
void issi3733_prepare_arrays(void)
{
memset(issidrv,0,sizeof(issi3733_driver_t) * ISSI3733_DRIVER_COUNT);
@@ -178,361 +194,309 @@ void issi3733_prepare_arrays(void)
issidrv[i].addr = addrs[i];
}
- issi3733_led_t *cur = led_map;
-
- while (cur < lede)
+ for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++)
{
//BYTE: 1 + (SW-1)*16 + (CS-1)
- cur->rgb.g = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swg-1)*16 + (cur->adr.cs-1));
- cur->rgb.r = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swr-1)*16 + (cur->adr.cs-1));
- cur->rgb.b = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swb-1)*16 + (cur->adr.cs-1));
+ led_map[i].rgb.g = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swg-1)*16 + (led_map[i].adr.cs-1));
+ led_map[i].rgb.r = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swr-1)*16 + (led_map[i].adr.cs-1));
+ led_map[i].rgb.b = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swb-1)*16 + (led_map[i].adr.cs-1));
//BYTE: 1 + (SW-1)*2 + (CS-1)/8
//BIT: (CS-1)%8
- *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swg-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8));
- *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swr-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8));
- *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swb-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8));
-
- cur++;
+ *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swg-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8));
+ *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swr-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8));
+ *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swb-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8));
}
}
-void disp_calc_extents(void)
+void led_matrix_prepare(void)
{
- issi3733_led_t *cur = led_map;
-
- disp.left = 1e10;
- disp.right = -1e10;
- disp.top = -1e10;
- disp.bottom = 1e10;
-
- while (cur < lede)
+ for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++)
{
- if (cur->x < disp.left) disp.left = cur->x;
- if (cur->x > disp.right) disp.right = cur->x;
- if (cur->y < disp.bottom) disp.bottom = cur->y;
- if (cur->y > disp.top) disp.top = cur->y;
-
- cur++;
+ *led_map[i].rgb.r = 0;
+ *led_map[i].rgb.g = 0;
+ *led_map[i].rgb.b = 0;
}
-
- disp.width = disp.right - disp.left;
- disp.height = disp.top - disp.bottom;
- disp.max_distance = sqrtf(powf(disp.width, 2) + powf(disp.height, 2));
}
-void disp_pixel_setup(void)
+void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b)
{
- issi3733_led_t *cur = led_map;
-
- while (cur < lede)
+ if (i < ISSI3733_LED_COUNT)
{
- cur->px = (cur->x - disp.left) / disp.width * 100;
- cur->py = (cur->y - disp.bottom) / disp.height * 100;
- *cur->rgb.r = 0;
- *cur->rgb.g = 0;
- *cur->rgb.b = 0;
-
- cur++;
+#ifdef USE_MASSDROP_CONFIGURATOR
+ led_matrix_massdrop_config_override(i);
+#else
+ led_buffer[i].r = r;
+ led_buffer[i].g = g;
+ led_buffer[i].b = b;
+#endif
}
}
-void led_matrix_prepare(void)
+void led_set_all(uint8_t r, uint8_t g, uint8_t b)
{
- disp_calc_extents();
- disp_pixel_setup();
+ for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++)
+ {
+ led_set_one(i, r, g, b);
+ }
}
-uint8_t led_enabled;
-float led_animation_speed;
-uint8_t led_animation_direction;
-uint8_t led_animation_orientation;
-uint8_t led_animation_breathing;
-uint8_t led_animation_breathe_cur;
-uint8_t breathe_step;
-uint8_t breathe_dir;
-uint8_t led_animation_circular;
-uint64_t led_next_run;
-
-uint8_t led_animation_id;
-uint8_t led_lighting_mode;
-
-issi3733_led_t *led_cur;
-uint8_t led_per_run = 15;
-float breathe_mult;
-
-__attribute__ ((weak))
-void led_matrix_run(void)
+void init(void)
{
- float ro;
- float go;
- float bo;
- float po;
-
- uint8_t led_this_run = 0;
- led_setup_t *f = (led_setup_t*)led_setups[led_animation_id];
-
- if (led_cur == 0) //Denotes start of new processing cycle in the case of chunked processing
- {
- led_cur = led_map;
+ DBGC(DC_LED_MATRIX_INIT_BEGIN);
- disp.frame += 1;
+ issi3733_prepare_arrays();
- breathe_mult = 1;
+ led_matrix_prepare();
- if (led_animation_breathing)
- {
- led_animation_breathe_cur += breathe_step * breathe_dir;
+ gcr_min_counter = 0;
+ v_5v_cat_hit = 0;
- if (led_animation_breathe_cur >= BREATHE_MAX_STEP)
- breathe_dir = -1;
- else if (led_animation_breathe_cur <= BREATHE_MIN_STEP)
- breathe_dir = 1;
+ DBGC(DC_LED_MATRIX_INIT_COMPLETE);
+}
- //Brightness curve created for 256 steps, 0 - ~98%
- breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur;
- if (breathe_mult > 1) breathe_mult = 1;
- else if (breathe_mult < 0) breathe_mult = 0;
- }
- }
+void flush(void)
+{
+#ifdef USE_MASSDROP_CONFIGURATOR
+ if (!led_enabled) { return; } //Prevent calculations and I2C traffic if LED drivers are not enabled
+#else
+ if (!sr_exp_data.bit.SDB_N) { return; } //Prevent calculations and I2C traffic if LED drivers are not enabled
+#endif
- uint8_t fcur = 0;
- uint8_t fmax = 0;
+ // Wait for previous transfer to complete
+ while (i2c_led_q_running) {}
- //Frames setup
- while (f[fcur].end != 1)
+ // Copy buffer to live DMA region
+ for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++)
{
- fcur++; //Count frames
+ *led_map[i].rgb.r = led_buffer[i].r;
+ *led_map[i].rgb.g = led_buffer[i].g;
+ *led_map[i].rgb.b = led_buffer[i].b;
}
- fmax = fcur; //Store total frames count
+#ifdef USE_MASSDROP_CONFIGURATOR
+ breathe_mult = 1;
- while (led_cur < lede && led_this_run < led_per_run)
+ if (led_animation_breathing)
{
- ro = 0;
- go = 0;
- bo = 0;
-
- if (led_lighting_mode == LED_MODE_KEYS_ONLY && led_cur->scan == 255)
- {
- //Do not act on this LED
- }
- else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && led_cur->scan != 255)
- {
- //Do not act on this LED
- }
- else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY)
- {
- //Do not act on this LED (Only show indicators)
- }
- else
- {
- //Act on LED
- for (fcur = 0; fcur < fmax; fcur++)
- {
-
- if (led_animation_circular) {
- po = sqrtf((powf(fabsf((disp.width / 2) - (led_cur->x - disp.left)), 2) + powf(fabsf((disp.height / 2) - (led_cur->y - disp.bottom)), 2))) / disp.max_distance * 100;
- }
- else {
- if (led_animation_orientation)
- {
- po = led_cur->py;
- }
- else
- {
- po = led_cur->px;
- }
- }
-
- float pomod;
- pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed;
-
- //Add in any moving effects
- if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L)))
- {
- pomod *= 100.0f;
- pomod = (uint32_t)pomod % 10000;
- pomod /= 100.0f;
-
- po -= pomod;
-
- if (po > 100) po -= 100;
- else if (po < 0) po += 100;
- }
- else if ((!led_animation_direction && f[fcur].ef & EF_SCR_L) || (led_animation_direction && (f[fcur].ef & EF_SCR_R)))
- {
- pomod *= 100.0f;
- pomod = (uint32_t)pomod % 10000;
- pomod /= 100.0f;
- po += pomod;
-
- if (po > 100) po -= 100;
- else if (po < 0) po += 100;
- }
+ //+60us 119 LED
+ led_animation_breathe_cur += BREATHE_STEP * breathe_dir;
+
+ if (led_animation_breathe_cur >= BREATHE_MAX_STEP)
+ breathe_dir = -1;
+ else if (led_animation_breathe_cur <= BREATHE_MIN_STEP)
+ breathe_dir = 1;
+
+ //Brightness curve created for 256 steps, 0 - ~98%
+ breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur;
+ if (breathe_mult > 1) breathe_mult = 1;
+ else if (breathe_mult < 0) breathe_mult = 0;
+ }
- //Check if LED's po is in current frame
- if (po < f[fcur].hs) continue;
- if (po > f[fcur].he) continue;
- //note: < 0 or > 100 continue
+ //This should only be performed once per frame
+ pomod = (float)((g_rgb_counters.tick / 10) % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed;
+ pomod *= 100.0f;
+ pomod = (uint32_t)pomod % 10000;
+ pomod /= 100.0f;
- //Calculate the po within the start-stop percentage for color blending
- po = (po - f[fcur].hs) / (f[fcur].he - f[fcur].hs);
+#endif // USE_MASSDROP_CONFIGURATOR
- //Add in any color effects
- if (f[fcur].ef & EF_OVER)
- {
- ro = (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5;
- go = (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5;
- bo = (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5;
- }
- else if (f[fcur].ef & EF_SUBTRACT)
- {
- ro -= (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5;
- go -= (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5;
- bo -= (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5;
- }
- else
- {
- ro += (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5;
- go += (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5;
- bo += (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5;
- }
- }
- }
+ uint8_t drvid;
- //Clamp values 0-255
- if (ro > 255) ro = 255; else if (ro < 0) ro = 0;
- if (go > 255) go = 255; else if (go < 0) go = 0;
- if (bo > 255) bo = 255; else if (bo < 0) bo = 0;
+ //NOTE: GCR does not need to be timed with LED processing, but there is really no harm
+ if (gcr_actual != gcr_actual_last)
+ {
+ for (drvid=0;drvid<ISSI3733_DRIVER_COUNT;drvid++)
+ I2C_LED_Q_GCR(drvid); //Queue data
+ gcr_actual_last = gcr_actual;
+ }
- if (led_animation_breathing)
- {
- ro *= breathe_mult;
- go *= breathe_mult;
- bo *= breathe_mult;
- }
+ for (drvid=0;drvid<ISSI3733_DRIVER_COUNT;drvid++)
+ I2C_LED_Q_PWM(drvid); //Queue data
- *led_cur->rgb.r = (uint8_t)ro;
- *led_cur->rgb.g = (uint8_t)go;
- *led_cur->rgb.b = (uint8_t)bo;
+ i2c_led_q_run();
+}
-#ifdef USB_LED_INDICATOR_ENABLE
- if (keyboard_leds())
+void led_matrix_indicators(void)
+{
+ uint8_t kbled = keyboard_leds();
+ if (kbled && rgb_matrix_config.enable)
+ {
+ for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++)
{
- uint8_t kbled = keyboard_leds();
if (
- #if USB_LED_NUM_LOCK_SCANCODE != 255
- (led_cur->scan == USB_LED_NUM_LOCK_SCANCODE && kbled & (1<<USB_LED_NUM_LOCK)) ||
- #endif //NUM LOCK
- #if USB_LED_CAPS_LOCK_SCANCODE != 255
- (led_cur->scan == USB_LED_CAPS_LOCK_SCANCODE && kbled & (1<<USB_LED_CAPS_LOCK)) ||
- #endif //CAPS LOCK
- #if USB_LED_SCROLL_LOCK_SCANCODE != 255
- (led_cur->scan == USB_LED_SCROLL_LOCK_SCANCODE && kbled & (1<<USB_LED_SCROLL_LOCK)) ||
- #endif //SCROLL LOCK
- #if USB_LED_COMPOSE_SCANCODE != 255
- (led_cur->scan == USB_LED_COMPOSE_SCANCODE && kbled & (1<<USB_LED_COMPOSE)) ||
- #endif //COMPOSE
- #if USB_LED_KANA_SCANCODE != 255
- (led_cur->scan == USB_LED_KANA_SCANCODE && kbled & (1<<USB_LED_KANA)) ||
- #endif //KANA
- (0))
+ #if USB_LED_NUM_LOCK_SCANCODE != 255
+ (led_map[i].scan == USB_LED_NUM_LOCK_SCANCODE && (kbled & (1<<USB_LED_NUM_LOCK))) ||
+ #endif //NUM LOCK
+ #if USB_LED_CAPS_LOCK_SCANCODE != 255
+ (led_map[i].scan == USB_LED_CAPS_LOCK_SCANCODE && (kbled & (1<<USB_LED_CAPS_LOCK))) ||
+ #endif //CAPS LOCK
+ #if USB_LED_SCROLL_LOCK_SCANCODE != 255
+ (led_map[i].scan == USB_LED_SCROLL_LOCK_SCANCODE && (kbled & (1<<USB_LED_SCROLL_LOCK))) ||
+ #endif //SCROLL LOCK
+ #if USB_LED_COMPOSE_SCANCODE != 255
+ (led_map[i].scan == USB_LED_COMPOSE_SCANCODE && (kbled & (1<<USB_LED_COMPOSE))) ||
+ #endif //COMPOSE
+ #if USB_LED_KANA_SCANCODE != 255
+ (led_map[i].scan == USB_LED_KANA_SCANCODE && (kbled & (1<<USB_LED_KANA))) ||
+ #endif //KANA
+ (0))
{
- if (*led_cur->rgb.r > 127) *led_cur->rgb.r = 0;
- else *led_cur->rgb.r = 255;
- if (*led_cur->rgb.g > 127) *led_cur->rgb.g = 0;
- else *led_cur->rgb.g = 255;
- if (*led_cur->rgb.b > 127) *led_cur->rgb.b = 0;
- else *led_cur->rgb.b = 255;
+ led_buffer[i].r = 255 - led_buffer[i].r;
+ led_buffer[i].g = 255 - led_buffer[i].g;
+ led_buffer[i].b = 255 - led_buffer[i].b;
}
}
-#endif //USB_LED_INDICATOR_ENABLE
-
- led_cur++;
- led_this_run++;
}
-}
-uint8_t led_matrix_init(void)
-{
- DBGC(DC_LED_MATRIX_INIT_BEGIN);
+}
- issi3733_prepare_arrays();
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = led_set_one,
+ .set_color_all = led_set_all
+};
+
+/*==============================================================================
+= Legacy Lighting Support =
+==============================================================================*/
+
+#ifdef USE_MASSDROP_CONFIGURATOR
+// Ported from Massdrop QMK Github Repo
+
+// TODO?: wire these up to keymap.c
+uint8_t led_animation_orientation = 0;
+uint8_t led_animation_direction = 0;
+uint8_t led_animation_breathing = 0;
+uint8_t led_animation_id = 0;
+float led_animation_speed = 4.0f;
+uint8_t led_lighting_mode = LED_MODE_NORMAL;
+uint8_t led_enabled = 1;
+uint8_t led_animation_breathe_cur = BREATHE_MIN_STEP;
+uint8_t breathe_dir = 1;
+
+static void led_run_pattern(led_setup_t *f, float* ro, float* go, float* bo, float pos) {
+ float po;
- led_matrix_prepare();
+ while (f->end != 1)
+ {
+ po = pos; //Reset po for new frame
- disp.frame = 0;
- led_next_run = 0;
-
- led_enabled = 1;
- led_animation_id = 0;
- led_lighting_mode = LED_MODE_NORMAL;
- led_animation_speed = 4.0f;
- led_animation_direction = 0;
- led_animation_orientation = 0;
- led_animation_breathing = 0;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_step = 1;
- breathe_dir = 1;
- led_animation_circular = 0;
+ //Add in any moving effects
+ if ((!led_animation_direction && f->ef & EF_SCR_R) || (led_animation_direction && (f->ef & EF_SCR_L)))
+ {
+ po -= pomod;
- gcr_min_counter = 0;
- v_5v_cat_hit = 0;
+ if (po > 100) po -= 100;
+ else if (po < 0) po += 100;
+ }
+ else if ((!led_animation_direction && f->ef & EF_SCR_L) || (led_animation_direction && (f->ef & EF_SCR_R)))
+ {
+ po += pomod;
- //Run led matrix code once for initial LED coloring
- led_cur = 0;
- rgb_matrix_init_user();
- led_matrix_run();
+ if (po > 100) po -= 100;
+ else if (po < 0) po += 100;
+ }
- DBGC(DC_LED_MATRIX_INIT_COMPLETE);
+ //Check if LED's po is in current frame
+ if (po < f->hs) { f++; continue; }
+ if (po > f->he) { f++; continue; }
+ //note: < 0 or > 100 continue
- return 0;
-}
+ //Calculate the po within the start-stop percentage for color blending
+ po = (po - f->hs) / (f->he - f->hs);
-__attribute__ ((weak))
-void rgb_matrix_init_user(void) {
+ //Add in any color effects
+ if (f->ef & EF_OVER)
+ {
+ *ro = (po * (f->re - f->rs)) + f->rs;// + 0.5;
+ *go = (po * (f->ge - f->gs)) + f->gs;// + 0.5;
+ *bo = (po * (f->be - f->bs)) + f->bs;// + 0.5;
+ }
+ else if (f->ef & EF_SUBTRACT)
+ {
+ *ro -= (po * (f->re - f->rs)) + f->rs;// + 0.5;
+ *go -= (po * (f->ge - f->gs)) + f->gs;// + 0.5;
+ *bo -= (po * (f->be - f->bs)) + f->bs;// + 0.5;
+ }
+ else
+ {
+ *ro += (po * (f->re - f->rs)) + f->rs;// + 0.5;
+ *go += (po * (f->ge - f->gs)) + f->gs;// + 0.5;
+ *bo += (po * (f->be - f->bs)) + f->bs;// + 0.5;
+ }
+ f++;
+ }
}
-#define LED_UPDATE_RATE 10 //ms
-
-//led data processing can take time, so process data in chunks to free up the processor
-//this is done through led_cur and lede
-void led_matrix_task(void)
+static void led_matrix_massdrop_config_override(int i)
{
- if (led_enabled)
- {
- //If an update may run and frame processing has completed
- if (timer_read64() >= led_next_run && led_cur == lede)
- {
- uint8_t drvid;
+ float ro = 0;
+ float go = 0;
+ float bo = 0;
+
+ float po = (led_animation_orientation)
+ ? (float)g_rgb_leds[i].point.y / 64.f * 100
+ : (float)g_rgb_leds[i].point.x / 224.f * 100;
+
+ uint8_t highest_active_layer = biton32(layer_state);
+
+ if (led_lighting_mode == LED_MODE_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw == 0xff) {
+ //Do not act on this LED
+ } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw != 0xff) {
+ //Do not act on this LED
+ } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) {
+ //Do not act on this LED (Only show indicators)
+ } else {
+ led_instruction_t* led_cur_instruction = led_instructions;
+ while (!led_cur_instruction->end) {
+ // Check if this applies to current layer
+ if ((led_cur_instruction->flags & LED_FLAG_MATCH_LAYER) &&
+ (led_cur_instruction->layer != highest_active_layer)) {
+ goto next_iter;
+ }
- led_next_run = timer_read64() + LED_UPDATE_RATE; //Set next frame update time
+ // Check if this applies to current index
+ if (led_cur_instruction->flags & LED_FLAG_MATCH_ID) {
+ uint8_t modid = i / 32; //Calculate which id# contains the led bit
+ uint32_t modidbit = 1 << (i % 32); //Calculate the bit within the id#
+ uint32_t *bitfield = &led_cur_instruction->id0 + modid; //Add modid as offset to id0 address. *bitfield is now idX of the led id
+ if (~(*bitfield) & modidbit) { //Check if led bit is not set in idX
+ goto next_iter;
+ }
+ }
- //NOTE: GCR does not need to be timed with LED processing, but there is really no harm
- if (gcr_actual != gcr_actual_last)
- {
- for (drvid=0;drvid<ISSI3733_DRIVER_COUNT;drvid++)
- I2C_LED_Q_GCR(drvid); //Queue data
- gcr_actual_last = gcr_actual;
+ if (led_cur_instruction->flags & LED_FLAG_USE_RGB) {
+ ro = led_cur_instruction->r;
+ go = led_cur_instruction->g;
+ bo = led_cur_instruction->b;
+ } else if (led_cur_instruction->flags & LED_FLAG_USE_PATTERN) {
+ led_run_pattern(led_setups[led_cur_instruction->pattern_id], &ro, &go, &bo, po);
+ } else if (led_cur_instruction->flags & LED_FLAG_USE_ROTATE_PATTERN) {
+ led_run_pattern(led_setups[led_animation_id], &ro, &go, &bo, po);
}
- for (drvid=0;drvid<ISSI3733_DRIVER_COUNT;drvid++)
- I2C_LED_Q_PWM(drvid); //Queue data
+ next_iter:
+ led_cur_instruction++;
+ }
- i2c_led_q_run();
+ if (ro > 255) ro = 255; else if (ro < 0) ro = 0;
+ if (go > 255) go = 255; else if (go < 0) go = 0;
+ if (bo > 255) bo = 255; else if (bo < 0) bo = 0;
- led_cur = 0; //Signal next frame calculations may begin
+ if (led_animation_breathing)
+ {
+ ro *= breathe_mult;
+ go *= breathe_mult;
+ bo *= breathe_mult;
}
}
- //Process more data if not finished
- if (led_cur != lede)
- {
- //DBG_1_OFF; //debug profiling
- led_matrix_run();
- //DBG_1_ON; //debug profiling
- }
+ led_buffer[i].r = (uint8_t)ro;
+ led_buffer[i].g = (uint8_t)go;
+ led_buffer[i].b = (uint8_t)bo;
}
+#endif // USE_MASSDROP_CONFIGURATOR
diff --git a/tmk_core/protocol/arm_atsam/led_matrix.h b/tmk_core/protocol/arm_atsam/led_matrix.h
index 4513234e7..1316efd9a 100644
--- a/tmk_core/protocol/arm_atsam/led_matrix.h
+++ b/tmk_core/protocol/arm_atsam/led_matrix.h
@@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef _LED_MATRIX_H_
#define _LED_MATRIX_H_
+#include "quantum.h"
+
//From keyboard
#include "config_led.h"
@@ -75,25 +77,20 @@ typedef struct issi3733_led_s {
uint8_t scan; //Key scan code from wiring (set 0xFF if no key)
} issi3733_led_t;
-typedef struct led_disp_s {
- uint64_t frame;
- float left;
- float right;
- float top;
- float bottom;
- float width;
- float height;
- float max_distance;
-} led_disp_t;
+extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT];
-uint8_t led_matrix_init(void);
-void rgb_matrix_init_user(void);
+extern uint8_t gcr_desired;
+extern uint8_t gcr_breathe;
+extern uint8_t gcr_actual;
+extern uint8_t gcr_actual_last;
-#define LED_MODE_NORMAL 0 //Must be 0
-#define LED_MODE_KEYS_ONLY 1
-#define LED_MODE_NON_KEYS_ONLY 2
-#define LED_MODE_INDICATORS_ONLY 3
-#define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY //Must be highest value
+void gcr_compute(void);
+
+void led_matrix_indicators(void);
+
+/*------------------------- Legacy Lighting Support ------------------------*/
+
+#ifdef USE_MASSDROP_CONFIGURATOR
#define EF_NONE 0x00000000 //No effect
#define EF_OVER 0x00000001 //Overwrite any previous color information with new
@@ -114,33 +111,48 @@ typedef struct led_setup_s {
uint8_t end; //Set to signal end of the setup
} led_setup_t;
-extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT];
+extern const uint8_t led_setups_count;
+extern void *led_setups[];
-extern uint8_t gcr_desired;
-extern uint8_t gcr_breathe;
-extern uint8_t gcr_actual;
-extern uint8_t gcr_actual_last;
+//LED Extra Instructions
+#define LED_FLAG_NULL 0x00 //Matching and coloring not used (default)
+#define LED_FLAG_MATCH_ID 0x01 //Match on the ID of the LED (set id#'s to desired bit pattern, first LED is id 1)
+#define LED_FLAG_MATCH_LAYER 0x02 //Match on the current active layer (set layer to desired match layer)
+#define LED_FLAG_USE_RGB 0x10 //Use a specific RGB value (set r, g, b to desired output color values)
+#define LED_FLAG_USE_PATTERN 0x20 //Use a specific pattern ID (set pattern_id to desired output pattern)
+#define LED_FLAG_USE_ROTATE_PATTERN 0x40 //Use pattern the user has cycled to manually
+
+typedef struct led_instruction_s {
+ uint16_t flags; // Bitfield for LED instructions
+ uint32_t id0; // Bitwise id, IDs 0-31
+ uint32_t id1; // Bitwise id, IDs 32-63
+ uint32_t id2; // Bitwise id, IDs 64-95
+ uint32_t id3; // Bitwise id, IDs 96-127
+ uint8_t layer;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t pattern_id;
+ uint8_t end;
+} led_instruction_t;
+
+extern led_instruction_t led_instructions[];
+extern uint8_t led_animation_breathing;
extern uint8_t led_animation_id;
-extern uint8_t led_enabled;
extern float led_animation_speed;
extern uint8_t led_lighting_mode;
-extern uint8_t led_animation_direction;
-extern uint8_t led_animation_orientation;
-extern uint8_t led_animation_breathing;
+extern uint8_t led_enabled;
extern uint8_t led_animation_breathe_cur;
+extern uint8_t led_animation_direction;
extern uint8_t breathe_dir;
-extern uint8_t led_animation_circular;
-extern const uint8_t led_setups_count;
-extern void *led_setups[];
-
-extern issi3733_led_t *led_cur;
-extern issi3733_led_t *lede;
-
-void led_matrix_run(void);
-void led_matrix_task(void);
+#define LED_MODE_NORMAL 0 //Must be 0
+#define LED_MODE_KEYS_ONLY 1
+#define LED_MODE_NON_KEYS_ONLY 2
+#define LED_MODE_INDICATORS_ONLY 3
+#define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY //Must be highest value
-void gcr_compute(void);
+#endif // USE_MASSDROP_CONFIGURATOR
#endif //_LED_MATRIX_H_
diff --git a/keyboards/massdrop/ctrl/led_programs.c b/tmk_core/protocol/arm_atsam/led_matrix_programs.c
index ca2701645..cf7478dc3 100644
--- a/keyboards/massdrop/ctrl/led_programs.c
+++ b/tmk_core/protocol/arm_atsam/led_matrix_programs.c
@@ -15,7 +15,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ctrl.h"
+#ifdef USE_MASSDROP_CONFIGURATOR
+
#include "led_matrix.h"
//Teal <-> Salmon
@@ -118,3 +119,5 @@ void *led_setups[] = {
};
const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]);
+
+#endif
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
index eaad66e9f..0974a230d 100644
--- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c
+++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c
@@ -203,13 +203,6 @@ void main_subtask_usb_state(void)
}
}
-void main_subtask_led(void)
-{
- if (g_usb_state != USB_FSMSTATUS_FSMSTATE_ON_Val) return; //Only run LED tasks if USB is operating
-
- led_matrix_task();
-}
-
void main_subtask_power_check(void)
{
static uint64_t next_5v_checkup = 0;
@@ -221,7 +214,9 @@ void main_subtask_power_check(void)
v_5v = adc_get(ADC_5V);
v_5v_avg = 0.9 * v_5v_avg + 0.1 * v_5v;
+#ifdef RGB_MATRIX_ENABLE
gcr_compute();
+#endif
}
}
@@ -240,7 +235,6 @@ void main_subtask_usb_extra_device(void)
void main_subtasks(void)
{
main_subtask_usb_state();
- main_subtask_led();
main_subtask_power_check();
main_subtask_usb_extra_device();
}
@@ -263,7 +257,9 @@ int main(void)
SR_EXP_Init();
+#ifdef RGB_MATRIX_ENABLE
i2c1_init();
+#endif // RGB_MATRIX_ENABLE
matrix_init();
@@ -281,8 +277,7 @@ int main(void)
DBG_LED_OFF;
- led_matrix_init();
-
+#ifdef RGB_MATRIX_ENABLE
while (I2C3733_Init_Control() != 1) {}
while (I2C3733_Init_Drivers() != 1) {}
@@ -292,6 +287,7 @@ int main(void)
for (uint8_t drvid = 0; drvid < ISSI3733_DRIVER_COUNT; drvid++)
I2C_LED_Q_ONOFF(drvid); //Queue data
+#endif // RGB_MATRIX_ENABLE
keyboard_setup();
diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.c b/tmk_core/protocol/arm_atsam/usb/usb2422.c
index d6e192242..76ec3aaaa 100644
--- a/tmk_core/protocol/arm_atsam/usb/usb2422.c
+++ b/tmk_core/protocol/arm_atsam/usb/usb2422.c
@@ -365,8 +365,10 @@ void USB_ExtraSetState(uint8_t state)
if (usb_extra_state == USB_EXTRA_STATE_ENABLED) CDC_print("USB: Extra enabled\r\n");
else if (usb_extra_state == USB_EXTRA_STATE_DISABLED)
{
- CDC_print("USB: Extra disabled\r\n");
- if (led_animation_breathing) gcr_breathe = gcr_desired;
+ CDC_print("USB: Extra disabled\r\n");
+#ifdef USE_MASSDROP_CONFIGURATOR
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+#endif
}
else if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) CDC_print("USB: Extra disabled until replug\r\n");
else CDC_print("USB: Extra state unknown\r\n");
diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp
index bee6bb2c1..80839731f 100644
--- a/tmk_core/protocol/lufa/adafruit_ble.cpp
+++ b/tmk_core/protocol/lufa/adafruit_ble.cpp
@@ -533,8 +533,7 @@ bool adafruit_ble_enable_keyboard(void) {
// Disable command echo
static const char kEcho[] PROGMEM = "ATE=0";
// Make the advertised name match the keyboard
- static const char kGapDevName[] PROGMEM =
- "AT+GAPDEVNAME=" STR(PRODUCT) " " STR(DESCRIPTION);
+ static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" STR(PRODUCT);
// Turn on keyboard support
static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1";
diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrv.c b/tmk_core/protocol/vusb/usbdrv/usbdrv.c
index 2e8dd8756..30cdc9dcf 100644
--- a/tmk_core/protocol/vusb/usbdrv/usbdrv.c
+++ b/tmk_core/protocol/vusb/usbdrv/usbdrv.c
@@ -95,7 +95,7 @@ const PROGMEM int usbDescriptorStringDevice[] = {
#if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN
#undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber)
-PROGMEM int usbDescriptorStringSerialNumber[] = {
+const PROGMEM int usbDescriptorStringSerialNumber[] = {
USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN),
USB_CFG_SERIAL_NUMBER
};
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index c43f14292..3a322cee4 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -383,6 +383,8 @@ show_path:
@echo OBJ=$(OBJ)
ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
+SIZE_MARGIN = 1024
+
check-size:
$(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne '/^#/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))
@@ -390,7 +392,15 @@ check-size:
$(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(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 printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); else $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; fi \
+ if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \
+ 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:
diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c
index 212d06de6..9e8c7af24 100644
--- a/users/arkag/arkag.c
+++ b/users/arkag/arkag.c
@@ -5,34 +5,7 @@
https://github.com/arkag/qmk_firmware/blob/master/keyboards/mechmini/v2/keymaps/arkag/keymap.c
*/
-// Start: Written by konstantin: vomindoraan
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-void send_unicode_hex_string(const char *str) {
- if (!str) { return; } // Saftey net
- while (*str) {
- // Find the next code point (token) in the string
- for (; *str == ' '; str++);
- size_t n = strcspn(str, " "); // Length of the current token
- char code_point[n+1];
- strncpy(code_point, str, n);
- code_point[n] = '\0'; // Make sure it's null-terminated
-
- // Normalize the code point: make all hex digits lowercase
- for (char *p = code_point; *p; p++) {
- *p = tolower(*p);
- }
-
- // Send the code point as a Unicode input string
- unicode_input_start();
- send_string(code_point);
- unicode_input_finish();
- str += n; // Move to the first ' ' (or '\0') after the current token
- }
-}
-// End: Written by konstantin: vomindoraan
+#include <stdbool.h>
// Start: Written by Chris Lewis
#ifndef MIN
@@ -78,6 +51,8 @@ Color underglow,
flashState flash_state = no_flash;
fadeState fade_state = add_fade;
activityState state = boot;
+bool aesthetic = false,
+ shifty = false;
void set_color (Color new, bool update) {
rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update);
@@ -146,7 +121,7 @@ void check_state (void) {
case sleeping:
if (!slept) {
- rgblight_mode_noeeprom(4);
+ rgblight_mode_noeeprom(5);
slept = true;
activated = false;
deactivated = false;
@@ -249,11 +224,6 @@ void set_os (uint8_t os, bool update) {
num_extra_flashes_off = 1;
}
-void tap_key(uint8_t keycode) {
- register_code(keycode);
- unregister_code(keycode);
-}
-
// register GUI if Mac or Ctrl if other
void pri_mod(bool press) {
if (press) {
@@ -293,13 +263,13 @@ void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
register_code(KC_LSFT);
}
for (int i = 0; i < num_of_chars; i++) {
- tap_key(keycode);
+ tap_code(keycode);
}
if (use_shift) {
unregister_code(KC_LSFT);
}
for (int i = 0; i < (num_of_chars/2); i++) {
- tap_key(KC_LEFT);
+ tap_code(KC_LEFT);
}
}
@@ -307,7 +277,7 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) {
for (int i = 0; i < num_of_keys-1; i++) {
register_code(keys[i]);
}
- tap_key(keys[num_of_keys-1]);
+ tap_code(keys[num_of_keys-1]);
for (int i = 0; i < num_of_keys-1; i++) {
unregister_code(keys[i]);
}
@@ -315,7 +285,10 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) {
void dance_grv (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- tap_key(KC_GRV);
+ tap_code(KC_GRV);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
} else if (state->count == 2) {
surround_type(2, KC_GRAVE, false);
} else {
@@ -325,7 +298,10 @@ void dance_grv (qk_tap_dance_state_t *state, void *user_data) {
void dance_quot (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- tap_key(KC_QUOT);
+ tap_code(KC_QUOT);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
} else if (state->count == 2) {
surround_type(2, KC_QUOTE, false);
} else if (state->count == 3) {
@@ -333,35 +309,73 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data) {
}
}
-void dance_strk (qk_tap_dance_state_t *state, void *user_data) {
+void dance_hyph (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- surround_type(4, KC_TILDE, true);
+ tap_code(KC_MINS);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
} else if (state->count == 2) {
- if (current_os == OS_MAC) {
- long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4});
- } else if (current_os == OS_WIN) {
- long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S});
- } else {
- return;
+ register_code(KC_LSFT);
+ tap_code(KC_MINS);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
}
+ unregister_code(KC_LSFT);
+ } else if (state->count == 3) {
+ send_unicode_hex_string("2014");
}
}
-void dance_3 (qk_tap_dance_state_t *state, void *user_data) {
+void dance_obrck (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- tap_key(KC_3);
+ tap_code(KC_LBRC);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
} else if (state->count == 2) {
- send_unicode_hex_string("00E8");
- } else if (state->count == 3) {
- send_unicode_hex_string("00E9");
+ register_code(KC_LSFT);
+ tap_code(KC_9);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
+ unregister_code(KC_LSFT);
}
}
-void dance_c (qk_tap_dance_state_t *state, void *user_data) {
+void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
- tap_key(KC_C);
+ tap_code(KC_RBRC);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
} else if (state->count == 2) {
- send_unicode_hex_string("00E7");
+ register_code(KC_LSFT);
+ tap_code(KC_0);
+ if (aesthetic) {
+ tap_code(KC_SPACE);
+ }
+ unregister_code(KC_LSFT);
+ }
+}
+
+void dance_game (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+
+ } else if (state->count == 2) {
+
+ } else if (state->count == 3) {
+ uint8_t layer = biton32(layer_state);
+ if (layer == _QWERTY) {
+ layer_off(_QWERTY);
+ layer_on(_GAMING);
+ // swirling rgb
+ rgblight_mode_noeeprom(12);
+ } else {
+ layer_off(_GAMING);
+ layer_on(_QWERTY);
+ rgblight_mode_noeeprom(1);
+ }
}
}
@@ -383,13 +397,29 @@ void matrix_scan_user(void) {
// begin OS functions
SEQ_TWO_KEYS(KC_P, KC_B) {
if (current_os == OS_WIN) {
- SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_PAUSE) SS_UP(X_LGUI));
+ long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE});
+ } else {
+ return;
+ }
+ }
+ SEQ_TWO_KEYS(KC_LSFT, M_PMOD) {
+ if (current_os == OS_WIN) {
+ long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LSFT, KC_ESC});
+ } else {
+ }
+ }
+ SEQ_TWO_KEYS(KC_S, KC_S) {
+ if (current_os == OS_MAC) {
+ long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4});
+ } else if (current_os == OS_WIN) {
+ long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S});
} else {
+ return;
}
}
SEQ_THREE_KEYS(KC_C, KC_A, KC_D) {
if (current_os == OS_WIN) {
- SEND_STRING(SS_DOWN(X_LCTRL) SS_DOWN(X_LALT) SS_TAP(X_DELETE) SS_UP(X_LALT) SS_UP(X_LCTRL));
+ long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LALT, KC_DEL});
} else {
}
}
@@ -415,33 +445,33 @@ void matrix_scan_user(void) {
SEQ_ONE_KEY(KC_S) {
surround_type(4, KC_GRAVE, true);
}
- SEQ_TWO_KEYS(KC_S, KC_S) {
- if (current_os == OS_MAC) {
- long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4});
- } else if (current_os == OS_WIN) {
- long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S});
- } else {
- return;
- }
- }
SEQ_ONE_KEY(KC_C) {
- surround_type(2, KC_GRAVE, false);
+ send_unicode_hex_string("00E7");
}
SEQ_TWO_KEYS(KC_C, KC_C) {
+ surround_type(2, KC_GRAVE, false);
+ }
+ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
surround_type(6, KC_GRAVE, false);
}
+ SEQ_ONE_KEY(KC_E) {
+ send_unicode_hex_string("00E8");
+ }
+ SEQ_TWO_KEYS(KC_E, KC_E) {
+ send_unicode_hex_string("00E9");
+ }
// end format functions
// start fancy functions
- SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
+ SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) {
surround_type(6, KC_GRAVE, false);
pri_mod(true);
- tap_key(KC_V);
+ tap_code(KC_V);
pri_mod(false);
- tap_key(KC_RGHT);
- tap_key(KC_RGHT);
- tap_key(KC_RGHT);
- tap_key(KC_ENTER);
+ tap_code(KC_RGHT);
+ tap_code(KC_RGHT);
+ tap_code(KC_RGHT);
+ tap_code(KC_ENTER);
}
// end fancy functions
@@ -450,8 +480,8 @@ void matrix_scan_user(void) {
// ™
send_unicode_hex_string("2122");
}
- SEQ_THREE_KEYS(KC_G, KC_G, KC_T) {
- SEND_STRING("@GrahamGoldenTech.com");
+ SEQ_TWO_KEYS(KC_D, KC_D) {
+ SEND_STRING(".\\Administrator");
}
SEQ_THREE_KEYS(KC_L, KC_O, KC_D) {
// ಠ__ಠ
@@ -482,29 +512,103 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (aesthetic) {
+ switch (keycode) {
+ case KC_A ... KC_0:
+ case KC_SPACE ... KC_SLASH:
+ if (record->event.pressed) {
+ state = active;
+ velocikey_accelerate();
+ tap_code(keycode);
+ tap_code(KC_SPACE);
+ }
+ return false;
+
+ case KC_BSPACE:
+ if (record->event.pressed) {
+ state = active;
+ velocikey_accelerate();
+ tap_code(keycode);
+ tap_code(keycode);
+ }
+ return false;
+ default: // Do nothing
+ break;
+ }
+ }
+
+ if (shifty) {
+ switch (keycode) {
+ case KC_A ... KC_Z:
+ if (record->event.pressed) {
+ int shift = rand() % 2;
+ state = active;
+ velocikey_accelerate();
+ if (shift == 1){
+ register_code(KC_LSFT);
+ }
+ tap_code(keycode);
+ if (shift == 1){
+ unregister_code(KC_LSFT);
+ }
+ }
+ return false;
+ case KC_SPC:
+ if (record->event.pressed) {
+ state = active;
+ velocikey_accelerate();
+ tap_code(keycode);
+ }
+ return false;
+ default: // Do nothing
+ break;
+ }
+ }
+
switch (keycode) {
case M_PMOD:
- if (record->event.pressed) {
- pri_mod(true);
- } else {
- pri_mod(false);
- }
+ pri_mod(record->event.pressed);
return false;
case M_SMOD:
- if (record->event.pressed) {
- sec_mod(true);
- } else {
- sec_mod(false);
- }
+ sec_mod(record->event.pressed);
return false;
case M_OS:
- if (record->event.pressed) {
+ if (record->event.pressed){
set_os((current_os+1) % _OS_COUNT, true);
}
+
return false;
+ case M_SPC:
+ if(record->event.pressed){
+ if (aesthetic) {
+ aesthetic = false;
+ rgblight_mode_noeeprom(1);
+ } else {
+ aesthetic = true;
+ shifty = false;
+ // snake mode
+ rgblight_mode_noeeprom(20);
+ }
+ return false;
+ }
+
+ case M_SFT:
+ if(record->event.pressed){
+ if (shifty) {
+ shifty = false;
+ rgblight_mode_noeeprom(1);
+ } else {
+ shifty = true;
+ aesthetic = false;
+ // knight mode
+ rgblight_mode_noeeprom(23);
+ }
+ return false;
+ }
+
default:
if (record->event.pressed) {
state = active;
@@ -516,13 +620,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_3_GRV_ACT] = ACTION_TAP_DANCE_FN (dance_3),
- [TD_C_CED] = ACTION_TAP_DANCE_FN (dance_c),
[TD_GRV_3GRV] = ACTION_TAP_DANCE_FN (dance_grv),
[TD_SING_DOUB] = ACTION_TAP_DANCE_FN (dance_quot),
- [TD_STRK_SHOT] = ACTION_TAP_DANCE_FN (dance_strk),
- [TD_HYPH_UNDR] = ACTION_TAP_DANCE_DOUBLE (KC_MINS, LSFT(KC_MINS)),
- [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, LSFT(KC_9)),
- [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, LSFT(KC_0)),
+ [TD_HYPH_UNDR] = ACTION_TAP_DANCE_FN (dance_hyph),
+ [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck),
+ [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck),
[TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT),
+ [TD_GAME] = ACTION_TAP_DANCE_FN (dance_game),
};
diff --git a/users/arkag/arkag.h b/users/arkag/arkag.h
index a4672a8e8..fdc4a5fee 100644
--- a/users/arkag/arkag.h
+++ b/users/arkag/arkag.h
@@ -14,12 +14,13 @@
#define STRIKE TD(TD_STRK_SHOT)
#define HYPHEN TD(TD_HYPH_UNDR)
#define CEDILLA TD(TD_C_CED)
+#define GAME TD(TD_GAME)
#define RAISE MO(1)
#define LOWER MO(2)
-#define KEEB MO(3)
-#define MEDIA MO(4)
-#define LAZY MO(5)
+#define MEDIA MO(3)
+#define FUNCT MO(4)
+#define KEEB MO(5)
#define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))
#define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))
@@ -37,9 +38,10 @@ enum {
_QWERTY = 0,
_RAISE,
_LOWER,
- _KEEB,
_MEDIA,
- _LAZY,
+ _FUNCT,
+ _KEEB,
+ _GAMING,
};
typedef enum {
@@ -76,22 +78,9 @@ typedef enum {
enum custom_keycodes {
M_PMOD = SAFE_RANGE,
M_SMOD,
- M_P_B,
- M_C_A_D,
- M_CALC,
M_OS,
- M_TF,
- M_TM,
- M_GGT,
- M_LOD,
- M_LENNY,
- M_BOLD,
- M_ITAL,
- M_ULIN,
- M_SNIPT,
- M_REPO,
- M_SHRUG,
- M_UF,
+ M_SFT,
+ M_SPC,
};
enum tapdances {
@@ -101,16 +90,13 @@ enum tapdances {
TD_SLSH_HTTP,
TD_SING_DOUB,
TD_HYPH_UNDR,
- TD_STRK_SHOT,
TD_SPECIAL,
TD_BRCK_PARN_O,
TD_BRCK_PARN_C,
TD_LALT_RALT,
- SPC_SFT_NSFT,
+ TD_GAME,
};
-void send_unicode_hex_string(const char *str);
-
void velocikey_accelerate(void);
void velocikey_decelerate(void);
uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
@@ -146,6 +132,7 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data);
void dance_strk (qk_tap_dance_state_t *state, void *user_data);
void dance_3 (qk_tap_dance_state_t *state, void *user_data);
void dance_c (qk_tap_dance_state_t *state, void *user_data);
+void dance_game (qk_tap_dance_state_t *state, void *user_data);
int cur_dance (qk_tap_dance_state_t *state);
void spc_finished (qk_tap_dance_state_t *state, void *user_data);
diff --git a/users/arkag/config.h b/users/arkag/config.h
index 2e0a9ad01..5a89a18f6 100644
--- a/users/arkag/config.h
+++ b/users/arkag/config.h
@@ -1,6 +1,6 @@
#pragma once
#define TAPPING_TERM 200
-#define LEADER_TIMEOUT 250
+#define LEADER_TIMEOUT 300
#define LEADER_PER_KEY_TIMING
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 2e125d1e4..2abd326da 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -15,10 +15,10 @@
// #ifdef RGBLIGHT_ENABLE
// #define NO_MUSIC_MODE
// #endif //RGBLIGHT_ENABLE/
- #ifndef __arm__
- #undef NOTE_REST
- #define NOTE_REST 1.00f
- #endif // !__arm__
+ // #ifndef __arm__
+ // #undef NOTE_REST
+ // #define NOTE_REST 1.00f
+ // #endif // !__arm__
#define UNICODE_SONG_OSX SONG(RICK_ROLL)
#define UNICODE_SONG_LNX SONG(RICK_ROLL)
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 8019f2667..6968a4b92 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -144,9 +144,9 @@ void shutdown_user (void) {
rgblight_setrgb_red();
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
- uint16_t timer_start = timer_read();
- rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
- while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
+ // uint16_t timer_start = timer_read();
+ // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
+ // while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
#endif //RGB_MATRIX_ENABLE
shutdown_keymap();
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index ca55198e3..c19b18943 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -53,11 +53,6 @@ enum userspace_layers {
/*
define modifiers here, since MOD_* doesn't seem to work for these
*/
-#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
-#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
-#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
-#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
-
bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 73cad92f6..2d9025b37 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -12,7 +12,6 @@ bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
return true;
}
-
// Defines actions tor my global custom keycodes. Defined in drashna.h file
// Then runs the _keymap's record handier if not processed here
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -35,30 +34,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
if (!record->event.pressed) {
- #if !defined(KEYBOARD_viterbi)
- uint8_t temp_mod = get_mods();
- uint8_t temp_osm = get_oneshot_mods();
- clear_mods(); clear_oneshot_mods();
- #endif
+ uint8_t temp_mod = get_mods();
+ uint8_t temp_osm = get_oneshot_mods();
+ clear_mods(); clear_oneshot_mods();
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER);
- #if defined(KEYBOARD_viterbi)
- send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER);
- #else
- if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) {
- #if defined(__arm__)
- send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER);
- #elif defined(BOOTLOADER_DFU)
- send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER);
- #elif defined(BOOTLOADER_HALFKAY)
- send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER);
- #elif defined(BOOTLOADER_CATERINA)
- send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER);
- #endif // bootloader options
- }
- if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); }
- send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER);
- set_mods(temp_mod);
- #endif
+#ifndef MAKE_BOOTLOADER
+ if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT )
+#endif
+ {
+ #if defined(__arm__)
+ send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER);
+ #elif defined(BOOTLOADER_DFU)
+ send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER);
+ #elif defined(BOOTLOADER_HALFKAY)
+ send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER);
+ #elif defined(BOOTLOADER_CATERINA)
+ send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER);
+ #endif // bootloader options
+ }
+ if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); }
+ send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER);
+ set_mods(temp_mod);
+ set_oneshot_mods(temp_osm);
}
break;
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index 7eaa7e949..a98ad590c 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -4,6 +4,7 @@
#if defined(RGBLIGHT_ENABLE)
extern rgblight_config_t rgblight_config;
+bool has_initialized;
#elif defined(RGB_MATRIX_ENABLE)
extern rgb_config_t rgb_matrix_config;
#endif
@@ -17,7 +18,7 @@ void rgblight_sethsv_default_helper(uint8_t index) {
#ifdef INDICATOR_LIGHTS
void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) {
- if (this_mod & MODS_SHIFT_MASK || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MODS_SHIFT_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK) ) {
#ifdef SHFT_LED1
rgblight_sethsv_at(120, 255, 255, SHFT_LED1);
#endif // SHFT_LED1
@@ -32,7 +33,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
rgblight_sethsv_default_helper(SHFT_LED2);
#endif // SHFT_LED2
}
- if (this_mod & MODS_CTRL_MASK || this_osm & MODS_CTRL_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_CTRL) {
#ifdef CTRL_LED1
rgblight_sethsv_at(0, 255, 255, CTRL_LED1);
#endif // CTRL_LED1
@@ -47,7 +48,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
rgblight_sethsv_default_helper(CTRL_LED2);
#endif // CTRL_LED2
}
- if (this_mod & MODS_GUI_MASK || this_osm & MODS_GUI_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_GUI) {
#ifdef GUI_LED1
rgblight_sethsv_at(51, 255, 255, GUI_LED1);
#endif // GUI_LED1
@@ -62,7 +63,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
rgblight_sethsv_default_helper(GUI_LED2);
#endif // GUI_LED2
}
- if (this_mod & MODS_ALT_MASK || this_osm & MODS_ALT_MASK) {
+ if ( (this_mod | this_osm) & MOD_MASK_ALT) {
#ifdef ALT_LED1
rgblight_sethsv_at(240, 255, 255, ALT_LED1);
#endif // ALT_LED1
@@ -81,7 +82,9 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
}
void matrix_scan_indicator(void) {
- set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods());
+ if (has_initialized) {
+ set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods());
+ }
}
#endif //INDICATOR_LIGHTS
@@ -244,22 +247,16 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
void keyboard_post_init_rgb(void) {
-
#ifdef RGBLIGHT_ENABLE
- if (userspace_config.rgb_layer_change) {
- rgblight_enable_noeeprom();
- switch (biton32(eeconfig_read_default_layer())) {
- case _COLEMAK:
- rgblight_sethsv_noeeprom_magenta(); break;
- case _DVORAK:
- rgblight_sethsv_noeeprom_springgreen(); break;
- case _WORKMAN:
- rgblight_sethsv_noeeprom_goldenrod(); break;
- default:
- rgblight_sethsv_noeeprom_cyan(); break;
- }
- rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
- }
+ rgblight_enable_noeeprom();
+ layer_state_set_user(layer_state);
+ uint16_t old_hue = rgblight_config.hue;
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
+ for (uint16_t i = 360; i > 0; i--) {
+ rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255);
+ wait_ms(10);
+ }
+ layer_state_set_user(layer_state);
#endif
}
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 6d8612e71..5050704a5 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -42,3 +42,7 @@ ifdef CONSOLE_ENABLE
OPT_DEFS += -DKEYLOGGER_ENABLE
endif
endif
+
+ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
+ OPT_DEFS += -DMAKE_BOOTLOADER
+endif
diff --git a/users/jarred/jarred.h b/users/jarred/jarred.h
index 3f27163ab..ae48adb70 100644
--- a/users/jarred/jarred.h
+++ b/users/jarred/jarred.h
@@ -50,6 +50,8 @@ enum {
// Wrappers
#define LAYOUT_planck_grid_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__)
+#define LAYOUT_atreus62_grid_wrapper(...) LAYOUT(__VA_ARGS__)
+#define LAYOUT_ergotravel_grid_wrapper(...) LAYOUT(__VA_ARGS__)
/* Qwerty Layer */
#define QWERTY_L1 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
@@ -127,6 +129,8 @@ enum {
#define MOUSE_4_DOX _______, _______, _______, _______, _______, _______
+#define BLANK_12 KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO
+
#define QWERTY_1_12 QWERTY_L1, QWERTY_R1
#define QWERTY_2_12 QWERTY_L2, QWERTY_R2
#define QWERTY_3_12 QWERTY_L3, QWERTY_R3
diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h
index 14284435b..42306727c 100644
--- a/users/stanrc85/config.h
+++ b/users/stanrc85/config.h
@@ -1,6 +1,6 @@
#pragma once
-#define TAPPING_TERM 200
+#define TAPPING_TERM 250
#define RETRO_TAPPING
#ifdef RGBLIGHT_ENABLE
diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c
index bddc14d7e..78b0c4a14 100644
--- a/users/stanrc85/stanrc85.c
+++ b/users/stanrc85/stanrc85.c
@@ -1,10 +1,55 @@
#include "stanrc85.h"
+static td_state_t td_state;
+
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
+// determine the tapdance state to return
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) { return SINGLE_TAP; }
+ else { return SINGLE_HOLD; }
+ }
+ if (state->count == 2) { return DOUBLE_TAP; }
+ else { return 3; } // any number higher than the maximum state value you return above
+}
+
+// handle the possible states for each tapdance keycode you define:
+void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data) {
+ td_state = cur_dance(state);
+ switch (td_state) {
+ case SINGLE_TAP:
+ SEND_STRING(SS_LCTRL("c"));
+ break;
+ case SINGLE_HOLD:
+ register_mods(MOD_BIT(KC_RCTL));
+ break;
+ case DOUBLE_TAP:
+ SEND_STRING(SS_LCTRL("v"));
+ }
+}
+
+void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (td_state) {
+ case SINGLE_TAP:
+ break;
+ case SINGLE_HOLD:
+ unregister_mods(MOD_BIT(KC_RCTL));
+ break;
+ case DOUBLE_TAP:
+ break;
+ }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK),
+ [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV),
+ [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset)
+};
+
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MAKE:
@@ -32,7 +77,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
set_mods(mods);
}
- return false;
+ break;
+ case KC_RDP: //Opens Windows RDP
+ if (!record->event.pressed) {
+ register_code(KC_LGUI);
+ tap_code(KC_R);
+ unregister_code(KC_LGUI);
+ wait_ms(200);
+ send_string_with_delay_P(PSTR("mstsc"), 10);
+ send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
+ }
break;
}
return process_record_keymap(keycode, record);
diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h
index 1d9602a05..da52df09b 100644
--- a/users/stanrc85/stanrc85.h
+++ b/users/stanrc85/stanrc85.h
@@ -8,11 +8,6 @@
#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control
#define LAYER3 3 //RGB Underglow controls and RESET
-enum custom_keycodes {
- KC_MAKE = SAFE_RANGE,
- NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes
-};
-
//Aliases for longer keycodes
#define KC_CAD LALT(LCTL(KC_DEL))
#define KC_LOCK LGUI(KC_L)
@@ -22,3 +17,29 @@ enum custom_keycodes {
#define LT_SPCF LT(2, KC_SPC)
#define TD_TESC TD(TD_ESC)
#define TD_TWIN TD(TD_WIN)
+#define TD_TCTL TD(TD_RCTL)
+
+enum cust_keys {
+ KC_MAKE = SAFE_RANGE,
+ KC_RDP
+};
+
+enum tap_dance {
+ TD_WIN,
+ TD_ESC,
+ TD_RCTL
+};
+
+// define a type containing as many tapdance states as you need
+typedef enum {
+ SINGLE_TAP,
+ SINGLE_HOLD,
+ DOUBLE_TAP
+} td_state_t;
+
+// function to determine the current tapdance state
+int cur_dance (qk_tap_dance_state_t *state);
+
+// `finished` and `reset` functions for each tapdance keycode
+void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data);
+void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data);
diff --git a/util/bootloader_atmega32a_1_0_0.hex b/util/bootloader_atmega32a_1_0_0.hex
new file mode 100644
index 000000000..b35a310d5
--- /dev/null
+++ b/util/bootloader_atmega32a_1_0_0.hex
@@ -0,0 +1,154 @@
+:107000000C9468380C94A0380C9485380C9485380E
+:107010000C9485380C9485380C9485380C948538FC
+:107020000C9485380C9485380C9485380C948538EC
+:107030000C9485380C9485380C9485380C948538DC
+:107040000C9485380C9485380C9485380C948538CC
+:107050000C9485380403090412036F006200640075
+:10706000650076002E00610074001003480049009E
+:10707000440042006F006F00740012011001000014
+:107080000008C016DF05000101020001090222000C
+:107090000101008032090400000103000000092101
+:1070A00001010001222100070581030800C8060034
+:1070B000FF0901A101150026FF007508850195064D
+:1070C0000900B20201850295830900B20201C000E5
+:1070D00011241FBECFE5D8E0DEBFCDBF10E0A0E693
+:1070E000B0E0ECE6F9E702C005900D92AA36B107D0
+:1070F000D9F710E0AAE6B0E001C01D92A43AB107AA
+:10710000E1F70E94173C0C94B43C0C940038A82F73
+:10711000B92F80E090E041E050EA609530E009C08E
+:107120002D9182279795879510F084279527305EBB
+:10713000C8F36F5FA8F30895EADF8D939D930895D8
+:10714000CF93CFB7CF93C395839BE9F7839B09C0B8
+:10715000839B07C0839B05C0839B03C0839B01C0A7
+:10716000A3C0DF93C0918700DD27C257DF4F839B09
+:1071700002C0DF91EBCF2F930F931F9300B32FEF3C
+:1071800003FB20F94F933F9310B34FEF012703FB0D
+:1071900021F93BE031C04E7F012F10B3216028C0A0
+:1071A000102F4D7F2260000000B329C04B7F246068
+:1071B000012F000010B32BC010B3477F28602AC0F6
+:1071C0004F7E00B320612CC04F7D10B320622FC0D2
+:1071D0004F7B00B3206432C0422700B349934FEF86
+:1071E0000000102713FB20F910B31C70C9F1297F90
+:1071F00091F2012703FB21F900B3237F89F231507B
+:1072000058F1102713FB22F910B3277E79F20127DA
+:1072100003FB23F92F7C81F200B3102713FB24F921
+:107220002F7971F200C010B3012703FB25F92F73EA
+:1072300059F200C000B3102713FB26F9223040F2A8
+:1072400000C010B3012703FB27F9243028F64F773D
+:10725000206810B30000F9CF10E41ABF002719C04E
+:107260003B503195C31BD04010E41ABF0881033C4A
+:10727000F9F00B34E9F0209185001981110F1213F8
+:10728000EDCF4A81441F093641F10D3211F0013E24
+:1072900029F700938C003F914F911F910F912F91EF
+:1072A000DF91CAB7C6FD4FCFCF91CFBFCF91189511
+:1072B00020918C00222379F310918A00112321F56B
+:1072C000343022F130938A00209386001091870099
+:1072D0003BE0311B3093870019C000918A000130D8
+:1072E0009CF40AE54F7081F43091600034FD10C0C9
+:1072F00000936000C9E7D0E00FC02795A8F4515073
+:10730000A9F4220F0000F9CF4AE503C042ED01C005
+:10731000432FC4E1D0E032E011B31C60939A11BB5B
+:1073200002B320E41CE05F93012756E002BB2795DF
+:1073300020F4515021F4220FF9CF012756E000002C
+:107340003B5A02BBD0F2279528F4515029F4220F62
+:107350000000F9CF012756E0279502BB20F45150D9
+:1073600021F4220FF9CF012756E02991332302BBE4
+:1073700021F6037F10918B00110FC651D04002BB44
+:1073800011F01093850010E41ABF086011B3137F49
+:10739000402F437F5F9100C000C002BB11BB42BBC6
+:1073A0007ACF80916D00882309F445C088EB9BE07B
+:1073B0000197F1F780916A008F5F80936A00909146
+:1073C00061008917B1F510926A0080916B008230DC
+:1073D000C1F0833028F4882341F0813041F50CC09E
+:1073E0008330B9F0843019F519C082B38C7A82BB2E
+:1073F00081E080936B0017C082B3836582BB82E01B
+:1074000004C082B38C7A82BB83E080936B008FE7E9
+:107410000BC082B3836582BB84E0F7CF82B38C7AE2
+:1074200082BB10926B008FEF8093610002C01092BC
+:107430006B0081E0089529B3237040916E000DC068
+:1074400089B330E090E0837090702817390711F00D
+:1074500040E001C04F5F29B32370463088F320938A
+:10746000720040936E00233018F481E080936D0029
+:1074700080916D00089585B7826085BF8BB7806469
+:107480008BBF0895F89481E180935700E8951BBE67
+:1074900015BE81E08BBF1BBE8B9AE0917700F09107
+:1074A0007800099521E020936C00FC0181818930EE
+:1074B00069F48281823029F420937500209384003E
+:1074C00003C082E0809384008FEF0895813011F033
+:1074D00080E0089582E690E0909389008093880090
+:1074E00087E00895CF93DF93DC01C0917000D091C5
+:1074F0007100413051F410926F001196CC911197A8
+:107500001296DC9112971496645030916F00360FEA
+:1075100030936F00AE014F7751F4F89483E0FE0191
+:1075200080935700E895789407B600FCFDCFF89457
+:10753000AE018D919C91119721E0FE010C012093E9
+:107540005700E895112478942296FE01EF7751F4C4
+:10755000F89485E0FA0180935700E895789407B68F
+:1075600000FCFDCF625011F01296D4CFD093710081
+:10757000C0937000832F8078DF91CF910895CF93CF
+:10758000DF93FC0180918400813071F4809175005B
+:10759000813029F410927500CF0141E002C0CF0183
+:1075A00040E00E94723A2FC0823061F581818130C3
+:1075B00011F40E94423A8F3F21F484E090E06FEF93
+:1075C00019C08E3F91F482B3836582BBC0E0D0E0E6
+:1075D000CE016FEF0E94A73C219684E0C030D8070F
+:1075E000B9F782B38C7A82BB0BC08D3F31F48281B4
+:1075F000938164810E94A73C03C081E08093760060
+:107600001092840081E0DF91CF9108951F93CF9372
+:10761000DF9360918A00635067FDBAC08091870054
+:10762000CCE0D0E0C81BD109C257DF4F8091860063
+:107630008D3209F09AC0683009F0A8C083EC8093BD
+:1076400079008AE5809360001092740088818076CA
+:1076500041F0CE010E94523A282F8F3F09F474C0A6
+:107660007AC09A81109282008981882321F4109235
+:10767000830022E062C0853019F490938B005CC0D7
+:10768000863009F04AC08B81813019F48AE790E78F
+:107690001BC0823041F48CE890E79093890080937E
+:1076A000880022E236C08330F9F48A81882341F4CD
+:1076B00084E590E7909389008093880024E029C0B6
+:1076C000813041F488E590E79093890080938800A9
+:1076D00022E11FC08230E1F48AE690E790938900AE
+:1076E0008093880020E115C0813241F48EE990E753
+:1076F000909389008093880029E00BC0823241F486
+:107700008EEA90E7909389008093880021E201C07F
+:1077100020E080E4809374001EC0883021F421E0D2
+:107720008DE890E00CC0893019F490938D0004C06E
+:107730008A3011F421E001C020E082E890E09093CB
+:1077400089008093880007C0888187FD2E8180E8AA
+:107750008093740006C08F81882319F48E8182176C
+:1077600008F0822F8093690011C08091740087FF18
+:107770000DC0CE010E94BF3A8F3F21F48EE180936D
+:10778000600004C0882311F01092690010928A00F2
+:107790008091600084FF3DC0809169008F3FC9F1F6
+:1077A000182F893008F018E0811B809369008091C0
+:1077B000790098E88927809379001123E1F0E0911E
+:1077C0008800F09189008091740086FF09C0912F94
+:1077D000AAE7B0E084918D9331969150D9F707C014
+:1077E000912FAAE7B0E081918D939150E1F7F0934A
+:1077F0008900E09388008AE790E0612F0E949C381E
+:10780000612F6C5F6C3019F08FEF8093690060938B
+:10781000600094E180B38C7031F49150D9F71092EC
+:107820008B0010928500DF91CF911F91089581B355
+:10783000836581BB82B38C7A82BB8D98959A8AB31B
+:107840008C7F8ABB8BB383608BBBB89AC09881E076
+:1078500090E00E948E3C80937300882349F481E07D
+:1078600080936D0081E090E06FEF0E94A73C08C01C
+:10787000E0E0F0E0E491EF3F19F481E080936D00E7
+:107880000E94D139882309F447C081E08BBF82E090
+:107890008BBF0E943B3A88E991E00E948E3C88238E
+:1078A00049F48B9A20E0A89588EB9BE00197F1F7CB
+:1078B0002150C9F78B9878940FEF10E0C0E0D0E02A
+:1078C00080916C008823B9F483E0C93ED80714F492
+:1078D000219611C0F89481E090E060E00E94963C0F
+:1078E0008B9A28E088E190E00FB6F894A89581BDC6
+:1078F0000FBE21BDFFCFA8950E94063B8091760068
+:10790000882331F0002319F4115011F405C00150FF
+:107910000E94D1398823A1F60E94423AE199FECF14
+:107920009FBB8EBBE09A99278DB30895262FE199CE
+:10793000FECF9FBB8EBBE09A01970DB2021631F0CD
+:107940002DBB0FB6F894E29AE19A0FBE0895262F48
+:10795000E199FECF9FBB8EBB2DBB0FB6F894E29A88
+:0C796000E19A0FBE01960895F894FFCF45
+:0A796C005A7F01800000800000FF38
+:040000030000700089
+:00000001FF
diff --git a/util/docker_build.sh b/util/docker_build.sh
index e7aeac8f3..35839ac41 100755
--- a/util/docker_build.sh
+++ b/util/docker_build.sh
@@ -47,4 +47,4 @@ dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows
# Run container and build firmware
docker run --rm -it $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \
- make "$keyboard${keymap:+:$keymap}${target:+:$target}"
+ /bin/bash -c "make git-submodule; make \"$keyboard${keymap:+:$keymap}${target:+:$target}\""