summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorJames Young <xxiinophobia@yahoo.com>2020-02-29 12:00:00 -0800
committerJames Young <xxiinophobia@yahoo.com>2020-02-29 11:59:30 -0800
commit26eef35f07698d23aafae90e1c230b52e100a334 (patch)
treeeb8e43fc58ca55788e6e89430af0db55ea79e324 /keyboards
parent85041ff05bf0e5f4ff4535caf6e638491a5614c8 (diff)
2020 February 29 Breaking Changes Update (#8064)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/acheron/austin/chconf.h202
-rw-r--r--keyboards/acheron/austin/halconf.h265
-rwxr-xr-xkeyboards/amj40/keymaps/fabian/keymap.c10
-rw-r--r--keyboards/amj40/keymaps/myee/keymap.c27
-rw-r--r--keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/at_at/660m/chconf.h202
-rw-r--r--keyboards/at_at/660m/halconf.h265
-rw-r--r--keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c6
-rw-r--r--keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c177
-rw-r--r--keyboards/candybar/chconf.h202
-rw-r--r--keyboards/candybar/halconf.h266
-rw-r--r--keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/an_c/chconf.h202
-rw-r--r--keyboards/cannonkeys/an_c/halconf.h265
-rw-r--r--keyboards/cannonkeys/bluepill/ws2812.c1
-rw-r--r--keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/chimera65/chconf.h202
-rw-r--r--keyboards/cannonkeys/chimera65/halconf.h265
-rw-r--r--keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/instant60/chconf.h202
-rw-r--r--keyboards/cannonkeys/instant60/halconf.h265
-rw-r--r--keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/iron165/chconf.h202
-rw-r--r--keyboards/cannonkeys/iron165/halconf.h265
-rw-r--r--keyboards/cannonkeys/ortho48/chconf.h202
-rw-r--r--keyboards/cannonkeys/ortho48/halconf.h266
-rw-r--r--keyboards/cannonkeys/ortho60/chconf.h202
-rw-r--r--keyboards/cannonkeys/ortho60/halconf.h266
-rw-r--r--keyboards/cannonkeys/ortho75/chconf.h202
-rw-r--r--keyboards/cannonkeys/ortho75/halconf.h266
-rw-r--r--keyboards/cannonkeys/practice60/chconf.h202
-rw-r--r--keyboards/cannonkeys/practice60/halconf.h266
-rw-r--r--keyboards/cannonkeys/practice65/chconf.h202
-rw-r--r--keyboards/cannonkeys/practice65/halconf.h266
-rw-r--r--keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c177
-rw-r--r--keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/satisfaction75/chconf.h202
-rw-r--r--keyboards/cannonkeys/satisfaction75/halconf.h265
-rw-r--r--keyboards/cannonkeys/satisfaction75/i2c_master.c8
-rw-r--r--keyboards/cannonkeys/satisfaction75/mcuconf.h187
-rw-r--r--keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/savage65/chconf.h202
-rw-r--r--keyboards/cannonkeys/savage65/halconf.h265
-rw-r--r--keyboards/cannonkeys/stm32f072/ws2812.c1
-rw-r--r--keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/cannonkeys/tmov2/chconf.h202
-rw-r--r--keyboards/cannonkeys/tmov2/halconf.h265
-rw-r--r--keyboards/cheshire/curiosity/chconf.h206
-rw-r--r--keyboards/cheshire/curiosity/halconf.h266
-rw-r--r--keyboards/clueboard/60/chconf.h202
-rw-r--r--keyboards/clueboard/60/halconf.h241
-rw-r--r--keyboards/clueboard/60/mcuconf.h62
-rw-r--r--keyboards/clueboard/66/rev4/chconf.h202
-rw-r--r--keyboards/clueboard/66/rev4/halconf.h241
-rw-r--r--keyboards/clueboard/66/rev4/mcuconf.h62
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/chconf.h202
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/halconf.h241
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/mcuconf.h62
-rw-r--r--keyboards/converter/siemens_tastatur/chconf.h202
-rw-r--r--keyboards/converter/siemens_tastatur/halconf.h266
-rw-r--r--keyboards/converter/siemens_tastatur/matrix.c89
-rw-r--r--keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c4
-rw-r--r--keyboards/ergodox_infinity/board_is31fl3731c.h2
-rw-r--r--keyboards/ergodox_infinity/chconf.h236
-rw-r--r--keyboards/ergodox_infinity/halconf.h266
-rw-r--r--keyboards/ergodox_stm32/chconf.h202
-rw-r--r--keyboards/ergodox_stm32/halconf.h266
-rw-r--r--keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c18
-rw-r--r--keyboards/gon/nerd60/config.h35
-rw-r--r--keyboards/gon/nerd60/info.json78
-rw-r--r--keyboards/gon/nerd60/keymaps/default/keymap.c20
-rw-r--r--keyboards/gon/nerd60/keymaps/default/readme.md3
-rw-r--r--keyboards/gon/nerd60/keymaps/mauin/keymap.c (renamed from keyboards/gonnerd/keymaps/mauin/keymap.c)0
-rw-r--r--keyboards/gon/nerd60/keymaps/mauin/readme.md (renamed from keyboards/gonnerd/keymaps/mauin/readme.md)0
-rw-r--r--keyboards/gon/nerd60/keymaps/mauin/rules.mk (renamed from keyboards/gonnerd/keymaps/default/rules.mk)18
-rw-r--r--keyboards/gon/nerd60/nerd60.c1
-rw-r--r--keyboards/gon/nerd60/nerd60.h22
-rw-r--r--keyboards/gon/nerd60/readme.md27
-rw-r--r--keyboards/gon/nerd60/rules.mk (renamed from keyboards/gonnerd/rules.mk)13
-rw-r--r--keyboards/gon/nerdtkl/config.h (renamed from keyboards/gonnerd/config.h)11
-rw-r--r--keyboards/gon/nerdtkl/info.json104
-rw-r--r--keyboards/gon/nerdtkl/keymaps/default/keymap.c24
-rw-r--r--keyboards/gon/nerdtkl/keymaps/default/readme.md3
-rw-r--r--keyboards/gon/nerdtkl/keymaps/gam3cat/config.h (renamed from keyboards/gonnerd/keymaps/gam3cat/config.h)0
-rw-r--r--keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c (renamed from keyboards/gonnerd/keymaps/gam3cat/keymap.c)0
-rw-r--r--keyboards/gon/nerdtkl/keymaps/gam3cat/readme.md (renamed from keyboards/gonnerd/keymaps/gam3cat/readme.md)0
-rw-r--r--keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk26
-rw-r--r--keyboards/gon/nerdtkl/nerdtkl.c1
-rw-r--r--keyboards/gon/nerdtkl/nerdtkl.h24
-rw-r--r--keyboards/gon/nerdtkl/readme.md (renamed from keyboards/gonnerd/readme.md)13
-rw-r--r--keyboards/gon/nerdtkl/rules.mk36
-rw-r--r--keyboards/gon/readme.md9
-rw-r--r--keyboards/gonnerd/gonnerd.c1
-rw-r--r--keyboards/gonnerd/gonnerd.h42
-rw-r--r--keyboards/gonnerd/info.json18
-rw-r--r--keyboards/gonnerd/keymaps/default/keymap.c22
-rw-r--r--keyboards/gonnerd/keymaps/gam3cat/rules.mk24
-rw-r--r--keyboards/gonnerd/keymaps/mauin/rules.mk18
-rw-r--r--keyboards/gonnerd/keymaps/tkl/keymap.c27
-rw-r--r--keyboards/gonnerd/keymaps/tkl/rules.mk18
-rw-r--r--keyboards/hadron/ver3/chconf.h202
-rw-r--r--keyboards/hadron/ver3/halconf.h241
-rw-r--r--keyboards/hadron/ver3/mcuconf.h62
-rw-r--r--keyboards/handwired/bluepill/bluepill70/chconf.h202
-rw-r--r--keyboards/handwired/bluepill/bluepill70/halconf.h267
-rw-r--r--keyboards/handwired/ck4x4/chconf.h202
-rw-r--r--keyboards/handwired/ck4x4/halconf.h266
-rw-r--r--keyboards/handwired/co60/rev6/chconf.h202
-rw-r--r--keyboards/handwired/co60/rev6/halconf.h241
-rw-r--r--keyboards/handwired/co60/rev6/mcuconf.h62
-rw-r--r--keyboards/handwired/co60/rev7/chconf.h202
-rw-r--r--keyboards/handwired/co60/rev7/halconf.h241
-rw-r--r--keyboards/handwired/co60/rev7/mcuconf.h62
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c12
-rw-r--r--keyboards/handwired/onekey/bluepill/chconf.h202
-rw-r--r--keyboards/handwired/onekey/bluepill/halconf.h266
-rw-r--r--keyboards/handwired/onekey/stm32f0_disco/chconf.h202
-rw-r--r--keyboards/handwired/onekey/stm32f0_disco/halconf.h266
-rw-r--r--keyboards/handwired/onekey/teensy_32/chconf.h202
-rw-r--r--keyboards/handwired/onekey/teensy_32/halconf.h267
-rw-r--r--keyboards/handwired/onekey/teensy_lc/chconf.h202
-rw-r--r--keyboards/handwired/onekey/teensy_lc/halconf.h267
-rw-r--r--keyboards/handwired/steamvan/rev1/chconf.h202
-rw-r--r--keyboards/handwired/steamvan/rev1/halconf.h241
-rw-r--r--keyboards/handwired/steamvan/rev1/mcuconf.h62
-rw-r--r--keyboards/hhkb/keymaps/shela/keymap.c9
-rw-r--r--keyboards/hs60/v2/chconf.h202
-rw-r--r--keyboards/hs60/v2/halconf.h241
-rw-r--r--keyboards/hs60/v2/mcuconf.h62
-rw-r--r--keyboards/infinity60/chconf.h202
-rw-r--r--keyboards/infinity60/halconf.h266
-rw-r--r--keyboards/infinity60/led_controller.c10
-rw-r--r--keyboards/jd45/keymaps/mjt6u/keymap.c12
-rw-r--r--keyboards/jm60/chconf.h202
-rw-r--r--keyboards/jm60/halconf.h266
-rw-r--r--keyboards/k_type/chconf.h202
-rw-r--r--keyboards/k_type/halconf.h266
-rw-r--r--keyboards/katana60/keymaps/rominronin/keymap.c22
-rw-r--r--keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c9
-rw-r--r--keyboards/kinesis/keymaps/milestogo/keymap.c14
-rw-r--r--keyboards/lets_split/keymaps/adam/keymap.c9
-rw-r--r--keyboards/matrix/noah/boards/noah_bd/board.c157
-rw-r--r--keyboards/matrix/noah/chconf.h209
-rw-r--r--keyboards/matrix/noah/config.h7
-rw-r--r--keyboards/matrix/noah/halconf.h241
-rw-r--r--keyboards/matrix/noah/noah.c3
-rw-r--r--keyboards/matrix/noah/rules.mk2
-rw-r--r--keyboards/matrix/noah/ws2812_f4.c272
-rw-r--r--keyboards/matrix/noah/ws2812_f4.h102
-rw-r--r--[-rwxr-xr-x]keyboards/nk65/chconf.h202
-rw-r--r--[-rwxr-xr-x]keyboards/nk65/halconf.h241
-rw-r--r--[-rwxr-xr-x]keyboards/nk65/mcuconf.h62
-rw-r--r--keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c187
-rw-r--r--keyboards/peiorisboards/ixora/chconf.h205
-rw-r--r--keyboards/peiorisboards/ixora/halconf.h271
-rw-r--r--keyboards/planck/keymaps/ab/keymap.c62
-rw-r--r--keyboards/planck/keymaps/alexey/keymap.c41
-rw-r--r--keyboards/planck/keymaps/altgr/beakl.h482
-rw-r--r--keyboards/planck/keymaps/altgr/colemak.h96
-rw-r--r--keyboards/planck/keymaps/altgr/common/chord_layout.h24
-rw-r--r--keyboards/planck/keymaps/altgr/common/number_fkey_layout.h52
-rw-r--r--keyboards/planck/keymaps/altgr/common/steno_layout.h24
-rw-r--r--keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h48
-rw-r--r--keyboards/planck/keymaps/altgr/common/toggle_layout.h62
-rw-r--r--keyboards/planck/keymaps/altgr/keymap.c27
-rw-r--r--keyboards/planck/keymaps/altgr/qwerty.h48
-rw-r--r--keyboards/planck/keymaps/andylikescandy/keymap.c112
-rw-r--r--keyboards/planck/keymaps/angerthosenear/keymap.c50
-rw-r--r--keyboards/planck/keymaps/austin/keymap.c50
-rw-r--r--keyboards/planck/keymaps/aviator/keymap.c64
-rw-r--r--keyboards/planck/keymaps/basic/keymap.c39
-rw-r--r--keyboards/planck/keymaps/bone2planck/keymap.c80
-rw-r--r--keyboards/planck/keymaps/brandon/keymap.c113
-rw-r--r--keyboards/planck/keymaps/cbbrowne/keymap.c70
-rw-r--r--keyboards/planck/keymaps/chance/keymap.c107
-rw-r--r--keyboards/planck/keymaps/charlie/keymap.c38
-rw-r--r--keyboards/planck/keymaps/circuit/keymap.c80
-rw-r--r--keyboards/planck/keymaps/coloneljesus/keymap.c88
-rw-r--r--keyboards/planck/keymaps/corvec/keymap.c16
-rw-r--r--keyboards/planck/keymaps/daniel/keymap.c50
-rw-r--r--keyboards/planck/keymaps/danielhklein/keymap.c52
-rw-r--r--keyboards/planck/keymaps/david/keymap.c50
-rw-r--r--keyboards/planck/keymaps/dbroqua/keymap.c75
-rw-r--r--keyboards/planck/keymaps/dc/keymap.c67
-rw-r--r--keyboards/planck/keymaps/dcompact/keymap.c88
-rw-r--r--keyboards/planck/keymaps/dlaroe/keymap.c92
-rw-r--r--keyboards/planck/keymaps/dodger/keymap.c76
-rw-r--r--keyboards/planck/keymaps/dr0ck/keymap.c100
-rw-r--r--keyboards/planck/keymaps/dudeofawesome/keymap.c101
-rw-r--r--keyboards/planck/keymaps/dzobert/keymap.c50
-rw-r--r--keyboards/planck/keymaps/emilyh/keymap.c92
-rw-r--r--keyboards/planck/keymaps/espynn/keymap.c62
-rw-r--r--keyboards/planck/keymaps/experimental/keymap.c105
-rw-r--r--keyboards/planck/keymaps/gabriel/keymap.c51
-rw-r--r--keyboards/planck/keymaps/grahampheath/keymap.c101
-rw-r--r--keyboards/planck/keymaps/gunp/keymap.c160
-rw-r--r--keyboards/planck/keymaps/handwired_binaryplease/keymap.c92
-rw-r--r--keyboards/planck/keymaps/hiea/common/chord_layout.h24
-rw-r--r--keyboards/planck/keymaps/hiea/common/number_fkey_layout.h26
-rw-r--r--keyboards/planck/keymaps/hiea/common/steno_layout.h24
-rw-r--r--keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h24
-rw-r--r--keyboards/planck/keymaps/hiea/common/toggle_layout.h62
-rw-r--r--keyboards/planck/keymaps/hiea/config.h2
-rw-r--r--keyboards/planck/keymaps/hiea/hiea.h50
-rw-r--r--keyboards/planck/keymaps/hiea/keymap.c27
-rw-r--r--keyboards/planck/keymaps/hieax/common/chord_layout.h24
-rw-r--r--keyboards/planck/keymaps/hieax/common/number_fkey_layout.h26
-rw-r--r--keyboards/planck/keymaps/hieax/common/steno_layout.h24
-rw-r--r--keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h24
-rw-r--r--keyboards/planck/keymaps/hieax/common/toggle_layout.h62
-rw-r--r--keyboards/planck/keymaps/hieax/config.h2
-rw-r--r--keyboards/planck/keymaps/hieax/hiea.h72
-rw-r--r--keyboards/planck/keymaps/hieax/keymap.c27
-rw-r--r--keyboards/planck/keymaps/impossible/keymap.c80
-rw-r--r--keyboards/planck/keymaps/jacob/keymap.c43
-rw-r--r--keyboards/planck/keymaps/jeebak/keymap.c116
-rw-r--r--keyboards/planck/keymaps/jeremy-dev/keymap.c65
-rw-r--r--keyboards/planck/keymaps/jhenahan/config.h1
-rw-r--r--keyboards/planck/keymaps/jhenahan/keymap.c92
-rw-r--r--keyboards/planck/keymaps/jirgn/keymap.c76
-rw-r--r--keyboards/planck/keymaps/joe/keymap.c91
-rw-r--r--keyboards/planck/keymaps/johannes/keymap.c51
-rw-r--r--keyboards/planck/keymaps/kelorean/keymap.c88
-rw-r--r--keyboards/planck/keymaps/khord/keymap.c52
-rw-r--r--keyboards/planck/keymaps/kloki/keymap.c64
-rw-r--r--keyboards/planck/keymaps/kmontag42/keymap.c64
-rw-r--r--keyboards/planck/keymaps/kyle/keymap.c50
-rw-r--r--keyboards/planck/keymaps/lae3/keymap.c92
-rw-r--r--keyboards/planck/keymaps/leo/keymap.c50
-rw-r--r--keyboards/planck/keymaps/lucas/keymap.c92
-rw-r--r--keyboards/planck/keymaps/lukas/keymap.c42
-rw-r--r--keyboards/planck/keymaps/luke/keymap.c111
-rw-r--r--keyboards/planck/keymaps/mason/keymap.c51
-rw-r--r--keyboards/planck/keymaps/matrixman/keymap.c78
-rw-r--r--keyboards/planck/keymaps/max/keymap.c50
-rw-r--r--keyboards/planck/keymaps/mitch/keymap.c39
-rw-r--r--keyboards/planck/keymaps/mjt/keymap.c80
-rw-r--r--keyboards/planck/keymaps/mjtnumsym/keymap.c80
-rw-r--r--keyboards/planck/keymaps/mollat/keymap.c75
-rw-r--r--keyboards/planck/keymaps/myoung34/config.h1
-rw-r--r--keyboards/planck/keymaps/myoung34/keymap.c54
-rw-r--r--keyboards/planck/keymaps/neo2planck/keymap.c54
-rw-r--r--keyboards/planck/keymaps/nico/keymap.c72
-rw-r--r--keyboards/planck/keymaps/not-quite-neo/keymap.c63
-rw-r--r--keyboards/planck/keymaps/originerd/keymap.c56
-rwxr-xr-xkeyboards/planck/keymaps/paget/keymap.c40
-rw-r--r--keyboards/planck/keymaps/palleiko/keymap.c112
-rw-r--r--keyboards/planck/keymaps/pete/keymap.c126
-rw-r--r--keyboards/planck/keymaps/phreed/keymap.c76
-rw-r--r--keyboards/planck/keymaps/piemod/keymap.c135
-rw-r--r--keyboards/planck/keymaps/pok3r/keymap.c100
-rw-r--r--keyboards/planck/keymaps/premek/keymap.c94
-rw-r--r--keyboards/planck/keymaps/pvc/keymap.c78
-rw-r--r--keyboards/planck/keymaps/rai-suta/keymap.c39
-rw-r--r--keyboards/planck/keymaps/rodhaene/keymap.c64
-rw-r--r--keyboards/planck/keymaps/sdothum/beakl.h434
-rw-r--r--keyboards/planck/keymaps/sdothum/colemak.h98
-rw-r--r--keyboards/planck/keymaps/sdothum/common/chord_layout.h24
-rw-r--r--keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h52
-rw-r--r--keyboards/planck/keymaps/sdothum/common/steno_layout.h24
-rw-r--r--keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h48
-rw-r--r--keyboards/planck/keymaps/sdothum/common/toggle_layout.h62
-rw-r--r--keyboards/planck/keymaps/sdothum/config.h2
-rw-r--r--keyboards/planck/keymaps/sdothum/keymap.c27
-rw-r--r--keyboards/planck/keymaps/sdothum/qwerty.h48
-rw-r--r--keyboards/planck/keymaps/sean/keymap.c113
-rw-r--r--keyboards/planck/keymaps/sgoodwin/keymap.c68
-rw-r--r--keyboards/planck/keymaps/smt/keymap.c80
-rw-r--r--keyboards/planck/keymaps/steno/keymap.c88
-rw-r--r--keyboards/planck/keymaps/tak3over/keymap.c66
-rw-r--r--keyboards/planck/keymaps/tehwalris/keymap.c76
-rw-r--r--keyboards/planck/keymaps/that_canadian/keymap.c68
-rw-r--r--keyboards/planck/keymaps/thermal_printer/keymap.c92
-rw-r--r--keyboards/planck/keymaps/tong92/keymap.c89
-rw-r--r--keyboards/planck/keymaps/unicode/keymap.c92
-rw-r--r--keyboards/planck/keymaps/yale/keymap.c54
-rw-r--r--keyboards/planck/keymaps/yang/keymap.c84
-rw-r--r--keyboards/planck/keymaps/zach/keymap.c75
-rwxr-xr-xkeyboards/planck/keymaps/zrichard/keymap.c78
-rw-r--r--keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c179
-rw-r--r--keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h26
-rw-r--r--keyboards/projectkb/alice/chconf.h202
-rw-r--r--keyboards/projectkb/alice/halconf.h264
-rw-r--r--keyboards/retro_75/chconf.h206
-rw-r--r--keyboards/retro_75/halconf.h266
-rw-r--r--keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c4
-rw-r--r--keyboards/sentraq/s60_x/keymaps/hasu/keymap.c9
-rw-r--r--keyboards/sentraq/s60_x/keymaps/jpec/keymap.c9
-rw-r--r--keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c5
-rw-r--r--keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c7
-rw-r--r--keyboards/sentraq/s65_x/keymaps/nall/keymap.c3
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c9
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c9
-rw-r--r--keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c187
-rw-r--r--keyboards/vinta/chconf.h205
-rw-r--r--keyboards/vinta/halconf.h271
-rw-r--r--keyboards/wete/chconf.h202
-rw-r--r--keyboards/wete/halconf.h265
-rw-r--r--keyboards/whitefox/board_is31fl3731c.h2
-rw-r--r--keyboards/whitefox/chconf.h202
-rw-r--r--keyboards/whitefox/halconf.h266
-rw-r--r--keyboards/xiaomi/mk02/chconf.h206
-rw-r--r--keyboards/xiaomi/mk02/halconf.h265
310 files changed, 26063 insertions, 8162 deletions
diff --git a/keyboards/acheron/austin/chconf.h b/keyboards/acheron/austin/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/acheron/austin/chconf.h
+++ b/keyboards/acheron/austin/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/acheron/austin/halconf.h b/keyboards/acheron/austin/halconf.h
index 38743e0904..adb1a90715 100644
--- a/keyboards/acheron/austin/halconf.h
+++ b/keyboards/acheron/austin/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c
index 360424f300..a35337a4e2 100755
--- a/keyboards/amj40/keymaps/fabian/keymap.c
+++ b/keyboards/amj40/keymaps/fabian/keymap.c
@@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
- KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, F(0), RAISE, KC_RGUI, KC_RALT, KC_RCTL \
+ KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), RAISE, KC_RGUI, KC_RALT, KC_RCTL \
),
/* Colemak
@@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
- KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, F(0), RAISE, KC_RGUI, KC_RALT, KC_RCTL \
+ KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), RAISE, KC_RGUI, KC_RALT, KC_RCTL \
),
/* Dvorak
@@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \
- KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, F(0), RAISE, KC_RGUI, KC_RALT, KC_RCTL \
+ KC_LCTL, MEH_GRV, KC_LALT, KC_LGUI, LT(_LOWER, KC_SPC), RAISE, KC_RGUI, KC_RALT, KC_RCTL \
),
/* Lower
@@ -168,10 +168,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
-};
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c
index 7642ede34d..ec8cdd87db 100644
--- a/keyboards/amj40/keymaps/myee/keymap.c
+++ b/keyboards/amj40/keymaps/myee/keymap.c
@@ -13,7 +13,9 @@
#define _RAISE 2
#define _ADJUST 3
-
+#define LOW_SPC LT(_LOWER, KC_SPC)
+#define RSE_SPC LT(_RAISE, KC_SPC)
+#define ADJ_TAB LT(ADJUST, KC_TAB)
enum custom_keycodes {
QWERTY = SAFE_RANGE,
@@ -26,9 +28,9 @@ 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_BSPC,\
- F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \
+ ADJ_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_LCTL, KC_LGUI,KC_LALT, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \
+ KC_LCTL, KC_LGUI,KC_LALT, LOW_SPC, RSE_SPC, KC_RGUI,KC_RALT, KC_RCTL \
),
[_LOWER] = LAYOUT( \
@@ -54,25 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-enum function_id {
- LAUNCH,
- RGBLED_TOGGLE,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
- [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
- [2] = ACTION_LAYER_TAP_KEY(_ADJUST,KC_TAB),
-
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
-
- return MACRO_NONE;
-};
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/at_at/660m/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/at_at/660m/chconf.h b/keyboards/at_at/660m/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/at_at/660m/chconf.h
+++ b/keyboards/at_at/660m/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/at_at/660m/halconf.h b/keyboards/at_at/660m/halconf.h
index 38743e0904..adb1a90715 100644
--- a/keyboards/at_at/660m/halconf.h
+++ b/keyboards/at_at/660m/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c
index d9a81b195a..20ce6bd15f 100644
--- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c
+++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c
@@ -21,11 +21,7 @@ enum custom_macros {
R_POINT
};
- const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
- };
-
-#define SPC_LW FUNC(0)
+#define SPC_LW LT(_LOWER, KC_SPC)
#define MSE MO(_MOUSE)
#define PIPE M(R_PIPE)
#define POINT M(R_POINT)
diff --git a/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c
index 7e9f90853e..7c09bd997c 100644
--- a/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
-#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.
+ * @brief Type of STM32 GPIO initialization data.
*/
-const PALConfig pal_default_config = {
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
+
+/**
+ * @brief STM32 GPIO static initialization data.
+ */
+static const gpio_config_t gpio_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},
@@ -62,24 +124,117 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
+#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
@@ -108,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/candybar/chconf.h b/keyboards/candybar/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/candybar/chconf.h
+++ b/keyboards/candybar/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/candybar/halconf.h b/keyboards/candybar/halconf.h
index 8b9724b1a3..16f32117d5 100644
--- a/keyboards/candybar/halconf.h
+++ b/keyboards/candybar/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/an_c/chconf.h b/keyboards/cannonkeys/an_c/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/an_c/chconf.h
+++ b/keyboards/cannonkeys/an_c/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/an_c/halconf.h b/keyboards/cannonkeys/an_c/halconf.h
index 38743e0904..adb1a90715 100644
--- a/keyboards/cannonkeys/an_c/halconf.h
+++ b/keyboards/cannonkeys/an_c/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/bluepill/ws2812.c b/keyboards/cannonkeys/bluepill/ws2812.c
index 7d0f909c0c..d30806d564 100644
--- a/keyboards/cannonkeys/bluepill/ws2812.c
+++ b/keyboards/cannonkeys/bluepill/ws2812.c
@@ -45,6 +45,7 @@ static THD_FUNCTION(ledsThread, arg) {
}
static const SPIConfig spicfg = {
+ false,
NULL,
PORT_WS2812,
PIN_WS2812,
diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/chimera65/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/chimera65/chconf.h b/keyboards/cannonkeys/chimera65/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/chimera65/chconf.h
+++ b/keyboards/cannonkeys/chimera65/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/chimera65/halconf.h b/keyboards/cannonkeys/chimera65/halconf.h
index 64cf68298b..a406166756 100644
--- a/keyboards/cannonkeys/chimera65/halconf.h
+++ b/keyboards/cannonkeys/chimera65/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/instant60/chconf.h
+++ b/keyboards/cannonkeys/instant60/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/instant60/halconf.h b/keyboards/cannonkeys/instant60/halconf.h
index 38743e0904..adb1a90715 100644
--- a/keyboards/cannonkeys/instant60/halconf.h
+++ b/keyboards/cannonkeys/instant60/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/iron165/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/iron165/chconf.h b/keyboards/cannonkeys/iron165/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/iron165/chconf.h
+++ b/keyboards/cannonkeys/iron165/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/iron165/halconf.h b/keyboards/cannonkeys/iron165/halconf.h
index acd7678e7b..ff5ae7e8a5 100644
--- a/keyboards/cannonkeys/iron165/halconf.h
+++ b/keyboards/cannonkeys/iron165/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/ortho48/chconf.h b/keyboards/cannonkeys/ortho48/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/cannonkeys/ortho48/chconf.h
+++ b/keyboards/cannonkeys/ortho48/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/ortho48/halconf.h b/keyboards/cannonkeys/ortho48/halconf.h
index 72879a575b..921803762e 100644
--- a/keyboards/cannonkeys/ortho48/halconf.h
+++ b/keyboards/cannonkeys/ortho48/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/ortho60/chconf.h b/keyboards/cannonkeys/ortho60/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/cannonkeys/ortho60/chconf.h
+++ b/keyboards/cannonkeys/ortho60/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/ortho60/halconf.h b/keyboards/cannonkeys/ortho60/halconf.h
index 72879a575b..921803762e 100644
--- a/keyboards/cannonkeys/ortho60/halconf.h
+++ b/keyboards/cannonkeys/ortho60/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/ortho75/chconf.h b/keyboards/cannonkeys/ortho75/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/cannonkeys/ortho75/chconf.h
+++ b/keyboards/cannonkeys/ortho75/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/ortho75/halconf.h b/keyboards/cannonkeys/ortho75/halconf.h
index 72879a575b..921803762e 100644
--- a/keyboards/cannonkeys/ortho75/halconf.h
+++ b/keyboards/cannonkeys/ortho75/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/practice60/chconf.h b/keyboards/cannonkeys/practice60/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/cannonkeys/practice60/chconf.h
+++ b/keyboards/cannonkeys/practice60/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/practice60/halconf.h b/keyboards/cannonkeys/practice60/halconf.h
index 72879a575b..921803762e 100644
--- a/keyboards/cannonkeys/practice60/halconf.h
+++ b/keyboards/cannonkeys/practice60/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/practice65/chconf.h b/keyboards/cannonkeys/practice65/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/cannonkeys/practice65/chconf.h
+++ b/keyboards/cannonkeys/practice65/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/practice65/halconf.h b/keyboards/cannonkeys/practice65/halconf.h
index 72879a575b..921803762e 100644
--- a/keyboards/cannonkeys/practice65/halconf.h
+++ b/keyboards/cannonkeys/practice65/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c
index d9f7bc329e..7c09bd997c 100644
--- a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/satisfaction75/chconf.h
+++ b/keyboards/cannonkeys/satisfaction75/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/satisfaction75/halconf.h b/keyboards/cannonkeys/satisfaction75/halconf.h
index 9a9ab838e6..7347a42536 100644
--- a/keyboards/cannonkeys/satisfaction75/halconf.h
+++ b/keyboards/cannonkeys/satisfaction75/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC TRUE
+#define HAL_USE_RTC TRUE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c
index 0e3adbbf16..d87f7668d5 100644
--- a/keyboards/cannonkeys/satisfaction75/i2c_master.c
+++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c
@@ -81,7 +81,7 @@ i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length,
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
i2cAcquireBus(&I2C_DRIVER);
- msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, TIME_MS2I(timeout));
i2cReleaseBus(&I2C_DRIVER);
return chibios_to_qmk(status);
}
@@ -90,7 +90,7 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, TIME_MS2I(timeout));
return chibios_to_qmk(status);
}
@@ -106,7 +106,7 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data,
}
complete_packet[0] = regaddr;
- msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, TIME_MS2I(timeout));
return chibios_to_qmk(status);
}
@@ -114,7 +114,7 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16
{
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
- msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), &regaddr, 1, data, length, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), &regaddr, 1, data, length, TIME_MS2I(timeout));
return chibios_to_qmk(status);
}
diff --git a/keyboards/cannonkeys/satisfaction75/mcuconf.h b/keyboards/cannonkeys/satisfaction75/mcuconf.h
index 6d89857962..b39e335134 100644
--- a/keyboards/cannonkeys/satisfaction75/mcuconf.h
+++ b/keyboards/cannonkeys/satisfaction75/mcuconf.h
@@ -37,140 +37,141 @@
/*
* 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 TRUE
-#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_LSE
+#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 TRUE
+#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_LSE
/*
- * ADC driver system settings.
+ * IRQ 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
+#define STM32_IRQ_EXTI0_1_IRQ_PRIORITY 3
+#define STM32_IRQ_EXTI2_3_IRQ_PRIORITY 3
+#define STM32_IRQ_EXTI4_15_IRQ_PRIORITY 3
+#define STM32_IRQ_EXTI16_IRQ_PRIORITY 3
+#define STM32_IRQ_EXTI17_20_IRQ_PRIORITY 3
+#define STM32_IRQ_EXTI21_22_IRQ_PRIORITY 3
/*
- * EXT driver system settings.
+ * ADC 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
+#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
/*
* 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
+#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")
+#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
+#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
+#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
+#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")
+#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
+#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")
+#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
+#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/savage65/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/savage65/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/savage65/chconf.h b/keyboards/cannonkeys/savage65/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/savage65/chconf.h
+++ b/keyboards/cannonkeys/savage65/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/savage65/halconf.h b/keyboards/cannonkeys/savage65/halconf.h
index 9bcb477c03..921803762e 100644
--- a/keyboards/cannonkeys/savage65/halconf.h
+++ b/keyboards/cannonkeys/savage65/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cannonkeys/stm32f072/ws2812.c b/keyboards/cannonkeys/stm32f072/ws2812.c
index 665763931e..b2f2384f2c 100644
--- a/keyboards/cannonkeys/stm32f072/ws2812.c
+++ b/keyboards/cannonkeys/stm32f072/ws2812.c
@@ -61,6 +61,7 @@ static THD_FUNCTION(hsv_transThread, arg) {
#endif
static const SPIConfig spicfg = {
+ false,
NULL,
GPIOB,
15,
diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/cannonkeys/tmov2/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/cannonkeys/tmov2/chconf.h b/keyboards/cannonkeys/tmov2/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/cannonkeys/tmov2/chconf.h
+++ b/keyboards/cannonkeys/tmov2/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cannonkeys/tmov2/halconf.h b/keyboards/cannonkeys/tmov2/halconf.h
index 38743e0904..adb1a90715 100644
--- a/keyboards/cannonkeys/tmov2/halconf.h
+++ b/keyboards/cannonkeys/tmov2/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/cheshire/curiosity/chconf.h b/keyboards/cheshire/curiosity/chconf.h
index 99fa8ce398..8d66b51d23 100644
--- a/keyboards/cheshire/curiosity/chconf.h
+++ b/keyboards/cheshire/curiosity/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,11 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#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
+#endif
/** @} */
@@ -126,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -144,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -152,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -161,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -169,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -180,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -188,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -198,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -208,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -218,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -226,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -236,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -245,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -256,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -266,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -275,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -287,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -296,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -307,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -323,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -332,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -341,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -351,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -359,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -378,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -388,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -399,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -411,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -419,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/cheshire/curiosity/halconf.h b/keyboards/cheshire/curiosity/halconf.h
index 8b9724b1a3..16f32117d5 100644
--- a/keyboards/cheshire/curiosity/halconf.h
+++ b/keyboards/cheshire/curiosity/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/clueboard/60/chconf.h b/keyboards/clueboard/60/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/clueboard/60/chconf.h
+++ b/keyboards/clueboard/60/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/clueboard/60/halconf.h b/keyboards/clueboard/60/halconf.h
index e617fdffc7..6517357194 100644
--- a/keyboards/clueboard/60/halconf.h
+++ b/keyboards/clueboard/60/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
-#endif
-
-/**
- * @brief Enables the QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/clueboard/60/mcuconf.h b/keyboards/clueboard/60/mcuconf.h
index 94cb540ec9..5127682f52 100644
--- a/keyboards/clueboard/60/mcuconf.h
+++ b/keyboards/clueboard/60/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/clueboard/66/rev4/chconf.h b/keyboards/clueboard/66/rev4/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/clueboard/66/rev4/chconf.h
+++ b/keyboards/clueboard/66/rev4/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/clueboard/66/rev4/halconf.h b/keyboards/clueboard/66/rev4/halconf.h
index e617fdffc7..6517357194 100644
--- a/keyboards/clueboard/66/rev4/halconf.h
+++ b/keyboards/clueboard/66/rev4/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
-#endif
-
-/**
- * @brief Enables the QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/clueboard/66/rev4/mcuconf.h b/keyboards/clueboard/66/rev4/mcuconf.h
index 94cb540ec9..5127682f52 100644
--- a/keyboards/clueboard/66/rev4/mcuconf.h
+++ b/keyboards/clueboard/66/rev4/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/clueboard/66_hotswap/gen1/chconf.h b/keyboards/clueboard/66_hotswap/gen1/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/clueboard/66_hotswap/gen1/chconf.h
+++ b/keyboards/clueboard/66_hotswap/gen1/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/clueboard/66_hotswap/gen1/halconf.h b/keyboards/clueboard/66_hotswap/gen1/halconf.h
index eda293c49b..0cb7998f5e 100644
--- a/keyboards/clueboard/66_hotswap/gen1/halconf.h
+++ b/keyboards/clueboard/66_hotswap/gen1/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
-#endif
-
-/**
- * @brief Enables the QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/clueboard/66_hotswap/gen1/mcuconf.h b/keyboards/clueboard/66_hotswap/gen1/mcuconf.h
index 226da48d59..2098fd2320 100644
--- a/keyboards/clueboard/66_hotswap/gen1/mcuconf.h
+++ b/keyboards/clueboard/66_hotswap/gen1/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/converter/siemens_tastatur/chconf.h b/keyboards/converter/siemens_tastatur/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/converter/siemens_tastatur/chconf.h
+++ b/keyboards/converter/siemens_tastatur/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/converter/siemens_tastatur/halconf.h b/keyboards/converter/siemens_tastatur/halconf.h
index 4ffc50fb11..f486da5bf2 100644
--- a/keyboards/converter/siemens_tastatur/halconf.h
+++ b/keyboards/converter/siemens_tastatur/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT TRUE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS TRUE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/converter/siemens_tastatur/matrix.c b/keyboards/converter/siemens_tastatur/matrix.c
index b7654e6e12..9fcfe9fdf4 100644
--- a/keyboards/converter/siemens_tastatur/matrix.c
+++ b/keyboards/converter/siemens_tastatur/matrix.c
@@ -33,58 +33,53 @@ volatile uint16_t portb_buffer = 0;
static uint32_t switch_buffer = 0;
+static void pal_cb(void* unused);
+
+static void enable_input_events(void)
+{
+ palDisablePadEventI(GPIOA, 0);
+ palDisablePadEventI(GPIOA, 1);
+ palDisablePadEventI(GPIOA, 2);
+ palDisablePadEventI(GPIOA, 9);
+ palDisablePadEventI(GPIOA, 10);
+ palDisablePadEventI(GPIOB, 12);
+ palDisablePadEventI(GPIOB, 13);
+ palDisablePadEventI(GPIOB, 14);
+ palDisablePadEventI(GPIOB, 15);
+
+ palEnablePadEventI(GPIOA, 0, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOA, 1, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOA, 2, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOA, 9, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOA, 10, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOB, 12, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOB, 13, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOB, 14, PAL_EVENT_MODE_FALLING_EDGE);
+ palEnablePadEventI(GPIOB, 15, PAL_EVENT_MODE_FALLING_EDGE);
+
+ palSetPadCallbackI(GPIOA, 0, &pal_cb, 0);
+ palSetPadCallbackI(GPIOA, 1, &pal_cb, 0);
+ palSetPadCallbackI(GPIOA, 2, &pal_cb, 0);
+ palSetPadCallbackI(GPIOA, 9, &pal_cb, 0);
+ palSetPadCallbackI(GPIOA, 10, &pal_cb, 0);
+ palSetPadCallbackI(GPIOB, 12, &pal_cb, 0);
+ palSetPadCallbackI(GPIOB, 13, &pal_cb, 0);
+ palSetPadCallbackI(GPIOB, 14, &pal_cb, 0);
+ palSetPadCallbackI(GPIOB, 15, &pal_cb, 0);
+}
+
// Trigger on negative edge of any of the sense lines.
-static void extcb1(EXTDriver *extp, expchannel_t channel) {
+static void pal_cb(void* unused) {
- (void)extp;
- (void)channel;
+ (void)unused;
chSysLockFromISR();
porta_buffer = palReadPort(GPIOA);
portb_buffer = palReadPort(GPIOB);
//Disable further interrupts that might occur on same button press.
- extChannelDisable(&EXTD1,0);
- extChannelDisable(&EXTD1,1);
- extChannelDisable(&EXTD1,2);
- extChannelDisable(&EXTD1,9);
- extChannelDisable(&EXTD1,10);
- extChannelDisable(&EXTD1,12);
- extChannelDisable(&EXTD1,13);
- extChannelDisable(&EXTD1,14);
- extChannelDisable(&EXTD1,15);
-
- extChannelEnable(&EXTD1,0);
- extChannelEnable(&EXTD1,1);
- extChannelEnable(&EXTD1,2);
- extChannelEnable(&EXTD1,9);
- extChannelEnable(&EXTD1,10);
- extChannelEnable(&EXTD1,12);
- extChannelEnable(&EXTD1,13);
- extChannelEnable(&EXTD1,14);
- extChannelEnable(&EXTD1,15);
+ enable_input_events();
chSysUnlockFromISR();
}
-static const EXTConfig extcfg = {
- {
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //0
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //1
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //2
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //9
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //10
- {EXT_CH_MODE_DISABLED, NULL},
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //12
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //13
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //14
- {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 } //15
- },
-};
-
void matrix_init(void) {
//Set I/O as pull-up inputs to read states
setPinInputHigh(A0);
@@ -115,8 +110,10 @@ void matrix_init(void) {
memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
matrix_init_quantum();
- //Start interrupt driver
- extStart(&EXTD1, &extcfg);
+
+ osalSysLock();
+ enable_input_events();
+ osalSysUnlock();
}
uint8_t matrix_scan(void) {
@@ -202,7 +199,7 @@ uint8_t matrix_scan(void) {
case 0x18FEB: matrix[3] = 0x10000; break;
case 0x3FF69: matrix[3] = 0x20000; break;
case 0x3A37B: matrix[3] = 0x40000; break;
- default:
+ default:
if ((portb_buffer & 0x1000) == 0) { matrix[1] = 0x4000; break; }
if ((portb_buffer & 0x2000) == 0) { matrix[3] = 0x4000; break; }
if ((portb_buffer & 0x4000) == 0) { matrix[0] = 0x4000; break; }
diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c
index 6dfd1ad79e..7e39908195 100644
--- a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c
+++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c
@@ -229,6 +229,7 @@ void led_set_user(uint8_t usb_led) {
LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
),
+#define KC_LT1 LT(1, KC_SPC)
/*
* SpaceFN layout
@@ -260,7 +261,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO,
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY,
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE,
- LCTL,LGUI,LALT,MHEN,HANJ, FN0, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
+ LCTL,LGUI,LALT,MHEN,HANJ, LT1, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT
),
/* 1: SpaceFN
@@ -288,7 +289,6 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
const action_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE),
[1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde
};
diff --git a/keyboards/ergodox_infinity/board_is31fl3731c.h b/keyboards/ergodox_infinity/board_is31fl3731c.h
index f248cc25ba..b2ed2b0031 100644
--- a/keyboards/ergodox_infinity/board_is31fl3731c.h
+++ b/keyboards/ergodox_infinity/board_is31fl3731c.h
@@ -104,7 +104,7 @@ static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) {
static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
(void) g;
- i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT));
+ i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, TIME_US2I(IS31_TIMEOUT));
}
#endif /* _GDISP_LLD_BOARD_H */
diff --git a/keyboards/ergodox_infinity/chconf.h b/keyboards/ergodox_infinity/chconf.h
index d59c35eb68..7f767b6ddc 100644
--- a/keyboards/ergodox_infinity/chconf.h
+++ b/keyboards/ergodox_infinity/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -25,10 +25,11 @@
* @{
*/
-#ifndef _CHCONF_H_
-#define _CHCONF_H_
+#ifndef CHCONF_H
+#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,15 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
-
-/**
- * @brief I/O Queues APIs.
- * @details If enabled then the I/O queues APIs are included in the kernel.
- *
- * @note The default is @p TRUE.
- */
-#define CH_CFG_USE_QUEUES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -279,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -291,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -300,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -311,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -327,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -336,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -345,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -355,16 +513,28 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
- * @details If enabled then the context switch circular trace buffer is
- * activated.
+ * @details If enabled then the trace buffer is activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#if !defined(CH_DBG_TRACE_MASK)
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
+
+/**
+ * @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.
+ */
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
+#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -376,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -386,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -397,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -409,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -417,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
@@ -429,10 +621,6 @@
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -467,6 +655,7 @@
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -476,6 +665,7 @@
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -519,6 +709,6 @@
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
-#endif /* _CHCONF_H_ */
+#endif /* CHCONF_H */
/** @} */
diff --git a/keyboards/ergodox_infinity/halconf.h b/keyboards/ergodox_infinity/halconf.h
index ade55ae72d..af31e509ae 100644
--- a/keyboards/ergodox_infinity/halconf.h
+++ b/keyboards/ergodox_infinity/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL TRUE
+#define HAL_USE_SERIAL TRUE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL_USB FALSE
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 128
+#define SERIAL_BUFFERS_SIZE 128
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/ergodox_stm32/chconf.h b/keyboards/ergodox_stm32/chconf.h
index 513ae821db..7f767b6ddc 100644
--- a/keyboards/ergodox_stm32/chconf.h
+++ b/keyboards/ergodox_stm32/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/ergodox_stm32/halconf.h b/keyboards/ergodox_stm32/halconf.h
index b87b0635c4..de0f29ce6e 100644
--- a/keyboards/ergodox_stm32/halconf.h
+++ b/keyboards/ergodox_stm32/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c
index 2f3f10f5c7..d7d8316c66 100644
--- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c
+++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT(
F(12),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, \
- F(2),KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \
+ LT(2, KC_CAPS),KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \
KC_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \
KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_NO,KC_RALT,MO(2),KC_APP,KC_RCTL),
@@ -107,7 +107,6 @@ enum function_id {
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay
- [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer
[3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay
[4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow
[5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode
@@ -120,21 +119,6 @@ const uint16_t PROGMEM fn_actions[] = {
[12] = ACTION_FUNCTION(SHIFT_ESC),
};
-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;
-};
-
void matrix_scan_user(void) {
// Layer LED indicators
diff --git a/keyboards/gon/nerd60/config.h b/keyboards/gon/nerd60/config.h
new file mode 100644
index 0000000000..090b50cb6a
--- /dev/null
+++ b/keyboards/gon/nerd60/config.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6FD7
+#define DEVICE_VER 0x0001
+#define MANUFACTURER GON
+#define PRODUCT NerD 60
+#define DESCRIPTION QMK port for the GON NerD 60 PCB
+
+/* key matrix size */
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 8
+
+/* backlight */
+#define BACKLIGHT_PIN B7
+#define BACKLIGHT_LEVELS 3
+
+/* matrix pins */
+#define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 }
+#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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
diff --git a/keyboards/gon/nerd60/info.json b/keyboards/gon/nerd60/info.json
new file mode 100644
index 0000000000..85e0fe9d54
--- /dev/null
+++ b/keyboards/gon/nerd60/info.json
@@ -0,0 +1,78 @@
+{
+ "keyboard_name": "GON NerD 60",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_60": {
+ "key_count": 64,
+ "layout": [
+ {"label":"K80", "x":0, "y":0},
+ {"label":"K10", "x":1, "y":0},
+ {"label":"K01", "x":2, "y":0},
+ {"label":"K11", "x":3, "y":0},
+ {"label":"K02", "x":4, "y":0},
+ {"label":"K12", "x":5, "y":0},
+ {"label":"K03", "x":6, "y":0},
+ {"label":"K13", "x":7, "y":0},
+ {"label":"K04", "x":8, "y":0},
+ {"label":"K14", "x":9, "y":0},
+ {"label":"K05", "x":10, "y":0},
+ {"label":"K15", "x":11, "y":0},
+ {"label":"K06", "x":12, "y":0},
+ {"label":"K16", "x":13, "y":0, "w":2},
+ {"label":"K20", "x":0, "y":1, "w":1.5},
+ {"label":"K30", "x":1.5, "y":1},
+ {"label":"K21", "x":2.5, "y":1},
+ {"label":"K31", "x":3.5, "y":1},
+ {"label":"K22", "x":4.5, "y":1},
+ {"label":"K32", "x":5.5, "y":1},
+ {"label":"K23", "x":6.5, "y":1},
+ {"label":"K33", "x":7.5, "y":1},
+ {"label":"K24", "x":8.5, "y":1},
+ {"label":"K34", "x":9.5, "y":1},
+ {"label":"K25", "x":10.5, "y":1},
+ {"label":"K35", "x":11.5, "y":1},
+ {"label":"K26", "x":12.5, "y":1},
+ {"label":"K36", "x":13.5, "y":1, "w":1.5},
+ {"label":"K40", "x":0, "y":2, "w":1.75},
+ {"label":"K41", "x":1.75, "y":2},
+ {"label":"K51", "x":2.75, "y":2},
+ {"label":"K42", "x":3.75, "y":2},
+ {"label":"K52", "x":4.75, "y":2},
+ {"label":"K43", "x":5.75, "y":2},
+ {"label":"K53", "x":6.75, "y":2},
+ {"label":"K44", "x":7.75, "y":2},
+ {"label":"K54", "x":8.75, "y":2},
+ {"label":"K45", "x":9.75, "y":2},
+ {"label":"K55", "x":10.75, "y":2},
+ {"label":"K46", "x":11.75, "y":2},
+ {"label":"K17", "x":12.75, "y":2},
+ {"label":"K56", "x":13.75, "y":2, "w":1.25},
+ {"label":"K70", "x":0, "y":3, "w":1.25},
+ {"label":"K97", "x":1.25, "y":3},
+ {"label":"K61", "x":2.25, "y":3},
+ {"label":"K71", "x":3.25, "y":3},
+ {"label":"K62", "x":4.25, "y":3},
+ {"label":"K72", "x":5.25, "y":3},
+ {"label":"K63", "x":6.25, "y":3},
+ {"label":"K73", "x":7.25, "y":3},
+ {"label":"K64", "x":8.25, "y":3},
+ {"label":"K74", "x":9.25, "y":3},
+ {"label":"K65", "x":10.25, "y":3},
+ {"label":"K75", "x":11.25, "y":3},
+ {"label":"K66", "x":12.25, "y":3, "w":1.75},
+ {"label":"K76", "x":14, "y":3},
+ {"label":"K60", "x":0, "y":4, "w":1.25},
+ {"label":"K50", "x":1.25, "y":4, "w":1.25},
+ {"label":"K87", "x":2.5, "y":4, "w":1.25},
+ {"label":"K07", "x":3.75, "y":4, "w":6.25},
+ {"label":"K27", "x":10, "y":4, "w":1.25},
+ {"label":"K37", "x":11.25, "y":4, "w":1.25},
+ {"label":"K47", "x":12.5, "y":4, "w":1.25},
+ {"label":"K57", "x":13.75, "y":4, "w":1.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/gon/nerd60/keymaps/default/keymap.c b/keyboards/gon/nerd60/keymaps/default/keymap.c
new file mode 100644
index 0000000000..d205e06de1
--- /dev/null
+++ b/keyboards/gon/nerd60/keymaps/default/keymap.c
@@ -0,0 +1,20 @@
+#include QMK_KEYBOARD_H
+
+// Keymap layers
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_60( /* 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_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_NUHS, KC_ENT,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL
+ ),
+
+ [1] = LAYOUT_60( /* System layer to have access to RESET button */
+ 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_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, _______, _______,
+ _______, _______, KC_APP, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
diff --git a/keyboards/gon/nerd60/keymaps/default/readme.md b/keyboards/gon/nerd60/keymaps/default/readme.md
new file mode 100644
index 0000000000..b7d46191e6
--- /dev/null
+++ b/keyboards/gon/nerd60/keymaps/default/readme.md
@@ -0,0 +1,3 @@
+# The default keymap for GON NerD 60
+
+![keymap](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/gon/nerd60/keymaps/default/keymap.png)
diff --git a/keyboards/gonnerd/keymaps/mauin/keymap.c b/keyboards/gon/nerd60/keymaps/mauin/keymap.c
index fc553bcf16..fc553bcf16 100644
--- a/keyboards/gonnerd/keymaps/mauin/keymap.c
+++ b/keyboards/gon/nerd60/keymaps/mauin/keymap.c
diff --git a/keyboards/gonnerd/keymaps/mauin/readme.md b/keyboards/gon/nerd60/keymaps/mauin/readme.md
index 63be7c3923..63be7c3923 100644
--- a/keyboards/gonnerd/keymaps/mauin/readme.md
+++ b/keyboards/gon/nerd60/keymaps/mauin/readme.md
diff --git a/keyboards/gonnerd/keymaps/default/rules.mk b/keyboards/gon/nerd60/keymaps/mauin/rules.mk
index c1019c7f41..625fc9c029 100644
--- a/keyboards/gonnerd/keymaps/default/rules.mk
+++ b/keyboards/gon/nerd60/keymaps/mauin/rules.mk
@@ -1,18 +1,20 @@
# 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
+# change yes to no to disable
#
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 = yes # 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
+# 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 = no # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = no # Audio output on port C6
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
+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
diff --git a/keyboards/gon/nerd60/nerd60.c b/keyboards/gon/nerd60/nerd60.c
new file mode 100644
index 0000000000..5022732b80
--- /dev/null
+++ b/keyboards/gon/nerd60/nerd60.c
@@ -0,0 +1 @@
+#include "nerd60.h"
diff --git a/keyboards/gon/nerd60/nerd60.h b/keyboards/gon/nerd60/nerd60.h
new file mode 100644
index 0000000000..3f8f538e27
--- /dev/null
+++ b/keyboards/gon/nerd60/nerd60.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_60( \
+ K80, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, \
+ K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, \
+ K40, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K17, K56, \
+ K70, K97, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, \
+ K60, K50, K87, K07, K27, K37, K47, K57 \
+) { \
+ { KC_NO, K01, K02, K03, K04, K05, K06, K07 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \
+ { K70, K71, K72, K73, K74, K75, K76, KC_NO }, \
+ { K80, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87 }, \
+ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K97 } \
+}
diff --git a/keyboards/gon/nerd60/readme.md b/keyboards/gon/nerd60/readme.md
new file mode 100644
index 0000000000..1b4689ea03
--- /dev/null
+++ b/keyboards/gon/nerd60/readme.md
@@ -0,0 +1,27 @@
+# GON NerD 60
+
+A Korean Custom 60%.
+
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: GON NerD 60 PCB
+* Hardware Availability: [gonskeyboardworks.com](http://www.gonskeyboardworks.com/pcbs-and-controllers/113-nerd-60-ver20-pcb.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make gon/nerd60: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).
+
+## Changing Bootloader
+
+It's not possible to simply flash this firmware on the GON NerD keyboard as the original bootloader does not support DFU connections.
+
+It is possible to change the bootloader of the GON NerD with an ISP programmer. A guide on how to change the bootloader on your GON NerD can be found here:
+[Converting NerD60 to TMK](https://deskthority.net/wiki/Converting_NerD60_to_TMK). After changing the bootloader you can flash your QMK keymap onto the keyboard.
+
+_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
+not work anymore. You will lose your warranty and official support from GON!_
+
+## Reset button
+
+To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins.
diff --git a/keyboards/gonnerd/rules.mk b/keyboards/gon/nerd60/rules.mk
index 798f96f4c4..8446dd39ca 100644
--- a/keyboards/gonnerd/rules.mk
+++ b/keyboards/gon/nerd60/rules.mk
@@ -22,12 +22,15 @@ MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
- # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# 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
-MIDI_ENABLE = no # MIDI controls
+# 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 = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
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
diff --git a/keyboards/gonnerd/config.h b/keyboards/gon/nerdtkl/config.h
index 5b22495db7..48f6c93c93 100644
--- a/keyboards/gonnerd/config.h
+++ b/keyboards/gon/nerdtkl/config.h
@@ -1,15 +1,14 @@
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x6060
+#define PRODUCT_ID 0x6965
#define DEVICE_VER 0x0001
#define MANUFACTURER GON
-#define PRODUCT NerD
-#define DESCRIPTION QMK port for the GON Nerd PCB
+#define PRODUCT NerD TKL
+#define DESCRIPTION QMK port for the GON NerD TKL PCB
/* key matrix size */
#define MATRIX_ROWS 10
@@ -34,5 +33,3 @@
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-
-#endif
diff --git a/keyboards/gon/nerdtkl/info.json b/keyboards/gon/nerdtkl/info.json
new file mode 100644
index 0000000000..475632ebf3
--- /dev/null
+++ b/keyboards/gon/nerdtkl/info.json
@@ -0,0 +1,104 @@
+{
+ "keyboard_name": "GON NerD TKL",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 18.25,
+ "height": 6.25,
+ "layouts": {
+ "LAYOUT_tkl": {
+ "key_count": 90,
+ "layout": [
+ {"label":"K80", "x":0, "y":0},
+ {"label":"K90", "x":2, "y":0},
+ {"label":"K81", "x":3, "y":0},
+ {"label":"K91", "x":4, "y":0},
+ {"label":"K82", "x":5, "y":0},
+ {"label":"K92", "x":6.5, "y":0},
+ {"label":"K83", "x":7.5, "y":0},
+ {"label":"K93", "x":8.5, "y":0},
+ {"label":"K84", "x":9.5, "y":0},
+ {"label":"K94", "x":11, "y":0},
+ {"label":"K85", "x":12, "y":0},
+ {"label":"K95", "x":13, "y":0},
+ {"label":"K86", "x":14, "y":0},
+ {"label":"K96", "x":15.25, "y":0},
+ {"label":"K88", "x":16.25, "y":0},
+ {"label":"K98", "x":17.25, "y":0},
+ {"label":"K00", "x":0, "y":1.25},
+ {"label":"K10", "x":1, "y":1.25},
+ {"label":"K01", "x":2, "y":1.25},
+ {"label":"K11", "x":3, "y":1.25},
+ {"label":"K02", "x":4, "y":1.25},
+ {"label":"K12", "x":5, "y":1.25},
+ {"label":"K03", "x":6, "y":1.25},
+ {"label":"K13", "x":7, "y":1.25},
+ {"label":"K04", "x":8, "y":1.25},
+ {"label":"K14", "x":9, "y":1.25},
+ {"label":"K05", "x":10, "y":1.25},
+ {"label":"K15", "x":11, "y":1.25},
+ {"label":"K06", "x":12, "y":1.25},
+ {"label":"K16", "x":13, "y":1.25, "w":2},
+ {"label":"K08", "x":15.25, "y":1.25},
+ {"label":"K18", "x":16.25, "y":1.25},
+ {"label":"K48", "x":17.25, "y":1.25},
+ {"label":"K20", "x":0, "y":2.25, "w":1.5},
+ {"label":"K30", "x":1.5, "y":2.25},
+ {"label":"K21", "x":2.5, "y":2.25},
+ {"label":"K31", "x":3.5, "y":2.25},
+ {"label":"K22", "x":4.5, "y":2.25},
+ {"label":"K32", "x":5.5, "y":2.25},
+ {"label":"K23", "x":6.5, "y":2.25},
+ {"label":"K33", "x":7.5, "y":2.25},
+ {"label":"K24", "x":8.5, "y":2.25},
+ {"label":"K34", "x":9.5, "y":2.25},
+ {"label":"K25", "x":10.5, "y":2.25},
+ {"label":"K35", "x":11.5, "y":2.25},
+ {"label":"K26", "x":12.5, "y":2.25},
+ {"label":"K36", "x":13.5, "y":2.25, "w":1.5},
+ {"label":"K28", "x":15.25, "y":2.25},
+ {"label":"K38", "x":16.25, "y":2.25},
+ {"label":"K58", "x":17.25, "y":2.25},
+ {"label":"K40", "x":0, "y":3.25, "w":1.75},
+ {"label":"K41", "x":1.75, "y":3.25},
+ {"label":"K51", "x":2.75, "y":3.25},
+ {"label":"K42", "x":3.75, "y":3.25},
+ {"label":"K52", "x":4.75, "y":3.25},
+ {"label":"K43", "x":5.75, "y":3.25},
+ {"label":"K53", "x":6.75, "y":3.25},
+ {"label":"K44", "x":7.75, "y":3.25},
+ {"label":"K54", "x":8.75, "y":3.25},
+ {"label":"K45", "x":9.75, "y":3.25},
+ {"label":"K55", "x":10.75, "y":3.25},
+ {"label":"K46", "x":11.75, "y":3.25},
+ {"label":"K17", "x":12.75, "y":3.25},
+ {"label":"K56", "x":13.75, "y":3.25, "w":1.25},
+ {"label":"K70", "x":0, "y":4.25, "w":1.25},
+ {"label":"K97", "x":1.25, "y":4.25},
+ {"label":"K61", "x":2.25, "y":4.25},
+ {"label":"K71", "x":3.25, "y":4.25},
+ {"label":"K62", "x":4.25, "y":4.25},
+ {"label":"K72", "x":5.25, "y":4.25},
+ {"label":"K63", "x":6.25, "y":4.25},
+ {"label":"K73", "x":7.25, "y":4.25},
+ {"label":"K64", "x":8.25, "y":4.25},
+ {"label":"K74", "x":9.25, "y":4.25},
+ {"label":"K65", "x":10.25, "y":4.25},
+ {"label":"K75", "x":11.25, "y":4.25},
+ {"label":"K66", "x":12.25, "y":4.25, "w":1.75},
+ {"label":"K76", "x":14, "y":4.25},
+ {"label":"K68", "x":16.25, "y":4.25},
+ {"label":"K60", "x":0, "y":5.25, "w":1.25},
+ {"label":"K50", "x":1.25, "y":5.25, "w":1.25},
+ {"label":"K87", "x":2.5, "y":5.25, "w":1.25},
+ {"label":"K07", "x":3.75, "y":5.25, "w":6.25},
+ {"label":"K27", "x":10, "y":5.25, "w":1.25},
+ {"label":"K37", "x":11.25, "y":5.25, "w":1.25},
+ {"label":"K47", "x":12.5, "y":5.25, "w":1.25},
+ {"label":"K57", "x":13.75, "y":5.25, "w":1.25},
+ {"label":"K67", "x":15.25, "y":5.25},
+ {"label":"K77", "x":16.25, "y":5.25},
+ {"label":"K78", "x":17.25, "y":5.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/gon/nerdtkl/keymaps/default/keymap.c b/keyboards/gon/nerdtkl/keymaps/default/keymap.c
new file mode 100644
index 0000000000..cca8e9108a
--- /dev/null
+++ b/keyboards/gon/nerdtkl/keymaps/default/keymap.c
@@ -0,0 +1,24 @@
+#include QMK_KEYBOARD_H
+
+// Keymap layers
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT_tkl( \
+ 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+
+ [1] = LAYOUT_tkl( \
+ RESET, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_APP, 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/gon/nerdtkl/keymaps/default/readme.md b/keyboards/gon/nerdtkl/keymaps/default/readme.md
new file mode 100644
index 0000000000..648157a051
--- /dev/null
+++ b/keyboards/gon/nerdtkl/keymaps/default/readme.md
@@ -0,0 +1,3 @@
+# The default keymap for GON NerD TKL
+
+![keymap](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/gon/nerdtkl/keymaps/default/keymap.png)
diff --git a/keyboards/gonnerd/keymaps/gam3cat/config.h b/keyboards/gon/nerdtkl/keymaps/gam3cat/config.h
index 334beb0ac2..334beb0ac2 100644
--- a/keyboards/gonnerd/keymaps/gam3cat/config.h
+++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/config.h
diff --git a/keyboards/gonnerd/keymaps/gam3cat/keymap.c b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c
index 3142209d6f..3142209d6f 100644
--- a/keyboards/gonnerd/keymaps/gam3cat/keymap.c
+++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c
diff --git a/keyboards/gonnerd/keymaps/gam3cat/readme.md b/keyboards/gon/nerdtkl/keymaps/gam3cat/readme.md
index 8630ea2966..8630ea2966 100644
--- a/keyboards/gonnerd/keymaps/gam3cat/readme.md
+++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/readme.md
diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk
new file mode 100644
index 0000000000..65c2a5d622
--- /dev/null
+++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk
@@ -0,0 +1,26 @@
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# 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 - If this doesn't work, add this to config.h: #define FORCE_NKRO
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+UNICODE_ENABLE = no # Unicode
+UNICODEMAP_ENABLE = no # Enable extended 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
+#VARIABLE_TRACE = no # Use this to debug changes to variable values
+API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings
+KEY_LOCK_ENABLE = no # This enables key lock
+SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common
+TAP_DANCE_ENABLE = no # Enable TapDance functionality
diff --git a/keyboards/gon/nerdtkl/nerdtkl.c b/keyboards/gon/nerdtkl/nerdtkl.c
new file mode 100644
index 0000000000..e221e9e78e
--- /dev/null
+++ b/keyboards/gon/nerdtkl/nerdtkl.c
@@ -0,0 +1 @@
+#include "nerdtkl.h"
diff --git a/keyboards/gon/nerdtkl/nerdtkl.h b/keyboards/gon/nerdtkl/nerdtkl.h
new file mode 100644
index 0000000000..9dbc036194
--- /dev/null
+++ b/keyboards/gon/nerdtkl/nerdtkl.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_tkl( \
+ K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K88, K98, \
+ K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K08, K18, K48, \
+ K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K28, K38, K58, \
+ K40, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K17, K56, \
+ K70, K97, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K68, \
+ K60, K50, K87, K07, K27, K37, K47, K57, K67, K77, K78 \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
+ { K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \
+ { K80, K81, K82, K83, K84, K85, K86, K87, K88 }, \
+ { K90, K91, K92, K93, K94, K95, K96, K97, K98 } \
+}
diff --git a/keyboards/gonnerd/readme.md b/keyboards/gon/nerdtkl/readme.md
index 223fdf3d3f..f8e982e770 100644
--- a/keyboards/gonnerd/readme.md
+++ b/keyboards/gon/nerdtkl/readme.md
@@ -1,17 +1,16 @@
-GON NerD
-========
+# GON NerD TKL
A Korean Custom TKL.
-Keyboard Maintainer: QMK Community
-Hardware Supported: GON NerD TKL PCB
-Hardware Availability: [gonskeyboardworks.com](http://www.gonskeyboardworks.com/pcbs-and-controllers/60-nerd-tkl-ver20-pcb.html)
+* Keyboard Maintainer: QMK Community
+* Hardware Supported: GON NerD TKL PCB
+* Hardware Availability: [gonskeyboardworks.com](http://www.gonskeyboardworks.com/pcbs-and-controllers/60-nerd-tkl-ver20-pcb.html)
Make example for this keyboard (after setting up your build environment):
- make gonnerd:default
+ make gon/nerdtkl: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).
## Changing Bootloader
diff --git a/keyboards/gon/nerdtkl/rules.mk b/keyboards/gon/nerdtkl/rules.mk
new file mode 100644
index 0000000000..8446dd39ca
--- /dev/null
+++ b/keyboards/gon/nerdtkl/rules.mk
@@ -0,0 +1,36 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency
+F_CPU = 8000000
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+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 = 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 = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+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
diff --git a/keyboards/gon/readme.md b/keyboards/gon/readme.md
new file mode 100644
index 0000000000..22837c5a2e
--- /dev/null
+++ b/keyboards/gon/readme.md
@@ -0,0 +1,9 @@
+# GON
+
+Gon's Keyboard Works is a Korean online mechanical keyboard retailer.
+
+Website: [gonskeyboardworks.com](https://www.gonskeyboardworks.com/)
+
+* Keyboards Supported:
+ * [GON NerD 60](nerd60/)
+ * [GON NerD TKL](nerdtkl/)
diff --git a/keyboards/gonnerd/gonnerd.c b/keyboards/gonnerd/gonnerd.c
deleted file mode 100644
index f25d3a85f2..0000000000
--- a/keyboards/gonnerd/gonnerd.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "gonnerd.h"
diff --git a/keyboards/gonnerd/gonnerd.h b/keyboards/gonnerd/gonnerd.h
deleted file mode 100644
index 0b9f5259dd..0000000000
--- a/keyboards/gonnerd/gonnerd.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef GONNERD_H
-#define GONNERD_H
-
-#include "quantum.h"
-
-#define LAYOUT_tkl( \
- K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \
- K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \
- K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \
- K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
- K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \
- K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \
-) \
-{ \
- { K00, K10, K20, K30, K40, K50, K60, K70, K80 }, \
- { K01, K11, K21, K31, K41, K51, K61, K71, K81 }, \
- { K02, K12, K22, K32, K42, K52, K62, K72, K82 }, \
- { K03, K13, K23, K33, K43, K53, K63, K73, K83 }, \
- { K04, K14, K24, K34, K44, K54, K64, K74, K84 }, \
- { K05, K15, K25, K35, K45, K55, K65, K75, K85 }, \
- { K06, K16, K26, K36, K46, K56, K66, K76, K86 }, \
- { K07, K17, K27, K37, K47, K57, K67, K77, K87 }, \
- { K08, K18, K28, K38, K48, K58, K68, K78, K88 }, \
- { K09, K19, K29, K39, K49, K59, K69, K79, K89 } \
-}
-
-#define LAYOUT_60( \
- K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \
- K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \
- K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
- K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, \
- K06, K05, K78, K70, K72, K73, K74, K75 \
-) LAYOUT_tkl( \
- K08, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- KC_NO, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, KC_NO, KC_NO, KC_NO, \
- K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, KC_NO, KC_NO, KC_NO, \
- K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \
- K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, KC_NO, \
- K06, K05, K78, K70, K72, K73, K74, K75, KC_NO, KC_NO, KC_NO \
-)
-
-#endif
diff --git a/keyboards/gonnerd/info.json b/keyboards/gonnerd/info.json
deleted file mode 100644
index 542eccd096..0000000000
--- a/keyboards/gonnerd/info.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "keyboard_name": "GON NerD",
- "url": "",
- "maintainer": "qmk",
- "width": 18.25,
- "height": 6.5,
- "layouts": {
- "LAYOUT_tkl": {
- "key_count": 90,
- "layout": [{"label":"K08", "x":0, "y":0}, {"label":"K09", "x":2, "y":0}, {"label":"K18", "x":3, "y":0}, {"label":"K19", "x":4, "y":0}, {"label":"K28", "x":5, "y":0}, {"label":"K29", "x":6.5, "y":0}, {"label":"K38", "x":7.5, "y":0}, {"label":"K39", "x":8.5, "y":0}, {"label":"K48", "x":9.5, "y":0}, {"label":"K49", "x":11, "y":0}, {"label":"K58", "x":12, "y":0}, {"label":"K59", "x":13, "y":0}, {"label":"K68", "x":14, "y":0}, {"label":"K69", "x":15.25, "y":0}, {"label":"K88", "x":16.25, "y":0}, {"label":"K89", "x":17.25, "y":0}, {"label":"K00", "x":0, "y":1.5}, {"label":"K01", "x":1, "y":1.5}, {"label":"K10", "x":2, "y":1.5}, {"label":"K11", "x":3, "y":1.5}, {"label":"K20", "x":4, "y":1.5}, {"label":"K21", "x":5, "y":1.5}, {"label":"K30", "x":6, "y":1.5}, {"label":"K31", "x":7, "y":1.5}, {"label":"K40", "x":8, "y":1.5}, {"label":"K41", "x":9, "y":1.5}, {"label":"K50", "x":10, "y":1.5}, {"label":"K51", "x":11, "y":1.5}, {"label":"K60", "x":12, "y":1.5}, {"label":"K61", "x":13, "y":1.5, "w":2}, {"label":"K80", "x":15.25, "y":1.5}, {"label":"K81", "x":16.25, "y":1.5}, {"label":"K84", "x":17.25, "y":1.5}, {"label":"K02", "x":0, "y":2.5, "w":1.5}, {"label":"K03", "x":1.5, "y":2.5}, {"label":"K12", "x":2.5, "y":2.5}, {"label":"K13", "x":3.5, "y":2.5}, {"label":"K22", "x":4.5, "y":2.5}, {"label":"K23", "x":5.5, "y":2.5}, {"label":"K32", "x":6.5, "y":2.5}, {"label":"K33", "x":7.5, "y":2.5}, {"label":"K42", "x":8.5, "y":2.5}, {"label":"K43", "x":9.5, "y":2.5}, {"label":"K52", "x":10.5, "y":2.5}, {"label":"K53", "x":11.5, "y":2.5}, {"label":"K62", "x":12.5, "y":2.5}, {"label":"K63", "x":13.5, "y":2.5, "w":1.5}, {"label":"K82", "x":15.25, "y":2.5}, {"label":"K83", "x":16.25, "y":2.5}, {"label":"K85", "x":17.25, "y":2.5}, {"label":"K04", "x":0, "y":3.5, "w":1.75}, {"label":"K14", "x":1.75, "y":3.5}, {"label":"K15", "x":2.75, "y":3.5}, {"label":"K24", "x":3.75, "y":3.5}, {"label":"K25", "x":4.75, "y":3.5}, {"label":"K34", "x":5.75, "y":3.5}, {"label":"K35", "x":6.75, "y":3.5}, {"label":"K44", "x":7.75, "y":3.5}, {"label":"K45", "x":8.75, "y":3.5}, {"label":"K54", "x":9.75, "y":3.5}, {"label":"K55", "x":10.75, "y":3.5}, {"label":"K64", "x":11.75, "y":3.5}, {"label":"K71", "x":12.75, "y":3.5}, {"label":"K65", "x":13.75, "y":3.5, "w":1.25}, {"label":"K07", "x":0, "y":4.5, "w":1.25}, {"label":"K79", "x":1.25, "y":4.5}, {"label":"K16", "x":2.25, "y":4.5}, {"label":"K17", "x":3.25, "y":4.5}, {"label":"K26", "x":4.25, "y":4.5}, {"label":"K27", "x":5.25, "y":4.5}, {"label":"K36", "x":6.25, "y":4.5}, {"label":"K37", "x":7.25, "y":4.5}, {"label":"K46", "x":8.25, "y":4.5}, {"label":"K47", "x":9.25, "y":4.5}, {"label":"K56", "x":10.25, "y":4.5}, {"label":"K57", "x":11.25, "y":4.5}, {"label":"K66", "x":12.25, "y":4.5, "w":1.75}, {"label":"K67", "x":14, "y":4.5}, {"label":"K86", "x":16.25, "y":4.5}, {"label":"K06", "x":0, "y":5.5, "w":1.25}, {"label":"K05", "x":1.25, "y":5.5, "w":1.25}, {"label":"K78", "x":2.5, "y":5.5, "w":1.25}, {"label":"K70", "x":3.75, "y":5.5, "w":6.25}, {"label":"K72", "x":10, "y":5.5, "w":1.25}, {"label":"K73", "x":11.25, "y":5.5, "w":1.25}, {"label":"K74", "x":12.5, "y":5.5, "w":1.25}, {"label":"K75", "x":13.75, "y":5.5, "w":1.25}, {"label":"K76", "x":15.25, "y":5.5}, {"label":"K77", "x":16.25, "y":5.5}, {"label":"K87", "x":17.25, "y":5.5}]
- },
-
- "LAYOUT_60": {
- "key_count": 64,
- "layout": [{"label":"K08", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K10", "x":2, "y":0}, {"label":"K11", "x":3, "y":0}, {"label":"K20", "x":4, "y":0}, {"label":"K21", "x":5, "y":0}, {"label":"K30", "x":6, "y":0}, {"label":"K31", "x":7, "y":0}, {"label":"K40", "x":8, "y":0}, {"label":"K41", "x":9, "y":0}, {"label":"K50", "x":10, "y":0}, {"label":"K51", "x":11, "y":0}, {"label":"K60", "x":12, "y":0}, {"label":"K61", "x":13, "y":0, "w":2}, {"label":"K02", "x":0, "y":1, "w":1.5}, {"label":"K03", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K22", "x":4.5, "y":1}, {"label":"K23", "x":5.5, "y":1}, {"label":"K32", "x":6.5, "y":1}, {"label":"K33", "x":7.5, "y":1}, {"label":"K42", "x":8.5, "y":1}, {"label":"K43", "x":9.5, "y":1}, {"label":"K52", "x":10.5, "y":1}, {"label":"K53", "x":11.5, "y":1}, {"label":"K62", "x":12.5, "y":1}, {"label":"K63", "x":13.5, "y":1, "w":1.5}, {"label":"K04", "x":0, "y":2, "w":1.75}, {"label":"K14", "x":1.75, "y":2}, {"label":"K15", "x":2.75, "y":2}, {"label":"K24", "x":3.75, "y":2}, {"label":"K25", "x":4.75, "y":2}, {"label":"K34", "x":5.75, "y":2}, {"label":"K35", "x":6.75, "y":2}, {"label":"K44", "x":7.75, "y":2}, {"label":"K45", "x":8.75, "y":2}, {"label":"K54", "x":9.75, "y":2}, {"label":"K55", "x":10.75, "y":2}, {"label":"K64", "x":11.75, "y":2}, {"label":"K71", "x":12.75, "y":2}, {"label":"K65", "x":13.75, "y":2, "w":1.25}, {"label":"K07", "x":0, "y":3, "w":1.25}, {"label":"K79", "x":1.25, "y":3}, {"label":"K16", "x":2.25, "y":3}, {"label":"K17", "x":3.25, "y":3}, {"label":"K26", "x":4.25, "y":3}, {"label":"K27", "x":5.25, "y":3}, {"label":"K36", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K46", "x":8.25, "y":3}, {"label":"K47", "x":9.25, "y":3}, {"label":"K56", "x":10.25, "y":3}, {"label":"K57", "x":11.25, "y":3}, {"label":"K66", "x":12.25, "y":3, "w":1.75}, {"label":"K67", "x":14, "y":3}, {"label":"K06", "x":0, "y":4, "w":1.25}, {"label":"K05", "x":1.25, "y":4, "w":1.25}, {"label":"K78", "x":2.5, "y":4, "w":1.25}, {"label":"K70", "x":3.75, "y":4, "w":6.25}, {"label":"K72", "x":10, "y":4, "w":1.25}, {"label":"K73", "x":11.25, "y":4, "w":1.25}, {"label":"K74", "x":12.5, "y":4, "w":1.25}, {"label":"K75", "x":13.75, "y":4, "w":1.25}]
- }
- }
-}
diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c
deleted file mode 100644
index 19b7960161..0000000000
--- a/keyboards/gonnerd/keymaps/default/keymap.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define __x__ KC_NO
-
-// Keymap layers
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_60( /* 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_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, __x__, KC_ENT, \
- KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \
- ),
-
- [1] = LAYOUT_60( /* System layer to have access to RESET button */
- RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
- __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
- __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
- __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
- __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
- ),
-};
diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk
deleted file mode 100644
index 6eab033cc0..0000000000
--- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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
-#
-TAP_DANCE_ENABLE = no # Enable TapDance functionality
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+1500)
-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 # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-UNICODE_ENABLE = no # Unicode
-UNICODEMAP_ENABLE = no # Enable extended unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
-FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE.
-#VARIABLE_TRACE = no # Use this to debug changes to variable values
-API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390)
-KEY_LOCK_ENABLE = no # This enables key lock(+260)
-SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common
diff --git a/keyboards/gonnerd/keymaps/mauin/rules.mk b/keyboards/gonnerd/keymaps/mauin/rules.mk
deleted file mode 100644
index 6de64fcf89..0000000000
--- a/keyboards/gonnerd/keymaps/mauin/rules.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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 = yes # 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.
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
diff --git a/keyboards/gonnerd/keymaps/tkl/keymap.c b/keyboards/gonnerd/keymaps/tkl/keymap.c
deleted file mode 100644
index 404f3825f6..0000000000
--- a/keyboards/gonnerd/keymaps/tkl/keymap.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define _x_ KC_NO
-#define TRN KC_TRNS
-
-// Keymap layers
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [0] = LAYOUT_tkl( \
- 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _x_, KC_ENT, \
- KC_LSFT, _x_, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _x_, KC_UP, \
- KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \
- ),
-
- [1] = LAYOUT_tkl( \
- RESET, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
- _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
- _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
- _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
- _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
- _x_, _x_, _x_, _x_, _x_, _x_, TRN, _x_, _x_, _x_, _x_ \
- )
-
-};
diff --git a/keyboards/gonnerd/keymaps/tkl/rules.mk b/keyboards/gonnerd/keymaps/tkl/rules.mk
deleted file mode 100644
index 4026390c4e..0000000000
--- a/keyboards/gonnerd/keymaps/tkl/rules.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
-NKRO_ENABLE = yes # 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.
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
diff --git a/keyboards/hadron/ver3/chconf.h b/keyboards/hadron/ver3/chconf.h
index ce44925f3c..c8dbb85a84 100644
--- a/keyboards/hadron/ver3/chconf.h
+++ b/keyboards/hadron/ver3/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 1000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/hadron/ver3/halconf.h b/keyboards/hadron/ver3/halconf.h
index a14ace02b4..b916cd13e3 100644
--- a/keyboards/hadron/ver3/halconf.h
+++ b/keyboards/hadron/ver3/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#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 QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/hadron/ver3/mcuconf.h b/keyboards/hadron/ver3/mcuconf.h
index 94d761cfba..0307251ec3 100644
--- a/keyboards/hadron/ver3/mcuconf.h
+++ b/keyboards/hadron/ver3/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 TRUE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/handwired/bluepill/bluepill70/chconf.h b/keyboards/handwired/bluepill/bluepill70/chconf.h
index fdbc4aed04..23af0349ce 100644
--- a/keyboards/handwired/bluepill/bluepill70/chconf.h
+++ b/keyboards/handwired/bluepill/bluepill70/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 16
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 2000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/bluepill/bluepill70/halconf.h b/keyboards/handwired/bluepill/bluepill70/halconf.h
index 5be284cd35..db65fadea3 100644
--- a/keyboards/handwired/bluepill/bluepill70/halconf.h
+++ b/keyboards/handwired/bluepill/bluepill70/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,12 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
-// Modified by Xydane
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 256
+#define SERIAL_USB_BUFFERS_SIZE 256
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -326,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/handwired/ck4x4/chconf.h b/keyboards/handwired/ck4x4/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/handwired/ck4x4/chconf.h
+++ b/keyboards/handwired/ck4x4/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/ck4x4/halconf.h b/keyboards/handwired/ck4x4/halconf.h
index 8b9724b1a3..16f32117d5 100644
--- a/keyboards/handwired/ck4x4/halconf.h
+++ b/keyboards/handwired/ck4x4/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/handwired/co60/rev6/chconf.h b/keyboards/handwired/co60/rev6/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/handwired/co60/rev6/chconf.h
+++ b/keyboards/handwired/co60/rev6/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/co60/rev6/halconf.h b/keyboards/handwired/co60/rev6/halconf.h
index 5e5d70219e..ccac2f8f74 100644
--- a/keyboards/handwired/co60/rev6/halconf.h
+++ b/keyboards/handwired/co60/rev6/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#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 QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/handwired/co60/rev6/mcuconf.h b/keyboards/handwired/co60/rev6/mcuconf.h
index 69bf9185d1..6f0b99fe00 100644
--- a/keyboards/handwired/co60/rev6/mcuconf.h
+++ b/keyboards/handwired/co60/rev6/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 TRUE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/handwired/co60/rev7/chconf.h b/keyboards/handwired/co60/rev7/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/handwired/co60/rev7/chconf.h
+++ b/keyboards/handwired/co60/rev7/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/co60/rev7/halconf.h b/keyboards/handwired/co60/rev7/halconf.h
index 7363a21a21..610bee5b59 100644
--- a/keyboards/handwired/co60/rev7/halconf.h
+++ b/keyboards/handwired/co60/rev7/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#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 QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/handwired/co60/rev7/mcuconf.h b/keyboards/handwired/co60/rev7/mcuconf.h
index 7ad0137446..eefee306b5 100644
--- a/keyboards/handwired/co60/rev7/mcuconf.h
+++ b/keyboards/handwired/co60/rev7/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 TRUE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c
index c5ed18797f..602bdd157b 100644
--- a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c
+++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c
@@ -25,8 +25,9 @@ TRAN
// Custom macros
/* Fn Keys */
+#define LT_SYM LT(_SYM, KC_SPC)
#define TT_SYM MO(_SYM)
-#define TT_MOV KC_FN2
+#define TT_MOV LT(_MOV,KC_BSPC)
#define TT_NUM MO(_NUM)
#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT)
@@ -59,7 +60,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,\
TT_MOV, 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_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ KC_LCTL, KC_LGUI, KC_LALT, LT_SYM, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
[_CDH] = LAYOUT(\
@@ -68,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
TT_MOV, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_2,\
KC_LSFT, KC_Z, KC_X, KC_C, M(DHPASTE), KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, ____, KC_1,\
- ____, ____, ____ , KC_FN1, ____, ____, ____, ____, ____, ____
+ ____, ____, ____ , LT_SYM, ____, ____, ____, ____, ____, ____
),
@@ -131,11 +132,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-const uint16_t PROGMEM fn_actions[] = {
-[1] = ACTION_LAYER_TAP_KEY(_SYM,KC_SPACE),
-[2] = ACTION_LAYER_TAP_KEY(_MOV,KC_BSPC)
-};
-
#ifdef AUDIO_ENABLE
float tone_startup[][2] = SONG(STARTUP_SOUND);
diff --git a/keyboards/handwired/onekey/bluepill/chconf.h b/keyboards/handwired/onekey/bluepill/chconf.h
index 9299be587e..f5e471640c 100644
--- a/keyboards/handwired/onekey/bluepill/chconf.h
+++ b/keyboards/handwired/onekey/bluepill/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h
index 53b2f91e33..ff5ae7e8a5 100644
--- a/keyboards/handwired/onekey/bluepill/halconf.h
+++ b/keyboards/handwired/onekey/bluepill/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/handwired/onekey/stm32f0_disco/chconf.h b/keyboards/handwired/onekey/stm32f0_disco/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/handwired/onekey/stm32f0_disco/chconf.h
+++ b/keyboards/handwired/onekey/stm32f0_disco/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/onekey/stm32f0_disco/halconf.h b/keyboards/handwired/onekey/stm32f0_disco/halconf.h
index 53b2f91e33..ff5ae7e8a5 100644
--- a/keyboards/handwired/onekey/stm32f0_disco/halconf.h
+++ b/keyboards/handwired/onekey/stm32f0_disco/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/handwired/onekey/teensy_32/chconf.h b/keyboards/handwired/onekey/teensy_32/chconf.h
index 1919fcb97c..09903ca2db 100644
--- a/keyboards/handwired/onekey/teensy_32/chconf.h
+++ b/keyboards/handwired/onekey/teensy_32/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 1000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS TRUE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS TRUE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS TRUE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/onekey/teensy_32/halconf.h b/keyboards/handwired/onekey/teensy_32/halconf.h
index 1b6f2adc20..16f32117d5 100644
--- a/keyboards/handwired/onekey/teensy_32/halconf.h
+++ b/keyboards/handwired/onekey/teensy_32/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,10 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
#endif
-#endif /* _HALCONF_H_ */
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
-/** @} */
+#endif /* HALCONF_H */
+/** @} */
diff --git a/keyboards/handwired/onekey/teensy_lc/chconf.h b/keyboards/handwired/onekey/teensy_lc/chconf.h
index 1919fcb97c..09903ca2db 100644
--- a/keyboards/handwired/onekey/teensy_lc/chconf.h
+++ b/keyboards/handwired/onekey/teensy_lc/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 1000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS TRUE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS TRUE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS TRUE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/onekey/teensy_lc/halconf.h b/keyboards/handwired/onekey/teensy_lc/halconf.h
index 1b6f2adc20..16f32117d5 100644
--- a/keyboards/handwired/onekey/teensy_lc/halconf.h
+++ b/keyboards/handwired/onekey/teensy_lc/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,10 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
#endif
-#endif /* _HALCONF_H_ */
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
-/** @} */
+#endif /* HALCONF_H */
+/** @} */
diff --git a/keyboards/handwired/steamvan/rev1/chconf.h b/keyboards/handwired/steamvan/rev1/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/handwired/steamvan/rev1/chconf.h
+++ b/keyboards/handwired/steamvan/rev1/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/handwired/steamvan/rev1/halconf.h b/keyboards/handwired/steamvan/rev1/halconf.h
index 7363a21a21..610bee5b59 100644
--- a/keyboards/handwired/steamvan/rev1/halconf.h
+++ b/keyboards/handwired/steamvan/rev1/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#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 QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/handwired/steamvan/rev1/mcuconf.h b/keyboards/handwired/steamvan/rev1/mcuconf.h
index 7ad0137446..eefee306b5 100644
--- a/keyboards/handwired/steamvan/rev1/mcuconf.h
+++ b/keyboards/handwired/steamvan/rev1/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 TRUE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/keymaps/shela/keymap.c
index dae85ad9ca..2d5f4c64ac 100644
--- a/keyboards/hhkb/keymaps/shela/keymap.c
+++ b/keyboards/hhkb/keymaps/shela/keymap.c
@@ -36,7 +36,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_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,
OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB),
- KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT),
+ KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT),
/* Layer 1: Pseudo US Layout Layer
* ,-----------------------------------------------------------------------------------------.
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1,
KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT,
KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB),
- KC_LGUI, KC_FN3, KC_FN2, KC_FN4, KC_RGUI),
+ KC_LGUI, KC_FN3, LT(SPACE_FN, KC_SPACE), KC_FN4, KC_RGUI),
/* Layer 2: Dvorak Layer
* ,-----------------------------------------------------------------------------------------.
@@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS,
KC_LCTL, 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, MO(HHKB),
- KC_LALT, KC_LGUI, KC_FN2, KC_RGUI, KC_RALT),
+ KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT),
/* Layer 3: Mouse layer
* ,-----------------------------------------------------------------------------------------.
@@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT,
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, MO(HHKB),
- KC_TRNS, KC_TRNS, KC_FN2, KC_KP_0, KC_PDOT),
+ KC_TRNS, KC_TRNS, LT(SPACE_FN, KC_SPACE), KC_KP_0, KC_PDOT),
/* Layer 5: HHKB mode (HHKB Fn)
* ,-----------------------------------------------------------------------------------------.
@@ -183,7 +183,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
*/
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION),
- [2] = ACTION_LAYER_TAP_KEY(SPACE_FN, KC_SPACE),
[3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN),
[4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA),
[5] = ACTION_DEFAULT_LAYER_SET(BASE),
diff --git a/keyboards/hs60/v2/chconf.h b/keyboards/hs60/v2/chconf.h
index 1d9f12ff1f..aac3303705 100644
--- a/keyboards/hs60/v2/chconf.h
+++ b/keyboards/hs60/v2/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/hs60/v2/halconf.h b/keyboards/hs60/v2/halconf.h
index eda293c49b..0cb7998f5e 100644
--- a/keyboards/hs60/v2/halconf.h
+++ b/keyboards/hs60/v2/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
-#endif
-
-/**
- * @brief Enables the QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/hs60/v2/mcuconf.h b/keyboards/hs60/v2/mcuconf.h
index ce608f904e..ed227b7967 100644
--- a/keyboards/hs60/v2/mcuconf.h
+++ b/keyboards/hs60/v2/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/infinity60/chconf.h b/keyboards/infinity60/chconf.h
index 513ae821db..7f767b6ddc 100644
--- a/keyboards/infinity60/chconf.h
+++ b/keyboards/infinity60/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/infinity60/halconf.h b/keyboards/infinity60/halconf.h
index b87b0635c4..de0f29ce6e 100644
--- a/keyboards/infinity60/halconf.h
+++ b/keyboards/infinity60/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/infinity60/led_controller.c b/keyboards/infinity60/led_controller.c
index f319f8c688..bc24574553 100644
--- a/keyboards/infinity60/led_controller.c
+++ b/keyboards/infinity60/led_controller.c
@@ -110,26 +110,26 @@ uint8_t pwm_register_array[9] = {0};
msg_t is31_select_page(uint8_t page) {
tx[0] = IS31_COMMANDREGISTER;
tx[1] = page;
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, US2ST(IS31_TIMEOUT));
+ return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT));
}
msg_t is31_write_data(uint8_t page, uint8_t *buffer, uint8_t size) {
is31_select_page(page);
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, US2ST(IS31_TIMEOUT));
+ return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, TIME_US2I(IS31_TIMEOUT));
}
msg_t is31_write_register(uint8_t page, uint8_t reg, uint8_t data) {
is31_select_page(page);
tx[0] = reg;
tx[1] = data;
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, US2ST(IS31_TIMEOUT));
+ return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT));
}
msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result) {
is31_select_page(page);
tx[0] = reg;
- return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, US2ST(IS31_TIMEOUT));
+ return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, TIME_US2I(IS31_TIMEOUT));
}
/* ========================
@@ -194,7 +194,7 @@ static THD_FUNCTION(LEDthread, arg) {
// wait for a message (asynchronous)
// (messages are queued (up to LED_MAILBOX_NUM_MSGS) if they can't
// be processed right away
- chMBFetch(&led_mailbox, &msg, TIME_INFINITE);
+ chMBFetchTimeout(&led_mailbox, &msg, TIME_INFINITE);
msg_type = msg & 0xFF; //first byte is action information
msg_args[0] = (msg >> 8) & 0xFF;
msg_args[1] = (msg >> 16) & 0XFF;
diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c
index 4c0b8828a5..6fda6ac95f 100644
--- a/keyboards/jd45/keymaps/mjt6u/keymap.c
+++ b/keyboards/jd45/keymaps/mjt6u/keymap.c
@@ -26,9 +26,9 @@ enum jd45_keycodes
#define LAYER_TOGGLE_DELAY 900
#define __MOD__ KC_TRNS
-#define F_FNSPC F(0)
-#define F_NUMSPC F(1)
-#define F_FNTAB F(2)
+#define F_FNSPC LT(_NUMSYM, KC_SPC)
+#define F_NUMSPC LT(_NUMPAD, KC_SPC)
+#define F_FNTAB LT(_FUNCTION, KC_TAB)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( \
@@ -81,12 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),
- [1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC),
- [2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB),
-};
-
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
diff --git a/keyboards/jm60/chconf.h b/keyboards/jm60/chconf.h
index 513ae821db..7f767b6ddc 100644
--- a/keyboards/jm60/chconf.h
+++ b/keyboards/jm60/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/jm60/halconf.h b/keyboards/jm60/halconf.h
index 8b9724b1a3..16f32117d5 100644
--- a/keyboards/jm60/halconf.h
+++ b/keyboards/jm60/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/k_type/chconf.h b/keyboards/k_type/chconf.h
index 513ae821db..7f767b6ddc 100644
--- a/keyboards/k_type/chconf.h
+++ b/keyboards/k_type/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/k_type/halconf.h b/keyboards/k_type/halconf.h
index b87b0635c4..de0f29ce6e 100644
--- a/keyboards/k_type/halconf.h
+++ b/keyboards/k_type/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/katana60/keymaps/rominronin/keymap.c
index 7af9ab87f3..754b552b24 100644
--- a/keyboards/katana60/keymaps/rominronin/keymap.c
+++ b/keyboards/katana60/keymaps/rominronin/keymap.c
@@ -64,28 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
- [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
-};
-
-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;
-};
-
-
void matrix_init_user(void) {
}
diff --git a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c
index ba12e1bf53..605e9f1004 100644
--- a/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c
+++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c
@@ -43,13 +43,8 @@ enum {
[TD_ZERO_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_ENT)
};
*/
- // Enable these functions using FUNC(n) macro.
- const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
- [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter,
- };
-#define SPC_LW FUNC(0)
-#define ENT_RS FUNC(1)
+#define SPC_LW LT(_LOWER, KC_SPC)
+#define ENT_RS LT(_RAISE, KC_ENT)
#define FNC MO(_FUNCTION)
#define MSE MO(_MOUSE)
#define PIPE M(R_PIPE)
diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c
index f3eb24eb05..024df59127 100644
--- a/keyboards/kinesis/keymaps/milestogo/keymap.c
+++ b/keyboards/kinesis/keymaps/milestogo/keymap.c
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,
TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,
KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,
- KC_GRAVE, KC_ESC, KC_FN4, KC_FN5,
+ KC_GRAVE, KC_ESC, KC_FN4, LT(_SYMB, KC_RIGHT),
KC_LCTL,KC_LALT,
KC_DEL,
KC_BSPC, KC_DEL ,TT(_MOUSE) ,
@@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS,
KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT,
KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
- KC_FN6, KC_FN7, KC_LBRC ,KC_RBRC,
+ LT(_SYMB, KC_UP), KC_FN7, KC_LBRC ,KC_RBRC,
KC_RALT,KC_RGUI,
KC_PGUP,
KC_PGDN,KC_ENTER ,KC_SPC
@@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC,
_______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD,
_______, KC_6, KC_7, KC_8, KC_9, KC_PIPE,
- _______, KC_COLON, KC_FN4, KC_FN5,
+ _______, KC_COLON, KC_FN4, LT(_SYMB, KC_RIGHT),
_______, _______,
_______,
_______, _______, RESET,
@@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______,
KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV,
KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX,
- KC_FN6, KC_FN7, KC_BSLS, XXXXXXX,
+ LT(_SYMB, KC_UP), KC_FN7, KC_BSLS, XXXXXXX,
_______, _______,
_______,
_______, _______, _______
@@ -149,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______,
_______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______,
_______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______,
- _______, _______, KC_FN4, KC_FN5,
+ _______, _______, KC_FN4, LT(_SYMB, KC_RIGHT),
_______, _______,
_______,
_______, _______, RESET,
@@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, KC_PLUS, KC_MINS, _______, _______,
_______, _______, KC_EQL, KC_PIPE, _______, _______,
_______, _______, _______, _______, _______, _______,
- KC_FN6, KC_FN7, _______, _______,
+ LT(_SYMB, KC_UP), KC_FN7, _______, _______,
_______, _______,
_______,
_______, _______, _______
@@ -265,9 +265,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TOGGLE(_MOUSE) ,
- [5]= ACTION_LAYER_TAP_KEY(_SYMB,KC_RIGHT),
[4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT),
- [6]= ACTION_LAYER_TAP_KEY(_SYMB,KC_UP),
[7]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_DOWN),
diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c
index a5ad8e32e8..baa4e0852a 100644
--- a/keyboards/lets_split/keymaps/adam/keymap.c
+++ b/keyboards/lets_split/keymaps/adam/keymap.c
@@ -11,6 +11,9 @@ extern keymap_config_t keymap_config;
#define FLOCK 1 // symbols arrows and F keys on F held down
#define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down
+#define FLOCK_F LT(FLOCK, KC_F)
+#define FLOCK_J LT(JLOCK, KC_J)
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
@@ -27,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT ( \
TD(1), KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, \
- SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), F(FLOCK), GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), F(JLOCK), CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \
+ SFT_T(KC_A), ALT_T(KC_S),CTL_T(KC_D), FLOCK_F, GUI_T(KC_G), KC_BSPC, KC_DELETE, GUI_T(KC_H), FLOCK_J, CTL_T(KC_K), ALT_T(KC_L), SFT_T(KC_SCLN), \
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOTE
),
[FLOCK] = LAYOUT ( \
@@ -44,10 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-const uint16_t PROGMEM fn_actions[] = {
- [FLOCK] = ACTION_LAYER_TAP_KEY(FLOCK,KC_F),
- [JLOCK] = ACTION_LAYER_TAP_KEY(JLOCK,KC_J)
-};
#ifdef TAP_DANCE_ENABLE
void tap_1(qk_tap_dance_state_t *state, void *user_data) {
switch (state->count) {
diff --git a/keyboards/matrix/noah/boards/noah_bd/board.c b/keyboards/matrix/noah/boards/noah_bd/board.c
index 7fd6a60b5f..68cf23cddc 100644
--- a/keyboards/matrix/noah/boards/noah_bd/board.c
+++ b/keyboards/matrix/noah/boards/noah_bd/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,20 +124,94 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB1(STM32_GPIO_EN_MASK);
+ rccEnableAHB1(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
+#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+
+ stm32_gpio_init();
stm32_clock_init();
}
@@ -128,4 +264,5 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+
}
diff --git a/keyboards/matrix/noah/chconf.h b/keyboards/matrix/noah/chconf.h
index 228a0827d8..7dc4f84a8a 100644
--- a/keyboards/matrix/noah/chconf.h
+++ b/keyboards/matrix/noah/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,12 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#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
+#endif
/** @} */
@@ -127,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -145,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -153,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -162,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -170,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -181,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -189,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -199,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -209,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -219,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -227,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -237,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -246,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -257,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -267,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -276,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -288,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -297,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -308,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -324,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -333,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -342,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -352,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -360,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -379,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -389,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -400,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -412,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -420,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
@@ -459,8 +648,6 @@
/* IRQ epilogue code here.*/ \
}
-#define ARM_WFI_IMPL __WFI
-
/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h
index a5a77067a6..ccedd43ccf 100644
--- a/keyboards/matrix/noah/config.h
+++ b/keyboards/matrix/noah/config.h
@@ -39,12 +39,7 @@
/* indicator rgb */
#define WS2812_LED_N 7
#define RGBLED_NUM WS2812_LED_N
-#define WS2812_TIM_N 3
-#define WS2812_TIM_CH 3
-#define PORT_WS2812 GPIOB
-#define PIN_WS2812 1
-#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
-#define WS2812_DMA_CHANNEL 5 // DMA channel for TIMx_UP
+#define RGB_DI_PIN B1
#define RGBLIGHT_ANIMATIONS
//#define WS2812_EXTERNAL_PULLUP
diff --git a/keyboards/matrix/noah/halconf.h b/keyboards/matrix/noah/halconf.h
index 8c42571983..2fccb45e1d 100644
--- a/keyboards/matrix/noah/halconf.h
+++ b/keyboards/matrix/noah/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#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 QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 256
+#define SERIAL_USB_BUFFERS_SIZE 256
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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 FALSE
+#define SPI_USE_MUTUAL_EXCLUSION FALSE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c
index 184be43704..64069148e5 100644
--- a/keyboards/matrix/noah/noah.c
+++ b/keyboards/matrix/noah/noah.c
@@ -7,7 +7,7 @@
#ifdef RGBLIGHT_ENABLE
#include <string.h>
#include "rgblight.h"
-#include "ws2812_f4.h"
+#include "ws2812.h"
extern rgblight_config_t rgblight_config;
// led 0 for caps lock, led 1 for scroll lock, led 3 for num lock
@@ -58,7 +58,6 @@ void matrix_init_kb(void) {
__attribute__((weak))
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
- ws2812_init();
rgblight_enable();
#endif
diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk
index 68163386f1..c24cfd9069 100644
--- a/keyboards/matrix/noah/rules.mk
+++ b/keyboards/matrix/noah/rules.mk
@@ -53,4 +53,4 @@ RGBLIGHT_CUSTOM_DRIVER = yes
# project specific files
SRC += \
matrix.c \
- ws2812_f4.c
+ ws2812.c
diff --git a/keyboards/matrix/noah/ws2812_f4.c b/keyboards/matrix/noah/ws2812_f4.c
deleted file mode 100644
index 7536d6d8c2..0000000000
--- a/keyboards/matrix/noah/ws2812_f4.c
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * @file ws2812.c
- * @author Austin Glaser <austin.glaser@gmail.com>, Joerg Wangemann <joerg.wangemann@gmail.com>
- * @brief WS2812 LED driver
- *
- * Copyright (C) 2016 Austin Glaser, 2017 Joerg Wangemann
- *
- * This software may be modified and distributed under the terms
- * of the MIT license. See the LICENSE file for details.
- *
- * @todo Put in names and descriptions of variables which need to be defined to use this file
- *
- * @addtogroup WS2812
- * @{
- */
-
-/* --- PRIVATE DEPENDENCIES ------------------------------------------------- */
-
-// This Driver
-#include "ws2812_f4.h"
-
-// Standard
-#include <stdint.h>
-
-// ChibiOS
-#include "ch.h"
-#include "hal.h"
-
-#include "wait.h"
-// Application
-//#include "board.h"
-
-// TODO: Add these #define's to the headers of your project.
-// Pin, timer and dma are all connected, check them all if you change one.
-// Tested with STM32F4, working at 144 or 168 MHz.
-//#define WS2812_LED_N 2 // Number of LEDs
-//#define PORT_WS2812 GPIOB
-//#define PIN_WS2812 9
-//#define WS2812_TIM_N 4 // timer, 1-11
-//#define WS2812_TIM_CH 3 // timer channel, 0-3
-//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
-//#define WS2812_DMA_CHANNEL 6 // DMA channel for TIMx_UP
-// The WS2812 expects 5V signal level (or at least 0.7 * VDD). Sometimes it works
-// with a 3V signal level, otherwise the easiest way to get the signal level to 5V
-// is to add an external pullup resistor from the DI pin to 5V (10k will do) and
-// configure the pin as open drain.
-// (An SMD resistor is easily solders on the connections of a light strip)
-// Uncomment the next line if an external pullup resistor is used.
-//#define WS2812_EXTERNAL_PULLUP
-
-/* --- CONFIGURATION CHECK -------------------------------------------------- */
-
-#if !defined(WS2812_LED_N)
- #error WS2812 LED chain length not specified
-#elif WS2812_LED_N <= 0
- #error WS2812 LED chain length set to invalid value
-#endif
-
-#if !defined(WS2812_TIM_N)
- #error WS2812 timer not specified
-#endif
-#if defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32F7XX)
- #if WS2812_TIM_N <= 2
- #define WS2812_AF 1
- #elif WS2812_TIM_N <= 5
- #define WS2812_AF 2
- #elif WS2812_TIM_N <= 11
- #define WS2812_AF 3
- #endif
-#elif !defined(WS2812_AF)
- #error WS2812_AF timer alternate function not specified
-#endif
-
-#if !defined(WS2812_TIM_CH)
- #error WS2812 timer channel not specified
-#elif WS2812_TIM_CH >= 4
- #error WS2812 timer channel set to invalid value
-#endif
-
-/* --- PRIVATE CONSTANTS ---------------------------------------------------- */
-
-#define WS2812_PWM_FREQUENCY (STM32_SYSCLK/2) /**< Clock frequency of PWM, must be valid with respect to system clock! */
-#define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY/800000) /**< Clock period in ticks. 1 / 800kHz = 1.25 uS (as per datasheet) */
-
-/**
- * @brief Number of bit-periods to hold the data line low at the end of a frame
- *
- * The reset period for each frame must be at least 50 uS; so we add in 50 bit-times
- * of zeroes at the end. (50 bits)*(1.25 uS/bit) = 62.5 uS, which gives us some
- * slack in the timing requirements
- */
-#define WS2812_RESET_BIT_N (50)
-#define WS2812_COLOR_BIT_N (WS2812_LED_N*24) /**< Number of data bits */
-#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */
-
-/**
- * @brief High period for a zero, in ticks
- *
- * Per the datasheet:
- * WS2812:
- * - T0H: 200 nS to 500 nS, inclusive
- * - T0L: 650 nS to 950 nS, inclusive
- * WS2812B:
- * - T0H: 200 nS to 500 nS, inclusive
- * - T0L: 750 nS to 1050 nS, inclusive
- *
- * The duty cycle is calculated for a high period of 350 nS.
- */
-#define WS2812_DUTYCYCLE_0 (WS2812_PWM_FREQUENCY/(1000000000/450))
-
-/**
- * @brief High period for a one, in ticks
- *
- * Per the datasheet:
- * WS2812:
- * - T1H: 550 nS to 850 nS, inclusive
- * - T1L: 450 nS to 750 nS, inclusive
- * WS2812B:
- * - T1H: 750 nS to 1050 nS, inclusive
- * - T1L: 200 nS to 500 nS, inclusive
- *
- * The duty cycle is calculated for a high period of 800 nS.
- * This is in the middle of the specifications of the WS2812 and WS2812B.
- */
-#define WS2812_DUTYCYCLE_1 (WS2812_PWM_FREQUENCY/(1000000000/900))
-
-/* --- PRIVATE MACROS ------------------------------------------------------- */
-
-/**
- * @brief Generates a reference to a numbered PWM driver
- *
- * @param[in] n: The driver (timer) number
- *
- * @return A reference to the driver
- */
-#define PWMD(n) CONCAT_EXPANDED_SYMBOLS(PWMD, n)
-
-#define WS2812_PWMD PWMD(WS2812_TIM_N) /**< The PWM driver to use for the LED chain */
-
-/**
- * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given bit
- *
- * @param[in] led: The led index [0, @ref WS2812_LED_N)
- * @param[in] byte: The byte number [0, 2]
- * @param[in] bit: The bit number [0, 7]
- *
- * @return The bit index
- */
-#define WS2812_BIT(led, byte, bit) (24*(led) + 8*(byte) + (7 - (bit)))
-
-/**
- * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
- *
- * @note The red byte is the middle byte in the color packet
- *
- * @param[in] led: The led index [0, @ref WS2812_LED_N)
- * @param[in] bit: The bit number [0, 7]
- *
- * @return The bit index
- */
-#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
-
-/**
- * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
- *
- * @note The green byte is the first byte in the color packet
- *
- * @param[in] led: The led index [0, @ref WS2812_LED_N)
- * @param[in] bit: The bit number [0, 7]
- *
- * @return The bit index
- */
-#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
-
-/**
- * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
- *
- * @note The blue byte is the last byte in the color packet
- *
- * @param[in] led: The led index [0, @ref WS2812_LED_N)
- * @param[in] bit: The bit index [0, 7]
- *
- * @return The bit index
- */
-#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
-
-/* --- PRIVATE VARIABLES ---------------------------------------------------- */
-
-static uint32_t ws2812_frame_buffer[WS2812_BIT_N + 1]; /**< Buffer for a frame */
-
-/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */
-/*
- * Gedanke: Double-buffer type transactions: double buffer transfers using two memory pointers for
-the memory (while the DMA is reading/writing from/to a buffer, the application can
-write/read to/from the other buffer).
- */
-
-void ws2812_init(void)
-{
- // Initialize led frame buffer
- uint32_t i;
- for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle
- for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero
- // Configure pin as AF output. If there's an external pull up resistor the signal level is brought to 5V using open drain mode.
-#ifdef WS2812_EXTERNAL_PULLUP
- palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(WS2812_AF) | PAL_STM32_OTYPE_OPENDRAIN);
-#else
- palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(WS2812_AF) | PAL_STM32_OTYPE_PUSHPULL); //PAL_MODE_STM32_ALTERNATE_PUSHPULL);
-#endif
- //palClearPad(PORT_WS2812, PIN_WS2812);
- //wait_ms(1);
- // PWM Configuration
- #pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
- static const PWMConfig ws2812_pwm_config = {
- .frequency = WS2812_PWM_FREQUENCY,
- .period = WS2812_PWM_PERIOD, //Mit dieser Periode wird UDE-Event erzeugt und ein neuer Wert (Länge WS2812_BIT_N) vom DMA ins CCR geschrieben
- .callback = NULL,
- .channels = {
- [0 ... 3] = {.mode = PWM_OUTPUT_DISABLED, .callback = NULL}, // Channels default to disabled
- [WS2812_TIM_CH] = {.mode = PWM_OUTPUT_ACTIVE_HIGH, .callback = NULL}, // Turn on the channel we care about
- },
- .cr2 = 0,
- .dier = TIM_DIER_UDE, // DMA on update event for next period
- };
- #pragma GCC diagnostic pop // Restore command-line warning options
-
- // Configure DMA
- //dmaInit(); // Joe added this
- dmaStreamAllocate(WS2812_DMA_STREAM, 10, NULL, NULL);
- dmaStreamSetPeripheral(WS2812_DMA_STREAM, &(WS2812_PWMD.tim->CCR[WS2812_TIM_CH])); // Ziel ist der An-Zeit im Cap-Comp-Register
- dmaStreamSetMemory0(WS2812_DMA_STREAM, ws2812_frame_buffer);
- dmaStreamSetTransactionSize(WS2812_DMA_STREAM, WS2812_BIT_N);
- dmaStreamSetMode(WS2812_DMA_STREAM,
- STM32_DMA_CR_CHSEL(WS2812_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD |
- STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3));
- // M2P: Memory 2 Periph; PL: Priority Level
-
- // Start DMA
- dmaStreamEnable(WS2812_DMA_STREAM);
-
- // Configure PWM
- // NOTE: It's required that preload be enabled on the timer channel CCR register. This is currently enabled in the
- // ChibiOS driver code, so we don't have to do anything special to the timer. If we did, we'd have to start the timer,
- // disable counting, enable the channel, and then make whatever configuration changes we need.
- pwmStart(&WS2812_PWMD, &ws2812_pwm_config);
- pwmEnableChannel(&WS2812_PWMD, WS2812_TIM_CH, 0); // Initial period is 0; output will be low until first duty cycle is DMA'd in
-}
-
-ws2812_err_t ws2812_write_led(uint32_t led_number, uint8_t r, uint8_t g, uint8_t b)
-{
- // Check for valid LED
- if (led_number > WS2812_LED_N) return WS2812_LED_INVALID;
-
- // Write color to frame buffer
- for (uint32_t bit = 0; bit < 8; bit++) {
- ws2812_frame_buffer[WS2812_RED_BIT(led_number, bit)] = ((r >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0;
- ws2812_frame_buffer[WS2812_GREEN_BIT(led_number, bit)] = ((g >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0;
- ws2812_frame_buffer[WS2812_BLUE_BIT(led_number, bit)] = ((b >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0;
- }
-
- // Success
- return WS2812_SUCCESS;
-}
-
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds)
-{
- for(int i = 0; i < number_of_leds; i++) {
- ws2812_write_led(i, ledarray[i].r, ledarray[i].g, ledarray[i].b);
- }
-}
-
-/** @} addtogroup WS2812 */
diff --git a/keyboards/matrix/noah/ws2812_f4.h b/keyboards/matrix/noah/ws2812_f4.h
deleted file mode 100644
index 245bd15fef..0000000000
--- a/keyboards/matrix/noah/ws2812_f4.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * @file ws2812.h
- * @author Austin Glaser <austin.glaser@gmail.com>
- * @brief Interface to WS2812 LED driver
- *
- * Copyright (C) 2016 Austin Glaser
- *
- * This software may be modified and distributed under the terms
- * of the MIT license. See the LICENSE file for details.
- *
- * @todo Put in names and descriptions of variables which need to be defined to use this file
- */
-
-#ifndef WS2812_H_
-#define WS2812_H_
-
-/**
- * @defgroup WS2812 WS2812 Driver
- * @{
- *
- * @brief DMA-based WS2812 LED driver
- *
- * A driver for WS2812 LEDs
- */
-
-/* --- PUBLIC DEPENDENCIES -------------------------------------------------- */
-
-// Standard
-#include <stdint.h>
-#include "color.h"
-
-/* --- PUBLIC MACROS -------------------------------------------------------- */
-
-/**
- * @brief Concatenates two symbols s1 and s2 exactly, without expanding either
- *
- * @param[in] s1: The first symbol to concatenate
- * @param[in] s2: The second symbol to concatenate
- *
- * @return A single symbol containing s1 and s2 concatenated without expansion
- */
-#define CONCAT_SYMBOLS(s1, s2) s1##s2
-
-/**
- * @brief Concatenate the symbols s1 and s2, expanding both of them
- *
- * This is important because simply applying s1##s2 doesn't expand them if they're
- * preprocessor tokens themselves
- *
- * @param[in] s1: The first symbol to concatenate
- * @param[in] s2: The second symbol to concatenate
- *
- * @return A single symbol containing s1 expanded followed by s2 expanded
- */
-#define CONCAT_EXPANDED_SYMBOLS(s1, s2) CONCAT_SYMBOLS(s1, s2)
-
-/* --- PUBLIC CONSTANTS ----------------------------------------------------- */
-
-/**
- * @brief Return codes from ws2812 interface functions
- */
-typedef enum {
- WS2812_SUCCESS = 0x00, /**< Operation completeed successfully */
- WS2812_LED_INVALID, /**< Attempted to index an invalid LED (@ref WS2812_N_LEDS) */
- MAX_WS2812_ERR, /**< Total number of possible error codes */
- WS2812_ERR_INVALID /**< Invalid error value */
-} ws2812_err_t;
-
-/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */
-
-/**
- * @brief Initialize the driver
- *
- * After this function is called, all necessary background tasks will be started.
- * The frame is initially dark.
- */
-void ws2812_init(void);
-
-/**
- * @brief Write the value of a single LED in the chain
- *
- * The color value is written to a frame buffer, and will not
- * be updated until the next frame is written. Frames are written
- * at the maximum possible speed -- the longest latency between a
- * call to this function and the value being displayed is
- * 1.25uS*(24*@ref WS2812_LED_N + 50)
- *
- * @param[in] led_number: The index of the LED to be written. Must be strictly less than
- * @ref WS2812_N_LEDS
- * @param[in] r: The red level of the LED
- * @param[in] g: The green level of the LED
- * @param[in] b: The blue level of the LED
- *
- * @retval WS2812_SUCCESS: The write was successful
- * @retval WS2812_LED_INVALID: The write was to an invalid LED index
- */
-ws2812_err_t ws2812_write_led(uint32_t led_number, uint8_t r, uint8_t g, uint8_t b);
-
-void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
-/** @} defgroup WS2812 */
-
-#endif // ifndef WS2812_H_
diff --git a/keyboards/nk65/chconf.h b/keyboards/nk65/chconf.h
index 1d9f12ff1f..aac3303705 100755..100644
--- a/keyboards/nk65/chconf.h
+++ b/keyboards/nk65/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM TRUE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK TRUE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/nk65/halconf.h b/keyboards/nk65/halconf.h
index c3e0cbb728..9306b2cfd8 100755..100644
--- a/keyboards/nk65/halconf.h
+++ b/keyboards/nk65/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,153 +28,190 @@
#ifndef HALCONF_H
#define HALCONF_H
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
+
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC TRUE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC TRUE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT TRUE
+#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
-#endif
-
-/**
- * @brief Enables the QSPI subsystem.
- */
-#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
-#define HAL_USE_QSPI FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -186,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -194,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -205,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -224,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -250,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -262,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -271,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -281,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -294,7 +394,7 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
@@ -305,7 +405,7 @@
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -320,7 +420,7 @@
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
#endif
/**
@@ -328,7 +428,7 @@
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_NUMBER 2
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -340,15 +440,32 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
#endif
/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
+#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
/*===========================================================================*/
@@ -360,7 +477,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
-#define UART_USE_WAIT FALSE
+#define UART_USE_WAIT FALSE
#endif
/**
@@ -368,7 +485,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define UART_USE_MUTUAL_EXCLUSION FALSE
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -380,7 +497,27 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
#endif /* HALCONF_H */
diff --git a/keyboards/nk65/mcuconf.h b/keyboards/nk65/mcuconf.h
index ce608f904e..ed227b7967 100755..100644
--- a/keyboards/nk65/mcuconf.h
+++ b/keyboards/nk65/mcuconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
*/
#define STM32F3xx_MCUCONF
+#define STM32F303_MCUCONF
/*
* HAL driver system settings.
@@ -66,9 +67,28 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
-#undef STM32_HSE_BYPASS
-// #error "oh no"
-// #endif
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 15
+#define STM32_IRQ_EXTI20_PRIORITY 15
+#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
+#define STM32_IRQ_EXTI30_32_PRIORITY 6
+#define STM32_IRQ_EXTI33_PRIORITY 6
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
/*
* ADC driver system settings.
@@ -115,25 +135,6 @@
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
/*
- * EXT driver system settings.
- */
-#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
-#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
-
-/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
#define STM32_GPT_USE_TIM6 TRUE
#define STM32_GPT_USE_TIM7 TRUE
#define STM32_GPT_USE_TIM8 TRUE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+#define STM32_GPT_USE_TIM17 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+#define STM32_PWM_USE_TIM17 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c
index 19adfb933e..754dc5c4dd 100644
--- a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c
+++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c
@@ -1,9 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -11,15 +14,82 @@
limitations under the License.
*/
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -54,23 +124,119 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
+#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -98,4 +264,5 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+
}
diff --git a/keyboards/peiorisboards/ixora/chconf.h b/keyboards/peiorisboards/ixora/chconf.h
index e811705ba3..6d169b36e9 100644
--- a/keyboards/peiorisboards/ixora/chconf.h
+++ b/keyboards/peiorisboards/ixora/chconf.h
@@ -1,9 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -12,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -26,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -38,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -55,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -78,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -91,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -100,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -119,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -137,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -145,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -154,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -162,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -173,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -181,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -191,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -201,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -211,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -219,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -229,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -238,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -249,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -259,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -268,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -280,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -289,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -300,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -316,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -325,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -334,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -344,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -352,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -371,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -381,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -392,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -404,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -412,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/peiorisboards/ixora/halconf.h b/keyboards/peiorisboards/ixora/halconf.h
index bc2b66f2e1..25f3fe5edf 100644
--- a/keyboards/peiorisboards/ixora/halconf.h
+++ b/keyboards/peiorisboards/ixora/halconf.h
@@ -1,9 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -31,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -176,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT FALSE
+#define ADC_USE_WAIT FALSE
#endif
/**
@@ -184,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION FALSE
+#define ADC_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -195,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -206,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -214,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -240,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -252,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -261,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -271,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -284,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -306,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 256
+#define SERIAL_USB_BUFFERS_SIZE 256
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -322,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT FALSE
+#define SPI_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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 FALSE
+#define SPI_USE_MUTUAL_EXCLUSION FALSE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -342,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
-/** @} */ \ No newline at end of file
+/** @} */
diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c
index 50123f2ee9..c028e7949f 100644
--- a/keyboards/planck/keymaps/ab/keymap.c
+++ b/keyboards/planck/keymaps/ab/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -30,8 +24,8 @@ extern keymap_config_t keymap_config;
#define CUS2 M(_CUS2)
// Func macro definitions.
-#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER
-#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE
+#define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER
+#define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE
#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK)
#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift
#define ZM_NRM FUNC(4) // Zoom normal
@@ -41,8 +35,6 @@ extern keymap_config_t keymap_config;
// Enable these functions using FUNC(n) macro.
const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN),
- [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP),
[2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS),
[3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
[4] = ACTION_MODS_KEY(MOD_LCTL, KC_0),
@@ -53,30 +45,30 @@ const uint16_t PROGMEM fn_actions[] = {
// This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = { /* QWERTY */
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
- {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_LOWER] = { /* LOWER */
- {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
-[_RAISE] = { /* RAISE */
- {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_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE}
-},
-[_CUSTOM] = { /* CUSTOM */
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MOB, KC_TRNS, CUS1, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-}
+[_QWERTY] = LAYOUT_planck_grid( /* QWERTY */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT,
+ KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_LOWER] = LAYOUT_planck_grid( /* LOWER */
+ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[_RAISE] = LAYOUT_planck_grid( /* RAISE */
+ 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_BSLS, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, EM_UNDO, KC_VOLD, KC_VOLU, KC_MUTE
+),
+[_CUSTOM] = LAYOUT_planck_grid( /* CUSTOM */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MOB, KC_TRNS, CUS1, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+)
};
// Set a layer persistently.
diff --git a/keyboards/planck/keymaps/alexey/keymap.c b/keyboards/planck/keymaps/alexey/keymap.c
index 90bdd2c37f..44befdc971 100644
--- a/keyboards/planck/keymaps/alexey/keymap.c
+++ b/keyboards/planck/keymaps/alexey/keymap.c
@@ -1,7 +1,4 @@
-#include "keymap.h"
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "backlight.h"
+#include QMK_KEYBOARD_H
#define _QW 0
#define _LW 1
@@ -10,24 +7,24 @@
// This layout tries to imitate the Atreus keyboard
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QW] = { /* Qwerty */
- {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, MO(_LW)},
- {KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS},
- {M(0), KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT, KC_TRNS}
-},
-[_RS] = { /* RAISE */
- {KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS},
- {KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS},
- {KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_EQL, KC_TRNS}
-},
-[_LW] = { /* LOWER */
- {KC_TRNS, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_DELETE, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_F11, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_TRNS}
-}
+[_QW] = LAYOUT_planck_grid( /* Qwerty */
+ 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, MO(_LW),
+ KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS,
+ M(0), KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT, KC_TRNS
+),
+[_RS] = LAYOUT_planck_grid( /* RAISE */
+ KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS,
+ KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
+ KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_EQL, KC_TRNS
+),
+[_LW] = LAYOUT_planck_grid( /* LOWER */
+ KC_TRNS, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ KC_TRNS, KC_DELETE, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_F11, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_TRNS
+)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/altgr/beakl.h b/keyboards/planck/keymaps/altgr/beakl.h
index a684a6c43d..650613a9d9 100644
--- a/keyboards/planck/keymaps/altgr/beakl.h
+++ b/keyboards/planck/keymaps/altgr/beakl.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V },
- {KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W },
- {KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
-
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)},
- {KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V ,
+ KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W ,
+ KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
+
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W),
+ KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)},
- {TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W),
+ TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V |
@@ -54,12 +54,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)},
- {TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W),
+ TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ..................................................................... BEAKL 8
@@ -74,19 +74,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z },
- {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z ,
+ KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z |
@@ -98,12 +98,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z |
@@ -115,12 +115,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL 8P
@@ -135,19 +135,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X },
- {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X ,
+ KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | R | F | X |
@@ -159,12 +159,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | F | X |
@@ -176,12 +176,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ................................................................... BEAKL 8TX
@@ -196,19 +196,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B },
- {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B ,
+ KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | $ | { | } | J | ^Alt | ^GUI | G | D | R | F | X |
@@ -220,12 +220,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | J | ^Alt | ^GUI | G | [ | ] | ^ | X |
@@ -237,12 +237,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)},
- {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B),
+ S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ................................................................... BEAKL 8TT
@@ -257,19 +257,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B },
- {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B ,
+ KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | $ | { | } | J | Fn | Caps | G | D | R | F | X |
@@ -281,12 +281,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | J | Fn | Caps | G | [ | ] | ^ | X |
@@ -298,12 +298,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)},
- {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B),
+ S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL 10
@@ -318,19 +318,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V },
- {KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V ,
+ KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)},
- {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V),
+ S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | [ | ! | ] | X | ^Alt | ^GUI | G | D | N | M | V |
@@ -342,12 +342,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)},
- {S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)},
- {S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V),
+ S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W),
+ S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | H | O | U | X | ^Alt | ^GUI | G | { | + | } | V |
@@ -359,12 +359,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V)},
- {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V),
+ S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ............................................................... BEAKL Mash Up
@@ -379,19 +379,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | N | M | X |
@@ -403,12 +403,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | M | X |
@@ -420,12 +420,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL MU
@@ -440,19 +440,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | $ | { | } | Z | Fn | Caps | G | D | N | M | X |
@@ -464,12 +464,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Fn | Caps | G | [ | ] | ^ | X |
@@ -481,12 +481,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL SP
@@ -501,19 +501,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X |
@@ -525,12 +525,12 @@
// | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X |
@@ -542,12 +542,12 @@
// | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL GR
@@ -562,19 +562,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X |
@@ -586,12 +586,12 @@
// | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {SM_K, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ SM_K, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X |
@@ -603,10 +603,10 @@
// | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W },
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W ,
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/altgr/colemak.h b/keyboards/planck/keymaps/altgr/colemak.h
index 8810ba82a5..694f163289 100644
--- a/keyboards/planck/keymaps/altgr/colemak.h
+++ b/keyboards/planck/keymaps/altgr/colemak.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
- {KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O },
- {KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
+ KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O ,
+ KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : |
@@ -54,12 +54,12 @@
// | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ..................................................................... ColemaX
@@ -74,19 +74,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
- {KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O },
- {KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
+ KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O ,
+ KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : |
@@ -98,12 +98,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : |
@@ -115,10 +115,10 @@
// | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/altgr/common/chord_layout.h b/keyboards/planck/keymaps/altgr/common/chord_layout.h
index 2c785d56ca..b6922705f3 100644
--- a/keyboards/planck/keymaps/altgr/common/chord_layout.h
+++ b/keyboards/planck/keymaps/altgr/common/chord_layout.h
@@ -14,12 +14,12 @@
// | | | | | | | | f() | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_EDIT] = {
- {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______},
- {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______},
- {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______},
- },
+ [_EDIT] = LAYOUT_planck_grid(
+ _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______,
+ UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______,
+ _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______
+ ),
// ................................................................ Adjust Layer
@@ -33,9 +33,9 @@
// | | | | f() | | | | | f() | | | |
// `-----------------------------------------------------------------------------------'
- [_ADJUST] = {
- {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_ADJUST] = LAYOUT_planck_grid(
+ PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h
index 528020e741..102d736acb 100644
--- a/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h
+++ b/keyboards/planck/keymaps/altgr/common/number_fkey_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | | | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___
#else
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___
#endif
- },
+ ),
#else
// .-----------------------------------------------------------------------------------.
// | | F | E | D | | | | / | 7 | 8 | 9 | * |
@@ -36,16 +36,16 @@
// | | f() | | = | 0 | |
// '-----------------------------------------------------------------------------------'
- [_NUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___
#else
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___
#endif
- },
+ ),
// .-----------------------------------------------------------------------------------.
// | | | | | | | | { | & | ? | : | } |
@@ -57,12 +57,12 @@
// | | f() | | \ | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMSYM] = {
- {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR},
- {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN},
- {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC},
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___},
- },
+ [_NUMSYM] = LAYOUT_planck_grid(
+ _______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR,
+ ___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN,
+ _______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC,
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___
+ ),
#endif
// ............ .................................................. Function Keys
@@ -78,9 +78,9 @@
// | | | | | f() | | | + | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_FNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_FNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/altgr/common/steno_layout.h b/keyboards/planck/keymaps/altgr/common/steno_layout.h
index ab4a6fe011..c1f2b5b24a 100644
--- a/keyboards/planck/keymaps/altgr/common/steno_layout.h
+++ b/keyboards/planck/keymaps/altgr/common/steno_layout.h
@@ -13,12 +13,12 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______
+ ),
#else
// ,-----------------------------------------------------------------------------------.
// | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
@@ -30,10 +30,10 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
- {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_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 ,
+ BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______
+ ),
#endif
diff --git a/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h
index 7986108707..e5c902f2df 100644
--- a/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h
+++ b/keyboards/planck/keymaps/altgr/common/symbol_guifn_layout.h
@@ -13,12 +13,12 @@
// | |Adjust| \ | | f() | |
// '-----------------------------------------------------------------------------------'
- [_SYMBOL] = {
- {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMBOL] = LAYOUT_planck_grid(
+ _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
#else
// .-----------------------------------------------------------------------------------.
// | { | . | * | & | } | | | | Home | Up | End | PgUp |
@@ -30,12 +30,12 @@
// | | | | \ | | f() | |
// '-----------------------------------------------------------------------------------'
- [_SYMBOL] = {
- {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN},
- {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMBOL] = LAYOUT_planck_grid(
+ KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN,
+ KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
// .-----------------------------------------------------------------------------------.
// | | ? | + | ~ | | | | | | | | |
@@ -47,12 +47,12 @@
// | | | | | f() | |
// '-----------------------------------------------------------------------------------'
- [_SYMREG] = {
- {___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___},
- {___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___},
- {___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMREG] = LAYOUT_planck_grid(
+ ___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___,
+ ___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___,
+ ___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
#endif
// ............................................................... Mouse Actions
@@ -67,9 +67,9 @@
// | | | f() | | f() | |
// '-----------------------------------------------------------------------------------'
- [_MOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_MOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/altgr/common/toggle_layout.h b/keyboards/planck/keymaps/altgr/common/toggle_layout.h
index 713d27bbcf..ed74f42522 100644
--- a/keyboards/planck/keymaps/altgr/common/toggle_layout.h
+++ b/keyboards/planck/keymaps/altgr/common/toggle_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | Space| | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_TTNUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_TTNUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______},
+ _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______
#else
- {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______},
+ _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______
#endif
- },
+ ),
// ............ .................................................. Function Keys
@@ -37,12 +37,12 @@
// | | | | f() | | | | + | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTFNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_TTFNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______
+ ),
// ....................................................................... Regex
@@ -56,12 +56,12 @@
// | | | | f() | - | | | + | Space| | | |
// `-----------------------------------------------------------------------------------'
- [_TTREGEX] = {
- {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___},
- {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___},
- {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___},
- {_______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______},
- },
+ [_TTREGEX] = LAYOUT_planck_grid(
+ ___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___,
+ ___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___,
+ ___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___,
+ _______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______
+ ),
// ............................................................ Navigation Layer
@@ -75,12 +75,12 @@
// | | | | f() | | | | | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTCURSOR] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTCURSOR] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
// ............................................................... Mouse Actions
@@ -94,9 +94,9 @@
// | | | | f() | | | | | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTMOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTMOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/altgr/keymap.c b/keyboards/planck/keymaps/altgr/keymap.c
index 5f4d1fdfdb..3ef9690a0a 100644
--- a/keyboards/planck/keymaps/altgr/keymap.c
+++ b/keyboards/planck/keymaps/altgr/keymap.c
@@ -66,17 +66,10 @@
// sudo CPATH=<keymap.c directory>/common make ...
-#include "config.h"
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#ifdef STENO_ENABLE
#include "keymap_steno.h"
#endif
-#ifdef AUDIO_ENABLE
-#include "audio.h"
-#endif
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
@@ -183,7 +176,7 @@ enum planck_keycodes {
#define S_TAB S (KC_TAB)
#define S_UP S (KC_UP)
-#include "tapdance.h"
+#include "common/tapdance.h"
// keycodes
#define ___x___ KC_TRNS
@@ -256,35 +249,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#include "beakl.h"
#include "colemak.h"
#include "qwerty.h"
-#include "steno_layout.h"
+#include "common/steno_layout.h"
// ...................................................... Number / Function Keys
-#include "number_fkey_layout.h"
+#include "common/number_fkey_layout.h"
// ......................................................... Symbol / Navigation
-#include "symbol_guifn_layout.h"
+#include "common/symbol_guifn_layout.h"
// ............................................................... Toggle Layers
#ifdef CENTER_TT
-#include "toggle_layout.h"
+#include "common/toggle_layout.h"
#endif
// ......................................................... Short Cuts / Adjust
-#include "chord_layout.h"
+#include "common/chord_layout.h"
};
// ...................................................................... Sounds
-#include "sounds.h"
+#include "common/sounds.h"
// ........................................................... User Keycode Trap
-#include "keycode_functions.h"
+#include "common/keycode_functions.h"
#define BASE_1 1
#define BASE_2 2
@@ -486,4 +479,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
return true;
}
-#include "init.h"
+#include "common/init.h"
diff --git a/keyboards/planck/keymaps/altgr/qwerty.h b/keyboards/planck/keymaps/altgr/qwerty.h
index d11d0478b3..eed52f0af8 100644
--- a/keyboards/planck/keymaps/altgr/qwerty.h
+++ b/keyboards/planck/keymaps/altgr/qwerty.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P },
- {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
- {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P ,
+ KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
+ KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)},
- {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P),
+ S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN,
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)},
- {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P),
+ S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN,
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P |
@@ -54,11 +54,11 @@
// | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)},
- {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P),
+ S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN,
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/andylikescandy/keymap.c b/keyboards/planck/keymaps/andylikescandy/keymap.c
index f9a7733984..295616f015 100644
--- a/keyboards/planck/keymaps/andylikescandy/keymap.c
+++ b/keyboards/planck/keymaps/andylikescandy/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -60,12 +58,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = {
- {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, SFT_T(KC_ENT) },
- {KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+ [_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,
+ 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, SFT_T(KC_ENT) ,
+ KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -78,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_COLEMAK] = {
- {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, SFT_T(KC_ENT) },
- {KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+ [_COLEMAK] = LAYOUT_planck_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, SFT_T(KC_ENT) ,
+ KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Dvorak REUSED AS COLEMAK
* ,-----------------------------------------------------------------------------------.
@@ -96,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = {
- {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_QUOT},
- {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT) },
- {KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+ [_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_BSPC,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT) ,
+ KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
// /* Dvorak
// * ,-----------------------------------------------------------------------------------.
// * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
@@ -113,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
// * `-----------------------------------------------------------------------------------'
// */
- // [_DVORAK] = {
- // {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 },
- // {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, NAVSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- // },
+ // [_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_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 ,
+ // BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, NAVSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ // ),
//
// /* Lower
// * ,-----------------------------------------------------------------------------------.
@@ -131,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// * | | | | | | | | HOME | PGDN | PGUP | END |
// * `-----------------------------------------------------------------------------------'
// */
-[_LOWER] = {
- { KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, 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_PIPE },
- { _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT },
- { _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END }
-},
+[_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, 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_PIPE ,
+ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT ,
+ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -149,12 +147,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | HOME | PGDN | PGUP | END |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- { KC_GRV, 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT },
- { _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END }
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_GRV, 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
+ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -168,12 +166,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -186,12 +184,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | |Qwerty|Colemk|Dvorak|Plover|
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- {LALT(LCTL(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_CAPSLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX},
- {_______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, XXXXXXX} //PLOVER}
-},
+[_ADJUST] = LAYOUT_planck_grid(
+ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ LALT(LCTL(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_CAPSLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX,
+ _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, XXXXXXX //PLOVER
+),
/* Navigation
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | Home | PgDn | PgUp | End |ctlBsp|
@@ -203,12 +201,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |C+A+S | | | | | | |C+Left|C+Down| C+Up |C+Right|
* `-----------------------------------------------------------------------------------'
*/
-[_NAVIGATION] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) },
- {KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL},
- {LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT},
- {_______, _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT), _______}
-}
+[_NAVIGATION] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) ,
+ KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL,
+ LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT,
+ _______, _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT), _______
+)
};
diff --git a/keyboards/planck/keymaps/angerthosenear/keymap.c b/keyboards/planck/keymaps/angerthosenear/keymap.c
index f22bb1f622..6a497641e6 100644
--- a/keyboards/planck/keymaps/angerthosenear/keymap.c
+++ b/keyboards/planck/keymaps/angerthosenear/keymap.c
@@ -1,31 +1,31 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {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_SLSH, KC_QUOT},
- {KC_LCTL, KC_LGUI, KC_LALT, BL_STEP, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ 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_SLSH, KC_QUOT,
+ KC_LCTL, KC_LGUI, KC_LALT, BL_STEP, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommodate for both spacebar wiring positions
-},
-[1] = { /* WASD + NumPad */
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PMNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PPLS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PENT, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_SPC, KC_P0, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
-[2] = { /* RAISE */
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS},
- {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL},
- {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-}
+),
+[1] = LAYOUT_planck_grid( /* WASD + NumPad */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_PMNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PPLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PENT, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_SPC, KC_P0, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL,
+ KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS),
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+)
};
diff --git a/keyboards/planck/keymaps/austin/keymap.c b/keyboards/planck/keymaps/austin/keymap.c
index 23dc2d4150..16bca79510 100644
--- a/keyboards/planck/keymaps/austin/keymap.c
+++ b/keyboards/planck/keymaps/austin/keymap.c
@@ -1,31 +1,31 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {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},
- {BL_STEP, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ 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,
+ BL_STEP, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Colemak */
- {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_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* RAISE */
- {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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-}
+),
+[1] = LAYOUT_planck_grid( /* Colemak */
+ 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_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC,
+ KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS),
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+)
};
diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c
index ca11be8255..8fe66b3781 100644
--- a/keyboards/planck/keymaps/aviator/keymap.c
+++ b/keyboards/planck/keymaps/aviator/keymap.c
@@ -4,9 +4,7 @@
* Designed for aeronautical data entry on the OLKB Planck.
*/
- #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
- #include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -41,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Data
* ,-----------------------------------------------------------------------------------.
@@ -59,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . |Shift |Enter |
* `-----------------------------------------------------------------------------------'
*/
-[_DATA] = {
- {KC_ESC, KC_HOME, KC_UP, KC_END, ___x___, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC},
- {KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, ___x___, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, KC_ENT},
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_0, KC_DOT, KC_RSFT, KC_ENT}
-},
+[_DATA] = LAYOUT_planck_grid(
+ KC_ESC, KC_HOME, KC_UP, KC_END, ___x___, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC,
+ KC_TAB, KC_LEFT, KC_DOWN, KC_RIGHT, ___x___, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, KC_ENT,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_0, KC_DOT, KC_RSFT, KC_ENT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -77,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Dn |Pg Up | End |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {KC_DEL, 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_GRV, ___x___, ___x___, ___x___, ___x___, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS},
- {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ KC_DEL, 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_GRV, ___x___, ___x___, ___x___, ___x___, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS,
+ _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -95,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | 0 | . |Shift |Enter |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC},
- {_______, KC_F5, KC_F6, KC_F7, KC_F8, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB},
- {_______, KC_F9, KC_F10, KC_F11, KC_F12, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, _______,},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_RSFT, KC_ENT}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, ___x___, KC_N, KC_S, KC_7, KC_8, KC_9, KC_BSPC,
+ _______, KC_F5, KC_F6, KC_F7, KC_F8, ___x___, KC_E, KC_W, KC_4, KC_5, KC_6, KC_TAB,
+ _______, KC_F9, KC_F10, KC_F11, KC_F12, ___x___, KC_PLUS, KC_MINS, KC_1, KC_2, KC_3, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_RSFT, KC_ENT
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -113,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {KC_ESC, RESET, DEBUG, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_DEL},
- {_______, ___x___, ___x___, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DATA, ___x___, ___x___, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, ___x___, ___x___, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ KC_ESC, RESET, DEBUG, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_DEL,
+ _______, ___x___, ___x___, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DATA, ___x___, ___x___, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, ___x___, ___x___, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c
index 4458c32a76..09efbc146f 100644
--- a/keyboards/planck/keymaps/basic/keymap.c
+++ b/keyboards/planck/keymaps/basic/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
// 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.
@@ -19,12 +18,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[0] = {
- {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_RSFT, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[0] = 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,
+ 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_RSFT, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -37,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Reset | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[1] = {
- {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),_______, _______, _______},
- {RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[1] = 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),_______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -55,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Reset | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[2] = {
- {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, _______, _______, _______},
- {RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[2] = 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, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
};
diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c
index 263c4102df..81ba356d3d 100644
--- a/keyboards/planck/keymaps/bone2planck/keymap.c
+++ b/keyboards/planck/keymaps/bone2planck/keymap.c
@@ -1,8 +1,4 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
-#include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
#include "keymap_german.h"
// for intellisense, has to be commented for building
@@ -32,13 +28,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[0] = {
- { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q },
- //{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
- { MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
- { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
- { KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
-},
+[0] = LAYOUT_planck_grid(
+ DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q ,
+ // LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) ,
+ MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) ,
+ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT ,
+ KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL
+),
/* M1 Special Characters
* very ergonomic placement for coding
@@ -52,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[1] = {
- { DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT },
- { _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ },
- { _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
-},
+[1] = LAYOUT_planck_grid(
+ DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT ,
+ _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ ,
+ _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* M2 Navigation & Number Blocks
* very easy to get used to & intuituve placement
@@ -71,12 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[2] = {
- { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS },
- { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT },
- { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ },
- { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
-},
+[2] = LAYOUT_planck_grid(
+ XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS ,
+ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT ,
+ _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ ,
+ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______
+),
/* M3 Switched Navigation & Number Blocks for one handed use
* accessed by sliding from M2 to M3 with thumb
@@ -91,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[3] = {
- { KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX },
- { _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
- { _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ },
- { _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ }
-},
+[3] = LAYOUT_planck_grid(
+ KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX ,
+ _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ ,
+ _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ ,
+ _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______
+),
/* M4 Function & Media Keys
@@ -110,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[4] = {
- { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX },
- { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT },
- { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
- { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
-},
+[4] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX ,
+ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
+ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
+ _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______
+),
/* M5 Switched Function & Media Keys|
@@ -130,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[5] = {
- { XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX },
- { _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ },
- { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ },
- { _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ }
-}
+[5] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX ,
+ _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ ,
+ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ ,
+ _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______
+)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c
index 47eb338a6e..ade4ea30f0 100644
--- a/keyboards/planck/keymaps/brandon/keymap.c
+++ b/keyboards/planck/keymaps/brandon/keymap.c
@@ -1,9 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#include "keymap_plover.h"
-#include "action_tapping.h"
extern keymap_config_t keymap_config;
@@ -46,6 +42,11 @@ enum planck_macros {
#define WM_W LALT(LGUI(KC_LEFT))
#define WM_CNTR LALT(LGUI(KC_C))
+#define LT_NAVS LT(NAVIGATION_LAYER, KC_SCLN)
+#define LT_NAVO LT(NAVIGATION_LAYER, KC_O)
+#define LT_GUIL LT(GUI_LAYER, KC_LBRC)
+#define LT_GUIR LT(GUI_LAYER, KC_RBRC)
+
// Special key codes
enum planck_keycodes {
QWERTY = SAFE_RANGE,
@@ -83,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* / /
* Tap for ] [ --------'-----------------------------------------------------'
*/
- [BASE_QWERTY_LAYER] = {
- {TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT},
- {F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, F(1), F(6)},
- {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC},
- {F(3), ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), F(4)}
- },
+ [BASE_QWERTY_LAYER] = LAYOUT_planck_grid(
+ TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
+ F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, F(6),
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ LT_GUIL, ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), LT_GUIR
+ ),
/* Base layer (Colemak)
* ,-----------------------------------------------------------------------.
@@ -101,12 +102,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------'
*/
- [BASE_COLEMAK_LAYER] = {
- {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______},
- {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, F(2), _______},
- {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [BASE_COLEMAK_LAYER] = LAYOUT_planck_grid(
+ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______,
+ _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, LT_NAVO, _______,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Base layer (Qwerty-Steno)
* ,-----------------------------------------------------------------------.
@@ -119,12 +120,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------'
*/
- [BASE_STENO_LAYER] = {
- {PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM},
- {PV_LOOK, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD},
- {PV_LOOK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ},
- {PV_EXIT, ___x___, ___x___, PV_A, PV_O, _______, _______, PV_E, PV_U, ___x___, ___x___, ___x___}
- },
+ [BASE_STENO_LAYER] = LAYOUT_planck_grid(
+ PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
+ PV_LOOK, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
+ PV_LOOK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
+ PV_EXIT, ___x___, ___x___, PV_A, PV_O, _______, _______, PV_E, PV_U, ___x___, ___x___, ___x___
+ ),
/* Numeric layer
* ,-----------------------------------------------------------------------.
@@ -137,12 +138,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | Backspace | | | | | |
* `-----------------------------------------------------------------------'
*/
- [LOWER_LAYER] = {
- {LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3)},
- {F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6)},
- {KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC},
- {F(3), ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), F(4)}
- },
+ [LOWER_LAYER] = LAYOUT_planck_grid(
+ LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3),
+ F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6),
+ KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ LT_GUIL, ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), LT_GUIR
+ ),
/* Symbol layer
* ,-----------------------------------------------------------------------.
@@ -155,12 +156,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | Delete | | | | | |
* `-----------------------------------------------------------------------'
*/
- [RAISE_LAYER] = {
- {_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(KC_3)},
- {_______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_QUOT, S(KC_QUOT), _______},
- {_______, KC_UNDS, KC_PLUS, KC_TILD, KC_PIPE, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, _______},
- {_______, _______, _______, _______, _______, KC_DEL, KC_DEL, _______, _______, _______, _______, _______}
- },
+ [RAISE_LAYER] = LAYOUT_planck_grid(
+ _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, S(KC_3),
+ _______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), KC_QUOT, S(KC_QUOT), _______,
+ _______, KC_UNDS, KC_PLUS, KC_TILD, KC_PIPE, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, _______,
+ _______, _______, _______, _______, _______, KC_DEL, KC_DEL, _______, _______, _______, _______, _______
+ ),
/* Directional navigation layer
*
@@ -175,12 +176,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------'
*/
- [NAVIGATION_LAYER] = {
- {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
- {_______, ___x___, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, F(1), _______},
- {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______},
- {_______, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, _______}
- },
+ [NAVIGATION_LAYER] = LAYOUT_planck_grid(
+ ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___,
+ _______, ___x___, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, LT_NAVS, _______,
+ _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______,
+ _______, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, _______
+ ),
/* GUI (window management/mouse/media controls) layer
*
@@ -196,12 +197,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------'
* \___ Media ___/ \___ Screen/sleep __/ \___ Volume __/
*/
- [GUI_LAYER] = {
- {_______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, ___x___, ___x___, WM_PREV, WM_NW, WM_N, WM_NE, _______},
- {_______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, ___x___, ___x___, WM_FULL, WM_W, WM_CNTR, WM_E, _______},
- {_______, KC_WH_L, KC_BTN3, KC_WH_R, ___x___, ___x___, ___x___, WM_NEXT, WM_SW, WM_S, WM_SE, _______},
- {_______, KC_MPRV, KC_MPLY, KC_MNXT, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, _______}
- },
+ [GUI_LAYER] = LAYOUT_planck_grid(
+ _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, ___x___, ___x___, WM_PREV, WM_NW, WM_N, WM_NE, _______,
+ _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, ___x___, ___x___, WM_FULL, WM_W, WM_CNTR, WM_E, _______,
+ _______, KC_WH_L, KC_BTN3, KC_WH_R, ___x___, ___x___, ___x___, WM_NEXT, WM_SW, WM_S, WM_SE, _______,
+ _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, KC_MUTE, KC_VOLD, KC_VOLU, _______
+ ),
/* Keyboard settings layer
* ,-----------------------------------------------------------------------.
@@ -215,21 +216,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------'
* \_____________\_ Backlight _/
*/
- [KEYBOARD_LAYER] = {
- {___x___, RESET, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
- {___x___, QWERTY, COLEMAK, STENO, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
- {___x___, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, AU_ON, AU_OFF, ___x___},
- {___x___, ___x___, ___x___, ___x___, LOWER, BL_TOGG, BL_TOGG, RAISE, BL_TOGG, BL_DEC, BL_INC, ___x___}
- }
+ [KEYBOARD_LAYER] = LAYOUT_planck_grid(
+ ___x___, RESET, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___,
+ ___x___, QWERTY, COLEMAK, STENO, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___,
+ ___x___, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, ___x___, ___x___, AU_ON, AU_OFF, ___x___,
+ ___x___, ___x___, ___x___, ___x___, LOWER, BL_TOGG, BL_TOGG, RAISE, BL_TOGG, BL_DEC, BL_INC, ___x___
+ )
};
const uint16_t PROGMEM fn_actions[] = {
- // Layer switching
- [1] = ACTION_LAYER_TAP_KEY(NAVIGATION_LAYER, KC_SCOLON),
- [2] = ACTION_LAYER_TAP_KEY(NAVIGATION_LAYER, KC_O),
- [3] = ACTION_LAYER_TAP_KEY(GUI_LAYER, KC_LBRACKET),
- [4] = ACTION_LAYER_TAP_KEY(GUI_LAYER, KC_RBRACKET),
-
// Modifiers
[5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB),
[6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT),
diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c
index f5e9cdbcd8..683b9342d8 100644
--- a/keyboards/planck/keymaps/cbbrowne/keymap.c
+++ b/keyboards/planck/keymaps/cbbrowne/keymap.c
@@ -1,10 +1,4 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
-#include "backlight.h"
-#endif
-#include "config.h"
-#include "quantum.h"
+#include QMK_KEYBOARD_H
#include "version.h"
/* Each layer is given a name to aid in readability, which is then
@@ -119,38 +113,38 @@ enum macro_id {
/* Note that Planck has dimensions 4 rows x 12 columns */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = { /* Qwerty */
- {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE },
- {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT}
+[_QWERTY] = LAYOUT_planck_grid( /* Qwerty */
+ 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE ,
+ KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT
/* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */
-},
-[_RAISE] = { /* RAISE */
- {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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______},
- {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP}
-},
-[_LOWER] = { /* LOWER */
- {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_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, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______},
- {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP}
- },
-[_KEYPAD] = { /* Key Pad */
- {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC},
- {KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE},
- {KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER},
- {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
-
-[_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */
- {ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
- {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
- {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ },
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
-}
+),
+[_RAISE] = LAYOUT_planck_grid( /* RAISE */
+ 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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______,
+ _______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP
+),
+[_LOWER] = LAYOUT_planck_grid( /* LOWER */
+ 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_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, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______,
+ _______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP
+ ),
+[_KEYPAD] = LAYOUT_planck_grid( /* Key Pad */
+ KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC,
+ KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE,
+ KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER,
+ KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
+
+[_ADJUST] = LAYOUT_planck_grid( /* Adjustments - gonna shift the wild tools in here */
+ ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
+ _______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
+ _______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
/* This bit of logic seeds a wee linear congruential random number generator */
diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c
index df57d5828b..23af2277bd 100644
--- a/keyboards/planck/keymaps/chance/keymap.c
+++ b/keyboards/planck/keymaps/chance/keymap.c
@@ -1,14 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -51,12 +42,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, F(0) },
- {KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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, F(0) ,
+ KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -69,12 +60,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -87,12 +78,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -105,12 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| | | | | | | Play | Vol- | Vol+ | Next |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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, _______, _______,KC_HOME, KC_END, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT}
-},
+[_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, _______, _______,KC_HOME, KC_END, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+),
\
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -123,12 +114,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| | | | | | | Play | Vol- | Vol+ | Next |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_PGUP, KC_PGDN, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, 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_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_PGUP, KC_PGDN, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -142,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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
+),
/* Numpad
* ,-----------------------------------------------------------------------------------.
@@ -160,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Exit | Ctrl | Alt | Gui | | 0 | . | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_NUMPAD] = {
- {KC_TAB, XXXXXXX, XXXXXXX, KC_CIRC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_EQL, XXXXXXX, KC_BSPC},
- {KC_ESC, XXXXXXX, XXXXXXX, KC_PERC, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LPRN, KC_RPRN, XXXXXXX},
- {KC_LSFT, XXXXXXX, XXXXXXX, KC_DLR, KC_DEL, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LBRC, KC_RBRC, KC_ENT },
- {EXT_NUM, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_P0, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_NUMPAD] = LAYOUT_planck_grid(
+ KC_TAB, XXXXXXX, XXXXXXX, KC_CIRC, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_EQL, XXXXXXX, KC_BSPC,
+ KC_ESC, XXXXXXX, XXXXXXX, KC_PERC, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LPRN, KC_RPRN, XXXXXXX,
+ KC_LSFT, XXXXXXX, XXXXXXX, KC_DLR, KC_DEL, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LBRC, KC_RBRC, KC_ENT ,
+ EXT_NUM, KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_P0, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -178,12 +169,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- { M(1) , _______, _______, _______, _______, _______, NUMPAD, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ M(1) , _______, _______, _______, _______, _______, NUMPAD, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/charlie/keymap.c b/keyboards/planck/keymaps/charlie/keymap.c
index d5e17d7f9c..29d0502238 100644
--- a/keyboards/planck/keymaps/charlie/keymap.c
+++ b/keyboards/planck/keymaps/charlie/keymap.c
@@ -1,24 +1,24 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = { /* Native */
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FUNC(2)},
- {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_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
- [1] = { /* QWERTY->PHOTOSHOP */
- {KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1)},
- {KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9},
- {KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9)},
- {KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14}
- },
- [2] = { /* 2: FUNC(3 PHOTOSHOP */
- {KC_ESC, FUNC(25), FUNC(26), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FUNC(19), FUNC(20), FUNC(21)},
- {KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO},
- {FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO}
- }
+ [0] = LAYOUT_planck_grid( /* Native */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FUNC(2),
+ 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_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+ [1] = LAYOUT_planck_grid( /* QWERTY->PHOTOSHOP */
+ KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1),
+ KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9,
+ KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9),
+ KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14
+ ),
+ [2] = LAYOUT_planck_grid( /* 2: FUNC(3 PHOTOSHOP */
+ KC_ESC, FUNC(25), FUNC(26), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FUNC(19), FUNC(20), FUNC(21),
+ KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO,
+ FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO
+ )
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c
index c2399bf305..018cff4e54 100644
--- a/keyboards/planck/keymaps/circuit/keymap.c
+++ b/keyboards/planck/keymaps/circuit/keymap.c
@@ -1,12 +1,6 @@
// Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
-#include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -67,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | Cmd | Vol- | ACTN | Space | NUMS | Vol+ | Left | Down | Left |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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},
- {SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT},
- {KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT}
-},
+[_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_QUOT,
+ SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_VOLD, ACTION, KC_SPC, KC_SPC, NUMBER, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT
+),
/* DVORAK
* ,-----------------------------------------------------------------------------------.
@@ -85,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_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_Z },
- {_______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_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_Z ,
+ _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* LOCK
* ,-----------------------------------------------------------------------------------.
@@ -103,12 +97,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | NULL | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_LOCKED] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_LOCKED] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* NUMBERS
* ,-----------------------------------------------------------------------------------.
@@ -121,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | NULL | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_NUMBER] = {
- {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {_______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH},
- {_______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______},
- {_______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______}
-},
+[_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUES, KC_SLSH,
+ _______, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______,
+ _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______
+),
/* ACTIONS
* ,-----------------------------------------------------------------------------------.
@@ -139,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | Mute | | NULL | | NULL | Home | PgDn | End |
* `-----------------------------------------------------------------------------------'
*/
-[_ACTION] = {
- {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
- {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT },
- {_______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END }
-},
+[_ACTION] = LAYOUT_planck_grid(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_CAPS, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_ENT ,
+ _______, _______, _______, KC_MUTE, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END
+),
/* FUNCTIONS
* ,-----------------------------------------------------------------------------------.
@@ -157,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Reset| NULL | Lock | NULL | | NULL | | NULL | NULL | NULL | NULL |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNCTN] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
- {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 },
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-}
+[_FUNCTN] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,
+ KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 ,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QWERTY, DVORAK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+)
};
diff --git a/keyboards/planck/keymaps/coloneljesus/keymap.c b/keyboards/planck/keymaps/coloneljesus/keymap.c
index 022d5520ee..f60adc43e6 100644
--- a/keyboards/planck/keymaps/coloneljesus/keymap.c
+++ b/keyboards/planck/keymaps/coloneljesus/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -54,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | App |Lower | Space |Raise | - | = | \ | Alt |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, RSFT_T(KC_ENT) },
- {KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_MINS, KC_EQL, KC_BSLS, KC_RALT}
-},
+[_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_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) ,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_MINS, KC_EQL, KC_BSLS, KC_RALT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -72,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -90,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -108,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Mute | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_LCBR, KC_RCBR, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______},
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_NUHS), KC_MPRV, KC_MNXT, S(KC_NUBS), _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE}
-},
+[_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_LCBR, KC_RCBR, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_NUHS), KC_MPRV, KC_MNXT, S(KC_NUBS), _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -126,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Mute | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_LBRC, KC_RBRC, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_MPRV, KC_MNXT, KC_NUBS, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE}
-},
+[_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_LBRC, KC_RBRC, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_MPRV, KC_MNXT, KC_NUBS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -145,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -163,12 +161,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/corvec/keymap.c b/keyboards/planck/keymaps/corvec/keymap.c
index 758a9310f8..3099a78345 100644
--- a/keyboards/planck/keymaps/corvec/keymap.c
+++ b/keyboards/planck/keymaps/corvec/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -140,12 +138,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
+)
};
diff --git a/keyboards/planck/keymaps/daniel/keymap.c b/keyboards/planck/keymaps/daniel/keymap.c
index ae47b9ba3d..e5b5202236 100644
--- a/keyboards/planck/keymaps/daniel/keymap.c
+++ b/keyboards/planck/keymaps/daniel/keymap.c
@@ -1,30 +1,30 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {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_RSFT},
- {MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ 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_RSFT,
+ MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* RAISE */
- {KC_GRV, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_EQL},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, S(KC_MINS), KC_BSLS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[2] = { /* LOWER */
- {S(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_EQL)},
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
- {KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ENT},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* Qwerty */
- {KC_ESC, 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_RSFT},
- {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+),
+[1] = LAYOUT_planck_grid( /* RAISE */
+ KC_GRV, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_EQL,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, S(KC_MINS), KC_BSLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[2] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_GRV), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_EQL),
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_ENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* Qwerty */
+ KC_ESC, 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_RSFT,
+ KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-}
+)
};
diff --git a/keyboards/planck/keymaps/danielhklein/keymap.c b/keyboards/planck/keymaps/danielhklein/keymap.c
index 25463cf17c..a62138e331 100644
--- a/keyboards/planck/keymaps/danielhklein/keymap.c
+++ b/keyboards/planck/keymaps/danielhklein/keymap.c
@@ -1,6 +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 "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -36,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT},
- {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},
- {ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS}
-},
+[_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_ENT,
+ 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,
+ ARROW, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_MINS
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -55,12 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN},
- {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC},
- {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_PSLS, KC_BSLS, KC_GRV,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_PAST, KC_LPRN, KC_RPRN,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, KC_LBRC, KC_RBRC,
+ XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_0, KC_DOT, KC_PEQL, KC_PPLS, KC_LCBR, KC_RCBR
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
/* Arrow
* ,----------------------------------------------------------------------------------.
@@ -93,12 +91,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------------------------------------------------------'
*/
-[_ARROW] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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}
-},
+[_ARROW] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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
+),
};
diff --git a/keyboards/planck/keymaps/david/keymap.c b/keyboards/planck/keymaps/david/keymap.c
index bb0abaab7c..57aafed2a0 100644
--- a/keyboards/planck/keymaps/david/keymap.c
+++ b/keyboards/planck/keymaps/david/keymap.c
@@ -1,31 +1,31 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_A, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {M(10), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_A, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ M(10), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Colemak */
- {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_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* RAISE */
- {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_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-}
+),
+[1] = LAYOUT_planck_grid( /* Colemak */
+ 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_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC,
+ KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS),
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+)
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c
index 256e6c4a0f..75087eb9c9 100644
--- a/keyboards/planck/keymaps/dbroqua/keymap.c
+++ b/keyboards/planck/keymaps/dbroqua/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -27,12 +21,7 @@ enum planck_keycodes {
};
// Func macro definitions.
-#define SFT_TAB FUNC(0) // Tap for Enter, hold for Shift
-
-// Enable these functions using FUNC(n) macro.
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_MULTIMEDIA, KC_TAB)
- };
+#define SFT_TAB LT(_MULTIMEDIA, KC_TAB) // Tap for Enter, hold for Shift
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -47,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | AltGr| Alt | Lower| Space | Raise| Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {SFT_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_RALT, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_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,
+ SFT_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_RALT, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -65,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home | PgDwn| PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -83,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ 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, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* _MULTIMEDIA
* ,-----------------------------------------------------------------------------------.
@@ -101,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Prev | Play | Next | Del |
* `-----------------------------------------------------------------------------------'
*/
-[_MULTIMEDIA] = {
- {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_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, KC_INS},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL}
-},
+[_MULTIMEDIA] = LAYOUT_planck_grid(
+ 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_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, KC_INS,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL
+),
/* Adjust (Lower + Raise)
@@ -120,12 +109,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/dc/keymap.c b/keyboards/planck/keymaps/dc/keymap.c
index 0990cae90f..cab66434cf 100644
--- a/keyboards/planck/keymaps/dc/keymap.c
+++ b/keyboards/planck/keymaps/dc/keymap.c
@@ -1,9 +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 "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
+#include QMK_KEYBOARD_H
enum planck_layers {
_DVORAK,
@@ -62,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Action| Ctrl | GUI | Alt |Number| Space/Enter |Symbol| Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = {
- {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE},
- {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH},
- {KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT)},
- {MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_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_BSPACE,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLASH,
+ KC_LSFT, TD(0), TD(1), TD(2), KC_K, KC_X, KC_B, KC_M, TD(3), TD(4), TD(5), MT(MOD_RSFT, KC_ENT),
+ MO(ACTIONS), KC_LCTRL, KC_LGUI, KC_LALT, NUMBERS, KC_SPACE, KC_SPACE, SYMBOLS,KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+ ),
/* Numbers
* ,-----------------------------------------------------------------------------------.
@@ -80,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_NUMBERS] = {
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______},
- {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_NUMBERS] = LAYOUT_planck_grid(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_KP_ASTERISK, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_KP_MINUS, _______,
+ _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_KP_PLUS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Symbols
* ,-----------------------------------------------------------------------------------.
@@ -98,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_SYMBOLS] = {
- {KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL},
- {KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS},
- {_______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_SYMBOLS] = LAYOUT_planck_grid(
+ KC_GRV, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, KC_DEL,
+ KC_CAPS, _______, KC_INS, KC_PGUP, _______, _______, _______, KC_UNDS, KC_PLUS, _______, _______, KC_BSLS,
+ _______, KC_HOME, KC_END, KC_PGDN, _______, _______, _______, KC_MINUS, KC_EQL, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Actions
* ,-----------------------------------------------------------------------------------.
@@ -116,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ACTIONS] = {
- {BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL},
- {_______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______},
- {_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_ACTIONS] = LAYOUT_planck_grid(
+ BL_STEP, _______, _______, _______, _______, KC_SLEP, RESET, _______, _______, _______, _______, KC_DEL,
+ _______, LCTL(KC_Y), _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______,
+ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Special
* ,-----------------------------------------------------------------------------------.
@@ -134,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_SPECIAL] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- }
+ [_SPECIAL] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c
index 0893059a0d..0e53d305d5 100644
--- a/keyboards/planck/keymaps/dcompact/keymap.c
+++ b/keyboards/planck/keymaps/dcompact/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#include "keymap_steno.h"
// Custom Keycodes and Combinations Used
@@ -64,12 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl |Plover| GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter |
* `-----------------------------------------------------------------------------------'
*/
-[_BASE] = {
- { 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_MINS},
- { DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC},
- { KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT}
-},
+[_BASE] = 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_MINS,
+ DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC,
+ KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -82,12 +80,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | |Raise | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX},
- { XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX},
- { XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX},
- { _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX,
+ XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX,
+ XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX,
+ _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -100,12 +98,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | |Lower | < | > | | 0 | . | , | |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- { QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL},
- { XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS},
- { XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC},
- { _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL,
+ XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS,
+ XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC,
+ _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX
+),
/* Func
* ,-----------------------------------------------------------------------------------.
@@ -118,12 +116,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNC] = {
- { XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX},
- { XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX},
- { XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX},
- { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX}
-},
+[_FUNC] = LAYOUT_planck_grid(
+ XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,
+ XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX,
+ XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX,
+ _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX
+),
/* Mouse (Not Reachable on Planck)
* ,-----------------------------------------------------------------------------------.
@@ -136,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_MOUSE] = {
- { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- { XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX},
- { XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX},
- { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX}
-},
+[_MOUSE] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX,
+ _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -155,12 +153,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2}
-},
+[_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -173,12 +171,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- { _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, RGB_TOG, RGB_MOD, _______, _______, _______},
- { _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_VAD, RGB_VAI, _______, _______, _______},
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, RGB_TOG, RGB_MOD, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_VAD, RGB_VAI, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/dlaroe/keymap.c b/keyboards/planck/keymaps/dlaroe/keymap.c
index 28d2ec1f62..41b3064132 100644
--- a/keyboards/planck/keymaps/dlaroe/keymap.c
+++ b/keyboards/planck/keymaps/dlaroe/keymap.c
@@ -1,13 +1,7 @@
// Can't Remember Sh*t Keymap for Planck
// http://www.keyboard-layout-editor.com/#/gists/c6c0ac051b2b118a34ef84ebadab54c7
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -47,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | \ | Alt | Lower| Space |Raise | [ | - | = | ] |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, SFT_T(KC_ENT) },
- {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC)}
-},
+[_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_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) ,
+ KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, LT(_LOWER, KC_LBRC), KC_MINS, KC_EQL, MT(MOD_RCTL, KC_RBRC)
+),
/* Arrow
* ,-----------------------------------------------------------------------------------.
@@ -65,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | \ | Alt | Lower| Space |Raise | Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
-[_ARROW] = {
- {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, SFT_T(KC_ENT) },
- {KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
+[_ARROW] = 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_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) ,
+ KC_LCTL, KC_LGUI, KC_BSLS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/* Game
@@ -84,12 +78,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt | 4 | 3 | 2 | Lower| Space |Raise | Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
-[_GAME] = {
- { KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ },
- {KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
+[_GAME] = LAYOUT_planck_grid(
+ KC_1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______ ,
+ KC_LALT, KC_4, KC_3, KC_2, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/* Lower (switched to # because KP# were weird in terminal emulators)
@@ -103,12 +97,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Esc | | | | | 0 | | | | KP_+ | |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- { KC_DEL, 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_4, KC_5, KC_6, KC_DOT, KC_ASTR},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______},
- {KC_ESC, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ KC_DEL, 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_4, KC_5, KC_6, KC_DOT, KC_ASTR,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_SLSH, _______,
+ KC_ESC, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______, KC_PLUS, _______
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -121,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | App | | | | Ins | | Home | PGDN | PGUP | End |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV},
- {_______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______},
- {_______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_RAISE] = 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_DEL, KC_WH_U, KC_BTN2, KC_MS_U, KC_BTN1, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE, KC_GRV,
+ _______, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLASH, _______,
+ _______, KC_APP, _______, _______, _______, KC_INS, KC_INS, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -140,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -158,12 +152,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| | | | | Play/Pause | | BL_T |BL_DEC|BL_INC|BL_ST |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, PLOVER, LALT(LCTL(KC_DEL))},
- {KC_CAPS, ARROW, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______},
- {BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ LALT(LCTL(KC_INS)), QWERTY, _______, _______, RESET, M(0), _______, _______, _______, _______, PLOVER, LALT(LCTL(KC_DEL)),
+ KC_CAPS, ARROW, _______, AU_ON, AU_OFF, GAME, AG_SWAP, AG_NORM, KC_PSCR, KC_SLCK, KC_PAUS, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
+ BACKLIT, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, BL_TOGG, BL_DEC , BL_INC , BL_STEP
+)
};
diff --git a/keyboards/planck/keymaps/dodger/keymap.c b/keyboards/planck/keymaps/dodger/keymap.c
index 2dd6af2668..421c719c25 100644
--- a/keyboards/planck/keymaps/dodger/keymap.c
+++ b/keyboards/planck/keymaps/dodger/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
bool isGame = false;
@@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt |lenny |Lower | shift|space |Raise | macro|macro2|macro3|QWERTY|
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL},
- {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_MINS},
- {KC_LCTL, KC_LGUI, KC_LALT, LENNY, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, COMMENTHEAD, RICKANDMORT, KC_LEFT, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL,
+ 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_MINS,
+ KC_LCTL, KC_LGUI, KC_LALT, LENNY, LOWER, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, COMMENTHEAD, RICKANDMORT, KC_LEFT, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -92,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {_______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, _______, S(KC_EQL)},
- {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_UNDS},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, _______, S(KC_EQL),
+ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_UNDS,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -110,12 +108,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | bl- | bl+ | GCTG |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
- {KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, MCTOGG, GCTOGG}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, MCTOGG, GCTOGG
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -128,26 +126,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, 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, _______, COLEMAK, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_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, _______, COLEMAK, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
-[_GAME] = {
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL},
- {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_MINS},
- {KC_LCTL, RAISE, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
+[_GAME] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL,
+ 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_MINS,
+ KC_LCTL, RAISE, KC_LALT, LOWER, KC_SPC, RSFT_T(KC_BSPC), TD(TD_SPC_ENT), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
-[_MUSIC] = {
- {MARIO, MARIOE, OVERWATCH, DOOM, DISNEY, NUMBERONE, CABBAGE, OLDSPICE, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_MUSIC] = LAYOUT_planck_grid(
+ MARIO, MARIOE, OVERWATCH, DOOM, DISNEY, NUMBERONE, CABBAGE, OLDSPICE, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/dr0ck/keymap.c b/keyboards/planck/keymaps/dr0ck/keymap.c
index 2c6d02f236..0d28698d29 100644
--- a/keyboards/planck/keymaps/dr0ck/keymap.c
+++ b/keyboards/planck/keymaps/dr0ck/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -56,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI | Esc |Lower |Enter |Space |Raise | Func | Alt |Prt Sc| Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {FUNCTION,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_LCTL, KC_LALT, KC_LGUI, KC_ESC, LOWER, KC_ENT, KC_SPC, RAISE, FUNCTION, KC_RALT,KC_PSCR, KC_RCTL}
-},
+[_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,
+ FUNCTION,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_LCTL, KC_LALT, KC_LGUI, KC_ESC, LOWER, KC_ENT, KC_SPC, RAISE, FUNCTION, KC_RALT,KC_PSCR, KC_RCTL
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {FUNCTION,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_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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,
+ FUNCTION,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_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -92,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
- {FUNCTION,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_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_BSPC,
+ FUNCTION,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_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -110,12 +108,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Up |Pg Dn | End |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END}
-},
+[_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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -128,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Up |Pg Dn | End |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END}
-},
+[_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_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_HOME, KC_PGUP, KC_PGDN, KC_END
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -147,12 +145,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -165,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Function
* ,-----------------------------------------------------------------------------------.
@@ -183,12 +181,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | | | | |Enter |Space | | | | | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNCTION] = {
- {KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_F5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL},
- {_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______},
- {KC_LSFT, _______, _______, _______, _______, _______, KC_END , _______, _______, _______, _______, KC_RSFT},
- {KC_LCTL, _______, _______, _______, KC_ENT, KC_SPC, _______, _______, _______, _______, _______, KC_RCTL}
-}
+[_FUNCTION] = LAYOUT_planck_grid(
+ KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_F5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL,
+ _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
+ KC_LSFT, _______, _______, _______, _______, _______, KC_END , _______, _______, _______, _______, KC_RSFT,
+ KC_LCTL, _______, _______, _______, KC_ENT, KC_SPC, _______, _______, _______, _______, _______, KC_RCTL
+)
};
diff --git a/keyboards/planck/keymaps/dudeofawesome/keymap.c b/keyboards/planck/keymaps/dudeofawesome/keymap.c
index ab1dd5f1e0..c28b8dfdd2 100644
--- a/keyboards/planck/keymaps/dudeofawesome/keymap.c
+++ b/keyboards/planck/keymaps/dudeofawesome/keymap.c
@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -55,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = {
- {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, RSFT_T(KC_ENT)},
- {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
- },
+ [_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 ,
+ 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, RSFT_T(KC_ENT),
+ TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Workman
* ,-----------------------------------------------------------------------------------.
@@ -73,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
- [_WORKMAN] = {
- {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC },
- {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT },
- {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT)},
- {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
- },
+ [_WORKMAN] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC ,
+ KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT ,
+ KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT),
+ TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -91,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
- [_COLEMAK] = {
- {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, RSFT_T(KC_ENT)},
- {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+ [_COLEMAK] = LAYOUT_planck_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, RSFT_T(KC_ENT),
+ TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -109,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Num | Ctrl | Alt | GUI | Lower| Space | Raise| Left | Down | Up | Right|
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = {
- {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, RSFT_T(KC_ENT)},
- {TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
- },
+ [_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_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, RSFT_T(KC_ENT),
+ TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -127,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Play | Vol- | Vol+ | Next |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = {
- {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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT}
- },
+ [_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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -145,12 +142,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Play | Vol- | Vol+ | Next |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = {
- {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_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_MPLY, 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_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_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -163,12 +160,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
- {KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_M_R, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Numpad
* ,-----------------------------------------------------------------------------------.
@@ -181,12 +178,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | ✗ | | 0 | 0 | . | / | = |
* `-----------------------------------------------------------------------------------'
*/
- [_NUMPAD] = {
- {_______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______},
- {_______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_NO},
- {_______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, KC_PENT},
- {_______, _______, _______, _______, KC_NO, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PSLS, KC_PEQL}
- }
+ [_NUMPAD] = LAYOUT_planck_grid(
+ _______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______,
+ _______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_NO,
+ _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PAST, KC_PENT,
+ _______, _______, _______, _______, KC_NO, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PSLS, KC_PEQL
+ )
};
diff --git a/keyboards/planck/keymaps/dzobert/keymap.c b/keyboards/planck/keymaps/dzobert/keymap.c
index 3cd8731b06..17b1bef019 100644
--- a/keyboards/planck/keymaps/dzobert/keymap.c
+++ b/keyboards/planck/keymaps/dzobert/keymap.c
@@ -1,31 +1,31 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC},
- {KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC,
+ KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Colemak */
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB},
- {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC},
- {KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT},
- {KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* RAISE */
- {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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_DEL},
- {KC_TRNS, KC_GRV, KC_MINS, KC_EQL, KC_QUOT, S(KC_QUOT), S(KC_LBRC), S(KC_RBRC), KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGUP, KC_PGDN, KC_END}
-},
-[3] = { /* LOWER */
- {KC_POWER,KC_PSCR, KC_SLCK, KC_PAUSE, KC_NLCK, KC_EXECUTE, KC_MENU, KC_APP, KC_7, KC_8, KC_9, KC_KP_SLASH},
- {KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_CAPS, KC_CANCEL, KC_UNDO, KC_AGAIN, KC_4, KC_5, KC_6, KC_KP_ASTERISK},
- {KC_TRNS, KC_INSERT,KC_CUT, KC_COPY, KC_PASTE, KC_BSLS, KC_9, KC_0, KC_1, KC_2, KC_3, KC_KP_MINUS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS}
-}
+),
+[1] = LAYOUT_planck_grid( /* Colemak */
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC,
+ KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_DEL,
+ KC_TRNS, KC_GRV, KC_MINS, KC_EQL, KC_QUOT, S(KC_QUOT), S(KC_LBRC), S(KC_RBRC), KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGUP, KC_PGDN, KC_END
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ KC_POWER,KC_PSCR, KC_SLCK, KC_PAUSE, KC_NLCK, KC_EXECUTE, KC_MENU, KC_APP, KC_7, KC_8, KC_9, KC_KP_SLASH,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_CAPS, KC_CANCEL, KC_UNDO, KC_AGAIN, KC_4, KC_5, KC_6, KC_KP_ASTERISK,
+ KC_TRNS, KC_INSERT,KC_CUT, KC_COPY, KC_PASTE, KC_BSLS, KC_9, KC_0, KC_1, KC_2, KC_3, KC_KP_MINUS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS
+)
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c
index e8a1d437a9..4a8a7d0c51 100644
--- a/keyboards/planck/keymaps/emilyh/keymap.c
+++ b/keyboards/planck/keymaps/emilyh/keymap.c
@@ -1,13 +1,7 @@
// 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.
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -50,12 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Brite| GUI | Alt |Lower | Space |Raise | / | Left | Down |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_UP, KC_ENT },
- {KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
-},
+[_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_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT ,
+ KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -68,12 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -86,12 +80,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -104,12 +98,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | End | Prev | Vol- | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
- {KC_TILD, 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), KC_HOME, KC_MNXT, KC_VOLU, KC_MUTE},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_MPRV, KC_VOLD, KC_MPLY}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_TILD, 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), KC_HOME, KC_MNXT, KC_VOLU, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_MPRV, KC_VOLD, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -122,12 +116,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | |Pg Dn | Prev | Vol- | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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, TO(_PLOVER), KC_PGUP, KC_MNXT, KC_VOLU, KC_MUTE},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY}
-},
+[_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, TO(_PLOVER), KC_PGUP, KC_MNXT, KC_VOLU, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MPRV, KC_VOLD, KC_MPLY
+),
/* Numpad Layer
* ,-----------------------------------------------------------------------------------.
@@ -141,12 +135,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {KC_ESC , XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN,XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC},
- {KC_TAB , KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS,XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX},
- {XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_UP, _______},
- {TO(_QWERTY),KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX, KC_SPC, KC_SPC, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT}
-},
+[_PLOVER] = LAYOUT_planck_grid(
+ KC_ESC , XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN,XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC,
+ KC_TAB , KC_PPLS, KC_PMNS, KC_PAST, KC_PSLS,XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_UP, _______,
+ TO(_QWERTY),KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX, KC_SPC, KC_SPC, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -159,12 +153,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c
index 5615a78bf7..924a8c35c6 100644
--- a/keyboards/planck/keymaps/espynn/keymap.c
+++ b/keyboards/planck/keymaps/espynn/keymap.c
@@ -1,10 +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 "action_layer.h"
-#include "eeconfig.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Symbolic names for macro IDs.
@@ -40,8 +34,8 @@ extern keymap_config_t keymap_config;
#define CUT M(_CUT)
// Func macro definitions.
-#define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER
-#define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE
+#define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER
+#define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE
#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK)
#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift
#define ZM_NRM FUNC(4) // Zoom normal
@@ -50,8 +44,6 @@ extern keymap_config_t keymap_config;
// Enable these functions using FUNC(n) macro.
const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN),
- [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP),
[2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS),
[3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
[4] = ACTION_MODS_KEY(MOD_LCTL, KC_0),
@@ -62,30 +54,30 @@ const uint16_t PROGMEM fn_actions[] = {
// This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = { /* QWERTY */
- {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_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_SLSH, SFT_ENT},
- {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_LOWER] = { /* LOWER */
- {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
-[_RAISE] = { /* RAISE */
- {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, S(KC_COMM), S(KC_DOT), KC_BSLS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[_CUSTOM] = { /* CUSTOM */
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, CUS4, KC_TRNS, KC_F12, KC_TRNS},
- {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {BL, RESET, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-}
+[_QWERTY] = LAYOUT_planck_grid( /* QWERTY */
+ 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_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_SLSH, SFT_ENT,
+ KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_LOWER] = LAYOUT_planck_grid( /* LOWER */
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_MINS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[_RAISE] = LAYOUT_planck_grid( /* RAISE */
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, S(KC_COMM), S(KC_DOT), KC_BSLS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[_CUSTOM] = LAYOUT_planck_grid( /* CUSTOM */
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, CUS4, KC_TRNS, KC_F12, KC_TRNS,
+ KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ BL, RESET, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+)
};
// Set a layer persistently.
diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c
index 0c592ce6e6..2024552004 100644
--- a/keyboards/planck/keymaps/experimental/keymap.c
+++ b/keyboards/planck/keymaps/experimental/keymap.c
@@ -1,13 +1,6 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#include "keymap_steno.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-
-#include "eeconfig.h"
#include "version.h"
extern keymap_config_t keymap_config;
@@ -46,12 +39,12 @@ enum planck_keycodes {
#define SW_SPC SH_T(KC_SPC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = {
- {QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
- {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
- {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
- {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}
-},
+[0] = LAYOUT_planck_grid(
+ QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL,
+ KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL,
+ KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL,
+ KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL
+),
/* Qwerty
,-----------------------------------------------------------------------------------.
@@ -64,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -82,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -100,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SW_SPC, SW_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -118,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -136,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_NUHS, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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_NUHS, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -155,12 +148,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2}
-},
+[_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -173,12 +166,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/gabriel/keymap.c b/keyboards/planck/keymaps/gabriel/keymap.c
index e0f74804f7..d0f792c312 100644
--- a/keyboards/planck/keymaps/gabriel/keymap.c
+++ b/keyboards/planck/keymaps/gabriel/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
// 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.
@@ -26,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | fn | ctl | alt | cmd |lower| spc |raise|left |down | up |right|
* `-----------------------------------------------------------------------'
*/
-[_QW] = { /* QWERTY */
- {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 },
- {MO(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_QW] = LAYOUT_planck_grid( /* QWERTY */
+ 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 ,
+ MO(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* MIT Layout (Raised layer)
*
* ,-----------------------------------------------------------------------.
@@ -44,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------'
*/
-[_RS] = { /* RAISE */
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE},
- {KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
+[_RS] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE,
+ KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
/* MIT Layout (Lowered layer)
*
* ,-----------------------------------------------------------------------.
@@ -62,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------'
*/
-[_LW] = { /* LOWER */
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_BSLS},
- {KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
+[_LW] = LAYOUT_planck_grid( /* LOWER */
+ 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_BSLS,
+ KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
/* MIT Layout (FN layer)
*
* ,-----------------------------------------------------------------------.
@@ -80,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | |home |pgdn |pgup | end |
* `-----------------------------------------------------------------------'
*/
-[_FN] = { /* FUNCTION */
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_PGDN, KC_PGUP, KC_END}
-}
+[_FN] = LAYOUT_planck_grid( /* FUNCTION */
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_PGDN, KC_PGUP, KC_END
+)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/grahampheath/keymap.c b/keyboards/planck/keymaps/grahampheath/keymap.c
index 51b8617ad6..babe67c442 100644
--- a/keyboards/planck/keymaps/grahampheath/keymap.c
+++ b/keyboards/planck/keymaps/grahampheath/keymap.c
@@ -13,10 +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/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "action_code.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -86,12 +83,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* - Right Shift: Tap for Enter, hold for shift.
* - Escape: Tap for Esc, hold for Ctrl.
*/
-[_QWERTY] = {
- {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_X0, 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_X1 },
- {KC_MOUS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ KC_X0, 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_X1 ,
+ KC_MOUS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -104,12 +101,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -122,12 +119,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Emoji Layer
@@ -142,12 +139,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* │ │ │ │ │Brig-│ Sleep │Brig+│ 👈 │ 👎 | 👍 │ 👉 │
* └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘
*/
-[_EMOJI] = {
- {HYPR_0, _______, WINK, _______, _______, TOUNGE, _______, _______, CRY, FLIP, _______, _______},
- {HYPR_1, ABOVE, SHRUG, _______, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______},
- {HYPR_2, _______, _______, _______, CONFUSED, _______, _______, GRIN, SHIT, _______, _______, _______},
- {_______, _______, _______, _______, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, FNGLEFT, THMBDN, THMBUP, FNGRIGHT}
-},
+[_EMOJI] = LAYOUT_planck_grid(
+ HYPR_0, _______, WINK, _______, _______, TOUNGE, _______, _______, CRY, FLIP, _______, _______,
+ HYPR_1, ABOVE, SHRUG, _______, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______,
+ HYPR_2, _______, _______, _______, CONFUSED, _______, _______, GRIN, SHIT, _______, _______, _______,
+ _______, _______, _______, _______, KC_SLCK, KC_SLEP, KC_SLEP, KC_PAUS, FNGLEFT, THMBDN, THMBUP, FNGRIGHT
+),
/* Lower
@@ -161,12 +158,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | |Tab-L | 👎 | 👍 |Tab-R |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______},
- {_______, _______, _______, _______, _______, KC_QS, KC_QS, _______, KC_TABL, THMBDN, THMBUP, KC_TABR}
-},
+[_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_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______,
+ _______, _______, _______, _______, _______, KC_QS, KC_QS, _______, KC_TABL, THMBDN, THMBUP, KC_TABR
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -179,12 +176,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Left | Down | Right|
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, KC_UP, KC_X2},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT}
-},
+[_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_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, KC_UP, KC_X2,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -197,12 +194,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Exit | | | A | O | | E | U | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -215,12 +212,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Brite | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, 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, _______, _______, _______, _______, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, 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, _______, _______, _______, _______, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/gunp/keymap.c b/keyboards/planck/keymaps/gunp/keymap.c
index 49776cefe3..a2a04a8e9b 100644
--- a/keyboards/planck/keymaps/gunp/keymap.c
+++ b/keyboards/planck/keymaps/gunp/keymap.c
@@ -16,9 +16,7 @@
/* modified by Gun Pinyo */
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -57,84 +55,84 @@ enum planck_keycodes {
#define XX XXXXXXX
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[LY_0000] = {
- {KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB},
- {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, FN_A, FN_B, FN_C, XX, KC_LSFT},
- {XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX}
-},
-[LY_1000] = {
- {UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1},
- {UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2},
- {KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3},
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4},
-},
-[LY_0010] = {
- {UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1},
- {UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2},
- {UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3},
- {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4},
-},
-[LY_1010] = {
- {UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1},
- {UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2},
- {UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3},
- {UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4}
-},
-[LY_0100] = {
- {KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1},
- {KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2},
- {KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3},
- {KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4},
-},
-[LY_1100] = {
- {KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1},
- {KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2},
- {KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3},
- {KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4},
-},
-[LY_0110] = {
- {MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1},
- {MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2},
- {MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3},
- {MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4}
-},
-[LY_1110] = {
- {MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1},
- {MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2},
- {MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3},
- {MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4}
-},
-[LY_1111] = {
- {KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1},
- {KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2},
- {KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3},
- {KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4},
-},
-[LY_1101] = {
- {XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1},
- {XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2},
- {XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3},
- {XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4},
-},
-[LY_0011] = {
- {UC(L'็'), UC(L'์'), UC(L'่'), UC(L'้'), UC(L'๊'), UC(L'๋'), MFN_R1},
- {UC(L'โ'), UC(L'แ'), UC(L'เ'), UC(L'า'), UC(L'ั'), UC(L'ะ'), MFN_R2},
- {UC(L'ไ'), UC(L'ใ'), UC(L'ิ'), UC(L'ี'), UC(L'ึ'), UC(L'ื'), MFN_R3},
- {UC(L'ๅ'), UC(L'ฺ'), UC(L'ํ'), UC(L'ุ'), UC(L'ู'), UC(L'ำ'), MFN_R4},
-},
-[LY_1011] = {
- {UC(L'ฐ'), UC(L'ฎ'), UC(L'ฏ'), UC(L'ฮ'), UC(L'ข'), UC(L'ฃ'), MFN_R1},
- {UC(L'ถ'), UC(L'ด'), UC(L'ต'), UC(L'อ'), UC(L'ก'), UC(L'จ'), MFN_R2},
- {UC(L'ภ'), UC(L'บ'), UC(L'ป'), UC(L'ส'), UC(L'ห'), UC(L'ฉ'), MFN_R3},
- {UC(L'ฯ'), UC(L'ผ'), UC(L'ฝ'), UC(L'ศ'), UC(L'ษ'), UC(L'ๆ'), MFN_R4},
-},
-[LY_0111] = {
- {UC(L'ฒ'), UC(L'ฤ'), UC(L'ฦ'), UC(L'ม'), UC(L'ค'), UC(L'ฅ'), MFN_R1},
- {UC(L'ณ'), UC(L'ร'), UC(L'ล'), UC(L'น'), UC(L'ว'), UC(L'ง'), MFN_R2},
- {UC(L'ญ'), UC(L'ช'), UC(L'ซ'), UC(L'ย'), UC(L'ท'), UC(L'ฑ'), MFN_R3},
- {UC(L'ฌ'), UC(L'ฬ'), UC(L'ฟ'), UC(L'พ'), UC(L'ธ'), UC(L'ฆ'), MFN_R4},
-},
+[LY_0000] = LAYOUT_planck_grid(
+ KC_DEL, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_K, KC_TAB,
+ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_M, FN_A, FN_B, FN_C, XX, KC_LSFT,
+ XX,KC_F21,KC_F22,KC_ESC,KC_SPC,KC_F23,KC_F24,KC_LCTL,KC_LSFT,KC_LALT,FN_D,XX
+),
+[LY_1000] = LAYOUT_planck_grid(
+ UC(L'∃'), KC_SLSH, KC_RCBR, KC_RPRN, KC_RBRC, KC_GT, MFN_R1,
+ UC(L'∀'), KC_BSLS, KC_LCBR, KC_LPRN, KC_LBRC, KC_LT, MFN_R2,
+ KC_AMPR, KC_PIPE, KC_AT, KC_TILD, KC_DLR, KC_CIRC, MFN_R3,
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MFN_R4,
+),
+[LY_0010] = LAYOUT_planck_grid(
+ UC(L'×'), KC_ASTR, KC_QUES, KC_EXLM, KC_GRV, KC_HASH, MFN_R1,
+ UC(L'→'), KC_MINS, KC_COMM, KC_DOT, KC_QUOT, KC_EQL, MFN_R2,
+ UC(L'∘'), KC_PLUS, KC_SCLN, KC_COLN, KC_DQUO, KC_UNDS, MFN_R3,
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MFN_R4,
+),
+[LY_1010] = LAYOUT_planck_grid(
+ UC(L'⊗'), UC(L'⊕'), KC_7, KC_8, KC_9, UC(L'┻'), MFN_R1,
+ UC(L'⊚'), KC_0, KC_1, KC_2, KC_3, UC(L'┃'), MFN_R2,
+ UC(L'┏'), UC(L'┓'), KC_4, KC_5, KC_6, UC(L'┳'), MFN_R3,
+ UC(L'┗'), UC(L'┛'), UC(L'┫'), UC(L'━'), UC(L'┣'), UC(L'╋'), MFN_R4
+),
+[LY_0100] = LAYOUT_planck_grid(
+ KC_F13, KC_WSCH, KC_HOME, KC_UP, KC_END, KC_PGUP, MFN_R1,
+ KC_F14, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, MFN_R2,
+ KC_F15, KC_WBAK, KC_WFWD, MC(KC_A), MC(KC_Z), MSC(KC_Z), MFN_R3,
+ KC_F16, MA(KC_LEFT), MC(KC_LEFT), MC(KC_F), MC(KC_RGHT),MA(KC_RGHT), MFN_R4,
+),
+[LY_1100] = LAYOUT_planck_grid(
+ KC_F17, MC(KC_WSCH), S(KC_HOME), S(KC_UP), S(KC_END), MC(KC_PGUP), MFN_R1,
+ KC_F18, XXXXXXX, S(KC_LEFT), S(KC_DOWN),S(KC_RGHT), MC(KC_PGDN), MFN_R2,
+ KC_F19, MC(KC_S), MC(KC_X), MC(KC_C), MC(KC_V), MC(KC_L), MFN_R3,
+ KC_F20, MCA(KC_LEFT),MSC(KC_LEFT),MCA(KC_F),MSC(KC_RGHT),MCA(KC_RGHT),MFN_R4,
+),
+[LY_0110] = LAYOUT_planck_grid(
+ MC(KC_F1) ,MC(KC_F2) ,MC(KC_F3) ,MC(KC_F4) ,MC(KC_F5) ,MC(KC_F6) , MFN_R1,
+ MC(KC_F7) ,MC(KC_F8) ,MC(KC_F9) ,MC(KC_F10),MC(KC_F11),MC(KC_F12), MFN_R2,
+ MC(KC_F13),MC(KC_F14),MC(KC_F15),MC(KC_F16),MC(KC_F17),MC(KC_F18), MFN_R3,
+ MC(KC_F19),MC(KC_F20),MC(KC_F21),MC(KC_F22),MC(KC_F23),MC(KC_F24), MFN_R4
+),
+[LY_1110] = LAYOUT_planck_grid(
+ MG(KC_F1) ,MG(KC_F2) ,MG(KC_F3) ,MG(KC_F4) ,MG(KC_F5) ,MG(KC_F6) , MFN_R1,
+ MG(KC_F7) ,MG(KC_F8) ,MG(KC_F9) ,MG(KC_F10),MG(KC_F11),MG(KC_F12), MFN_R2,
+ MG(KC_F13),MG(KC_F14),MG(KC_F15),MG(KC_F16),MG(KC_F17),MG(KC_F18), MFN_R3,
+ MG(KC_F19),MG(KC_F20),MG(KC_F21),MG(KC_F22),MG(KC_F23),MG(KC_F24), MFN_R4
+),
+[LY_1111] = LAYOUT_planck_grid(
+ KC_MPRV, DYN_REC_STOP, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, MFN_R1,
+ KC_CAPS, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, MFN_R2,
+ KC_MNXT, DYN_MACRO_PLAY2, DYN_MACRO_PLAY1, KC_MPLY, KC_MRWD, KC_MFFD, MFN_R3,
+ KC_MSTP, DYN_REC_START2, DYN_REC_START1, KC_BTN2, KC_BTN1, KC_BTN3, MFN_R4,
+),
+[LY_1101] = LAYOUT_planck_grid(
+ XXXXXXX, MU_ON, MU_OFF, PRINT_ON, PRINT_OFF, DEBUG, MFN_R1,
+ XXXXXXX, KC_APP, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, MFN_R2,
+ XXXXXXX, KC_MAIL, S(KC_VOLD), KC_INS, S(KC_VOLU), KC_PSCR, MFN_R3,
+ XXXXXXX, MUV_DE, MUV_IN, AU_ON, AU_OFF, RESET, MFN_R4,
+),
+[LY_0011] = LAYOUT_planck_grid(
+ UC(L'็'), UC(L'์'), UC(L'่'), UC(L'้'), UC(L'๊'), UC(L'๋'), MFN_R1,
+ UC(L'โ'), UC(L'แ'), UC(L'เ'), UC(L'า'), UC(L'ั'), UC(L'ะ'), MFN_R2,
+ UC(L'ไ'), UC(L'ใ'), UC(L'ิ'), UC(L'ี'), UC(L'ึ'), UC(L'ื'), MFN_R3,
+ UC(L'ๅ'), UC(L'ฺ'), UC(L'ํ'), UC(L'ุ'), UC(L'ู'), UC(L'ำ'), MFN_R4,
+),
+[LY_1011] = LAYOUT_planck_grid(
+ UC(L'ฐ'), UC(L'ฎ'), UC(L'ฏ'), UC(L'ฮ'), UC(L'ข'), UC(L'ฃ'), MFN_R1,
+ UC(L'ถ'), UC(L'ด'), UC(L'ต'), UC(L'อ'), UC(L'ก'), UC(L'จ'), MFN_R2,
+ UC(L'ภ'), UC(L'บ'), UC(L'ป'), UC(L'ส'), UC(L'ห'), UC(L'ฉ'), MFN_R3,
+ UC(L'ฯ'), UC(L'ผ'), UC(L'ฝ'), UC(L'ศ'), UC(L'ษ'), UC(L'ๆ'), MFN_R4,
+),
+[LY_0111] = LAYOUT_planck_grid(
+ UC(L'ฒ'), UC(L'ฤ'), UC(L'ฦ'), UC(L'ม'), UC(L'ค'), UC(L'ฅ'), MFN_R1,
+ UC(L'ณ'), UC(L'ร'), UC(L'ล'), UC(L'น'), UC(L'ว'), UC(L'ง'), MFN_R2,
+ UC(L'ญ'), UC(L'ช'), UC(L'ซ'), UC(L'ย'), UC(L'ท'), UC(L'ฑ'), MFN_R3,
+ UC(L'ฌ'), UC(L'ฬ'), UC(L'ฟ'), UC(L'พ'), UC(L'ธ'), UC(L'ฆ'), MFN_R4,
+),
[LY_0001] = UNUSED_LAYER
[LY_0101] = UNUSED_LAYER
[LY_1001] = UNUSED_LAYER
diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c
index a4d1f7cb09..58f9cea2a5 100644
--- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c
+++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -48,12 +42,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -66,12 +60,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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_LGUI, XXXXXXX, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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_LGUI, XXXXXXX, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -84,12 +78,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-/*[_DVORAK] = {*/
- /*{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, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}*/
-/*},*/
+/*[_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_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, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT*/
+/*),*/
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -102,12 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -120,12 +114,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -139,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-/*[_PLOVER] = {*/
- /*{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}*/
-/*},*/
+/*[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -157,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {_______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, QWERTY, COLEMAK},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, QWERTY, COLEMAK,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/hiea/common/chord_layout.h b/keyboards/planck/keymaps/hiea/common/chord_layout.h
index 2c785d56ca..b6922705f3 100644
--- a/keyboards/planck/keymaps/hiea/common/chord_layout.h
+++ b/keyboards/planck/keymaps/hiea/common/chord_layout.h
@@ -14,12 +14,12 @@
// | | | | | | | | f() | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_EDIT] = {
- {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______},
- {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______},
- {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______},
- },
+ [_EDIT] = LAYOUT_planck_grid(
+ _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______,
+ UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______,
+ _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______
+ ),
// ................................................................ Adjust Layer
@@ -33,9 +33,9 @@
// | | | | f() | | | | | f() | | | |
// `-----------------------------------------------------------------------------------'
- [_ADJUST] = {
- {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_ADJUST] = LAYOUT_planck_grid(
+ PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h b/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h
index 321482b291..c3d5c2d874 100644
--- a/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h
+++ b/keyboards/planck/keymaps/hiea/common/number_fkey_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | | | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___
#else
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___
#endif
- },
+ ),
// ............ .................................................. Function Keys
@@ -38,9 +38,9 @@
// | | | | | f() | | | + | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_FNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_FNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hiea/common/steno_layout.h b/keyboards/planck/keymaps/hiea/common/steno_layout.h
index ab4a6fe011..c1f2b5b24a 100644
--- a/keyboards/planck/keymaps/hiea/common/steno_layout.h
+++ b/keyboards/planck/keymaps/hiea/common/steno_layout.h
@@ -13,12 +13,12 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______
+ ),
#else
// ,-----------------------------------------------------------------------------------.
// | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
@@ -30,10 +30,10 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
- {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_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 ,
+ BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______
+ ),
#endif
diff --git a/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h
index 677e46409b..4a32f71bd9 100644
--- a/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h
+++ b/keyboards/planck/keymaps/hiea/common/symbol_guifn_layout.h
@@ -13,12 +13,12 @@
// | |Adjust| \ | | f() | |
// '-----------------------------------------------------------------------------------'
- [_SYMBOL] = {
- {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMBOL] = LAYOUT_planck_grid(
+ _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
// ............................................................... Mouse Actions
@@ -32,9 +32,9 @@
// | | | f() | | f() | |
// '-----------------------------------------------------------------------------------'
- [_MOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_MOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hiea/common/toggle_layout.h b/keyboards/planck/keymaps/hiea/common/toggle_layout.h
index 713d27bbcf..ed74f42522 100644
--- a/keyboards/planck/keymaps/hiea/common/toggle_layout.h
+++ b/keyboards/planck/keymaps/hiea/common/toggle_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | Space| | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_TTNUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_TTNUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______},
+ _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______
#else
- {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______},
+ _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______
#endif
- },
+ ),
// ............ .................................................. Function Keys
@@ -37,12 +37,12 @@
// | | | | f() | | | | + | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTFNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_TTFNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______
+ ),
// ....................................................................... Regex
@@ -56,12 +56,12 @@
// | | | | f() | - | | | + | Space| | | |
// `-----------------------------------------------------------------------------------'
- [_TTREGEX] = {
- {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___},
- {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___},
- {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___},
- {_______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______},
- },
+ [_TTREGEX] = LAYOUT_planck_grid(
+ ___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___,
+ ___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___,
+ ___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___,
+ _______, _______, _______, TT_ESC, KC_MINS, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______
+ ),
// ............................................................ Navigation Layer
@@ -75,12 +75,12 @@
// | | | | f() | | | | | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTCURSOR] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTCURSOR] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
// ............................................................... Mouse Actions
@@ -94,9 +94,9 @@
// | | | | f() | | | | | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTMOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTMOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hiea/config.h b/keyboards/planck/keymaps/hiea/config.h
index 655cdf5db3..eb86704578 100644
--- a/keyboards/planck/keymaps/hiea/config.h
+++ b/keyboards/planck/keymaps/hiea/config.h
@@ -14,7 +14,7 @@
// #define MOUSEKEY_WHEEL_DELAY 0
// compile time macro string, see functions/hardware planck script (undefine otherwise)
-#define PRIVATE_STRING
+//#define PRIVATE_STRING
// compile time macro string, must be in quotes
#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n"
diff --git a/keyboards/planck/keymaps/hiea/hiea.h b/keyboards/planck/keymaps/hiea/hiea.h
index 093802aef1..d396ff79fd 100644
--- a/keyboards/planck/keymaps/hiea/hiea.h
+++ b/keyboards/planck/keymaps/hiea/hiea.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
-
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
+
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {SM_H, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ SM_H, KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X |
@@ -54,10 +54,10 @@
// | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W },
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, SM_W ,
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/hiea/keymap.c b/keyboards/planck/keymaps/hiea/keymap.c
index c09fd41f20..eed4954096 100644
--- a/keyboards/planck/keymaps/hiea/keymap.c
+++ b/keyboards/planck/keymaps/hiea/keymap.c
@@ -66,17 +66,10 @@
// sudo CPATH=<keymap.c directory>/common make ...
-#include "config.h"
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#ifdef STENO_ENABLE
#include "keymap_steno.h"
#endif
-#ifdef AUDIO_ENABLE
-#include "audio.h"
-#endif
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
@@ -166,7 +159,7 @@ enum planck_keycodes {
#define S_TAB S (KC_TAB)
#define S_UP S (KC_UP)
-#include "tapdance.h"
+#include "common/tapdance.h"
// keycodes
#define ___x___ KC_TRNS
@@ -223,35 +216,35 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#include "hiea.h"
-#include "steno_layout.h"
+#include "common/steno_layout.h"
// ...................................................... Number / Function Keys
-#include "number_fkey_layout.h"
+#include "common/number_fkey_layout.h"
// ......................................................... Symbol / Navigation
-#include "symbol_guifn_layout.h"
+#include "common/symbol_guifn_layout.h"
// ............................................................... Toggle Layers
#ifdef CENTER_TT
-#include "toggle_layout.h"
+#include "common/toggle_layout.h"
#endif
// ......................................................... Short Cuts / Adjust
-#include "chord_layout.h"
+#include "common/chord_layout.h"
};
// ...................................................................... Sounds
-#include "sounds.h"
+#include "common/sounds.h"
// ........................................................... User Keycode Trap
-#include "keycode_functions.h"
+#include "common/keycode_functions.h"
#define BASE_1 1
#define BASE_2 2
@@ -425,4 +418,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
return true;
}
-#include "init.h"
+#include "common/init.h"
diff --git a/keyboards/planck/keymaps/hieax/common/chord_layout.h b/keyboards/planck/keymaps/hieax/common/chord_layout.h
index 2c785d56ca..b6922705f3 100644
--- a/keyboards/planck/keymaps/hieax/common/chord_layout.h
+++ b/keyboards/planck/keymaps/hieax/common/chord_layout.h
@@ -14,12 +14,12 @@
// | | | | | | | | f() | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_EDIT] = {
- {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______},
- {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______},
- {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______},
- },
+ [_EDIT] = LAYOUT_planck_grid(
+ _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______,
+ UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______,
+ _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______
+ ),
// ................................................................ Adjust Layer
@@ -33,9 +33,9 @@
// | | | | f() | | | | | f() | | | |
// `-----------------------------------------------------------------------------------'
- [_ADJUST] = {
- {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_ADJUST] = LAYOUT_planck_grid(
+ PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h b/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h
index 321482b291..c3d5c2d874 100644
--- a/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h
+++ b/keyboards/planck/keymaps/hieax/common/number_fkey_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | | | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___
#else
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___
#endif
- },
+ ),
// ............ .................................................. Function Keys
@@ -38,9 +38,9 @@
// | | | | | f() | | | + | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_FNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_FNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hieax/common/steno_layout.h b/keyboards/planck/keymaps/hieax/common/steno_layout.h
index ab4a6fe011..c1f2b5b24a 100644
--- a/keyboards/planck/keymaps/hieax/common/steno_layout.h
+++ b/keyboards/planck/keymaps/hieax/common/steno_layout.h
@@ -13,12 +13,12 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______
+ ),
#else
// ,-----------------------------------------------------------------------------------.
// | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
@@ -30,10 +30,10 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
- {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_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 ,
+ BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______
+ ),
#endif
diff --git a/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h
index 677e46409b..4a32f71bd9 100644
--- a/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h
+++ b/keyboards/planck/keymaps/hieax/common/symbol_guifn_layout.h
@@ -13,12 +13,12 @@
// | |Adjust| \ | | f() | |
// '-----------------------------------------------------------------------------------'
- [_SYMBOL] = {
- {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMBOL] = LAYOUT_planck_grid(
+ _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_GUI, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
// ............................................................... Mouse Actions
@@ -32,9 +32,9 @@
// | | | f() | | f() | |
// '-----------------------------------------------------------------------------------'
- [_MOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_MOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hieax/common/toggle_layout.h b/keyboards/planck/keymaps/hieax/common/toggle_layout.h
index ea4ead56b9..cf3138d6e3 100644
--- a/keyboards/planck/keymaps/hieax/common/toggle_layout.h
+++ b/keyboards/planck/keymaps/hieax/common/toggle_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | Space| | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_TTNUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_TTNUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_GUI, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______},
+ _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_0, LT_EQL, _______, _______, _______
#else
- {_______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______},
+ _______, _______, _______, TT_ESC, KC_SPC, _______, _______, KC_EQL, LT_0, _______, _______, _______
#endif
- },
+ ),
// ............ .................................................. Function Keys
@@ -37,12 +37,12 @@
// | | | | f() | | | | + | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTFNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_TTFNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, TT_ESC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______
+ ),
// ....................................................................... Regex
@@ -56,12 +56,12 @@
// | | | | f() | = | | | + | Space| | | |
// `-----------------------------------------------------------------------------------'
- [_TTREGEX] = {
- {___x___, KC_DOT, KC_ASTR, KC_AMPR, KC_TILD, ___x___, ___x___, KC_GRV, KC_LBRC, KC_RBRC, KC_CIRC, ___x___},
- {___x___, KC_LT, KC_PERC, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___},
- {___x___, KC_COLN, KC_AT, KC_EXLM, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, ___x___},
- {_______, _______, _______, TT_ESC, KC_EQL, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______},
- },
+ [_TTREGEX] = LAYOUT_planck_grid(
+ ___x___, KC_DOT, KC_ASTR, KC_AMPR, KC_TILD, ___x___, ___x___, KC_GRV, KC_LBRC, KC_RBRC, KC_CIRC, ___x___,
+ ___x___, KC_LT, KC_PERC, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___,
+ ___x___, KC_COLN, KC_AT, KC_EXLM, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, ___x___,
+ _______, _______, _______, TT_ESC, KC_EQL, _______, _______, KC_PLUS, KC_SPC, _______, _______, _______
+ ),
// ............................................................ Navigation Layer
@@ -75,12 +75,12 @@
// | | | | f() | | | | | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTCURSOR] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTCURSOR] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_GUI, OS_CTL, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
// ............................................................... Mouse Actions
@@ -94,9 +94,9 @@
// | | | | f() | | | | | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTMOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTMOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/hieax/config.h b/keyboards/planck/keymaps/hieax/config.h
index 655cdf5db3..eb86704578 100644
--- a/keyboards/planck/keymaps/hieax/config.h
+++ b/keyboards/planck/keymaps/hieax/config.h
@@ -14,7 +14,7 @@
// #define MOUSEKEY_WHEEL_DELAY 0
// compile time macro string, see functions/hardware planck script (undefine otherwise)
-#define PRIVATE_STRING
+//#define PRIVATE_STRING
// compile time macro string, must be in quotes
#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n"
diff --git a/keyboards/planck/keymaps/hieax/hiea.h b/keyboards/planck/keymaps/hieax/hiea.h
index 64541d633e..38077e8eeb 100644
--- a/keyboards/planck/keymaps/hieax/hiea.h
+++ b/keyboards/planck/keymaps/hieax/hiea.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_H, HOME_I, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_K, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_K), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Shift| Caps | G | D | N | M | X |
@@ -54,12 +54,12 @@
// | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT
+ ),
#ifdef HOME_MODS
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Fn | Caps | ` | [ | ] | ^ | X |
@@ -71,12 +71,12 @@
// | Ctrl | GUI | Alt | Esc | Space| Ins | Left | + | Space| Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSYMBOL] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, KC_PLUS, SL_SPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_LSYMBOL] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, TD_GRV, KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ HOME_H, HOME_I, HOME_E, ___fn__, KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_K), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_LCBR, KC_RCBR, KC_HASH, S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, KC_PLUS, SL_SPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | . | * | & | ~ | Fn | Caps | G | D | N | M | X |
@@ -89,11 +89,11 @@
// | | ↑Tab | = | Ent | Bksp | |
// `-----------------------------------------------------------------------------------'
- [_RSYMBOL] = {
- {S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W },
- {S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, S_TAB, TD_EQL, LT_INS, SP_LEFT, TD_ENT, LT_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_RSYMBOL] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DOT, KC_ASTR, KC_AMPR, TD_TILD, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_H), TD_LT, KC_PERC, TD_GT, KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), ___fn__, HOME_R, HOME_S, HOME_W ,
+ S(KC_J), TD_COLN, KC_AT, KC_EXLM, KC_SLSH, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, S_TAB, TD_EQL, LT_INS, SP_LEFT, TD_ENT, LT_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
#endif
#endif
diff --git a/keyboards/planck/keymaps/hieax/keymap.c b/keyboards/planck/keymaps/hieax/keymap.c
index 2b08506f25..80de85b884 100644
--- a/keyboards/planck/keymaps/hieax/keymap.c
+++ b/keyboards/planck/keymaps/hieax/keymap.c
@@ -66,17 +66,10 @@
// sudo CPATH=<keymap.c directory>/common make ...
-#include "config.h"
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#ifdef STENO_ENABLE
#include "keymap_steno.h"
#endif
-#ifdef AUDIO_ENABLE
-#include "audio.h"
-#endif
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
@@ -171,7 +164,7 @@ enum planck_keycodes {
#define S_TAB S (KC_TAB)
#define S_UP S (KC_UP)
-#include "tapdance.h"
+#include "common/tapdance.h"
// keycodes
#define ___x___ KC_TRNS
@@ -229,35 +222,35 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#include "hiea.h"
-#include "steno_layout.h"
+#include "common/steno_layout.h"
// ...................................................... Number / Function Keys
-#include "number_fkey_layout.h"
+#include "common/number_fkey_layout.h"
// ......................................................... Symbol / Navigation
-#include "symbol_guifn_layout.h"
+#include "common/symbol_guifn_layout.h"
// ............................................................... Toggle Layers
#ifdef CENTER_TT
-#include "toggle_layout.h"
+#include "common/toggle_layout.h"
#endif
// ......................................................... Short Cuts / Adjust
-#include "chord_layout.h"
+#include "common/chord_layout.h"
};
// ...................................................................... Sounds
-#include "sounds.h"
+#include "common/sounds.h"
// ........................................................... User Keycode Trap
-#include "keycode_functions.h"
+#include "common/keycode_functions.h"
#define BASE_1 1
#define BASE_2 2
@@ -442,4 +435,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
return true;
}
-#include "init.h"
+#include "common/init.h"
diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c
index b53023dd96..63541d5798 100644
--- a/keyboards/planck/keymaps/impossible/keymap.c
+++ b/keyboards/planck/keymaps/impossible/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -41,12 +35,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------------'
*/
-[_WORKMAN] = {
- {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9},
- {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6},
- {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3},
- {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)}
-},
+[_WORKMAN] = LAYOUT_planck_grid(
+ KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9,
+ KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6,
+ KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3,
+ ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)
+),
/* FN-key held (Workman)
* ,-----------------------------------------------------------------------------------------------.
@@ -60,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------------'
*/
-[_FN] = {
- {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9},
- {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6},
- {KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3},
- {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______}
-},
+[_FN] = LAYOUT_planck_grid(
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9,
+ KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6,
+ KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3,
+ _______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______
+),
/* Qwerty
* ,-----------------------------------------------------------------------------------------------.
@@ -79,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {GUI_T(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_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT},
- {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)},
-},
+[_QWERTY] = LAYOUT_planck_grid(
+ GUI_T(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_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)
+),
/* FN-key held (Qwerty)
* ,-----------------------------------------------------------------------------------------------.
@@ -98,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------------'
*/
-[_QW_FN] = {
- {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11},
- {_______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12},
- {_______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX},
- {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______}
-},
+[_QW_FN] = LAYOUT_planck_grid(
+ KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12,
+ _______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------------------.
@@ -117,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX},
- {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX},
- {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)}
-},
+[_PLOVER] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX,
+ KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX,
+ KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)
+),
/* Adjust
* ,-----------------------------------------------------------------------------------------------.
@@ -136,12 +130,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------------'
*/
-[_ADJ] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET},
- {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______}
-}
+[_ADJ] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET,
+ _______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______
+)
};
diff --git a/keyboards/planck/keymaps/jacob/keymap.c b/keyboards/planck/keymaps/jacob/keymap.c
index 5d823157bb..f9a0465d2d 100644
--- a/keyboards/planck/keymaps/jacob/keymap.c
+++ b/keyboards/planck/keymaps/jacob/keymap.c
@@ -1,9 +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 "action_layer.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
//Simple Keymap where CTRL, WINKEY, and ALT keys are placed in a more familiar location for Windows users.
//Focus of this particular keymap is to enable easy transition from more traditional keyboards to OLKB Planck.
@@ -14,24 +9,24 @@
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QW] = { /* Qwerty */
- {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, MT(MOD_RSFT, KC_ENT)},
- {KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
- [_RS] = { /* RAISE */
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
- },
- [_LW] = { /* LOWER */
- {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
- }
+ [_QW] = LAYOUT_planck_grid( /* Qwerty */
+ 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, MT(MOD_RSFT, KC_ENT),
+ KC_LCTL, KC_LGUI, KC_LALT, M(0), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+ [_RS] = LAYOUT_planck_grid( /* RAISE */
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL ,
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [_LW] = LAYOUT_planck_grid( /* LOWER */
+ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c
index 86a2c4c76a..9ac547bb82 100644
--- a/keyboards/planck/keymaps/jeebak/keymap.c
+++ b/keyboards/planck/keymaps/jeebak/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -91,12 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {CTL_ESC, KC_A, KC_S, LT_MC(KC_D),KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT},
- {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_QWERTY] = LAYOUT_planck_grid(
+ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ CTL_ESC, KC_A, KC_S, LT_MC(KC_D),KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT,
+ KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Colemak
* ,-----------------------------------------------------------------------------------------.
@@ -109,12 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {CTL_ESC, KC_A, KC_R, LT_MC(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, SFT_ENT},
- {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_COLEMAK] = LAYOUT_planck_grid(
+ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ CTL_ESC, KC_A, KC_R, LT_MC(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, SFT_ENT,
+ KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------------.
@@ -127,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | PrntScrn | RGUI | Alt | GUI |Lower | TC/Space |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
- {CTL_ESC, KC_A, KC_O, LT_MC(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, SFT_ENT},
- {KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_DVORAK] = LAYOUT_planck_grid(
+ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ CTL_ESC, KC_A, KC_O, LT_MC(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, SFT_ENT,
+ KC_PSCR, KC_RGUI, KC_LALT, KC_LGUI, LOWER, LT_TC, LT_TC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -145,12 +139,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Brite | | | | | | | Prev | Stop | Slct | Mute |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE}
-},
+[_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_LBRC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -163,12 +157,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Brite | | | | | | | Prev | Stop | Slct | Mute |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
- {KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE},
- {KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_DLR, KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE,
+ KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MSEL, KC_MUTE
+),
/* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations
* ,-----------------------------------------------------------------------------------.
@@ -185,12 +179,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* seem to work on Mac. Presumably they'll work under Windows.
*/
-[_TOUCHCURSOR] = {
- {ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______},
- {_______, KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R },
- {_______, AG_UNDO, AG_CUT, AG_COPY, AG_PASTE,KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R, CMD_SLSH,_______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_TOUCHCURSOR] = LAYOUT_planck_grid(
+ ALT_TAB, CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______,
+ _______, KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R ,
+ _______, AG_UNDO, AG_CUT, AG_COPY, AG_PASTE,KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R, CMD_SLSH,_______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Mouse Layer
* ,-----------------------------------------------------------------------------------.
@@ -204,12 +198,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_MOUSECURSOR] = {
- {_______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______},
- {_______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5},
- {_______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_MOUSECURSOR] = LAYOUT_planck_grid(
+ _______, _______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______,
+ _______, KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5,
+ _______, _______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -223,12 +217,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -241,12 +235,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | |Reset |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
+)
};
diff --git a/keyboards/planck/keymaps/jeremy-dev/keymap.c b/keyboards/planck/keymaps/jeremy-dev/keymap.c
index de679a3fc0..787bdd23c1 100644
--- a/keyboards/planck/keymaps/jeremy-dev/keymap.c
+++ b/keyboards/planck/keymaps/jeremy-dev/keymap.c
@@ -2,10 +2,7 @@
// Configuration options
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
enum my_layers {
@@ -32,36 +29,36 @@ enum my_keycodes {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [ALPH] = {
- {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_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
- {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)},
- {CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DEL), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)}
- },
- [NUMS] = {
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH},
- {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_TRNS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS},
- {KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS}
- },
- [CURS] = {
- {KC_MPLY, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT},
- {KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT},
- {KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO}
- },
- [SYMB] = {
- {MY_DEQL, MY_MEQL, MY_SEQL, MY_PEQL, MY_NEQL, KC_NO, KC_NO, MY_LTGT, KC_LABK, KC_RABK, KC_COLN, KC_DLR},
- {KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, KC_NO, KC_PIPE, MY_DPIP, KC_GRV, KC_QUOT, KC_DQUO, KC_HASH},
- {KC_BSLS, KC_CIRC, KC_PERC, KC_UNDS, KC_NO, KC_NO, KC_AMPR, MY_DAMP, KC_TILD, KC_AT, KC_EXLM, KC_QUES},
- {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO}
- },
- [FKEY] = {
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12},
- {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4},
- {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}
- }
+ [ALPH] = LAYOUT_planck_grid(
+ 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_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
+ SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH),
+ CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DEL), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)
+ ),
+ [NUMS] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH,
+ KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_TRNS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS,
+ KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS
+ ),
+ [CURS] = LAYOUT_planck_grid(
+ KC_MPLY, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT,
+ KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT,
+ KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO
+ ),
+ [SYMB] = LAYOUT_planck_grid(
+ MY_DEQL, MY_MEQL, MY_SEQL, MY_PEQL, MY_NEQL, KC_NO, KC_NO, MY_LTGT, KC_LABK, KC_RABK, KC_COLN, KC_DLR,
+ KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, KC_NO, KC_PIPE, MY_DPIP, KC_GRV, KC_QUOT, KC_DQUO, KC_HASH,
+ KC_BSLS, KC_CIRC, KC_PERC, KC_UNDS, KC_NO, KC_NO, KC_AMPR, MY_DAMP, KC_TILD, KC_AT, KC_EXLM, KC_QUES,
+ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO
+ ),
+ [FKEY] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4,
+ KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+ )
};
void press_key(uint16_t key) {
diff --git a/keyboards/planck/keymaps/jhenahan/config.h b/keyboards/planck/keymaps/jhenahan/config.h
index 1e42b92b9c..4dbcdd639e 100644
--- a/keyboards/planck/keymaps/jhenahan/config.h
+++ b/keyboards/planck/keymaps/jhenahan/config.h
@@ -4,6 +4,7 @@
#include "../../config.h"
#define FORCE_NKRO
+#undef WORKMAN_SOUND
#define WORKMAN_SOUND COLEMAK_SOUND
/*
diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c
index ea7a536102..e8d7456040 100644
--- a/keyboards/planck/keymaps/jhenahan/keymap.c
+++ b/keyboards/planck/keymaps/jhenahan/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -46,12 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_WORKMAN] = {
- {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
- {MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, 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}
-},
+[_WORKMAN] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC,
+ MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, 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
+),
/* Workman Dead Layer
* ,-----------------------------------------------------------------------------------.
@@ -64,12 +58,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | < | ~ | ` | , | # | ^ | > | | |
* `-----------------------------------------------------------------------------------'
*/
-[_DEAD] = {
- {XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX},
- {XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX},
- {XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX},
- {XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX}
-},
+[_DEAD] = LAYOUT_planck_grid(
+ XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX,
+ XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX,
+ XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX,
+ XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX
+),
/* Qwerty
* ,-----------------------------------------------------------------------------------.
@@ -82,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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}
-},
+[_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,
+ 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
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -100,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Prev | Next | Vol- | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_VOLU, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY}
-},
+[_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_VOLU, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY
+),
/* Raise - KWM Interaction
* ,-----------------------------------------------------------------------------------.
@@ -118,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX},
- {XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX},
- {_______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX,
+ XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX,
+ _______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -137,12 +131,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC},
- {TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT},
- {EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_PLOVER] = LAYOUT_planck_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_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC,
+ TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -155,12 +149,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/jirgn/keymap.c b/keyboards/planck/keymaps/jirgn/keymap.c
index 3917355a87..d89d702c2c 100644
--- a/keyboards/planck/keymaps/jirgn/keymap.c
+++ b/keyboards/planck/keymaps/jirgn/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -58,12 +56,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Hyper| Alt | Super| Lower| Space | Raise| Super| ALt | Hyper| |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {CTL_T(KC_ESC), NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NAV_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, SFT_T(KC_ENT)},
- {___x___, KC_HYPR, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LGUI, KC_LALT, KC_HYPR, ___x___}
-},
+[_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,
+ CTL_T(KC_ESC), NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NAV_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, SFT_T(KC_ENT),
+ ___x___, KC_HYPR, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LGUI, KC_LALT, KC_HYPR, ___x___
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -76,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {KC_TILD, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {CTL_DEL, LALT(KC_1), LALT(KC_2), KC_EUR, LALT(KC_4), LALT(KC_5), LALT(KC_6), KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, S(KC_NUHS), S(KC_NUBS), _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ KC_TILD, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC,
+ CTL_DEL, LALT(KC_1), LALT(KC_2), KC_EUR, LALT(KC_4), LALT(KC_5), LALT(KC_6), KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, S(KC_NUHS), S(KC_NUBS), _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
- {CTL_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, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_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,
+ CTL_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, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Navigation
* ,-----------------------------------------------------------------------------------.
@@ -112,12 +110,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_NAVIGATION] = {
- {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
- {_______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END , KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT, _______, ___x___},
- {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______},
- {___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, ___x___}
-},
+[_NAVIGATION] = LAYOUT_planck_grid(
+ ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___,
+ _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END , KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT, _______, ___x___,
+ _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, _______,
+ ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___, _______, _______, _______, ___x___
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -131,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {___x___, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
- {___x___, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {EXT_PLV, ___x___, ___x___, KC_C, KC_V, ___x___, ___x___, KC_N, KC_M, ___x___, ___x___, ___x___}
-},
+[_PLOVER] = LAYOUT_planck_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 ,
+ ___x___, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ ___x___, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ EXT_PLV, ___x___, ___x___, KC_C, KC_V, ___x___, ___x___, KC_N, KC_M, ___x___, ___x___, ___x___
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -149,12 +147,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, PLOVER, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, PLOVER, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/joe/keymap.c b/keyboards/planck/keymaps/joe/keymap.c
index ff17fa2366..b759a86cea 100644
--- a/keyboards/planck/keymaps/joe/keymap.c
+++ b/keyboards/planck/keymaps/joe/keymap.c
@@ -1,55 +1,54 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
#include "keymap_colemak.h"
+#define FN3_ESC LT(6, KC_ESC)
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = { /* Joe colemak */
- {F(3), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS},
- {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT },
- {F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT},
- {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
- },
- [1] = { /* Joe soft Colemak */
- {F(3), CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS},
- {KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT },
- {F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT},
- {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
- },
- [2] = { /* Joe NUMPAD */
- {F(3), KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 },
- {KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 },
- {F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 },
- {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT}
- },
- [3] = { /* Joe 1337 haxOr5*/
- {F(3), KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS},
- {KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT },
- {F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT},
- {KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
- },
- [4] = { /* Joe LOWER fn1 */
- {KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(3), M(2), M(1), M(0) },
- {KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS},
- {KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_PGUP, KC_EQL },
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_NO, KC_HOME, KC_PGDN, KC_END }
- },
- [5] = { /* Joe UPPER fn2 */
- {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_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_WH_U, KC_BTN4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO },
- {KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_L, KC_WH_D, KC_WH_R, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(LALT(KC_UP)), LCTL(KC_PGDN) },
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_NO, KC_NO, MO(5), KC_NO, LCTL(LALT(KC_LEFT)), LCTL(LALT(KC_DOWN)), LCTL(LALT(KC_RGHT))}
- },
- [6] = { /* Joe SPECIAL fn3 */
- {KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO },
- {KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET },
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO },
- {F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L))}
- }
+ [0] = LAYOUT_planck_grid( /* Joe colemak */
+ FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS,
+ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT ,
+ F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [1] = LAYOUT_planck_grid( /* Joe soft Colemak */
+ FN3_ESC, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS,
+ KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT ,
+ F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [2] = LAYOUT_planck_grid( /* Joe NUMPAD */
+ FN3_ESC, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 ,
+ KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 ,
+ F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 ,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT
+ ),
+ [3] = LAYOUT_planck_grid( /* Joe 1337 haxOr5*/
+ FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS,
+ KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT ,
+ F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [4] = LAYOUT_planck_grid( /* Joe LOWER fn1 */
+ KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(3), M(2), M(1), M(0) ,
+ KC_BSPC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_BSLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC, KC_PGUP, KC_EQL ,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_NO, KC_HOME, KC_PGDN, KC_END
+ ),
+ [5] = LAYOUT_planck_grid( /* Joe UPPER fn2 */
+ 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_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_WH_U, KC_BTN4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO ,
+ KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_L, KC_WH_D, KC_WH_R, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(LALT(KC_UP)), LCTL(KC_PGDN) ,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(4), KC_NO, KC_NO, MO(5), KC_NO, LCTL(LALT(KC_LEFT)), LCTL(LALT(KC_DOWN)), LCTL(LALT(KC_RGHT))
+ ),
+ [6] = LAYOUT_planck_grid( /* Joe SPECIAL fn3 */
+ KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO ,
+ KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET ,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO ,
+ F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L))
+ )
};
const uint16_t PROGMEM fn_actions[] = {
- /* ESC on tap, fn3 on hold */
- [3] = ACTION_LAYER_TAP_KEY(6, KC_ESC),
-
/* toggle layers */
[6] = ACTION_DEFAULT_LAYER_SET(0),
[7] = ACTION_DEFAULT_LAYER_SET(1),
diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c
index b0636d3147..274a3b57fb 100644
--- a/keyboards/planck/keymaps/johannes/keymap.c
+++ b/keyboards/planck/keymaps/johannes/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
// 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.
@@ -24,12 +23,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | alt |play/p| super|shift | Space|Raise | lower| alt | altgr| |fn |
* `-----------------------------------------------------------------------------------'
*/
-[QWERTY] = {
- {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_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {_______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)}
-},
+[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,
+ 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_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ _______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -42,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[LOWER] = {
- {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_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______},
- {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[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_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______,
+ _______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -60,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
- {_______, _______, KC_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[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_DEL,
+ _______, _______, KC_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Fn
* ,-----------------------------------------------------------------------------------.
@@ -78,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | CAPS | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[FUNCTION] = {
- {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_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______},
- {_______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______}
-},
+[FUNCTION] = LAYOUT_planck_grid(
+ 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_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______,
+ _______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______
+),
};
diff --git a/keyboards/planck/keymaps/kelorean/keymap.c b/keyboards/planck/keymaps/kelorean/keymap.c
index 03268d160a..f6bc65b62b 100644
--- a/keyboards/planck/keymaps/kelorean/keymap.c
+++ b/keyboards/planck/keymaps/kelorean/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -54,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt|
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC},
- {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, SFT_T(KC_ENT)},
- {KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)}
-},
+[_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_ESC,
+ 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, SFT_T(KC_ENT),
+ KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -72,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt|
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC},
- {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
- {KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)}
-},
+[_COLEMAK] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC,
+ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT),
+ KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -90,12 +88,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Brite| Alt | GUI |Lower | Space |Raise | Left | Up | Down |Ctr/Rt|
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_ESC},
- {KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT},
- {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)},
- {KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)}
-},
+[_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_ESC,
+ KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT),
+ KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, CTL_T(KC_RGHT)
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -108,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -126,12 +124,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -145,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -163,12 +161,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, 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, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_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, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c
index 8677e7b20f..ccd4386c92 100644
--- a/keyboards/planck/keymaps/khord/keymap.c
+++ b/keyboards/planck/keymaps/khord/keymap.c
@@ -1,6 +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 "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -53,12 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {CTL_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},
- {TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ CTL_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,
+ TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT),
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -71,12 +69,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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, W10SLP, _______, KC_END, KC_HOME, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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, W10SLP, _______, KC_END, KC_HOME, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -89,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_PGDN, KC_PGUP, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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_PGDN, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -107,12 +105,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | CADel|
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, ADMIN, SMSPC1, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, M_BRDFT, M_BRINC, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, M_BRTOG, M_BRDEC, C_A_INS},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_DEL}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, ADMIN, SMSPC1, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, M_BRDFT, M_BRINC, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, M_BRTOG, M_BRDEC, C_A_INS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_A_DEL
+)
};
diff --git a/keyboards/planck/keymaps/kloki/keymap.c b/keyboards/planck/keymaps/kloki/keymap.c
index 99f00a5f38..c22ca15b4e 100644
--- a/keyboards/planck/keymaps/kloki/keymap.c
+++ b/keyboards/planck/keymaps/kloki/keymap.c
@@ -1,6 +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 "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
enum planck_layers {
@@ -31,20 +29,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | GUI | Alt | Alt | [ | ] | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_WORKMAN] = {
- {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC },
- {CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT },
- {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT },
- {KC_LGUI, KC_LALT, KC_LBRC, KC_RBRC, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
-},
+[_WORKMAN] = LAYOUT_planck_grid(
+ KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC ,
+ CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT ,
+ KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT ,
+ KC_LGUI, KC_LALT, KC_LBRC, KC_RBRC, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
-[_QWERTY] = {
- {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
- {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT},
- {_______, _______, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______}
-},
+[_QWERTY] = LAYOUT_planck_grid(
+ _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT ,
+ _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
+ _______, _______, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______
+),
/* LOWER
* ,-----------------------------------------------------------------------------------.
@@ -57,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_BTN1, KC_MS_U, KC_BTN2, _______, _______},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_LOWER] = 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_BTN1, KC_MS_U, KC_BTN2, _______, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* RAISE
* ,-----------------------------------------------------------------------------------.
@@ -75,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_TILD, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_ASTR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
- {KC_DEL, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_UNDS, KC_PLUS, KC_EQL, KC_BSLS, _______},
- {_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_LABK, KC_RABK, KC_HOME, KC_END, KC_PIPE},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_ASTR, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
+ KC_DEL, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_UNDS, KC_PLUS, KC_EQL, KC_BSLS, _______,
+ _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_LABK, KC_RABK, KC_HOME, KC_END, KC_PIPE,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
@@ -96,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, WORKMAN, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, WORKMAN, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/kmontag42/keymap.c b/keyboards/planck/keymaps/kmontag42/keymap.c
index fc418f4e8e..6910dbc250 100644
--- a/keyboards/planck/keymaps/kmontag42/keymap.c
+++ b/keyboards/planck/keymaps/kmontag42/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -50,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | GUI | Ctrl | Alt | ) |Lower | Space |Raise | Left | Down | Up |Right |
* `--------------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {KC_LGUI, KC_LCTL, KC_LALT, KC_RPRN, LOWER, KC_LEAD, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LGUI, KC_LCTL, KC_LALT, KC_RPRN, LOWER, KC_LEAD, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -68,12 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -86,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -105,12 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -123,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/kyle/keymap.c b/keyboards/planck/keymaps/kyle/keymap.c
index eee5090139..a788aa859f 100644
--- a/keyboards/planck/keymaps/kyle/keymap.c
+++ b/keyboards/planck/keymaps/kyle/keymap.c
@@ -1,31 +1,31 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {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},
- {KC_RCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ 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,
+ KC_RCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Colemak */
- {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_TAB, 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_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* RAISE */
- {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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS)},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS},
- {BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-}
+),
+[1] = LAYOUT_planck_grid( /* Colemak */
+ 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_TAB, 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_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC,
+ KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS),
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+)
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c
index 59bb36038b..249bcb87a7 100644
--- a/keyboards/planck/keymaps/lae3/keymap.c
+++ b/keyboards/planck/keymaps/lae3/keymap.c
@@ -1,10 +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 "action_layer.h"
-#ifdef AUDIO_ENABLE
-#include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -57,12 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | Move |Lower | Space |Raise | Move | Alt | GUI | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = {
- {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_SLSH, KC_RSFT},
- {KC_LCTL, KC_LGUI, KC_LALT, MO(_MV), LOWER, KC_SPC, KC_SPC, RAISE, MO(_MV), KC_RALT, KC_RGUI, KC_RCTL}
- },
+ [_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_SLSH, KC_RSFT,
+ KC_LCTL, KC_LGUI, KC_LALT, MO(_MV), LOWER, KC_SPC, KC_SPC, RAISE, MO(_MV), KC_RALT, KC_RGUI, KC_RCTL
+ ),
/* Arrow
* ,-----------------------------------------------------------------------------------.
@@ -75,12 +69,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Left | Down | Right|
* `-----------------------------------------------------------------------------------'
*/
- [_ARROW] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT}
- },
+ [_ARROW] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT
+ ),
/* Numpad
* ,-----------------------------------------------------------------------------------.
@@ -93,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | 0 | . | + | |
* `-----------------------------------------------------------------------------------'
*/
- [_NUMPAD] = {
- {_______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______},
- {_______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS, _______}
- },
+ [_NUMPAD] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______,
+ _______, _______, _______, _______, _______, _______, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS, _______
+ ),
/* Movement
* ,-----------------------------------------------------------------------------------.
@@ -111,12 +105,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_MOVEMENT] = {
- {_______, KC_MB2, KC_MUP, KC_MB1, KC_MWUP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______},
- {_______, KC_MLFT, KC_MDN, KC_MRGT, KC_MWDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [_MOVEMENT] = LAYOUT_planck_grid(
+ _______, KC_MB2, KC_MUP, KC_MB1, KC_MWUP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______,
+ _______, KC_MLFT, KC_MDN, KC_MRGT, KC_MWDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -129,12 +123,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, _______},
- {KC_CAPS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, XXXXXXX, _______},
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [_LOWER] = LAYOUT_planck_grid(
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN, _______,
+ KC_CAPS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, XXXXXXX, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -147,12 +141,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = {
- {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_INS, KC_HOME, KC_PGUP, _______},
- {KC_CAPS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, XXXXXXX, _______},
- {_______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [_RAISE] = LAYOUT_planck_grid(
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_INS, KC_HOME, KC_PGUP, _______,
+ KC_CAPS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_PIPE, KC_DQUO, XXXXXXX, _______,
+ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -165,12 +159,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = {
- {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, BL_STEP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QWERTY, ARROW, NUMPAD, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- }
+ [_ADJUST] = LAYOUT_planck_grid(
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, BL_STEP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, QWERTY, ARROW, NUMPAD, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
diff --git a/keyboards/planck/keymaps/leo/keymap.c b/keyboards/planck/keymaps/leo/keymap.c
index d45f87a5d2..5a4a720fff 100644
--- a/keyboards/planck/keymaps/leo/keymap.c
+++ b/keyboards/planck/keymaps/leo/keymap.c
@@ -1,28 +1,28 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* BASE */
- {KC_ESC, KC_LBRC, KC_QUOT, KC_SCLN, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
- {KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT},
- {KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_COMM},
- {KC_LCTL, KC_LALT, KC_LGUI, MO(4), MO(3), KC_SPC, KC_SPC, MO(2), MO(4), KC_RGUI, KC_RALT, KC_RCTL}
-},
-[2] = { /* RAISE */
- {RALT(KC_RBRC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_RBRC)},
- {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
-[3] = { /* LOWER */
- {S(KC_EQL),S(KC_1),S(KC_2),S(KC_3),RALT(KC_5),S(KC_5), S(KC_6), S(KC_7),RALT(KC_7),RALT(KC_0),S(KC_0), KC_MINS},
- {KC_TRNS,RALT(KC_2),S(KC_SLSH),KC_NUBS,S(KC_NUBS),RALT(KC_MINS),RALT(KC_NUBS), KC_NUHS, S(KC_8), S(KC_9), S(KC_MINS), KC_SLSH},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
-[4] = { /* META */
- {KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_DEL},
- {KC_TRNS, KC_RGHT, KC_DOWN, KC_LEFT, KC_PGUP, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_PGDN, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS}
-}
+[0] = LAYOUT_planck_grid( /* BASE */
+ KC_ESC, KC_LBRC, KC_QUOT, KC_SCLN, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT,
+ KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_COMM,
+ KC_LCTL, KC_LALT, KC_LGUI, MO(4), MO(3), KC_SPC, KC_SPC, MO(2), MO(4), KC_RGUI, KC_RALT, KC_RCTL
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ RALT(KC_RBRC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, S(KC_RBRC),
+ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_EQL),S(KC_1),S(KC_2),S(KC_3),RALT(KC_5),S(KC_5), S(KC_6), S(KC_7),RALT(KC_7),RALT(KC_0),S(KC_0), KC_MINS,
+ KC_TRNS,RALT(KC_2),S(KC_SLSH),KC_NUBS,S(KC_NUBS),RALT(KC_MINS),RALT(KC_NUBS), KC_NUHS, S(KC_8), S(KC_9), S(KC_MINS), KC_SLSH,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_8), RALT(KC_9), KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[4] = LAYOUT_planck_grid( /* META */
+ KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_DEL,
+ KC_TRNS, KC_RGHT, KC_DOWN, KC_LEFT, KC_PGUP, KC_TRNS, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_PGDN, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS
+)
};
diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c
index 96393bc35d..9bd4b7a60b 100644
--- a/keyboards/planck/keymaps/lucas/keymap.c
+++ b/keyboards/planck/keymaps/lucas/keymap.c
@@ -8,14 +8,13 @@ The "Gaming" layer is mainly customized for CS:GO.
If you have any question about this keymap feel free to shoot me a message on reddit!
*/
-#include "keymap.h"
+#include QMK_KEYBOARD_H
#include "keymap_german.h"
-#include "backlight.h"
-#include "debug.h"
-#include "action_layer.h"
+
+#define LT_SPC LT(4, KC_SPC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Colemak
+[0] = LAYOUT_planck_grid( /* Colemak
* ,-----------------------------------------------------------------------.
* | Esc | q | w | f | p | g | j | l | u | y | ; | - |
* |-----------------------------------------------------------------------|
@@ -26,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | CTL | GUI | Tab | ALT |Lower| Space |Raise|Left |Down | Up |Right|
* `-----------------------------------------------------------------------'
*/
- {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Z, DE_SCLN, DE_MINS},
- {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, DE_QUOT},
- {M(0), KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, DE_COMM, DE_DOT, DE_SLSH, KC_ENT},
- {KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, MO(3),F(3), F(3), MO(2),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[1] = { /* Symbols
+ KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Z, DE_SCLN, DE_MINS,
+ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, DE_QUOT,
+ M(0), KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, DE_COMM, DE_DOT, DE_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_TAB, KC_LALT, MO(3), LT_SPC, LT_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[1] = LAYOUT_planck_grid( /* Symbols
* ,-----------------------------------------------------------------------.
* | | | | | | | | | | | : | |
* |-----------------------------------------------------------------------|
@@ -42,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------'
*/
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DOT, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
-[2] = { /* Raise
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DOT, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+[2] = LAYOUT_planck_grid( /* Raise
* ,-----------------------------------------------------------------------.
* | | Ä | | | | | | | Ü | Ö | |Game |
* |-----------------------------------------------------------------------|
@@ -58,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P |
* `-----------------------------------------------------------------------'
*/
- {KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4)},
- {KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12)},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11)},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* Lower
+ KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4),
+ KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12),
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* Lower
* ,-----------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | + |
* |-----------------------------------------------------------------------|
@@ -74,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |LCTL |LGUI | Tab |LALT | | Space |Raise|Home |PgDn |PgUp | End |
* `-----------------------------------------------------------------------'
*/
- {DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, DE_PLUS},
- {DE_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_EQL},
- {KC_NO, KC_NO, KC_NO, DE_PIPE, DE_LBRC, DE_RBRC, DE_LCBR, DE_RCBR, DE_EURO, KC_NO, DE_BSLS, KC_ENT},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
-[4] = { /* Function
+ DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, DE_PLUS,
+ DE_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_EQL,
+ KC_NO, KC_NO, KC_NO, DE_PIPE, DE_LBRC, DE_RBRC, DE_LCBR, DE_RCBR, DE_EURO, KC_NO, DE_BSLS, KC_ENT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
+[4] = LAYOUT_planck_grid( /* Function
* ,-----------------------------------------------------------------------.
* | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 |
* |-----------------------------------------------------------------------|
@@ -90,12 +89,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | |Light|BL DN|BL UP| | | | |Mute |Vol- |Vol+ | P/P |
* `-----------------------------------------------------------------------'
*/
- {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24},
- {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_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_NO, KC_NO, KC_NO, RESET, KC_NO},
- {KC_NO, BL_TOGG, BL_DEC, BL_INC, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[5] = { /* Gaming
+ KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
+ 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_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_NO, KC_NO, KC_NO, RESET, KC_NO,
+ KC_NO, BL_TOGG, BL_DEC, BL_INC, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[5] = LAYOUT_planck_grid( /* Gaming
* ,-----------------------------------------------------------------------.
* | Buy | ESC | q | w | e | r | t | y | u | i | o | p |
* |-----------------------------------------------------------------------|
@@ -106,12 +105,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | Tab | ALT | | Space |CrJmp| GUI |Left |Down |Right|
* `-----------------------------------------------------------------------'
*/
- {MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4)},
- {KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN},
- {KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH},
- {KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT}
-},
-[6] = { /* Gaming
+ MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4),
+ KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN,
+ KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH,
+ KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT
+),
+[6] = LAYOUT_planck_grid( /* Gaming
* CS:GO buy binds
* ,-----------------------------------------------------------------------.
* | | | | | | | | | 7 | 8 | 9 | |
@@ -123,15 +122,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | Tab | ALT | | Space |CrJmp| | 0 | KP+ |PEnt |
* `-----------------------------------------------------------------------'
*/
- {KC_TRNS, KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_P7, KC_P8, KC_P9, KC_NO},
- {KC_BSPC, KC_NO, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_P4, KC_P5, KC_P6, KC_END},
- {KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_P1, KC_P2, KC_P3, KC_PGDN},
- {KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_NO, KC_P0, KC_PDOT, KC_PENT}
-},
+ KC_TRNS, KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_P7, KC_P8, KC_P9, KC_NO,
+ KC_BSPC, KC_NO, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_P4, KC_P5, KC_P6, KC_END,
+ KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_K, KC_P1, KC_P2, KC_P3, KC_PGDN,
+ KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_NO, KC_P0, KC_PDOT, KC_PENT
+),
};
const uint16_t PROGMEM fn_actions[] = {
- [3] = ACTION_LAYER_TAP_KEY(4,KC_SPC), // to Function
[4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming
[5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap
};
diff --git a/keyboards/planck/keymaps/lukas/keymap.c b/keyboards/planck/keymaps/lukas/keymap.c
index 7adb6a3dd0..510cb147bd 100644
--- a/keyboards/planck/keymaps/lukas/keymap.c
+++ b/keyboards/planck/keymaps/lukas/keymap.c
@@ -1,8 +1,4 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
// This simple keymap is optimized for xmonad users using super as their modifier key.
// M(1) makes it possible to change virtual screens and swap windows between them.
@@ -13,24 +9,24 @@
#define _RS 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QW] = { /* Qwerty */
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {KC_LCTL, KC_LALT, KC_LGUI, M(1), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
- [_RS] = { /* RAISE */
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
- },
- [_LW] = { /* LOWER */
- {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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
- }
+ [_QW] = LAYOUT_planck_grid( /* Qwerty */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LCTL, KC_LALT, KC_LGUI, M(1), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+ [_RS] = LAYOUT_planck_grid( /* RAISE */
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL ,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [_LW] = LAYOUT_planck_grid( /* LOWER */
+ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c
index 2ee8a5072e..1fa0ea0745 100644
--- a/keyboards/planck/keymaps/luke/keymap.c
+++ b/keyboards/planck/keymaps/luke/keymap.c
@@ -41,8 +41,7 @@
*/
-#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
// Layers
#define _COLEMAK 0
@@ -112,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `---------------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
- {CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)}
-},
+[_COLEMAK] = LAYOUT_planck_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_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) ,
+ CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)
+),
@@ -133,12 +132,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `---------------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
- {CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
+[_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,
+ 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_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) ,
+ CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/* Symbols
@@ -153,12 +152,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_SYM] = {
- {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC},
- {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS},
- {KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT },
- {THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______}
-},
+[_SYM] = LAYOUT_planck_grid(
+ KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC,
+ FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS,
+ KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT ,
+ THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______
+),
/* Numbers
@@ -173,12 +172,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_NUM] = {
- {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
- {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT },
- {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT },
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______}
-},
+[_NUM] = LAYOUT_planck_grid(
+ KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT ,
+ KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT ,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______
+),
/* Gr layer / international keys
@@ -193,20 +192,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_GR] = {
- {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______},
- {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______},
- {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_GR] = LAYOUT_planck_grid(
+ _______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______,
+ _______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______,
+ MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S),
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
// Shifted layer of the above
-[_GR_S] = {
- {_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______},
- {_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______},
- {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_GR_S] = LAYOUT_planck_grid(
+ _______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______,
+ _______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______,
+ MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S),
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Adjust Layer (Gr + Num)
@@ -221,12 +220,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_ADJ] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
- {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_ADJ] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,
+ XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Navigation
@@ -241,12 +240,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_NAV] = {
- {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC},
- {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT },
- {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT },
- {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______}
-},
+[_NAV] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC,
+ XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT ,
+ XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT ,
+ _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______
+),
/* Plover Layer
* ,-----------------------------------------------------------------------------------.
@@ -260,12 +259,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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},
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-}
+[_PLOVER] = LAYOUT_planck_grid(
+ 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,
+ KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
+ EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+)
};
diff --git a/keyboards/planck/keymaps/mason/keymap.c b/keyboards/planck/keymaps/mason/keymap.c
index 3843bf2100..9cf65c172d 100644
--- a/keyboards/planck/keymaps/mason/keymap.c
+++ b/keyboards/planck/keymaps/mason/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
enum planck_layers {
_QWERTY,
@@ -26,12 +25,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Caps | Esc | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
- },
+ [_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,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_CAPS, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -44,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = {
- {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
- },
+ [_LOWER] = LAYOUT_planck_grid(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), S(KC_BSLS), _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -62,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = {
- {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {_______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
- {_______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
- },
+ [_RAISE] = LAYOUT_planck_grid(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
+ _______, KC_DEL, KC_END, KC_PGDN, KC_NLCK, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+ ),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -80,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER},
- {_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- }
+ [_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_POWER,
+ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_MOD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/planck/keymaps/matrixman/keymap.c b/keyboards/planck/keymaps/matrixman/keymap.c
index 583967f63a..20982a24ea 100644
--- a/keyboards/planck/keymaps/matrixman/keymap.c
+++ b/keyboards/planck/keymaps/matrixman/keymap.c
@@ -1,8 +1,4 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
-#include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
// http://www.keyboard-layout-editor.com/#/gists/eb0696806831fc0d93c9
@@ -14,47 +10,47 @@
#define _NAV_ALT 5
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_PROSE] = {
- {LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P)}
- ,{KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT}
- ,{SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)}
- ,{KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT}
-},
+[_PROSE] = LAYOUT_planck_grid(
+ LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P)
+ ,KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT
+ ,SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)
+ ,KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT
+),
// accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was
-[_SYMB_L] = {
- {KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE}
- ,{KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS}
- ,{KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS}
- ,{LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_0, KC_DOT, KC_DOT, KC_TRNS}
-},
+[_SYMB_L] = LAYOUT_planck_grid(
+ KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE
+ ,KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS
+ ,KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS
+ ,LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_0, KC_DOT, KC_DOT, KC_TRNS
+),
// accessed via the right symb-layer key, includes a colon where the left symb-layer key was
-[_SYMB_R] = {
- {KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE}
- ,{KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS}
- ,{KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS}
- ,{LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_COLN, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS}
-},
+[_SYMB_R] = LAYOUT_planck_grid(
+ KC_GRV, KC_TILD, KC_ASTR, KC_AMPR, KC_SLSH, LSFT(KC_COMM), LSFT(KC_DOT), KC_BSLS, KC_7, KC_8, KC_9, KC_PIPE
+ ,KC_UNDS, KC_CIRC, KC_PERC, KC_DLR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_4, KC_5, KC_6, KC_MINS
+ ,KC_EQL , KC_HASH, KC_AT, KC_EXLM, KC_LCBR, KC_TRNS, KC_TRNS, KC_RCBR, KC_1, KC_2, KC_3, KC_PLUS
+ ,LSFT(KC_QUOT), KC_TRNS, KC_COMM, LSFT(KC_SLSH), KC_COLN, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS
+),
// accessed via the left nav-layer key, includes a F10 where the right nav-layer key was
-[_NAV_L] = {
- {KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10}
- ,{KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11}
- ,{KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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}
-},
+[_NAV_L] = LAYOUT_planck_grid(
+ KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
+ ,KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11
+ ,KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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
+),
// accessed via the right nav-layer key, includes a F1 where the left nav-layer key was
-[_NAV_R] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_TRNS}
- ,{KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11}
- ,{KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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}
-},
+[_NAV_R] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_TRNS
+ ,KC_BTN1, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11
+ ,KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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
+),
// accessed via the lower alt keys, moves tab and delete to make alt+tab and ctrl+alt+del feel more standard
-[_NAV_ALT] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_DELETE}
- ,{KC_TAB, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11}
- ,{KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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}
-}
+[_NAV_ALT] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, BL_STEP, KC_F6, KC_F7, KC_F8, KC_F9, KC_DELETE
+ ,KC_TAB, KC_MS_L, KC_MS_U, KC_MS_D, KC_MS_R, KC_PSCREEN, KC_PAUSE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11
+ ,KC_BTN2, KC_BTN4, KC_MS_WH_UP,KC_MS_WH_DOWN, KC_BTN5, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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
+)
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/max/keymap.c b/keyboards/planck/keymaps/max/keymap.c
index a80d677c64..1e5d6a61c2 100644
--- a/keyboards/planck/keymaps/max/keymap.c
+++ b/keyboards/planck/keymaps/max/keymap.c
@@ -1,31 +1,31 @@
-#include "keymap.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = { /* Qwerty */
- {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_SLSH, KC_QUOT},
- {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+[0] = LAYOUT_planck_grid( /* Qwerty */
+ 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_SLSH, KC_QUOT,
+ KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
// Space is repeated to accommadate for both spacebar wiring positions
-},
-[1] = { /* Colemak */
- {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_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, 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_QUOT},
- {KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[2] = { /* RAISE */
- {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_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS},
- {KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[3] = { /* LOWER */
- {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC},
- {KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS},
- {KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS)},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-}
+),
+[1] = LAYOUT_planck_grid( /* Colemak */
+ 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_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, 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_QUOT,
+ KC_LCTL, BL_STEP, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[2] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS,
+ KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[3] = LAYOUT_planck_grid( /* LOWER */
+ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC,
+ KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS,
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS),
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+)
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c
index 3887881a9c..814a28deb8 100644
--- a/keyboards/planck/keymaps/mitch/keymap.c
+++ b/keyboards/planck/keymaps/mitch/keymap.c
@@ -1,5 +1,4 @@
-#include "keymap.h"
-#include "quantum.h"
+#include QMK_KEYBOARD_H
#define QWERTY 0
#define LOWER 1
@@ -21,12 +20,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Esc | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) },
- {KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[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,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) ,
+ KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -39,12 +38,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | Enter | | | PgUp | PgUn | |
* `-----------------------------------------------------------------------------------'
*/
-[LOWER] = {
- {GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
- {KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE},
- {_______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT},
- {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______}
-},
+[LOWER] = LAYOUT_planck_grid(
+ GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE,
+ _______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT,
+ _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -58,10 +57,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[RAISE] = {
- {KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______},
- {_______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS},
- {_______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT},
- {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______}
-}
+[RAISE] = LAYOUT_planck_grid(
+ KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS,
+ _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT,
+ _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______
+)
};
diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c
index 8179f4ab64..4862526e12 100644
--- a/keyboards/planck/keymaps/mjt/keymap.c
+++ b/keyboards/planck/keymaps/mjt/keymap.c
@@ -1,12 +1,6 @@
// This is MJT's bastardization of the planck and minivan defaults
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -50,12 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, SFT_T(KC_ENT) },
- {MO(_DYN), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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, SFT_T(KC_ENT) ,
+ MO(_DYN), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -68,12 +62,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -86,12 +80,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Dn |Pg Up | End |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_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_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_PGDN, KC_PGUP, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -105,12 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -123,18 +117,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |TogLED| | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL },
- {_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
- {_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
-[_DYN] = {
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ },
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL ,
+ _______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______,
+ _______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+[_DYN] = LAYOUT_planck_grid(
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ ,
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______
+)
};
diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c
index af72699a50..6274a9a602 100644
--- a/keyboards/planck/keymaps/mjtnumsym/keymap.c
+++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c
@@ -1,12 +1,6 @@
// This is MJT's bastardization of the planck and minivan defaults
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -49,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |FKEYS | Space |NUMSYM | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, SFT_T(KC_ENT) },
- {KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FKEYS, KC_SPC, KC_SPC, NUMSYM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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, SFT_T(KC_ENT) ,
+ KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FKEYS, KC_SPC, KC_SPC, NUMSYM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* FKEYS
* ,-----------------------------------------------------------------------------------.
@@ -67,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_FKEYS] = {
- {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______},
- {KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2},
- {_______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_FKEYS] = LAYOUT_planck_grid(
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
+ KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2,
+ _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* NUMSYM
* ,-----------------------------------------------------------------------------------.
@@ -85,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Dn |Pg Up | End |
* `-----------------------------------------------------------------------------------'
*/
-[_NUMSYM] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
- {_______,KC_UNDS, KC_PLUS,KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_NUMSYM] = 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_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______,KC_UNDS, KC_PLUS,KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -104,12 +98,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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 (FKEYS + NUMSYM)
* ,-----------------------------------------------------------------------------------.
@@ -122,18 +116,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |TogLED| | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL },
- {_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
- {_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-} /*,
-[_DYN] = {
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ },
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______}
-}*/
+[_ADJUST] = LAYOUT_planck_grid(
+ _______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL ,
+ _______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______,
+ _______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+) /*,
+[_DYN] = LAYOUT_planck_grid(
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ ,
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______
+)*/
};
diff --git a/keyboards/planck/keymaps/mollat/keymap.c b/keyboards/planck/keymaps/mollat/keymap.c
index 0bcafa08a6..2952a0ca8f 100644
--- a/keyboards/planck/keymaps/mollat/keymap.c
+++ b/keyboards/planck/keymaps/mollat/keymap.c
@@ -11,8 +11,7 @@
// this fork for updates as I probably won't bother jack with my pull requests frequently.
//
-#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 _QWERTY 0
#define _HIGH 1
@@ -25,22 +24,22 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = { /* Qwerty */
- { LT(_MOUSE, KC_ESC),KC_Q,KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
- { LT(_FN, 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, SFT_T(KC_ENT)},
- { __________, __________, KC_LGUI, KC_LALT, KC_LCTL,LT(_TMUX, KC_SPC),LT(_HIGH, KC_SPC),MO(_LOW),KC_RALT,KC_RGUI, __________, __________ }
-},
+[_QWERTY] = LAYOUT_planck_grid( /* Qwerty */
+ LT(_MOUSE, KC_ESC),KC_Q,KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
+ LT(_FN, 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, SFT_T(KC_ENT),
+ __________, __________, KC_LGUI, KC_LALT, KC_LCTL,LT(_TMUX, KC_SPC),LT(_HIGH, KC_SPC),MO(_LOW),KC_RALT,KC_RGUI, __________, __________
+),
// missing keys regarding to the form factor
// keeping the dot and comma for typing faster IP addresses and (german) float values
// putting the backslash on the slash's place
-[_HIGH] = {
- { KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS },
- { __________, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL },
- { __________, __________, __________, __________, __________, __________, __________, __________, KC_COMM, KC_DOT, KC_BSLS, LSFT(KC_BSLS)},
- { __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________ }
-},
+[_HIGH] = LAYOUT_planck_grid(
+ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS ,
+ __________, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL ,
+ __________, __________, __________, __________, __________, __________, __________, __________, KC_COMM, KC_DOT, KC_BSLS, LSFT(KC_BSLS),
+ __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________
+),
// classic Fn-Layer triggered with 'CapsLock-key' like on Pok3r
// SPC and ENT are doubled for using repeat (which I switched off, see https://github.com/tmk/tmk_keyboard/issues/287)
@@ -50,37 +49,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// del besides backspace (had no better place for it because of the umlauts)
// pg-down at 'f' (forward in vi), pg-up at 'b' (back in 'vi')
//
-[_FN] = {
- { __________, __________, __________, KC_END, __________, __________, __________, __________, KC_INS, __________, KC_DEL, RALT(KC_Y) },
- { KC_TRNS, __________, RALT(KC_S), __________, KC_PGDN, RALT(KC_5), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, RALT(KC_P), RALT(KC_Q) },
- { __________, KC_HOME, __________, __________, __________, KC_PGUP, __________, __________, __________, __________, __________, KC_ENT },
- { RESET, __________, __________, __________, __________, KC_SPC, KC_SPC, __________, __________, __________, __________, __________ }
-},
+[_FN] = LAYOUT_planck_grid(
+ __________, __________, __________, KC_END, __________, __________, __________, __________, KC_INS, __________, KC_DEL, RALT(KC_Y) ,
+ KC_TRNS, __________, RALT(KC_S), __________, KC_PGDN, RALT(KC_5), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, RALT(KC_P), RALT(KC_Q) ,
+ __________, KC_HOME, __________, __________, __________, KC_PGUP, __________, __________, __________, __________, __________, KC_ENT ,
+ RESET, __________, __________, __________, __________, KC_SPC, KC_SPC, __________, __________, __________, __________, __________
+),
// function key layer and some shift + (missing key at the small form factor)
-[_LOW] = {
- { KC_TILD, __________, __________, __________, __________, __________, __________, __________, __________, KC_LCBR, KC_RCBR, KC_UNDS },
- { __________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, KC_PLUS },
- { __________, __________, __________, __________, __________, KC_F9, KC_F10, KC_F11, KC_F12, __________, __________, __________ },
- { __________, __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________ }
-},
+[_LOW] = LAYOUT_planck_grid(
+ KC_TILD, __________, __________, __________, __________, __________, __________, __________, __________, KC_LCBR, KC_RCBR, KC_UNDS ,
+ __________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, KC_PLUS ,
+ __________, __________, __________, __________, __________, KC_F9, KC_F10, KC_F11, KC_F12, __________, __________, __________ ,
+ __________, __________, __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________
+),
// most macros will switch tmux screens
// two macros are for vi's save/quit at 'w' and 'q'
-[_TMUX] = {
- { __________, M(14), M(13), __________, __________, __________, __________, __________, __________, __________, M(11), __________ },
- { M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), __________, __________ },
- { __________, __________, __________, M(12), __________, __________, M(10), __________, __________, __________, __________, __________ },
- { __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________, __________ }
-},
+[_TMUX] = LAYOUT_planck_grid(
+ __________, M(14), M(13), __________, __________, __________, __________, __________, __________, __________, M(11), __________ ,
+ M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), __________, __________ ,
+ __________, __________, __________, M(12), __________, __________, M(10), __________, __________, __________, __________, __________ ,
+ __________, __________, __________, __________, __________, KC_TRNS, __________, __________, __________, __________, __________, __________
+),
// mouse movement can be improved (e.g. can't press hj at once), but I will use this seldom, so I stick with hjkl keys.
-[_MOUSE] = {
- { KC_TRNS, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________ },
- { __________, __________, __________, __________, KC_WH_D, __________, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, __________, __________ },
- { __________, __________, __________, __________, __________, KC_WH_U, __________, __________, __________, __________, __________, __________ },
- { __________, __________, __________, KC_ACL2, KC_ACL1, KC_ACL0, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, __________, __________, __________ }
-}
+[_MOUSE] = LAYOUT_planck_grid(
+ KC_TRNS, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________, __________ ,
+ __________, __________, __________, __________, KC_WH_D, __________, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, __________, __________ ,
+ __________, __________, __________, __________, __________, KC_WH_U, __________, __________, __________, __________, __________, __________ ,
+ __________, __________, __________, KC_ACL2, KC_ACL1, KC_ACL0, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, __________, __________, __________
+)
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/planck/keymaps/myoung34/config.h b/keyboards/planck/keymaps/myoung34/config.h
index 68d447dec8..d855da8683 100644
--- a/keyboards/planck/keymaps/myoung34/config.h
+++ b/keyboards/planck/keymaps/myoung34/config.h
@@ -3,6 +3,7 @@
#include "../../config.h"
+#undef WORKMAN_SOUND
#define WORKMAN_SOUND COLEMAK_SOUND
#ifdef AUDIO_ENABLE
diff --git a/keyboards/planck/keymaps/myoung34/keymap.c b/keyboards/planck/keymaps/myoung34/keymap.c
index 0bb9e7c958..2529df7422 100644
--- a/keyboards/planck/keymaps/myoung34/keymap.c
+++ b/keyboards/planck/keymaps/myoung34/keymap.c
@@ -14,11 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#include "backlight.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -49,12 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = {
- {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, RSFT_T(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_QUOT },
- {_______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }
- },
+ [_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_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RSFT_T(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_QUOT ,
+ _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -67,12 +63,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | BL | | | | | | | Play | Vol- | Vol+ | Next |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = {
- {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_TAB, 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, _______},
- {BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT}
- },
+ [_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_TAB, 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, _______,
+ BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -85,12 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | BL | | | | | | | Play | Vol- | Vol+ | Next |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
- {KC_TAB, KC_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, _______},
- {BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, 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_DEL ,
+ KC_TAB, 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, _______,
+ BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT
+ ),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -103,12 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, 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, RGB_M_R, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- }
+ [_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, 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, RGB_M_R, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
};
diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c
index 7b9d459fa2..6579ad9bc7 100644
--- a/keyboards/planck/keymaps/neo2planck/keymap.c
+++ b/keyboards/planck/keymaps/neo2planck/keymap.c
@@ -1,8 +1,4 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
-#include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
#include "keymap_german.h"
// for intellisense, has to be commented for building
@@ -30,12 +26,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
`-----------------------------------------------------------------------------------'
*/
-[0] = {
- { KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC },
- { KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y },
- { KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT },
- { KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL }
-},
+[0] = LAYOUT_planck_grid(
+ KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC ,
+ KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y ,
+ KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT ,
+ KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL
+),
/* M1
,-----------------------------------------------------------------------------------.
@@ -48,12 +44,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| Ctrl | GUI | Alt | M2 | M1 | Space | M1 | M2 | Alt | Esc | Ctrl |
`-----------------------------------------------------------------------------------'
*/
-[1] = {
- { _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS },
- { KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT },
- { _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
- { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
-},
+[1] = LAYOUT_planck_grid(
+ _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS ,
+ KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT ,
+ _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ ,
+ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______
+),
/* M2 Navigation & Number Blocks
* very easy to get used to & intuituve placement
@@ -67,12 +63,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | M2 | M1 | Space | M1 | M2 | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[2] = {
- { XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS },
- { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT },
- { _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ },
- { _______, _______, _______, _______, MO(3), _______, _______, MO(3), _______, _______, _______, _______ }
-},
+[2] = LAYOUT_planck_grid(
+ XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS ,
+ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT ,
+ _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ ,
+ _______, _______, _______, _______, MO(3), _______, _______, MO(3), _______, _______, _______, _______
+),
/* M3 Function & Media Keys
* ,-----------------------------------------------------------------------------------.
@@ -85,12 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Alt | M2 | M1 | Space | M1 | M2 | Alt | Esc | Ctrl |
* `-----------------------------------------------------------------------------------'
*/
-[3] = {
- { XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX },
- { KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT },
- { _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
- { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
-},
+[3] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX ,
+ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT ,
+ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ ,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/nico/keymap.c b/keyboards/planck/keymaps/nico/keymap.c
index 4efc271fc3..7836517890 100644
--- a/keyboards/planck/keymaps/nico/keymap.c
+++ b/keyboards/planck/keymaps/nico/keymap.c
@@ -1,7 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "backlight.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.
@@ -13,42 +11,40 @@
#define _LW 3
#define _RS 4
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QW] = { /* Qwerty */
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {M(0), KC_ESC, KC_LALT, KC_LGUI, F(1), KC_SPC, KC_SPC, F(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_CM] = { /* Colemak */
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {M(0), KC_ESC, KC_LALT, KC_LGUI, F(1), KC_SPC, KC_SPC, F(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_DV] = { /* Dvorak */
- {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_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 },
- {M(0), KC_ESC, KC_LALT, KC_LGUI, F(1), KC_SPC, KC_SPC, F(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_RS] = { /* RAISE */
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
- {M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[_LW] = { /* LOWER */
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
- {M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY}
-}
-};
+#define LW_BSPC LT(_LW, KC_BSPC)
+#define RS_ENT LT(_RS, KC_ENT)
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_LAYER_TAP_KEY(MO(_LW), KC_BSPC), // Tap for backspace, hold for LOWER
- [2] = ACTION_LAYER_TAP_KEY(MO(_RS), KC_ENT), // Tap for enter, hold for RAISE
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_QW] = LAYOUT_planck_grid( /* Qwerty */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ M(0), KC_ESC, KC_LALT, KC_LGUI, LW_BSPC, KC_SPC, KC_SPC, RS_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_CM] = LAYOUT_planck_grid( /* Colemak */
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ M(0), KC_ESC, KC_LALT, KC_LGUI, LW_BSPC, KC_SPC, KC_SPC, RS_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_DV] = LAYOUT_planck_grid( /* Dvorak */
+ 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_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 ,
+ M(0), KC_ESC, KC_LALT, KC_LGUI, LW_BSPC, KC_SPC, KC_SPC, RS_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_RS] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS,
+ M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[_LW] = LAYOUT_planck_grid( /* LOWER */
+ 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS,
+ M(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, KC_MFFD, KC_VOLD, KC_VOLU, KC_MPLY
+)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/not-quite-neo/keymap.c b/keyboards/planck/keymaps/not-quite-neo/keymap.c
index d5f0d9c4b3..42ed71d0ad 100644
--- a/keyboards/planck/keymaps/not-quite-neo/keymap.c
+++ b/keyboards/planck/keymaps/not-quite-neo/keymap.c
@@ -4,8 +4,7 @@ A layout based on the
*/
-#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
#include "nqn-keys-on-quertz-de-latin1.h"
#include "nqn-basic-layout.h"
@@ -35,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | CTLR | GUI | ALT | L05 | L04 | SPACE| SPACE| L04 | L05 | ALTGR| LFN | CTLR |
* `-----------------------------------------------------------------------------------'
*/
-[L01] = {
- {KC_ESC, L01_LEFT_01, L01_RIGHT_01, KC_ENTER},
- {MO(L03), L01_LEFT_02, L01_RIGHT_02, MO(L03)},
- {KC_LSHIFT, L01_LEFT_03, L01_RIGHT_03, KC_RSFT},
- {KC_LCTRL,KC_LGUI, KC_LALT, MO(L05), MO(L04), KC_SPC, KC_SPC, MO(L04), MO(L05), KC_RALT, MO(LFN), KC_RCTRL}
-},
+[L01] = LAYOUT_planck_grid(
+ KC_ESC, L01_LEFT_01, L01_RIGHT_01, KC_ENTER,
+ MO(L03), L01_LEFT_02, L01_RIGHT_02, MO(L03),
+ KC_LSHIFT, L01_LEFT_03, L01_RIGHT_03, KC_RSFT,
+ KC_LCTRL,KC_LGUI, KC_LALT, MO(L05), MO(L04), KC_SPC, KC_SPC, MO(L04), MO(L05), KC_RALT, MO(LFN), KC_RCTRL
+),
/*
@@ -59,12 +58,12 @@ L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable)
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[L03] = {
- {_______, L03_LEFT_01, L03_RIGHT_01, _______},
- {_______, L03_LEFT_02, L03_RIGHT_02, _______},
- {_______, L03_LEFT_03, L03_RIGHT_03, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[L03] = LAYOUT_planck_grid(
+ _______, L03_LEFT_01, L03_RIGHT_01, _______,
+ _______, L03_LEFT_02, L03_RIGHT_02, _______,
+ _______, L03_LEFT_03, L03_RIGHT_03, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* L04 -> MO(L04): NAVIGATION AND NUMBERS
@@ -78,12 +77,12 @@ L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable)
* | | | | | | | 0 | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[L04] = {
- {_______, L04_LEFT_01, L04_RIGHT_01, _______},
- {_______, L04_LEFT_02, L04_RIGHT_02, _______},
- {_______, L04_LEFT_03, L04_RIGHT_03, _______},
- {_______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______}
-},
+[L04] = LAYOUT_planck_grid(
+ _______, L04_LEFT_01, L04_RIGHT_01, _______,
+ _______, L04_LEFT_02, L04_RIGHT_02, _______,
+ _______, L04_LEFT_03, L04_RIGHT_03, _______,
+ _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______
+),
/* L05 -> MO(L05): ALTERNATE
@@ -97,12 +96,12 @@ L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable)
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[L05] = {
- {_______, L05_LEFT_01, L05_RIGHT_01, _______},
- {_______, L05_LEFT_02, L05_RIGHT_02, _______},
- {_______, L05_LEFT_03, L05_RIGHT_03, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[L05] = LAYOUT_planck_grid(
+ _______, L05_LEFT_01, L05_RIGHT_01, _______,
+ _______, L05_LEFT_02, L05_RIGHT_02, _______,
+ _______, L05_LEFT_03, L05_RIGHT_03, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/*
@@ -121,10 +120,10 @@ L06 -> <TBD>: UNSPECIFIED
* |VOICE-|VOICE+|MUS ON|MUS OF| LIGHT| | | VOL+ | VOL- | MUTE | | |
* `-----------------------------------------------------------------------------------'
*/
-[LFN] = {
- {RESET, L06_LEFT_01, L06_RIGHT_01, KC_BSPC},
- {_______, L06_LEFT_02, L06_RIGHT_02, KC_INS},
- {_______, L06_LEFT_03, L06_RIGHT_03, KC_DEL},
- {MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______}
-}
+[LFN] = LAYOUT_planck_grid(
+ RESET, L06_LEFT_01, L06_RIGHT_01, KC_BSPC,
+ _______, L06_LEFT_02, L06_RIGHT_02, KC_INS,
+ _______, L06_LEFT_03, L06_RIGHT_03, KC_DEL,
+ MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c
index 27aa9d93cb..7604959119 100644
--- a/keyboards/planck/keymaps/originerd/keymap.c
+++ b/keyboards/planck/keymaps/originerd/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -40,12 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | DEL | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_NERD] = {
- {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_SLSH, KC_RSFT},
- {KC_DEL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_NERD] = 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_SLSH, KC_RSFT,
+ KC_DEL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
@@ -59,12 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_BSLS},
- {_______, 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}
-},
+[_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_BSLS,
+ _______, 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
* ,-----------------------------------------------------------------------------------.
@@ -77,12 +71,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_QUOT},
- {_______, 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}
-},
+[_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_QUOT,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Adjust (Lower + Raise)
@@ -96,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, NERD, _______, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, NERD, _______, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/paget/keymap.c b/keyboards/planck/keymaps/paget/keymap.c
index eb3c0f0203..599380ea37 100755
--- a/keyboards/planck/keymaps/paget/keymap.c
+++ b/keyboards/planck/keymaps/paget/keymap.c
@@ -1,8 +1,6 @@
//Keymap I created to suit my working style
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
//Define the layers
#define _QWERTY 0
@@ -23,12 +21,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_RSFT},
- {KC_LCTL, KC_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_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_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_LCTL, KC_ENT, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/*
* ,-----------------------------------------------------------------------------------.
@@ -41,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | | | |Lower | Space |Raise | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC},
- {KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS},
- {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_RBRC,
+ KC_TRNS, KC_NUBS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NUHS, KC_TRNS,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
+),
/*
* ,-----------------------------------------------------------------------------------.
@@ -60,11 +58,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
- {KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO},
- {KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS},
- {KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO}
-}
+[_RAISE] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO,
+ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_NO
+)
};
diff --git a/keyboards/planck/keymaps/palleiko/keymap.c b/keyboards/planck/keymaps/palleiko/keymap.c
index a980939388..d3798c6518 100644
--- a/keyboards/planck/keymaps/palleiko/keymap.c
+++ b/keyboards/planck/keymaps/palleiko/keymap.c
@@ -16,9 +16,7 @@
* Palleiko Layout
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -76,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, S_ENT },
- {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM}
-},
+[_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,
+ 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, S_ENT ,
+ KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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, S_ENT },
- {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM}
-},
+[_COLEMAK] = LAYOUT_planck_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, S_ENT ,
+ KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -112,12 +110,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM |
* `----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM}
-},
+[_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_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, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -130,12 +128,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -148,12 +146,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Hex Numpad
* ,-----------------------------------------------------------------------------------.
@@ -166,12 +164,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | 0 | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_NUM] = {
- {_______, ___x___, ___x___, KC_LCBR, KC_RCBR, KC_A, KC_B, KC_7, KC_8, KC_9, ___x___, _______},
- {_______, ___x___, ___x___, KC_LPRN, KC_RPRN, KC_C, KC_D, KC_4, KC_5, KC_6, ___x___, _______},
- {_______, ___x___, ___x___, KC_LBRC, KC_RBRC, KC_E, KC_F, KC_1, KC_2, KC_3, ___x___, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______}
-},
+[_NUM] = LAYOUT_planck_grid(
+ _______, ___x___, ___x___, KC_LCBR, KC_RCBR, KC_A, KC_B, KC_7, KC_8, KC_9, ___x___, _______,
+ _______, ___x___, ___x___, KC_LPRN, KC_RPRN, KC_C, KC_D, KC_4, KC_5, KC_6, ___x___, _______,
+ _______, ___x___, ___x___, KC_LBRC, KC_RBRC, KC_E, KC_F, KC_1, KC_2, KC_3, ___x___, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______
+),
/* WM (i3 window binds)
* ,-----------------------------------------------------------------------------------.
@@ -184,12 +182,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | WM0 | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_WM] = {
- {_______, WM_1, WM_2, WM_3, WM_4, WM_5, WM_6, WM_7, WM_8, WM_9, WM_0, _______},
- {_______, _______, _______, _______, _______, _______, _______, WM_4, WM_5, WM_6, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, WM_1, WM_2 , WM_3, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, WM_0, _______, _______, _______}
-},
+[_WM] = LAYOUT_planck_grid(
+ _______, WM_1, WM_2, WM_3, WM_4, WM_5, WM_6, WM_7, WM_8, WM_9, WM_0, _______,
+ _______, _______, _______, _______, _______, _______, _______, WM_4, WM_5, WM_6, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, WM_1, WM_2 , WM_3, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, WM_0, _______, _______, _______
+),
/* Navigation Layer (Vim-like arrow binds & i3 binds)
* ,-----------------------------------------------------------------------------------.
@@ -202,12 +200,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_NAV] = {
- {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
- {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ___x___, ___x___},
- {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_NAV] = LAYOUT_planck_grid(
+ ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___,
+ ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ___x___, ___x___,
+ _______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -220,12 +218,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Reset| Debug| | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
- {_______, _______, _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
+ _______, _______, _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c
index 6f8f8579c1..6b95a2eafb 100644
--- a/keyboards/planck/keymaps/pete/keymap.c
+++ b/keyboards/planck/keymaps/pete/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -50,65 +44,65 @@ extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = {
- {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 },
- {OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-
-[_COLEMAK] = {
- {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 },
- {OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-
-[_DVORAK] = {
- {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 },
- {OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-
-[_LOWER] = {
- {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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-
-[_RAISE] = {
- {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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_RAISE, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-
-[_SETUP] = { /* Setup */
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, WIN, MAC, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______}
-},
-[_MAC] = { /* Mac */
- {CYCLWIN,MACSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL },
- {_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, MACPRNT,MACPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX},
- {_______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX},
- {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END }
-},
-[_WIN] = { /* Windows */
- {CYCLWIN,WINSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL },
- {_______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, WINPRNT,WINPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX},
- {_______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX},
- {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END }
-},
-[_LIN] = { /* Linux */
- {KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_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,
+ 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 ,
+ OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[_COLEMAK] = LAYOUT_planck_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 ,
+ OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[_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_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 ,
+ OS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+[_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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+[_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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _RAISE, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+
+[_SETUP] = LAYOUT_planck_grid( /* Setup */
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, WIN, MAC, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______
+),
+[_MAC] = LAYOUT_planck_grid( /* Mac */
+ CYCLWIN,MACSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL ,
+ _______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, MACPRNT,MACPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX,
+ _______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,
+ _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END
+),
+[_WIN] = LAYOUT_planck_grid( /* Windows */
+ CYCLWIN,WINSLEEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL ,
+ _______, MICMUTE, KC_MUTE, KC_VOLD, KC_VOLU, WINPRNT,WINPRNT2, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX,
+ _______, BL_STEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,
+ _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDOWN,KC_PGUP,KC_END
+),
+[_LIN] = LAYOUT_planck_grid( /* Linux */
+ KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/phreed/keymap.c b/keyboards/planck/keymaps/phreed/keymap.c
index 05574a938d..bf68288220 100644
--- a/keyboards/planck/keymaps/phreed/keymap.c
+++ b/keyboards/planck/keymaps/phreed/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -31,47 +29,47 @@ enum planck_layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERT__Y] = {
- {KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_ESC), GUI_T(KC_BSLS), KC_Y, KC_U, KC_I, KC_O, KC_P},
- {KC_A, KC_S, KC_D, LT(_NP,KC_F), KC_G, ALT_T(KC_TAB), ALT_T(KC_QUOT), KC_H, LT(_FN,KC_J), KC_K, KC_L, KC_SCLN},
- {KC_Z, KC_X, KC_C, LT(_SC,KC_V), KC_B, KC_LBRC, KC_RBRC, KC_N, LT(_CD,KC_M), KC_COMM, KC_DOT, KC_SLSH},
- {KC_LEFT, KC_DOWN, KC_BSPC, KC_ENT, KC_LSPO,CTL_T(KC_MINS), CTL_T(KC_EQL),KC_RSPC, KC_SPC, KC_DEL, KC_UP, KC_RGHT}
-},
+[_QWERT__Y] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_ESC), GUI_T(KC_BSLS), KC_Y, KC_U, KC_I, KC_O, KC_P,
+ KC_A, KC_S, KC_D, LT(_NP,KC_F), KC_G, ALT_T(KC_TAB), ALT_T(KC_QUOT), KC_H, LT(_FN,KC_J), KC_K, KC_L, KC_SCLN,
+ KC_Z, KC_X, KC_C, LT(_SC,KC_V), KC_B, KC_LBRC, KC_RBRC, KC_N, LT(_CD,KC_M), KC_COMM, KC_DOT, KC_SLSH,
+ KC_LEFT, KC_DOWN, KC_BSPC, KC_ENT, KC_LSPO,CTL_T(KC_MINS), CTL_T(KC_EQL),KC_RSPC, KC_SPC, KC_DEL, KC_UP, KC_RGHT
+),
-[_NP] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_7, KC_8, KC_9, KC_DOT},
- {XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_LALT, KC_PPLS, KC_PMNS, KC_4, KC_5, KC_6, KC_0},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_PSLS, KC_1, KC_2, KC_3, KC_EQL},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_NP] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_7, KC_8, KC_9, KC_DOT,
+ XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_LALT, KC_PPLS, KC_PMNS, KC_4, KC_5, KC_6, KC_0,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_PSLS, KC_1, KC_2, KC_3, KC_EQL,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
-[_SC] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_ASTR, KC_TILD, XXXXXXX },
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, KC_DLR, KC_PERC, KC_CIRC, KC_GRV},
- {XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EXLM, KC_AT, KC_HASH, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_SC] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_ASTR, KC_TILD, XXXXXXX ,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, KC_DLR, KC_PERC, KC_CIRC, KC_GRV,
+ XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EXLM, KC_AT, KC_HASH, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
-[_FN] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LALT, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_FN] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LALT, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
-[_CD] = {
- {KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_PGUP, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_PGDN, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_CD] = LAYOUT_planck_grid(
+ KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_PGUP, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_PGDN, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
-[_PLOVER] = {
- {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},
- {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-}
+[_PLOVER] = LAYOUT_planck_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,
+ XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+)
};
diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c
index 12f1be2ae1..57002cc386 100644
--- a/keyboards/planck/keymaps/piemod/keymap.c
+++ b/keyboards/planck/keymaps/piemod/keymap.c
@@ -1,10 +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 "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#define DVORAK 0
#define ARROW 1 //F(1)
@@ -15,62 +9,70 @@
#define CUSTOM_MACROS 6 // F(6)
#define MOUSE 7 // F(7)
+#define LT_1A LT(1, KC_A)
+#define LT_2O LT(2, KC_O)
+#define LT_3E LT(3, KC_E)
+#define LT_4U LT(4, KC_U)
+#define LT_5Q LT(5, KC_Q)
+#define LT_6CTL LT(6, KC_LCTL)
+#define LT_7COM LT(7, KC_COMM)
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [DVORAK] = {
- {KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE},
- {KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER},
- {KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS},
- {F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT},
- },
-
- [ARROW] = {
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}
- },
-
- [SYMBOL] = {
- {KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
- {KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21)},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL}
- },
-
- [NUMBER] = {
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL}
- },
-
- [FUNCTION] = {
- {KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE},
- {RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
- },
-
- [EMACS] = {
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}
- },
-
- [CUSTOM_MACROS] = {
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}
- },
-
- [MOUSE] = {
- {KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO},
- {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO}
- },
+ [DVORAK] = LAYOUT_planck_grid(
+ KC_ESC, KC_QUOTE, LT_7COM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE,
+ KC_TAB, LT_1A, LT_2O, LT_3E, LT_4U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER,
+ KC_LSHIFT, KC_SCOLON, LT_5Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS,
+ F(10), LT_6CTL, KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+ ),
+
+ [ARROW] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+ ),
+
+ [SYMBOL] = LAYOUT_planck_grid(
+ KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
+ KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21),
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL
+ ),
+
+ [NUMBER] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL
+ ),
+
+ [FUNCTION] = LAYOUT_planck_grid(
+ KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE,
+ RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+ ),
+
+ [EMACS] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+ ),
+
+ [CUSTOM_MACROS] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+ ),
+
+ [MOUSE] = LAYOUT_planck_grid(
+ KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO
+ ),
};
@@ -94,15 +96,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// MACROS 6, F(6)
// MOUSE 7, F(7)
- // Layers
- [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A.
- [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O.
- [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E.
- [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U.
- [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q.
- [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key.
- [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key.
-
// Special Keys
[10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt.
diff --git a/keyboards/planck/keymaps/pok3r/keymap.c b/keyboards/planck/keymaps/pok3r/keymap.c
index ad83701425..8c10ee3401 100644
--- a/keyboards/planck/keymaps/pok3r/keymap.c
+++ b/keyboards/planck/keymaps/pok3r/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -56,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Up | Down |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {FUNCTION , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)},
- {KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT}
-},
+[_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,
+ FUNCTION , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT),
+ KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -74,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_TAB , KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {FUNCTION , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT)},
- {KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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,
+ FUNCTION , KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ SFT_T(KC_ESC) , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT),
+ KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -92,12 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | GUI | Esc | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {KC_TAB , KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
- {FUNCTION , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
- {SFT_T(KC_ESC) , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_RSFT, KC_ENT)},
- {KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_BSPC,
+ FUNCTION , KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
+ SFT_T(KC_ESC) , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MT(MOD_RSFT, KC_ENT),
+ KC_LCTL , KC_LGUI, KC_ESC, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -110,12 +108,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Up |Pg Dn | End |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END}
-},
+[_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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -128,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Home |Pg Up |Pg Dn | End |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL },
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END}
-},
+[_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_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_HOME, KC_PGUP, KC_PGDN, KC_END
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -147,12 +145,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -165,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_CAPS},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ KC_CAPS, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, KC_CAPS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
/* Function
* ,-----------------------------------------------------------------------------------.
@@ -183,12 +181,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | Esc | | Esc | Home |Pg Up |Pg Dn | End |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNCTION] = {
- {KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL},
- {_______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, KC_ESC , _______, _______, KC_ESC , KC_HOME, KC_PGUP, KC_PGDN, KC_END}
-}
+[_FUNCTION] = LAYOUT_planck_grid(
+ KC_ESC , _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL,
+ _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, KC_ESC , _______, _______, KC_ESC , KC_HOME, KC_PGUP, KC_PGDN, KC_END
+)
};
diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c
index 28fc8f3ad1..4bcfbd91a0 100644
--- a/keyboards/planck/keymaps/premek/keymap.c
+++ b/keyboards/planck/keymaps/premek/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -34,49 +28,49 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = {
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P },
- {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
- {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
- {KC_LGUI, _______, _______, KC_LALT, LOWER, MT(MOD_LSFT, KC_SPC), KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI}
-},
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_LOWER] = {
- {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_HOME, KC_PGDN, KC_PGUP, KC_END },
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
-[_RAISE] = {
- {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
- {_______, _______, _______, KC_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT},
- {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MS_BTN3}
-},
-
-[_PLOVER] = {
- {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] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_QWERTY] = LAYOUT_planck_grid(
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P ,
+ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
+ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
+ KC_LGUI, _______, _______, KC_LALT, LOWER, MT(MOD_LSFT, KC_SPC), KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI
+),
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_LOWER] = 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END ,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_F12, KC_PLUS, KC_PIPE, KC_LCBR, KC_RCBR,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+[_RAISE] = 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_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
+ _______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MS_BTN3
+),
+
+[_PLOVER] = LAYOUT_planck_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] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c
index a6ecf16115..78123c44ce 100644
--- a/keyboards/planck/keymaps/pvc/keymap.c
+++ b/keyboards/planck/keymaps/pvc/keymap.c
@@ -1,8 +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 "action_layer.h"
-#include "eeconfig.h"
-#include "led.h"
+#include QMK_KEYBOARD_H
#include "mousekey.h"
#ifdef AUDIO_ENABLE
@@ -121,12 +117,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_QWERTY] = {
- { 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_UP , KC_ENT },
- { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT }
-},
+[LAYER_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 ,
+ 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_UP , KC_ENT ,
+ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT
+),
/* LAYER = LAYER_UPPER
.-----------------------------------------------------------------------------------------------------------.
| PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL |
@@ -138,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_UPPER] = {
- { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL },
- { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS },
- { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME },
- { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END }
-},
+[LAYER_UPPER] = LAYOUT_planck_grid(
+ KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL ,
+ KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS ,
+ _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME ,
+ _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END
+),
/* LAYER = LAYER_LOWER
.-----------------------------------------------------------------------------------------------------------.
| ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP |
@@ -155,12 +151,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_LOWER] = {
- { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP },
- { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN },
- { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME },
- { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END }
-},
+[LAYER_LOWER] = LAYOUT_planck_grid(
+ _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP ,
+ _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN ,
+ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME ,
+ _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END
+),
/* LAYER = LAYER_FUNCTION
.-----------------------------------------------------------------------------------------------------------.
| XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
@@ -172,12 +168,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_FUNCTION] = {
- { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE },
- { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }
-},
+[LAYER_FUNCTION] = LAYOUT_planck_grid(
+ XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE ,
+ _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
+),
/* LAYER = LAYER_MOUSE
.-----------------------------------------------------------------------------------------------------------.
| ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR |
@@ -189,12 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_MOUSE] = {
- { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R },
- { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U },
- { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D },
- { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }
-},
+[LAYER_MOUSE] = LAYOUT_planck_grid(
+ KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R ,
+ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U ,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D ,
+ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
+),
/* LAYER = LAYER_ADJUST
.-----------------------------------------------------------------------------------------------------------.
| XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | MUSIC | AUDIO |
@@ -206,12 +202,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | XXXXXX | TEMPO- | VOICE- | TEMPO+ |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_ADJUST] = {
- { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG },
- { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX },
- { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP }
-},
+[LAYER_ADJUST] = LAYOUT_planck_grid(
+ XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG ,
+ XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX ,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP
+),
};
diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c
index e4934dbc45..8cc37dc651 100644
--- a/keyboards/planck/keymaps/rai-suta/keymap.c
+++ b/keyboards/planck/keymaps/rai-suta/keymap.c
@@ -1,7 +1,6 @@
// This keymap assumes that the keyboard is recognized as JIS keyboard from the OS.
-#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
#include "version.h"
#include "sendstring_jis.h"
@@ -46,26 +45,26 @@ enum keymap_layer {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [KL_QWERTY] = {
- { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JK_CLN},
- {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_ZKHK, KC_KANA, KC_LGUI, KC_LALT, M_MHEN, KC_SPC, KC_SPC, M_HENK, KC_RALT, KC_RGUI, KC_APP, KC_ENT}
- },
+ [KL_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,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JK_CLN,
+ 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_ZKHK, KC_KANA, KC_LGUI, KC_LALT, M_MHEN, KC_SPC, KC_SPC, M_HENK, KC_RALT, KC_RGUI, KC_APP, KC_ENT
+ ),
- [KL_LOWER] = {
- {KC_GESC, KC_EXLM, JK_DQT, KC_HASH, KC_DLR, KC_PERC, JK_AMPR, JK_SQT, JK_LPRN, JK_RPRN, JK_S0, KC_DEL},
- {_______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, JK_EQ, JK_TLD, JK_GRV, JK_LCBR, JK_PIPE},
- {_______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), XXXXXXX, KC_ENT, KC_LABK, KC_RABK, JK_RCBR, JK_UNDS},
- { RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [KL_LOWER] = LAYOUT_planck_grid(
+ KC_GESC, KC_EXLM, JK_DQT, KC_HASH, KC_DLR, KC_PERC, JK_AMPR, JK_SQT, JK_LPRN, JK_RPRN, JK_S0, KC_DEL,
+ _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, JK_EQ, JK_TLD, JK_GRV, JK_LCBR, JK_PIPE,
+ _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), C(KC_Y), XXXXXXX, KC_ENT, KC_LABK, KC_RABK, JK_RCBR, JK_UNDS,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
- [KL_RAISE] = {
- {KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
- {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, JK_CIRC, JK_AT, JK_LBRC, KC_JYEN},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_COMM, KC_DOT, JK_RBRC, JK_BSLS},
- {M_DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
- },
+ [KL_RAISE] = LAYOUT_planck_grid(
+ KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, JK_CIRC, JK_AT, JK_LBRC, KC_JYEN,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_COMM, KC_DOT, JK_RBRC, JK_BSLS,
+ M_DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
};
diff --git a/keyboards/planck/keymaps/rodhaene/keymap.c b/keyboards/planck/keymaps/rodhaene/keymap.c
index d866684dd8..8aded36b82 100644
--- a/keyboards/planck/keymaps/rodhaene/keymap.c
+++ b/keyboards/planck/keymaps/rodhaene/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -50,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | | Alt | GUI |Lower |Enter |Space |Raise | Left | Up | Down |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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_QUOT },
- {KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT}
-},
+[_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_DEL,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT ,
+ KC_LCTL, _______, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
+),
/* Number Pad
* ,-----------------------------------------------------------------------------------.
@@ -68,12 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Exit | | | | | | | | 0 | . | | |
* `-----------------------------------------------------------------------------------'
*/
-[_NUMPAD] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , KC_BSPC },
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_4 , KC_5 , KC_6 , KC_ENT },
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_1 , KC_2 , KC_3 , _______},
- {EXT_NUMPAD, _______, _______, _______, _______, _______, _______, _______, KC_0 , KC_DOT , _______, _______}
-},
+[_NUMPAD] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , KC_BSPC ,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_4 , KC_5 , KC_6 , KC_ENT ,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_1 , KC_2 , KC_3 , _______,
+ EXT_NUMPAD, _______, _______, _______, _______, _______, _______, _______, KC_0 , KC_DOT , _______, _______
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -86,12 +84,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -104,12 +102,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -122,12 +120,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Brite | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, 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, NUMPAD, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_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, QWERTY, NUMPAD, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/sdothum/beakl.h b/keyboards/planck/keymaps/sdothum/beakl.h
index de3da34a5d..999f0aac95 100644
--- a/keyboards/planck/keymaps/sdothum/beakl.h
+++ b/keyboards/planck/keymaps/sdothum/beakl.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V },
- {KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W },
- {KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
-
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)},
- {KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_K, CNTR_TL, CNTR_TR, KC_F, KC_G, KC_R, KC_C, KC_V ,
+ KC_H, KC_I, KC_E, HOME_A, TD_QUOT, CNTR_HL, CNTR_HR, KC_L, KC_S, KC_T, KC_N, KC_W ,
+ KC_SCLN, KC_COMM, KC_J, KC_DOT, KC_X, CNTR_BL, CNTR_BR, KC_B, KC_D, KC_M, KC_P, KC_Z ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
+
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_QUOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W),
+ KC_SCLN, KC_COMM, S(KC_J), KC_DOT, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)},
- {TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W),
+ TD_COLN, TD_TILD, S(KC_J), TD_GRV, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | K | ^Alt | ^GUI | F | G | R | C | V |
@@ -54,12 +54,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V)},
- {S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W)},
- {TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_K), CNTR_TL, CNTR_TR, S(KC_F), S(KC_G), S(KC_R), S(KC_C), S(KC_V),
+ S(KC_H), S(KC_I), S(KC_E), S(KC_A), TD_DQOT, CNTR_HL, CNTR_HR, S(KC_L), S(KC_S), S(KC_T), S(KC_N), S(KC_W),
+ TD_COLN, KC_SLSH, S(KC_J), KC_QUES, S(KC_X), CNTR_BL, CNTR_BR, S(KC_B), S(KC_D), S(KC_M), S(KC_P), S(KC_Z),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ..................................................................... BEAKL 8
@@ -74,19 +74,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z },
- {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_C, KC_R, KC_F, KC_Z ,
+ KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_D, KC_S, KC_T, KC_N, KC_B ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z |
@@ -98,12 +98,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), TD_TILD, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT ,
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | X | ^Alt | ^GUI | G | C | R | F | Z |
@@ -115,12 +115,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_C), S(KC_R), S(KC_F), S(KC_Z),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_D), S(KC_S), S(KC_T), S(KC_N), S(KC_B),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL 8P
@@ -135,19 +135,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X },
- {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X ,
+ KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_S, KC_N, KC_B ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ,
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ,
// ,-----------------------------------------------------------------------------------.
// | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | R | F | X |
@@ -159,12 +159,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | F | X |
@@ -176,12 +176,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_N), S(KC_B),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ................................................................... BEAKL 8TX
@@ -196,19 +196,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B },
- {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B ,
+ KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | $ | { | } | J | ^Alt | ^GUI | G | D | R | F | X |
@@ -220,12 +220,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | J | ^Alt | ^GUI | G | [ | ] | ^ | X |
@@ -237,12 +237,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)},
- {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B),
+ S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ................................................................... BEAKL 8TT
@@ -257,19 +257,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B },
- {KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_J, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_R, KC_F, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_S, HOME_N, HOME_B ,
+ KC_Z, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_W, KC_M, KC_L, KC_P, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | $ | { | } | J | Fn | Caps | G | D | R | F | X |
@@ -281,12 +281,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X)},
- {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_R), S(KC_F), S(KC_X),
+ S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_S), S(KC_N), S(KC_B),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_W), S(KC_M), S(KC_L), S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | J | Fn | Caps | G | [ | ] | ^ | X |
@@ -298,12 +298,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B)},
- {S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_J), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_B),
+ S(KC_Z), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL 10
@@ -318,19 +318,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V },
- {KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_H, KC_O, KC_U, KC_X, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_V ,
+ KC_Y, KC_I, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_S, KC_R, KC_T, KC_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_COMM, KC_Z, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_K ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)},
- {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V),
+ S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, KC_COMM, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | [ | ! | ] | X | ^Alt | ^GUI | G | D | N | M | V |
@@ -342,12 +342,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V)},
- {S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W)},
- {S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), TD_LBRC, KC_EXLM, TD_RBRC, S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_V),
+ S(KC_Y), TD_LT, KC_EQL, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_S), S(KC_R), S(KC_T), S(KC_W),
+ S(KC_J), KC_COLN, TD_DQOT, TD_GRV, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | H | O | U | X | ^Alt | ^GUI | G | { | + | } | V |
@@ -359,12 +359,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V)},
- {S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_H), S(KC_O), S(KC_U), S(KC_X), CNTR_TL, CNTR_TR, S(KC_G), TD_LCBR, KC_PLUS, TD_RCBR, S(KC_V),
+ S(KC_Y), S(KC_I), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, S(KC_C), TD_LPRN, KC_ASTR, TD_RPRN, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, KC_SLSH, S(KC_Z), CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_K),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ............................................................... BEAKL Mash Up
@@ -379,19 +379,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ KC_K, KC_H, KC_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, KC_T, KC_R, KC_S, KC_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | { | } | $ | ^Alt | ^GUI | G | D | N | M | X |
@@ -403,12 +403,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LCBR, KC_RCBR, KC_DLR, CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | ^Alt | ^GUI | ^ | [ | ] | M | X |
@@ -420,12 +420,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, KC_CIRC, KC_LBRC, KC_RBRC, S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, S(KC_S), S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_DLR, KC_ASTR, S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL MU
@@ -440,19 +440,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | $ | { | } | Z | Fn | Caps | G | D | N | M | X |
@@ -464,12 +464,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | _ | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), KC_DLR, KC_LCBR, KC_RCBR, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), KC_SLSH, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_UNDS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Fn | Caps | G | [ | ] | ^ | X |
@@ -481,12 +481,12 @@
// | Ctrl | GUI | Alt | Caps | - | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LBRC, KC_RBRC, KC_CIRC, S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_MINS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// .................................................................... BEAKL SP
@@ -501,19 +501,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Ins | Left | Ent | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X },
- {HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W },
- {KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V },
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_Y, KC_O, KC_U, KC_Z, CNTR_TL, CNTR_TR, KC_G, KC_D, KC_N, KC_M, KC_X ,
+ HOME_K, HOME_H, HOME_E, HOME_A, KC_DOT, CNTR_HL, CNTR_HR, KC_C, HOME_T, HOME_R, HOME_S, HOME_W ,
+ KC_J, KC_SCLN, TD_QUOT, KC_I, KC_COMM, CNTR_BL, CNTR_BR, KC_B, KC_P, KC_L, KC_F, KC_V ,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_DOT, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_J), KC_SCLN, TD_QUOT, S(KC_I), KC_COMM, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_INS, SP_LEFT, TD_ENT, SP_BSPC, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | [ | ] | Z | Shift| Caps | G | D | N | M | X |
@@ -525,12 +525,12 @@
// | Ctrl | GUI | Alt | ↑Tab | f() | Ins | Left | _ | Del | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X)},
- {S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W)},
- {S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), KC_LBRC, KC_RBRC, S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), S(KC_D), S(KC_N), S(KC_M), S(KC_X),
+ S(KC_K), KC_CIRC, TD_LT, TD_GT, TD_TILD, CNTR_HL, CNTR_HR, S(KC_C), S(KC_T), S(KC_R), S(KC_S), S(KC_W),
+ S(KC_Z), KC_COLN, KC_EXLM, KC_EQL, TD_GRV, CNTR_BL, CNTR_BR, S(KC_B), S(KC_P), S(KC_L), S(KC_F), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, S_TAB, ___fn__, LT_INS, S_LEFT, KC_UNDS, SP_DEL, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | Y | O | U | Z | Shift| Caps | G | { | } | M | X |
@@ -542,10 +542,10 @@
// | Ctrl | GUI | Alt | Tab | - | Ins | Left | f() | Bksp | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X)},
- {S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W)},
- {S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V)},
- {OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_Y), S(KC_O), S(KC_U), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_G), KC_LCBR, KC_RCBR, S(KC_M), S(KC_X),
+ S(KC_K), S(KC_H), S(KC_E), S(KC_A), KC_QUES, CNTR_HL, CNTR_HR, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, S(KC_W),
+ S(KC_J), TD_COLN, TD_DQOT, S(KC_I), KC_SLSH, CNTR_BL, CNTR_BR, KC_BSLS, KC_ASTR, KC_DOT, S(KC_P), S(KC_V),
+ OS_CTL, OS_GUI, OS_ALT, KC_TAB, KC_MINS, LT_INS, S_LEFT, ___fn__, SP_BSPC, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/sdothum/colemak.h b/keyboards/planck/keymaps/sdothum/colemak.h
index b7e9df22c1..3d8f0d4863 100644
--- a/keyboards/planck/keymaps/sdothum/colemak.h
+++ b/keyboards/planck/keymaps/sdothum/colemak.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
- {KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O },
- {KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
-
- [_SHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_F, KC_P, KC_B, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
+ KC_A, KC_R, KC_S, KC_T, KC_G, CNTR_HL, CNTR_HR, KC_M, KC_N, KC_E, KC_I, KC_O ,
+ KC_Z, KC_X, KC_C, KC_D, KC_V, CNTR_BL, CNTR_BR, KC_K, KC_H, KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
+
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | F | P | B | ^Alt | ^GUI | J | L | U | Y | : |
@@ -54,12 +54,12 @@
// | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_B), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_G), CNTR_HL, CNTR_HR, S(KC_M), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_D), S(KC_V), CNTR_BL, CNTR_BR, S(KC_K), S(KC_H), TD_TILD, TD_GRV, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
// ..................................................................... ColemaX
@@ -74,19 +74,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN},
- {KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O },
- {KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_C, KC_G, KC_Z, CNTR_TL, CNTR_TR, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
+ KC_A, KC_R, KC_S, KC_T, KC_B, CNTR_HL, CNTR_HR, KC_K, KC_N, KC_E, KC_I, KC_O ,
+ KC_X, KC_V, KC_F, KC_D, KC_P, CNTR_BL, CNTR_BR, KC_M, KC_H, KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_SCLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : |
@@ -98,12 +98,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), KC_SLSH, KC_QUES, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | C | G | Z | ^Alt | ^GUI | J | L | U | Y | : |
@@ -115,11 +115,11 @@
// | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN},
- {S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O)},
- {S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_C), S(KC_G), S(KC_Z), CNTR_TL, CNTR_TR, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), TD_COLN,
+ S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_B), CNTR_HL, CNTR_HR, S(KC_K), S(KC_N), S(KC_E), S(KC_I), S(KC_O),
+ S(KC_X), S(KC_V), S(KC_F), S(KC_D), S(KC_P), CNTR_BL, CNTR_BR, S(KC_M), S(KC_H), TD_TILD, TD_GRV, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/sdothum/common/chord_layout.h b/keyboards/planck/keymaps/sdothum/common/chord_layout.h
index 2c785d56ca..b6922705f3 100644
--- a/keyboards/planck/keymaps/sdothum/common/chord_layout.h
+++ b/keyboards/planck/keymaps/sdothum/common/chord_layout.h
@@ -14,12 +14,12 @@
// | | | | | | | | f() | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_EDIT] = {
- {_______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______},
- {UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______},
- {_______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______},
- },
+ [_EDIT] = LAYOUT_planck_grid(
+ _______, _______, TMCOPY, TMPASTE, _______, _______, _______, _______, _______, _______, _______, _______,
+ UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, TD_PRIV, TD_SEND, _______, _______,
+ _______, _______, NAK, EOT, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, ___fn__, ___fn__, _______, _______, _______, _______
+ ),
// ................................................................ Adjust Layer
@@ -33,9 +33,9 @@
// | | | | f() | | | | | f() | | | |
// `-----------------------------------------------------------------------------------'
- [_ADJUST] = {
- {PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_ADJUST] = LAYOUT_planck_grid(
+ PLOVER, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ AU_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, ___fn__, _______, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h b/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h
index 4824b82a07..e19a6097c1 100644
--- a/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h
+++ b/keyboards/planck/keymaps/sdothum/common/number_fkey_layout.h
@@ -14,16 +14,16 @@
// | | | | f() | | | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___
#else
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___
#endif
- },
+ ),
#else
// .-----------------------------------------------------------------------------------.
// | | F | E | D | | | | / | 7 | 8 | 9 | * |
@@ -36,16 +36,16 @@
// | | | | f() | | | | = | 0 | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_CTL, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_NUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_CTL, GT_C, AT_B, LT_A, _______, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, MT_X, S(KC_G), _______, _______, _______, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_0, LT_EQL, ___x___, ___x___, ___x___
#else
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___},
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_EQL, LT_0, ___x___, ___x___, ___x___
#endif
- },
+ ),
// .-----------------------------------------------------------------------------------.
// | | | | | | | | { | & | ? | : | } |
@@ -57,12 +57,12 @@
// | | | | f() | | | | \ | | | | | |
// '-----------------------------------------------------------------------------------'
- [_NUMSYM] = {
- {_______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR},
- {___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN},
- {_______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC},
- {___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___},
- },
+ [_NUMSYM] = LAYOUT_planck_grid(
+ _______, _______, _______, ___x___, _______, _______, _______, TD_LCBR, KC_AMPR, KC_QUES, KC_COLN, KC_RCBR,
+ ___x___, ___x___, ___x___, ___fn__, _______, _______, _______, TD_LPRN, KC_DLR, KC_PERC, KC_CIRC, KC_RPRN,
+ _______, _______, _______, ___x___, _______, _______, _______, TD_LBRC, KC_LT, KC_TILD, KC_GT, KC_RBRC,
+ ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___, KC_BSLS, KC_PIPE, ___x___, ___x___, ___x___
+ ),
#endif
// ............ .................................................. Function Keys
@@ -78,10 +78,10 @@
// | | | | | f() | | | + | | | | | see _PLOVER
// '-----------------------------------------------------------------------------------'
- [_FNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______},
- },
+ [_FNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, _______, ___fn__, ___fn__, _______, KC_PLUS, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/sdothum/common/steno_layout.h b/keyboards/planck/keymaps/sdothum/common/steno_layout.h
index ab4a6fe011..c1f2b5b24a 100644
--- a/keyboards/planck/keymaps/sdothum/common/steno_layout.h
+++ b/keyboards/planck/keymaps/sdothum/common/steno_layout.h
@@ -13,12 +13,12 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {_______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ BASE1, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ BASE2, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ _______, _______, _______, PS_STNA, PS_STNO, _______, _______, PS_STNE, PS_STNU, _______, _______, _______
+ ),
#else
// ,-----------------------------------------------------------------------------------.
// | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
@@ -30,10 +30,10 @@
// | | A | O | E | U | |
// `-----------------------------------------------------------------------------------'
- [_PLOVER] = {
- {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
- {BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
- {BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {_______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______},
- },
+ [_PLOVER] = LAYOUT_planck_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 ,
+ BASE1, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
+ BASE2, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ _______, _______, _______, LT_C, LT_V, _______, _______, LT_N, LT_M, _______, _______, _______
+ ),
#endif
diff --git a/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h b/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h
index 2edfe1a04a..d33ca8baa8 100644
--- a/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h
+++ b/keyboards/planck/keymaps/sdothum/common/symbol_guifn_layout.h
@@ -13,12 +13,12 @@
// | | | |Adjust| \ | | | | f() | | | |
// '-----------------------------------------------------------------------------------'
- [_SYMBOL] = {
- {_______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_CTL, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMBOL] = LAYOUT_planck_grid(
+ _______, KC_TILD, KC_ASTR, KC_AMPR, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_CTL, SM_CIRC, SM_PERC, SM_DLR, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, KC_HASH, KC_AT, KC_EXLM, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, ADJUST, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
#else
// .-----------------------------------------------------------------------------------.
// | { | . | * | & | } | | | | Home | Up | End | PgUp |
@@ -30,12 +30,12 @@
// | | | | | | \ | | | | f() | | | |
// '-----------------------------------------------------------------------------------'
- [_SYMBOL] = {
- {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN},
- {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMBOL] = LAYOUT_planck_grid(
+ KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, TD_RCBR, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ SM_LPRN, SM_CIRC, SM_PERC, SM_DLR, TD_RPRN, _______, _______, _______, LT_LFTX, KC_DOWN, KC_RGHT, KC_PGDN,
+ KC_LBRC, KC_HASH, KC_AT, KC_EXLM, TD_RBRC, _______, _______, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, SL_PIPE, LT_BSLS, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
// .-----------------------------------------------------------------------------------.
// | | ? | + | ~ | | | | | | | | |
@@ -47,12 +47,12 @@
// | | | | | | | | | f() | | | |
// '-----------------------------------------------------------------------------------'
- [_SYMREG] = {
- {___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___},
- {___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___},
- {___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______},
- {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___},
- },
+ [_SYMREG] = LAYOUT_planck_grid(
+ ___x___, KC_QUES, KC_PLUS, KC_TILD, ___x___, _______, _______, _______, ___x___, ___x___, ___x___, ___x___,
+ ___x___, KC_LT, KC_EQL, TD_RNGL, ___x___, _______, _______, _______, ___fn__, ___x___, ___x___, ___x___,
+ ___x___, KC_3, KC_2, KC_1, ___x___, _______, _______, _______, _______, _______, _______, _______,
+ ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___fn__, ___x___, ___x___, ___x___
+ ),
#endif
// ............................................................... Mouse Actions
@@ -67,9 +67,9 @@
// | | | | | f() | | | | f() | | | |
// '-----------------------------------------------------------------------------------'
- [_MOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______},
- },
+ [_MOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, ___fn__, _______, _______, _______, ___fn__, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/sdothum/common/toggle_layout.h b/keyboards/planck/keymaps/sdothum/common/toggle_layout.h
index 504a1ff579..ae44576df9 100644
--- a/keyboards/planck/keymaps/sdothum/common/toggle_layout.h
+++ b/keyboards/planck/keymaps/sdothum/common/toggle_layout.h
@@ -14,16 +14,16 @@
// | | f() | Space| = | 0 | |
// '-----------------------------------------------------------------------------------'
- [_TTNUMBER] = {
- {_______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR},
- {OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS},
- {_______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS},
+ [_TTNUMBER] = LAYOUT_planck_grid(
+ _______, KC_F, MT_E, KC_D, _______, ___x___, ___x___, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR,
+ OS_CTL, GT_C, AT_B, ST_A, _______, ___x___, ___x___, TD_DOT, KC_4, KC_5, KC_6, KC_MINS,
+ _______, KC_HASH, SM_G, KC_BSLS, _______, ___x___, ___x___, TD_COMM, KC_1, KC_2, KC_3, KC_PLUS,
#ifdef THUMB_0
- {_______, _______, _______, _______, TT_ESC, KC_SPC, KC_0, LT_EQL, _______, _______, _______, _______},
+ _______, _______, _______, _______, TT_ESC, KC_SPC, KC_0, LT_EQL, _______, _______, _______, _______
#else
- {_______, _______, _______, _______, TT_ESC, KC_SPC, KC_EQL, LT_0, _______, _______, _______, _______},
+ _______, _______, _______, _______, TT_ESC, KC_SPC, KC_EQL, LT_0, _______, _______, _______, _______
#endif
- },
+ ),
// ............ .................................................. Function Keys
@@ -37,12 +37,12 @@
// | | f() | | + | | |
// '-----------------------------------------------------------------------------------'
- [_TTFNCKEY] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 },
- {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 },
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 },
- {_______, _______, _______, _______, TT_ESC, _______, KC_PLUS, _______, _______, _______, _______, _______},
- },
+ [_TTFNCKEY] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F7, KC_F8, KC_F9, KC_F12 ,
+ OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_F1, KC_F2, KC_F3, KC_F10 ,
+ _______, _______, _______, _______, TT_ESC, _______, KC_PLUS, _______, _______, _______, _______, _______
+ ),
// ....................................................................... Regex
@@ -56,12 +56,12 @@
// | | f() | - | + | Space| |
// `-----------------------------------------------------------------------------------'
- [_TTREGEX] = {
- {___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___},
- {___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___},
- {___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___},
- {_______, _______, _______, _______, TT_ESC, KC_MINS, KC_PLUS, KC_SPC, _______, _______, _______, _______},
- },
+ [_TTREGEX] = LAYOUT_planck_grid(
+ ___x___, KC_TILD, KC_LCBR, KC_RCBR, KC_AMPR, ___x___, ___x___, KC_PERC, KC_LBRC, KC_RBRC, KC_AT, ___x___,
+ ___x___, KC_CIRC, KC_LT, KC_GT, KC_QUES, ___x___, ___x___, KC_PIPE, KC_LPRN, KC_RPRN, KC_DLR, ___x___,
+ ___x___, KC_COLN, KC_EXLM, KC_EQL, KC_SLSH, ___x___, ___x___, KC_BSLS, KC_ASTR, KC_DOT, KC_HASH, ___x___,
+ _______, _______, _______, _______, TT_ESC, KC_MINS, KC_PLUS, KC_SPC, _______, _______, _______, _______
+ ),
// ............................................................ Navigation Layer
@@ -75,12 +75,12 @@
// | | f() | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTCURSOR] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP},
- {OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTCURSOR] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_HOME, KC_UP, KC_END, KC_PGUP,
+ OS_CTL, OS_GUI, OS_ALT, OS_SFT, _______, ___x___, ___x___, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______
+ ),
// ............................................................... Mouse Actions
@@ -94,9 +94,9 @@
// | | f() | | | | |
// '-----------------------------------------------------------------------------------'
- [_TTMOUSE] = {
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U},
- {_______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D},
- {_______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______},
- },
+ [_TTMOUSE] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U,
+ _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, ___x___, ___x___, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
+ _______, _______, _______, _______, _______, ___x___, ___x___, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, TT_ESC, _______, _______, _______, _______, _______, _______, _______
+ ),
diff --git a/keyboards/planck/keymaps/sdothum/config.h b/keyboards/planck/keymaps/sdothum/config.h
index 8bed79e6f7..903bbe8095 100644
--- a/keyboards/planck/keymaps/sdothum/config.h
+++ b/keyboards/planck/keymaps/sdothum/config.h
@@ -14,7 +14,7 @@
// #define MOUSEKEY_WHEEL_DELAY 0
// compile time macro string, see functions/hardware planck script (undefine otherwise)
-#define PRIVATE_STRING
+//#define PRIVATE_STRING
// compile time macro string, must be in quotes
#define PUBLIC_STRING ":%s/arch=(.*)/arch=('any')\n"
diff --git a/keyboards/planck/keymaps/sdothum/keymap.c b/keyboards/planck/keymaps/sdothum/keymap.c
index 59a4a25e32..597466ba47 100644
--- a/keyboards/planck/keymaps/sdothum/keymap.c
+++ b/keyboards/planck/keymaps/sdothum/keymap.c
@@ -66,17 +66,10 @@
// sudo CPATH=<keymap.c directory>/common make ...
-#include "config.h"
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#ifdef STENO_ENABLE
#include "keymap_steno.h"
#endif
-#ifdef AUDIO_ENABLE
-#include "audio.h"
-#endif
-#include "eeconfig.h"
extern keymap_config_t keymap_config;
@@ -181,7 +174,7 @@ enum planck_keycodes {
#define S_TAB S (KC_TAB)
#define S_UP S (KC_UP)
-#include "tapdance.h"
+#include "common/tapdance.h"
// keycodes
#define ___x___ KC_TRNS
@@ -254,35 +247,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#include "beakl.h"
#include "colemak.h"
#include "qwerty.h"
-#include "steno_layout.h"
+#include "common/steno_layout.h"
// ...................................................... Number / Function Keys
-#include "number_fkey_layout.h"
+#include "common/number_fkey_layout.h"
// ......................................................... Symbol / Navigation
-#include "symbol_guifn_layout.h"
+#include "common/symbol_guifn_layout.h"
// ............................................................... Toggle Layers
#ifdef CENTER_TT
-#include "toggle_layout.h"
+#include "common/toggle_layout.h"
#endif
// ......................................................... Short Cuts / Adjust
-#include "chord_layout.h"
+#include "common/chord_layout.h"
};
// ...................................................................... Sounds
-#include "sounds.h"
+#include "common/sounds.h"
// ........................................................... User Keycode Trap
-#include "keycode_functions.h"
+#include "common/keycode_functions.h"
#define BASE_1 1
#define BASE_2 2
@@ -476,4 +469,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
return true;
}
-#include "init.h"
+#include "common/init.h"
diff --git a/keyboards/planck/keymaps/sdothum/qwerty.h b/keyboards/planck/keymaps/sdothum/qwerty.h
index d11d0478b3..3bfdb3e704 100644
--- a/keyboards/planck/keymaps/sdothum/qwerty.h
+++ b/keyboards/planck/keymaps/sdothum/qwerty.h
@@ -13,19 +13,19 @@
// | Ctrl | GUI | Alt | Esc | Space| Tab | Bksp | Ent | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_BASE] = {
- {KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P },
- {KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
- {KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_BASE] = LAYOUT_planck_grid(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, CNTR_TL, CNTR_TR, KC_Y, KC_U, KC_I, KC_O, KC_P ,
+ KC_A, KC_S, KC_D, KC_F, KC_G, CNTR_HL, CNTR_HR, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
+ KC_Z, KC_X, KC_C, KC_V, KC_B, CNTR_BL, CNTR_BR, KC_N, KC_M, KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
- [_SHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)},
- {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT},
- },
+ [_SHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P),
+ S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), KC_SCLN,
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_COMM, KC_DOT, TD_QUOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, TD_SPC, LT_TAB, LT_BSPC, TD_ENT, LT_LEFT, AT_DOWN, GT_UP, CT_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P |
@@ -37,12 +37,12 @@
// | Ctrl | GUI | Alt | Esc | f() | Tab | Del | - | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_LSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)},
- {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_LSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P),
+ S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN,
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), KC_SLSH, KC_QUES, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, LT_ESC, ___fn__, LT_TAB, KC_DEL, KC_MINS, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
// ,-----------------------------------------------------------------------------------.
// | Q | W | E | R | T | ^Alt | ^GUI | Y | U | I | O | P |
@@ -54,11 +54,11 @@
// | Ctrl | GUI | Alt | Caps | _ | ↑Tab | Bksp | f() | Left | Down | Up | Right|
// `-----------------------------------------------------------------------------------'
- [_RSHIFT] = {
- {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P)},
- {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN},
- {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT},
- {OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT },
- },
+ [_RSHIFT] = LAYOUT_planck_grid(
+ S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), CNTR_TL, CNTR_TR, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P),
+ S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), CNTR_HL, CNTR_HR, S(KC_H), S(KC_J), S(KC_K), S(KC_L), TD_COLN,
+ S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), CNTR_BL, CNTR_BR, S(KC_N), S(KC_M), TD_TILD, TD_GRV, TD_DQOT,
+ OS_CTL, OS_GUI, OS_ALT, KC_CAPS, KC_UNDS, SL_TAB, LT_BSPC, ___fn__, SL_LEFT, S_DOWN, S_UP, S_RGHT
+ ),
#endif
diff --git a/keyboards/planck/keymaps/sean/keymap.c b/keyboards/planck/keymaps/sean/keymap.c
index 497efeaab2..b4024909f5 100644
--- a/keyboards/planck/keymaps/sean/keymap.c
+++ b/keyboards/planck/keymaps/sean/keymap.c
@@ -1,10 +1,7 @@
// This is Sean Hunter's keymap file, customized from the canonical layout file for the Quantum project.
// If you want to add another keyboard, that is the style you want to emulate.
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
#include "mymappings.h"
extern keymap_config_t keymap_config;
@@ -50,12 +47,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui |Lower | Space |Raise | < | v | ^ | > |
* `-----------------------------------------------------------------------------------'
*/
-[_DVRK] = {
- {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_SLSH, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L},
- {KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_BSPC, KC_D, KC_H, KC_T, KC_N, KC_S},
- {KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z},
- {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
+[_DVRK] = LAYOUT_planck_grid(
+ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_SLSH, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L,
+ KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_BSPC, KC_D, KC_H, KC_T, KC_N, KC_S,
+ KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_TAB, KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/* Lower
@@ -69,12 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui |Lower | |Raise | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10},
- {KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0},
- {KC_TILD, KC_PIPE, KC_GRV, KC_MINS, KC_UNDS, KC_INS, KC_DEL, KC_LPRN, KC_RPRN, KC_PLUS, KC_EQL, KC_BSLS},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0,
+ KC_TILD, KC_PIPE, KC_GRV, KC_MINS, KC_UNDS, KC_INS, KC_DEL, KC_LPRN, KC_RPRN, KC_PLUS, KC_EQL, KC_BSLS,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Raise
@@ -88,12 +85,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui |Lower | |Raise | Gui | Alt | Ctl | Sft |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- { KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20},
- {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLEP, KC_WAKE, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
- { GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10},
- {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20,
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_SLEP, KC_WAKE, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
+ GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT
+),
/* 'Software Dvorak': Designed to look like dvorak in the mapping but depend on software
* dvorak (ie the OS keymapping changed to dvorak).
@@ -107,12 +104,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui |SLower| Space |SRaise| < | v | ^ | > |
* `-----------------------------------------------------------------------------------'
*/
-[_SDRK] = {
- {DV_QUOT, DV_COMM, DV_DOT, DV_P, DV_Y, DV_SLSH, DV_EQL, DV_F, DV_G, DV_C, DV_R, DV_L},
- {DV_A, DV_O, DV_E, DV_U, DV_I, KC_ESC, KC_BSPC, DV_D, DV_H, DV_T, DV_N, DV_S},
- {DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_TAB, KC_ENT, DV_B, DV_M, DV_W, DV_V, DV_Z},
- {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
-},
+[_SDRK] = LAYOUT_planck_grid(
+ DV_QUOT, DV_COMM, DV_DOT, DV_P, DV_Y, DV_SLSH, DV_EQL, DV_F, DV_G, DV_C, DV_R, DV_L,
+ DV_A, DV_O, DV_E, DV_U, DV_I, KC_ESC, KC_BSPC, DV_D, DV_H, DV_T, DV_N, DV_S,
+ DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_TAB, KC_ENT, DV_B, DV_M, DV_W, DV_V, DV_Z,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+),
/* 'Software dvorak lower mode': Puts all the braces etc in the right places so it works
@@ -128,12 +125,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui |SLower| |SRaise| Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
-[_SLWER] = {
- {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, DV_LCBR, DV_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10},
- {DV_1, DV_2, DV_3, DV_4, DV_5, DV_LBRC, DV_RBRC, DV_6, DV_7, DV_8, DV_9, DV_0},
- {DV_TILD, DV_PIPE, DV_GRV, DV_MINS, DV_UNDS, KC_INS, KC_DEL, DV_LPRN, DV_RPRN, DV_PLUS, DV_EQL, DV_BSLS},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_SLWER] = LAYOUT_planck_grid(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, DV_LCBR, DV_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
+ DV_1, DV_2, DV_3, DV_4, DV_5, DV_LBRC, DV_RBRC, DV_6, DV_7, DV_8, DV_9, DV_0,
+ DV_TILD, DV_PIPE, DV_GRV, DV_MINS, DV_UNDS, KC_INS, KC_DEL, DV_LPRN, DV_RPRN, DV_PLUS, DV_EQL, DV_BSLS,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* 'Software dvorak raise mode'
@@ -147,12 +144,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui |Lower | |Raise | Gui | Alt | Ctl | Sft |
* `-----------------------------------------------------------------------------------'
*/
-[_SRAIS] = {
- { KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20},
- {DV_EXLM, DV_AT, DV_HASH, DV_DLR, DV_PERC, KC_SLEP, KC_WAKE, DV_CIRC, DV_AMPR, DV_ASTR, DV_LPRN, DV_RPRN},
- { GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10},
- {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT}
-},
+[_SRAIS] = LAYOUT_planck_grid(
+ KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20,
+ DV_EXLM, DV_AT, DV_HASH, DV_DLR, DV_PERC, KC_SLEP, KC_WAKE, DV_CIRC, DV_AMPR, DV_ASTR, DV_LPRN, DV_RPRN,
+ GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, _______, _______, GUI_6, GUI_7, GUI_8, GUI_9, GUI_10,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, SLWER, KC_SPC, KC_SPC, SRAIS, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT
+),
/* Adjust (Lower + Raise or SLower + SRaise)
@@ -166,12 +163,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Brite |BToggl| | | | | | Gui | Alt | Ctl | Sft |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, HRVL, HRESET, HMENU},
- { KC_PWR, KC_EJCT, CUT, COPY, PASTE, KC_PSCR, KC_SYSREQ, KC_CAPS, KC_MRWD, KC_MFFD, KC_MUTE, KC_MSTP},
- { DVRK, TO(_NMPD), TO(_MVMT), SDRK, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY},
- {BACKLIT, BACKTOG, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT}
-},
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, HRVL, HRESET, HMENU,
+ KC_PWR, KC_EJCT, CUT, COPY, PASTE, KC_PSCR, KC_SYSREQ, KC_CAPS, KC_MRWD, KC_MFFD, KC_MUTE, KC_MSTP,
+ DVRK, TO(_NMPD), TO(_MVMT), SDRK, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
+ BACKLIT, BACKTOG, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT
+),
/* Numpad
@@ -185,12 +182,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | 0 | . | + |
* `-----------------------------------------------------------------------------------'
*/
-[_NMPD] = {
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST},
- {TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PMNS},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS}
-},
+[_NMPD] = LAYOUT_planck_grid(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PENT, KC_P4, KC_P5, KC_P6, KC_PAST,
+ TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PMNS,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PPLS
+),
/* Movement
@@ -204,12 +201,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Sft | Ctl | Alt | Gui | | | | Gui | Alt | Ctl | Sft |
* `-----------------------------------------------------------------------------------'
*/
-[_MVMT] = {
- {KC_MB2, KC_MWDN, KC_MWUP, KC_MB1, KC_MB3, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END},
- {KC_MLFT, KC_MDN, KC_MUP, KC_MRGT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT},
- {TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT}
-},
+[_MVMT] = LAYOUT_planck_grid(
+ KC_MB2, KC_MWDN, KC_MWUP, KC_MB1, KC_MB3, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
+ KC_MLFT, KC_MDN, KC_MUP, KC_MRGT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
+ TO(_DVRK),TO(_NMPD),TO(_MVMT),SDRK,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT
+),
};
diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c
index f5efeef459..1b70524825 100644
--- a/keyboards/planck/keymaps/sgoodwin/keymap.c
+++ b/keyboards/planck/keymaps/sgoodwin/keymap.c
@@ -2,13 +2,7 @@
// It doesn't have Plover or Dvorak layers because he doesn't use that.
// It Also doesn't allow for swapping alt with CMD because that only happens in error.
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -43,12 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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, MT(MOD_RSFT, KC_ENT) },
- {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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, MT(MOD_RSFT, KC_ENT) ,
+ ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Qwerty
* ,-----------------------------------------------------------------------------------.
@@ -61,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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, MT(MOD_RSFT, KC_ENT) },
- {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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, MT(MOD_RSFT, KC_ENT) ,
+ ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -79,12 +73,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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),_______, _______, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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),_______, _______, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -97,12 +91,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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, _______, _______, _______},
- {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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, _______, _______, _______,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -115,12 +109,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c
index 1426b62a68..55115b0c84 100644
--- a/keyboards/planck/keymaps/smt/keymap.c
+++ b/keyboards/planck/keymaps/smt/keymap.c
@@ -1,10 +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 "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -47,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {CTL_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, SFT_ENT},
- {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_QWERTY] = LAYOUT_planck_grid(
+ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ CTL_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, SFT_ENT,
+ MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -65,12 +59,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {CTL_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, SFT_ENT},
- {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_grid(
+ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ CTL_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, SFT_ENT,
+ MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -83,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | ` | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
- {CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
- {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT},
- {MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_DVORAK] = LAYOUT_planck_grid(
+ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT,
+ MEH_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -101,12 +95,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
- {CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
+ CTL_T(KC_DLR), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, _______, _______,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -119,12 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | Home |PageDn|PageUp| End |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {_______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS)},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ ALL_T(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_UNDS, KC_QUES, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, _______, _______, _______, _______, _______, KC_MINS, KC_SLSH, KC_EQL, KC_LBRC, KC_RBRC, SFT_T(KC_BSLS),
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -137,12 +131,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/steno/keymap.c b/keyboards/planck/keymaps/steno/keymap.c
index 849fefa5c4..c2db4746cc 100644
--- a/keyboards/planck/keymaps/steno/keymap.c
+++ b/keyboards/planck/keymaps/steno/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
#include "keymap_steno.h"
extern keymap_config_t keymap_config;
@@ -58,12 +56,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -76,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -112,12 +110,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -130,12 +128,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -149,12 +147,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC },
- {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR },
- {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR },
- {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2}
-},
+[_PLOVER] = LAYOUT_planck_grid(
+ STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC ,
+ STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR ,
+ XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR ,
+ EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -167,12 +165,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, ST_BOLT, ST_GEM},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, ST_BOLT, ST_GEM,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/tak3over/keymap.c b/keyboards/planck/keymaps/tak3over/keymap.c
index 8b26520bf9..1b9f91b0bd 100644
--- a/keyboards/planck/keymaps/tak3over/keymap.c
+++ b/keyboards/planck/keymaps/tak3over/keymap.c
@@ -1,11 +1,7 @@
//
//Dropped the Dvorak layer and added two my layer buttons. Both Raise and lower can be accessed from either side now.
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.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.
@@ -30,12 +26,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QW] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {KC_LCTL, KC_LALT, KC_LGUI, MO(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_QW] = 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,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
+ KC_LCTL, KC_LALT, KC_LGUI, MO(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
@@ -47,12 +43,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right
* `-----------------------------------------------------------------------------------'
*/
-[_CM] = {
- {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_LALT, KC_LGUI, MO(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_CM] = LAYOUT_planck_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_LALT, KC_LGUI, MO(_FN), MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp
@@ -64,12 +60,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_RS] = {
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE},
- {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
+[_RS] = 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
@@ -81,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_LW] = {
- {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_TRNS, RESET, KC_INS, KC_HOME, KC_PGUP, DF(_CM), KC_LEFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, M(0), KC_DEL, KC_END, KC_PGDN, DF(_QW), KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-},
+[_LW] = 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_TRNS, RESET, KC_INS, KC_HOME, KC_PGUP, DF(_CM), KC_LEFT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, M(0), KC_DEL, KC_END, KC_PGDN, DF(_QW), KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
/* Function
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
@@ -98,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI |Func |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_FN] = {
- {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_TRNS, KC_RGUI, KC_X, KC_C, KC_V, KC_Z, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_BSLS},
- {KC_TRNS, KC_RCTL, KC_X, KC_C, KC_V, KC_Z, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
-}
+[_FN] = 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_TRNS, KC_RGUI, KC_X, KC_C, KC_V, KC_Z, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_BSLS,
+ KC_TRNS, KC_RCTL, KC_X, KC_C, KC_V, KC_Z, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/tehwalris/keymap.c b/keyboards/planck/keymaps/tehwalris/keymap.c
index 0af864d9e0..f2a9fd909a 100644
--- a/keyboards/planck/keymaps/tehwalris/keymap.c
+++ b/keyboards/planck/keymaps/tehwalris/keymap.c
@@ -14,9 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -37,47 +35,47 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[DVORAK] = {
- {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, OSL(OVL_C)},
- {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, 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_LGUI, MO(OVL_N), KC_LCTL, KC_RCTL, KC_BSPC, MO(OVL_L), MO(OVL_R), KC_SPC, KC_LALT, MO(OVL_F), KC_RALT, KC_RGUI }
-},
+[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, OSL(OVL_C),
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, 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_LGUI, MO(OVL_N), KC_LCTL, KC_RCTL, KC_BSPC, MO(OVL_L), MO(OVL_R), KC_SPC, KC_LALT, MO(OVL_F), KC_RALT, KC_RGUI
+),
-[OVL_L] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RGHT, _______},
- {_______, KC_UNDS, KC_MINS, KC_BSLS, KC_SLSH, KC_PLUS, KC_DLR, KC_LEFT, KC_EQL, KC_LCBR, KC_RCBR, _______},
- {_______, KC_SCLN, _______, _______, _______, _______, _______, _______, KC_GRV, KC_HASH, KC_PIPE, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[OVL_L] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RGHT, _______,
+ _______, KC_UNDS, KC_MINS, KC_BSLS, KC_SLSH, KC_PLUS, KC_DLR, KC_LEFT, KC_EQL, KC_LCBR, KC_RCBR, _______,
+ _______, KC_SCLN, _______, _______, _______, _______, _______, _______, KC_GRV, KC_HASH, KC_PIPE, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
-[OVL_R] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_EXLM, KC_CIRC, KC_QUES, KC_PERC, KC_AMPR, KC_ASTR, _______},
- {_______, KC_TILD, KC_AT, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[OVL_R] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_EXLM, KC_CIRC, KC_QUES, KC_PERC, KC_AMPR, KC_ASTR, _______,
+ _______, KC_TILD, KC_AT, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
-[OVL_C] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, _______},
- {_______, UMLT_A, UMLT_O, _______, UMLT_U, _______, _______, KC_HOME, _______, _______, _______, _______},
- {_______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______}
-},
+[OVL_C] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, _______,
+ _______, UMLT_A, UMLT_O, _______, UMLT_U, _______, _______, KC_HOME, _______, _______, _______, _______,
+ _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______
+),
-[OVL_N] = {
- {_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______},
- {_______, KC_PLUS, KC_UNDS, KC_LPRN, KC_RPRN, _______, _______, KC_4, KC_5, KC_6, _______, _______},
- {_______, KC_ASTR, KC_SLSH, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQL, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______}
-},
+[OVL_N] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______,
+ _______, KC_PLUS, KC_UNDS, KC_LPRN, KC_RPRN, _______, _______, KC_4, KC_5, KC_6, _______, _______,
+ _______, KC_ASTR, KC_SLSH, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQL, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______
+),
-[OVL_F] = {
- {_______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_F4, KC_F5, KC_F6, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, _______}
-}
+[OVL_F] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_F4, KC_F5, KC_F6, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c
index 131bf4108a..178422cd8b 100644
--- a/keyboards/planck/keymaps/that_canadian/keymap.c
+++ b/keyboards/planck/keymaps/that_canadian/keymap.c
@@ -1,13 +1,7 @@
// 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.
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -46,12 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
- {OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT},
- {KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
+ KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -64,12 +58,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE},
- {_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_LOWER] = LAYOUT_planck_grid(
+ KC_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE,
+ _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -82,12 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
- {KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS},
- {_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_RAISE] = LAYOUT_planck_grid(
+ 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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
+ KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS,
+ _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -100,12 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | RESET|
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}
-},
+[_ADJUST] = LAYOUT_planck_grid(
+ TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET
+),
/* Function
* ,-----------------------------------------------------------------------------------.
@@ -118,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNCTION] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______},
- {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_FUNCTION] = LAYOUT_planck_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c
index e43e13cd27..9a1d0d0494 100644
--- a/keyboards/planck/keymaps/thermal_printer/keymap.c
+++ b/keyboards/planck/keymaps/thermal_printer/keymap.c
@@ -1,11 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -45,12 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -63,12 +57,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -81,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -99,12 +93,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -117,12 +111,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -136,12 +130,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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}
-},
+[_PLOVER] = LAYOUT_planck_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)
* ,-----------------------------------------------------------------------------------.
@@ -154,12 +148,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, PRINT_ON, PRINT_OFF, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, PRINT_ON, PRINT_OFF, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c
index bdde285690..de43024c40 100644
--- a/keyboards/planck/keymaps/tong92/keymap.c
+++ b/keyboards/planck/keymaps/tong92/keymap.c
@@ -1,9 +1,6 @@
//Author: tong92 <tong92power@gmail.com>
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.h"
-#endif
+#include QMK_KEYBOARD_H
enum planck_layers {
_WINDOW,
@@ -41,12 +38,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt |
* `-----------------------------------------------------------------------'
*/
-[_WINDOW] ={
-{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
-{KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_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},
-{WINDOW_SHORTCUT, KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT}
-},
+[_WINDOW] = 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,
+KC_LCTL,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_SLSH,KC_RSFT,
+WINDOW_SHORTCUT, KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT
+),
/* Mac - Qwerty
* ,-----------------------------------------------------------------------.
* |Tab | q | w | e | r | t | y | u | i | o | p | BS |
@@ -58,12 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Fn |Lang |Ctrl | Alt |Lower| Space |Upper| ' | [ | ] |SPOT |
* `-----------------------------------------------------------------------'
*/
-[_MAC] ={
-{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_LGUI,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_SLSH,KC_RSFT},
-{MAC_SHORTCUT, LCTL(KC_SPC),KC_LCTL,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,LGUI(KC_SPC)}
-},
+[_MAC] = 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,
+KC_LGUI,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_SLSH,KC_RSFT,
+MAC_SHORTCUT, LCTL(KC_SPC),KC_LCTL,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,LGUI(KC_SPC)
+),
/* LOWER
* ,-----------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS |
@@ -75,12 +72,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | SPACE | | END | LEFT| DOWN|RIGHT|
* `-----------------------------------------------------------------------'
*/
-[_LOWER] ={
-{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS },
-{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
-{XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
-},
+[_LOWER] = 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS ,
+_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN ,
+XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT
+),
/* RAISE
* ,-----------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS |
@@ -92,12 +89,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | SPACE | | END | LEFT| DOWN|RIGHT|
* `-----------------------------------------------------------------------'
*/
-[_RAISE] ={
-{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE },
-{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
-{XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
-},
+[_RAISE] = 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE ,
+_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN ,
+XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT
+),
/* Window Shortcut
* ,-----------------------------------------------------------------------.
* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL |
@@ -109,12 +106,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED |
* `-----------------------------------------------------------------------'
*/
-[_WINDOW_SHORTCUT] ={
-{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL},
-{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
-{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX},
-{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DEL)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT}
-},
+[_WINDOW_SHORTCUT] = LAYOUT_planck_grid(
+KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL,
+_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX,
+_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX,
+KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DEL)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT
+),
/* Mac Shortcut
* ,-----------------------------------------------------------------------.
* | ESC |CmdUp|CmdDo| | | | | PgUp| UP | PgDo|PrtSc| DEL |
@@ -126,12 +123,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | MOUSE | | | | | LED |
* `-----------------------------------------------------------------------'
*/
-[_MAC_SHORTCUT] ={
-{KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL},
-{_______,LALT(LSFT(KC_LEFT)),LALT(LSFT(KC_RIGHT)),XXXXXXX,LGUI(LCTL(KC_F)),XXXXXXX,KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
-{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX},
-{KC_TRNS,_______ ,_______ ,MOUSE ,MOUSE ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT}
-},
+[_MAC_SHORTCUT] = LAYOUT_planck_grid(
+KC_ESC ,LGUI(KC_UP) ,LGUI(KC_DOWN) ,XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DEL,
+_______,LALT(LSFT(KC_LEFT)),LALT(LSFT(KC_RIGHT)),XXXXXXX,LGUI(LCTL(KC_F)),XXXXXXX,KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX,
+_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX,XXXXXXX ,XXXXXXX,XXXXXXX,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX,
+KC_TRNS,_______ ,_______ ,MOUSE ,MOUSE ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,BACKLIT
+),
/* 10: mouse layer
* ,-----------------------------------------------------------------------.
* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET|
@@ -143,12 +140,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | GO_DEFT | | | | | MAC |
* `-----------------------------------------------------------------------'
*/
-[_MOUSE] ={
-{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET},
-{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX},
-{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,WINDOW},
-{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,EXT_MOUSE,EXT_MOUSE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,MAC}
-}
+[_MOUSE] = LAYOUT_planck_grid(
+XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET,
+XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX,
+XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,WINDOW,
+XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,EXT_MOUSE,EXT_MOUSE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,MAC
+)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c
index bc9e5326a3..215acaa3ab 100644
--- a/keyboards/planck/keymaps/unicode/keymap.c
+++ b/keyboards/planck/keymaps/unicode/keymap.c
@@ -21,13 +21,7 @@
*/
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#include "action_layer.h"
-#ifdef AUDIO_ENABLE
- #include "audio.h"
-#endif
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -67,12 +61,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {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 },
- {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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,
+ 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 ,
+ M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Colemak
* ,-----------------------------------------------------------------------------------.
@@ -85,12 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = {
- {KC_TAB, UC_q, UC_w, UC_f, UC_p, UC_g, UC_j, UC_l, UC_u, UC_y, UC_SCLN, UC_BSPC},
- {KC_ESC, UC_a, UC_r, UC_s, UC_t, UC_d, UC_h, UC_n, UC_e, UC_i, UC_o, UC_QUOT},
- {KC_LSFT, UC_z, UC_x, UC_c, UC_v, UC_b, UC_k, UC_m, UC_COMM, UC_DOT, UC_SLSH, KC_ENT},
- {KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_grid(
+ KC_TAB, UC_q, UC_w, UC_f, UC_p, UC_g, UC_j, UC_l, UC_u, UC_y, UC_SCLN, UC_BSPC,
+ KC_ESC, UC_a, UC_r, UC_s, UC_t, UC_d, UC_h, UC_n, UC_e, UC_i, UC_o, UC_QUOT,
+ KC_LSFT, UC_z, UC_x, UC_c, UC_v, UC_b, UC_k, UC_m, UC_COMM, UC_DOT, UC_SLSH, KC_ENT,
+ KC_TRNS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Dvorak
* ,-----------------------------------------------------------------------------------.
@@ -103,12 +97,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = {
- {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 },
- {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_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_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 ,
+ M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -121,12 +115,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {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, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -139,12 +133,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
+[_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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
/* Plover layer (http://opensteno.org)
* ,-----------------------------------------------------------------------------------.
@@ -158,12 +152,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
-[_PLOVER] = {
- {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},
- {TOG_OUT, 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}
-},
+[_PLOVER] = LAYOUT_planck_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,
+ TOG_OUT, 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)
* ,-----------------------------------------------------------------------------------.
@@ -176,12 +170,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL},
- {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
- {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-}
+[_ADJUST] = LAYOUT_planck_grid(
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c
index f6ece4d1e7..60bbc758d7 100644
--- a/keyboards/planck/keymaps/yale/keymap.c
+++ b/keyboards/planck/keymaps/yale/keymap.c
@@ -1,10 +1,6 @@
//
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.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.
@@ -28,12 +24,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter|
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = {
- {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {CTL_T(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_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT}
-},
+[_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,
+ CTL_T(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_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT
+),
/* _NUM
* ,-----------------------------------------------------------------------------------.
@@ -46,12 +42,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ |
* `-----------------------------------------------------------------------------------'
*/
-[_NUM] = {
- {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL},
- {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______},
- {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______}
-},
+[_NUM] = LAYOUT_planck_grid(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL,
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______,
+ _______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______
+),
/* _FUNC
* ,-----------------------------------------------------------------------------------.
@@ -64,19 +60,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ |
* `-----------------------------------------------------------------------------------'
*/
-[_FUNC] = {
- {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
- {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______},
- {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______},
- {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______}
-},
+[_FUNC] = LAYOUT_planck_grid(
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______,
+ _______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______,
+ _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______
+),
-[_NAV] = {
- {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX},
- {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX},
- {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
- {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_NAV] = LAYOUT_planck_grid(
+ KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX,
+ KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
};
diff --git a/keyboards/planck/keymaps/yang/keymap.c b/keyboards/planck/keymaps/yang/keymap.c
index 477eb50312..e9c69c9989 100644
--- a/keyboards/planck/keymaps/yang/keymap.c
+++ b/keyboards/planck/keymaps/yang/keymap.c
@@ -1,9 +1,5 @@
-#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
-#include "planck.h"
-#ifdef BACKLIGHT_ENABLE
- #include "backlight.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.
@@ -16,48 +12,46 @@
#define _RS 4
#define _RGB 5
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QW] = { /* Qwerty */
- {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 },
- {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), F(0), F(0), MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_CM] = { /* Colemak */
- {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 },
- {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), F(0), F(0), MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_DV] = { /* Dvorak */
- {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 },
- {M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), F(0), F(0), MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
-[_RS] = { /* RAISE */
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[_LW] = { /* LOWER */
- {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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
-},
-[_RGB] = { /* RGBLIGHT */
- {KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL},
- {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_TRNS},
- {KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS},
- {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
+#define RGB_SPC LT(_RGB, KC_SPC)
-}
-};
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[_QW] = LAYOUT_planck_grid( /* Qwerty */
+ 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 ,
+ M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), RGB_SPC, RGB_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_CM] = LAYOUT_planck_grid( /* Colemak */
+ 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 ,
+ M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), RGB_SPC, RGB_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_DV] = LAYOUT_planck_grid( /* Dvorak */
+ 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 ,
+ M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), RGB_SPC, RGB_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+[_RS] = LAYOUT_planck_grid( /* RAISE */
+ 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[_LW] = LAYOUT_planck_grid( /* LOWER */
+ 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
+),
+[_RGB] = LAYOUT_planck_grid( /* RGBLIGHT */
+ KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_TRNS,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+)
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_RGB, KC_SPC),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
diff --git a/keyboards/planck/keymaps/zach/keymap.c b/keyboards/planck/keymaps/zach/keymap.c
index ef1ac0fef7..ba0338e39a 100644
--- a/keyboards/planck/keymaps/zach/keymap.c
+++ b/keyboards/planck/keymaps/zach/keymap.c
@@ -1,49 +1,48 @@
// Zach Nielsen Custom Planck Keyboard layout
-#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 PLANCK_YES // This is the Planck
#include "zach_common_functions.c"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_COLEMAK] = { /* Base Layer */
- {KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC},
- {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT},
- {SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
- {CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
-},
+[_COLEMAK] = LAYOUT_planck_grid( /* Base Layer */
+ KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC,
+ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
+ SHFT_CAP,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ CTRLB, TD(SUP), KC_LALT, KC_LCTL, TD(LOW), KC_SPC, KC_SPC, TD(RAI), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
-[_SWCOLE] = { /* Software Colemak */
- {_______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______},
- {_______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______},
- {_______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
-},
+[_SWCOLE] = LAYOUT_planck_grid( /* Software Colemak */
+ _______, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, KC_QUOT, _______,
+ _______, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, _______,
+ _______, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
-[_RAISE] = { /* RAISE - Numpad and Unicode symbols */
- {KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______},
- {KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR},
- {_______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS},
- {_______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL}
-},
+[_RAISE] = LAYOUT_planck_grid( /* RAISE - Numpad and Unicode symbols */
+ KC_GRV, SUPA2, FACE, DISFACE, SHRUG, PLUMIN, IBANG, KC_7, KC_8, KC_9, KC_COLN, _______,
+ KC_DEL, DEGREE, MICRO, WOMEGA, OMEGA, PENGY, KC_ENT, KC_4, KC_5, KC_6, KC_SLSH, KC_ASTR,
+ _______, KC_COLN, TFLIP, LAROW, RAROW, DUCK, KC_SPC, KC_1, KC_2, KC_3, KC_MINS, KC_PLUS,
+ _______, KC_PIPE, TPUT, _______, _______, KC_TAB, KC_TAB, _______, KC_0, KC_0, KC_DOT, KC_EQL
+),
-[_LOWER] = { /* LOWER - Symbols, Paging, CtrAltDel */
- {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL},
- {KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP},
- {CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN},
- {_______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______}
-},
+[_LOWER] = LAYOUT_planck_grid( /* LOWER - Symbols, Paging, CtrAltDel */
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_DQT, KC_DEL,
+ KC_DEL, KC_LBRC, KC_RBRC, KC_MINS, KC_UNDS, KC_HOME, KC_END, KC_LPRN, KC_RPRN, KC_SLSH, KC_SCLN, KC_PGUP,
+ CPYPST, XXXXXXX, C(KC_X), KC_LABK, KC_RABK, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_BSLS, KC_COLN, KC_PGDN,
+ _______, _______, _______, _______, _______, KC_TAB, KC_TAB, _______, _______, _______, _______, _______
+),
-[_ADJUST] = { /* ADJUST - Macros, Layer Switching, Function Keys */
- {UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX},
- {UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX},
- {_______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX},
- {_______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}
-},
+[_ADJUST] = LAYOUT_planck_grid( /* ADJUST - Macros, Layer Switching, Function Keys */
+ UNIWIN, XXXXXXX, XXXXXXX, PENGY, DUCK, KC_INS, KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX,
+ UNILIN, XXXXXXX, XXXXXXX, RANDIG, RANDIG, SWCOLE, COLEMAK, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX,
+ _______, CADKEY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,
+ _______, _______, _______, _______, _______, RESET, RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+),
-[_UNICODES] = { /* UNICODES - Extra layer for unicode stuff */
- {_______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______},
- {KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______},
- {XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX},
- {_______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______}
-}
+[_UNICODES] = LAYOUT_planck_grid( /* UNICODES - Extra layer for unicode stuff */
+ _______, TFLIP, XXXXXXX, XXXXXXX, IBANG, roman7, XXXXXXX, XXXXXXX, ROMAN7, XXXXXXX, XXXXXXX, _______,
+ KC_DEL, TPUT, FACE, DISFACE, SHRUG, roman4, roman5, roman6, ROMAN4, ROMAN5, ROMAN6, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, LAROW, RAROW, roman1, roman2, roman3, ROMAN1, ROMAN2, ROMAN3, XXXXXXX,
+ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______
+)
};
diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c
index a792560bd4..550117d000 100755
--- a/keyboards/planck/keymaps/zrichard/keymap.c
+++ b/keyboards/planck/keymaps/zrichard/keymap.c
@@ -1,8 +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 "action_layer.h"
-#include "eeconfig.h"
-#include "led.h"
+#include QMK_KEYBOARD_H
#include "mousekey.h"
#ifdef AUDIO_ENABLE
@@ -130,12 +126,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| LCTRL | LWIN | FN | LALT | LOWER | SPACE | SPACE | UPPER | MENU | LEFT | DOWN | RIGHT |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_QWERTY] = {
- { 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_UP , KC_SFTENT /*M_SHENT*/ },
- { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT }
-},
+[LAYER_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_QUOT ,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_SFTENT /*M_SHENT*/ ,
+ KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT
+),
/* LAYER = LAYER_UPPER
.-----------------------------------------------------------------------------------------------------------.
| PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL |
@@ -147,12 +143,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | LOWER | KP 0 | KP 0 | ______ | RALT | KP 0 | KP ENT | RTCTRL |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_UPPER] = {
- { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL },
- { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_HOME },
- { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_END },
- { _______, _______, _______, _______, M_LOWER, KC_KP_0, KC_KP_0, _______, KC_KP_0, KC_PDOT, KC_PENT, KC_RCTL }
-},
+[LAYER_UPPER] = LAYOUT_planck_grid(
+ KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL ,
+ KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_HOME ,
+ _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_END ,
+ _______, _______, _______, _______, M_LOWER, KC_KP_0, KC_KP_0, _______, KC_KP_0, KC_PDOT, KC_PENT, KC_RCTL
+),
/* LAYER = LAYER_LOWER
.-----------------------------------------------------------------------------------------------------------.
| ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP |
@@ -164,12 +160,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | ______ | ______ | ______ | UPPER | ______ | ______ | ______ | END |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_LOWER] = {
- { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP },
- { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN },
- { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME },
- { _______, _______, _______, _______, _______, _______, _______, M_UPPER, _______, _______, _______, KC_END }
-},
+[LAYER_LOWER] = LAYOUT_planck_grid(
+ _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP ,
+ _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN ,
+ _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME ,
+ _______, _______, _______, _______, _______, _______, _______, M_UPPER, _______, _______, _______, KC_END
+),
/* LAYER = LAYER_FUNCTION
.-----------------------------------------------------------------------------------------------------------.
| XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX |
@@ -181,12 +177,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_FUNCTION] = {
- { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE },
- { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }
-},
+[LAYER_FUNCTION] = LAYOUT_planck_grid(
+ XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE ,
+ _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
+),
/* LAYER = LAYER_MOUSE
.-----------------------------------------------------------------------------------------------------------.
| ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR |
@@ -198,12 +194,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_MOUSE] = {
- { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R },
- { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U },
- { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D },
- { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }
-},
+[LAYER_MOUSE] = LAYOUT_planck_grid(
+ KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R ,
+ XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U ,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D ,
+ _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
+),
/* LAYER = LAYER_ADJUST
.-----------------------------------------------------------------------------------------------------------.
| XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | MUSIC | AUDIO |
@@ -215,12 +211,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
| XXXXXX | XXXXXX | XXXXXX | XXXXXX | LOWER | XXXXXX | XXXXXX | UPPER | XXXXXX | TEMPO- | VOICE- | TEMPO+ |
'-----------------------------------------------------------------------------------------------------------'
*/
-[LAYER_ADJUST] = {
- { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG },
- { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
- { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , MY_MACRO},
- { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP }
-},
+[LAYER_ADJUST] = LAYOUT_planck_grid(
+ XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, MU_TOG , AU_TOG ,
+ XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,
+ XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , MY_MACRO,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP
+),
};
diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c
index 9d10fbd754..7c09bd997c 100644
--- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c
+++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,14 +20,76 @@
*/
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -62,23 +124,118 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
+#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -106,4 +263,6 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+ SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
+ SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h
index de3a93d1ce..57636d1f12 100644
--- a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h
+++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -22,6 +22,10 @@
#ifndef BOARD_H
#define BOARD_H
+/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
/*
* Setup for ST STM32F072B-Discovery board.
*/
@@ -166,11 +170,9 @@
#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)
@@ -178,11 +180,24 @@
#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)
+/*===========================================================================*/
+/* Driver pre-compile time settings. */
+/*===========================================================================*/
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
-#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
-#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+/*===========================================================================*/
+/* Driver data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
/*
* I/O ports initial setup, this configuration is established soon after reset
@@ -908,6 +923,9 @@
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
PIN_AFIO_AF(GPIOF_PIN15, 0U))
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/keyboards/projectkb/alice/chconf.h b/keyboards/projectkb/alice/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/projectkb/alice/chconf.h
+++ b/keyboards/projectkb/alice/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/projectkb/alice/halconf.h b/keyboards/projectkb/alice/halconf.h
index da08cdbae2..adb1a90715 100644
--- a/keyboards/projectkb/alice/halconf.h
+++ b/keyboards/projectkb/alice/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,7 +25,11 @@
* @{
*/
-#pragma once
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -33,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -178,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -186,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -197,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -208,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -216,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -242,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -254,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -263,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -273,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -286,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -308,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -324,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#endif
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -345,7 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
#endif
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+#endif /* HALCONF_H */
+
/** @} */
diff --git a/keyboards/retro_75/chconf.h b/keyboards/retro_75/chconf.h
index 99fa8ce398..8d66b51d23 100644
--- a/keyboards/retro_75/chconf.h
+++ b/keyboards/retro_75/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,11 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#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
+#endif
/** @} */
@@ -126,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -144,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -152,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -161,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -169,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -180,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -188,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -198,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -208,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -218,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -226,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -236,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -245,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -256,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -266,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -275,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -287,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -296,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -307,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -323,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -332,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -341,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -351,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -359,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -378,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -388,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -399,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -411,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -419,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/retro_75/halconf.h b/keyboards/retro_75/halconf.h
index 8b9724b1a3..16f32117d5 100644
--- a/keyboards/retro_75/halconf.h
+++ b/keyboards/retro_75/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c
index f7a66b96f5..cfeda0a245 100644
--- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c
+++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c
@@ -28,14 +28,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//GamingMode Lock (disables SpaceFn and OneShot LShift)
//Function
//Mute microphone
-#define KC_SPACEFN KC_FN0
+#define KC_SPACEFN LT(2, KC_SPACE)
#define KC_OSLS KC_FN3
#define KC_GMLK KC_FN1
#define KC_FUNC MO(2)
#define MICMUTE RCTL(KC_LCTL)
enum function_codes {
- F_SPACEFN = 0,
F_OSLS = 3,
F_GMLK = 1,
};
@@ -151,7 +150,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Fn action definition
*/
const uint16_t PROGMEM fn_actions[] = {
- [F_SPACEFN] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), // SpaceFn layout 1
[F_GMLK] = ACTION_LAYER_TOGGLE(1), // Disable SpaceFn and Oneshot Shift
[F_OSLS] = ACTION_MODS_ONESHOT(MOD_LSFT) // Oneshot Leftshift
};
diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c
index 077f1c6277..c72c37d9d3 100644
--- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c
+++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c
@@ -4,6 +4,9 @@
#define KC_MO6 MO(6)
#define KC_MO7 MO(7)
+#define KC_LT5 LT(5, KC_SLSH)
+#define KC_LT6 LT(6, KC_SCLN)
+
/*
* Hasu
*/
@@ -24,8 +27,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_kc(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- CAPS, A, S, D, F, G, H, J, K, L, FN2, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, FN1, NO, FN9, NO, \
+ CAPS, A, S, D, F, G, H, J, K, L, LT6, QUOT, NO, ENT, \
+ LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, FN9, NO, \
LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4),
/* Keymap 1: colemak
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
@@ -173,8 +176,6 @@ Lw: set Workman layout
* Fn action definition
*/
const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_LAYER_TAP_KEY(5, KC_SLASH),
- [2] = ACTION_LAYER_TAP_KEY(6, KC_SCLN),
[5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout
[6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout
[7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout
diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c
index 4b7208a9e2..0145540198 100644
--- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c
+++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
#define KC_MO1 MO(1)
+#define KC_SPFN LT(1, KC_SPC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layout 0: Default Layer
@@ -37,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT, \
LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- MO1, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL),
+ MO1, LGUI, LALT, SPFN, RALT, RGUI, APP, RCTL),
/* Layout 1: Function Layer
* ,-----------------------------------------------------------.
@@ -64,17 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Fn action definition
*/
const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), /* SpaceFn layout 1 */
[2] = ACTION_MODS_KEY(MOD_LSFT, KC_DEL), /* Cut */
[3] = ACTION_MODS_KEY(MOD_LCTL, KC_INS), /* Copy */
[4] = ACTION_MODS_KEY(MOD_LSFT, KC_INS), /* Paste */
};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- return MACRO_NONE;
-};
-
void matrix_init_user(void) {
diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c
index b0d08202da..ee7ec6cd68 100644
--- a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c
+++ b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c
@@ -1,5 +1,7 @@
#include QMK_KEYBOARD_H
+#define KC_LT1 LT(1, KC_SPC)
+
/*
* SpaceFN
* http://geekhack.org/index.php?topic=51069.0
@@ -23,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, FN0, RALT, RGUI, APP, RCTL),
+ LCTL, LGUI, LALT, LT1, RALT, RGUI, APP, RCTL),
/* Overlay 1: SpaceFN
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
@@ -50,6 +52,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Fn action definition
*/
const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE),
[1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde
};
diff --git a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c
index 371c2b8ef6..d5b4937aa5 100644
--- a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c
+++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_65_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_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_END, \
- F(4), 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, \
+ LT(_FL, 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_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_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_CM] = LAYOUT_65_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_DEL, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \
- F(4), 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_PGUP, \
+ LT(_FL, KC_BSPC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DV] = LAYOUT_65_ansi(
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_DEL, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_END, \
- F(4), 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_PGUP, \
+ LT(_FL, KC_BSPC), 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_PGUP, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_PGDN, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
@@ -143,7 +143,6 @@ const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TOGGLE(_CM), //Toggle Colemak Layer overlay
[2] = ACTION_LAYER_TOGGLE(_DV), // Toggle Dvorak Layer overlay
[3] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay
- [4] = ACTION_LAYER_TAP_KEY(_FL, KC_BSPC), // Tap to Backspace and hold to activate function layer
[5] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay
};
diff --git a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c
index 37bd742b59..093070cb4b 100644
--- a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c
+++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c
@@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_65_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_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_END, \
- F(2), 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, \
+ LT(_FL, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
@@ -95,7 +95,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay
- [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer
[3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay
};
diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c
index 10e9b9dcdf..6e22e9e23a 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c
@@ -20,9 +20,9 @@ enum planck_keycodes {
DYNAMIC_MACRO_RANGE,
};
-#define FKEYS F(_FKEYS)
+#define FKEYS LT(_FKEYS, KC_TAB)
#define NUMSYM TT(_NUMSYM)
-#define FKEYGRV F(_FKEYGRV)
+#define FKEYGRV LT(_FKEYS, KC_GRV)
#define MACSLEEP M(5)
#define PLOVER M(6)
#define LAYERRESET M(7)
@@ -82,11 +82,6 @@ void persistant_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
-const uint16_t PROGMEM fn_actions[] = {
- [_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB),
- [_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV),
-};
-
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch(id) {
diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c
index 6f7167cbbe..b4d5234561 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c
@@ -25,8 +25,8 @@ enum tv44_keycodes {
EXT_MOUSE
};
-#define LOWER F(_LOWER)
-#define RAISE F(_RAISE)
+#define LOWER LT(_LOWER, KC_SPC)
+#define RAISE LT(_RAISE, KC_SPC)
#define WINDOW_SHORTCUT MO(_WINDOW_SHORTCUT)
#define MAC_SHORTCUT MO(_MAC_SHORTCUT)
@@ -153,11 +153,6 @@ XXXXXXX,XXXXXXX,XXXXXXX, EXT_MOUSE,EXT_MOUSE, XXXXXXX,XXXX
)
};
-const uint16_t PROGMEM fn_actions[] = {
- [_LOWER] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
- [_RAISE] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC)
-};
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case WINDOW:
diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c
index 19adfb933e..754dc5c4dd 100644
--- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c
+++ b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c
@@ -1,9 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -11,15 +14,82 @@
limitations under the License.
*/
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
#include "hal.h"
+#include "stm32_gpio.h"
+
+/*===========================================================================*/
+/* Driver local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Driver local variables and types. */
+/*===========================================================================*/
+
+/**
+ * @brief Type of STM32 GPIO port setup.
+ */
+typedef struct {
+ uint32_t moder;
+ uint32_t otyper;
+ uint32_t ospeedr;
+ uint32_t pupdr;
+ uint32_t odr;
+ uint32_t afrl;
+ uint32_t afrh;
+} gpio_setup_t;
+
+/**
+ * @brief Type of STM32 GPIO initialization data.
+ */
+typedef struct {
+#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
+ gpio_setup_t PAData;
+#endif
+#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
+ gpio_setup_t PBData;
+#endif
+#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
+ gpio_setup_t PCData;
+#endif
+#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
+ gpio_setup_t PDData;
+#endif
+#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
+ gpio_setup_t PEData;
+#endif
+#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
+ gpio_setup_t PFData;
+#endif
+#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
+ gpio_setup_t PGData;
+#endif
+#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
+ gpio_setup_t PHData;
+#endif
+#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
+ gpio_setup_t PIData;
+#endif
+#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
+ gpio_setup_t PJData;
+#endif
+#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
+ gpio_setup_t PKData;
+#endif
+} gpio_config_t;
-#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.
+ * @brief STM32 GPIO static initialization data.
*/
-const PALConfig pal_default_config = {
+static const gpio_config_t gpio_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},
@@ -54,23 +124,119 @@ const PALConfig pal_default_config = {
#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}
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH},
+#endif
+#if STM32_HAS_GPIOJ
+ {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
+ VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
+#endif
+#if STM32_HAS_GPIOK
+ {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
+ VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
#endif
};
+
+/*===========================================================================*/
+/* Driver local functions. */
+/*===========================================================================*/
+
+static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
+
+ gpiop->OTYPER = config->otyper;
+ gpiop->OSPEEDR = config->ospeedr;
+ gpiop->PUPDR = config->pupdr;
+ gpiop->ODR = config->odr;
+ gpiop->AFRL = config->afrl;
+ gpiop->AFRH = config->afrh;
+ gpiop->MODER = config->moder;
+}
+
+static void stm32_gpio_init(void) {
+
+ /* Enabling GPIO-related clocks, the mask comes from the
+ registry header file.*/
+ rccResetAHB(STM32_GPIO_EN_MASK);
+ rccEnableAHB(STM32_GPIO_EN_MASK, true);
+
+ /* Initializing all the defined GPIO ports.*/
+#if STM32_HAS_GPIOA
+ gpio_init(GPIOA, &gpio_default_config.PAData);
#endif
+#if STM32_HAS_GPIOB
+ gpio_init(GPIOB, &gpio_default_config.PBData);
+#endif
+#if STM32_HAS_GPIOC
+ gpio_init(GPIOC, &gpio_default_config.PCData);
+#endif
+#if STM32_HAS_GPIOD
+ gpio_init(GPIOD, &gpio_default_config.PDData);
+#endif
+#if STM32_HAS_GPIOE
+ gpio_init(GPIOE, &gpio_default_config.PEData);
+#endif
+#if STM32_HAS_GPIOF
+ gpio_init(GPIOF, &gpio_default_config.PFData);
+#endif
+#if STM32_HAS_GPIOG
+ gpio_init(GPIOG, &gpio_default_config.PGData);
+#endif
+#if STM32_HAS_GPIOH
+ gpio_init(GPIOH, &gpio_default_config.PHData);
+#endif
+#if STM32_HAS_GPIOI
+ gpio_init(GPIOI, &gpio_default_config.PIData);
+#endif
+#if STM32_HAS_GPIOJ
+ gpio_init(GPIOJ, &gpio_default_config.PJData);
+#endif
+#if STM32_HAS_GPIOK
+ gpio_init(GPIOK, &gpio_default_config.PKData);
+#endif
+}
+
+/*===========================================================================*/
+/* Driver interrupt handlers. */
+/*===========================================================================*/
-void enter_bootloader_mode_if_requested(void);
+/*===========================================================================*/
+/* Driver exported functions. */
+/*===========================================================================*/
/**
* @brief Early initialization code.
- * @details This initialization must be performed just after stack setup
- * and before any other initialization.
+ * @details GPIO ports and system clocks are initialized before everything
+ * else.
*/
void __early_init(void) {
+ extern void enter_bootloader_mode_if_requested(void);
enter_bootloader_mode_if_requested();
+
+ stm32_gpio_init();
stm32_clock_init();
}
+#if HAL_USE_SDC || defined(__DOXYGEN__)
+/**
+ * @brief SDC card detection.
+ */
+bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief SDC card write protection detection.
+ */
+bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
+
+ (void)sdcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif /* HAL_USE_SDC */
+
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
@@ -98,4 +264,5 @@ bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
+
}
diff --git a/keyboards/vinta/chconf.h b/keyboards/vinta/chconf.h
index e811705ba3..6d169b36e9 100644
--- a/keyboards/vinta/chconf.h
+++ b/keyboards/vinta/chconf.h
@@ -1,9 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -12,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -26,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -38,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -55,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -78,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -91,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -100,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -119,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -137,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -145,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -154,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -162,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -173,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -181,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -191,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -201,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -211,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -219,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -229,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -238,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -249,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -259,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -268,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -280,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -289,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -300,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -316,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -325,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -334,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -344,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -352,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -371,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -381,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -392,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -404,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -412,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/vinta/halconf.h b/keyboards/vinta/halconf.h
index bc2b66f2e1..25f3fe5edf 100644
--- a/keyboards/vinta/halconf.h
+++ b/keyboards/vinta/halconf.h
@@ -1,9 +1,12 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -31,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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 TRUE
+#define HAL_USE_SERIAL_USB TRUE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -176,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT FALSE
+#define ADC_USE_WAIT FALSE
#endif
/**
@@ -184,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION FALSE
+#define ADC_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -195,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -206,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -214,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -240,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -252,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -261,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -271,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -284,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -306,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 256
+#define SERIAL_USB_BUFFERS_SIZE 256
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -322,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT FALSE
+#define SPI_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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 FALSE
+#define SPI_USE_MUTUAL_EXCLUSION FALSE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -342,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
-/** @} */ \ No newline at end of file
+/** @} */
diff --git a/keyboards/wete/chconf.h b/keyboards/wete/chconf.h
index 89388dd5a3..4640ff5332 100644
--- a/keyboards/wete/chconf.h
+++ b/keyboards/wete/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES FALSE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES FALSE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES FALSE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES FALSE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/wete/halconf.h b/keyboards/wete/halconf.h
index acd7678e7b..ff5ae7e8a5 100644
--- a/keyboards/wete/halconf.h
+++ b/keyboards/wete/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/whitefox/board_is31fl3731c.h b/keyboards/whitefox/board_is31fl3731c.h
index d59b2ff43a..238d30cb44 100644
--- a/keyboards/whitefox/board_is31fl3731c.h
+++ b/keyboards/whitefox/board_is31fl3731c.h
@@ -100,7 +100,7 @@ static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) {
static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) {
(void) g;
- i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT));
+ i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, TIME_US2I(IS31_TIMEOUT));
}
#endif /* _GDISP_LLD_BOARD_H */
diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h
index 513ae821db..7f767b6ddc 100644
--- a/keyboards/whitefox/chconf.h
+++ b/keyboards/whitefox/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 100000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 0
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 20
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#define CH_CFG_NO_IDLE_THREAD FALSE
+#endif
/** @} */
@@ -122,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED TRUE
+#endif
/** @} */
@@ -140,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -148,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -165,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -184,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
+#endif
/**
* @brief Events Flags APIs.
@@ -222,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS TRUE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY TRUE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -319,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -328,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -407,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -415,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/whitefox/halconf.h b/keyboards/whitefox/halconf.h
index b87b0635c4..de0f29ce6e 100644
--- a/keyboards/whitefox/halconf.h
+++ b/keyboards/whitefox/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C TRUE
+#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM FALSE
+#define HAL_USE_PWM FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI FALSE
+#define HAL_USE_SPI FALSE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,15 +440,52 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
@@ -345,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/keyboards/xiaomi/mk02/chconf.h b/keyboards/xiaomi/mk02/chconf.h
index 99fa8ce398..8d66b51d23 100644
--- a/keyboards/xiaomi/mk02/chconf.h
+++ b/keyboards/xiaomi/mk02/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
*/
/**
- * @file templates/chconf.h
+ * @file rt/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.
@@ -29,6 +29,7 @@
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_6_0_
/*===========================================================================*/
/**
@@ -41,14 +42,34 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
+#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
+#endif
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
+#if !defined(CH_CFG_ST_FREQUENCY)
#define CH_CFG_ST_FREQUENCY 10000
+#endif
+
+/**
+ * @brief Time intervals data size.
+ * @note Allowed values are 16, 32 or 64 bits.
+ */
+#if !defined(CH_CFG_INTERVALS_SIZE)
+#define CH_CFG_INTERVALS_SIZE 32
+#endif
+
+/**
+ * @brief Time types data size.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#if !defined(CH_CFG_TIME_TYPES_SIZE)
+#define CH_CFG_TIME_TYPES_SIZE 32
+#endif
/**
* @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
+#if !defined(CH_CFG_ST_TIMEDELTA)
#define CH_CFG_ST_TIMEDELTA 2
+#endif
/** @} */
@@ -81,7 +104,9 @@
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
+#if !defined(CH_CFG_TIME_QUANTUM)
#define CH_CFG_TIME_QUANTUM 0
+#endif
/**
* @brief Managed RAM size.
@@ -94,7 +119,9 @@
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
+#if !defined(CH_CFG_MEMCORE_SIZE)
#define CH_CFG_MEMCORE_SIZE 0
+#endif
/**
* @brief Idle thread automatic spawn suppression.
@@ -103,11 +130,9 @@
* function becomes the idle thread and must implement an
* infinite loop.
*/
+#if !defined(CH_CFG_NO_IDLE_THREAD)
#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
+#endif
/** @} */
@@ -126,7 +151,9 @@
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_OPTIMIZE_SPEED)
#define CH_CFG_OPTIMIZE_SPEED FALSE
+#endif
/** @} */
@@ -144,7 +171,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_TM)
#define CH_CFG_USE_TM FALSE
+#endif
/**
* @brief Threads registry APIs.
@@ -152,7 +181,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
+#endif
/**
* @brief Threads synchronization APIs.
@@ -161,7 +192,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
+#endif
/**
* @brief Semaphores APIs.
@@ -169,7 +202,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
+#endif
/**
* @brief Semaphores queuing mode.
@@ -180,7 +215,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+#endif
/**
* @brief Mutexes APIs.
@@ -188,7 +225,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
+#endif
/**
* @brief Enables recursive behavior on mutexes.
@@ -198,7 +237,9 @@
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+#endif
/**
* @brief Conditional Variables APIs.
@@ -208,7 +249,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
+#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
+#endif
/**
* @brief Conditional Variables APIs with timeout.
@@ -218,7 +261,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
+#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+#endif
/**
* @brief Events Flags APIs.
@@ -226,7 +271,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_EVENTS)
#define CH_CFG_USE_EVENTS TRUE
+#endif
/**
* @brief Events Flags APIs with timeout.
@@ -236,7 +283,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
+#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+#endif
/**
* @brief Synchronous Messages APIs.
@@ -245,7 +294,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
+#endif
/**
* @brief Synchronous Messages queuing mode.
@@ -256,7 +307,9 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
+#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+#endif
/**
* @brief Mailboxes APIs.
@@ -266,7 +319,9 @@
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
+#if !defined(CH_CFG_USE_MAILBOXES)
#define CH_CFG_USE_MAILBOXES TRUE
+#endif
/**
* @brief Core Memory Manager APIs.
@@ -275,7 +330,9 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE FALSE
+#endif
/**
* @brief Heap Allocator APIs.
@@ -287,7 +344,9 @@
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
+#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP FALSE
+#endif
/**
* @brief Memory Pools Allocator APIs.
@@ -296,7 +355,31 @@
*
* @note The default is @p TRUE.
*/
+#if !defined(CH_CFG_USE_MEMPOOLS)
#define CH_CFG_USE_MEMPOOLS FALSE
+#endif
+
+/**
+ * @brief Objects FIFOs APIs.
+ * @details If enabled then the objects FIFOs APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_OBJ_FIFOS)
+#define CH_CFG_USE_OBJ_FIFOS FALSE
+#endif
+
+/**
+ * @brief Pipes APIs.
+ * @details If enabled then the pipes APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#if !defined(CH_CFG_USE_PIPES)
+#define CH_CFG_USE_PIPES TRUE
+#endif
/**
* @brief Dynamic Threads APIs.
@@ -307,7 +390,80 @@
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
+#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC FALSE
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Objects factory options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Objects Factory APIs.
+ * @details If enabled then the objects factory APIs are included in the
+ * kernel.
+ *
+ * @note The default is @p FALSE.
+ */
+#if !defined(CH_CFG_USE_FACTORY)
+#define CH_CFG_USE_FACTORY FALSE
+#endif
+
+/**
+ * @brief Maximum length for object names.
+ * @details If the specified length is zero then the name is stored by
+ * pointer but this could have unintended side effects.
+ */
+#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
+#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
+#endif
+
+/**
+ * @brief Enables the registry of generic objects.
+ */
+#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
+#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
+#endif
+
+/**
+ * @brief Enables factory for generic buffers.
+ */
+#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
+#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
+#endif
+
+/**
+ * @brief Enables factory for semaphores.
+ */
+#if !defined(CH_CFG_FACTORY_SEMAPHORES)
+#define CH_CFG_FACTORY_SEMAPHORES TRUE
+#endif
+
+/**
+ * @brief Enables factory for mailboxes.
+ */
+#if !defined(CH_CFG_FACTORY_MAILBOXES)
+#define CH_CFG_FACTORY_MAILBOXES TRUE
+#endif
+
+/**
+ * @brief Enables factory for objects FIFOs.
+ */
+#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
+#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
+#endif
+
+/**
+ * @brief Enables factory for Pipes.
+ */
+#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
+#define CH_CFG_FACTORY_PIPES TRUE
+#endif
/** @} */
@@ -323,7 +479,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_STATISTICS)
#define CH_DBG_STATISTICS FALSE
+#endif
/**
* @brief Debug option, system state check.
@@ -332,7 +490,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#endif
/**
* @brief Debug option, parameters checks.
@@ -341,7 +501,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
+#endif
/**
* @brief Debug option, consistency checks.
@@ -351,7 +513,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
+#endif
/**
* @brief Debug option, trace buffer.
@@ -359,14 +523,18 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
+#if !defined(CH_DBG_TRACE_MASK)
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+#endif
/**
* @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.
*/
+#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
#define CH_DBG_TRACE_BUFFER_SIZE 128
+#endif
/**
* @brief Debug option, stack checks.
@@ -378,7 +546,9 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
+#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#endif
/**
* @brief Debug option, stacks initialization.
@@ -388,7 +558,9 @@
*
* @note The default is @p FALSE.
*/
+#if !defined(CH_DBG_FILL_THREADS)
#define CH_DBG_FILL_THREADS FALSE
+#endif
/**
* @brief Debug option, threads profiling.
@@ -399,7 +571,9 @@
* @note This debug option is not currently compatible with the
* tickless mode.
*/
+#if !defined(CH_DBG_THREADS_PROFILING)
#define CH_DBG_THREADS_PROFILING FALSE
+#endif
/** @} */
@@ -411,6 +585,22 @@
/*===========================================================================*/
/**
+ * @brief System structure extension.
+ * @details User fields added to the end of the @p ch_system_t structure.
+ */
+#define CH_CFG_SYSTEM_EXTRA_FIELDS \
+ /* Add threads custom fields here.*/
+
+/**
+ * @brief System initialization hook.
+ * @details User initialization code added to the @p chSysInit() function
+ * just before interrupts are enabled globally.
+ */
+#define CH_CFG_SYSTEM_INIT_HOOK() { \
+ /* Add threads initialization code here.*/ \
+}
+
+/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
@@ -419,9 +609,9 @@
/**
* @brief Threads initialization hook.
- * @details User initialization code added to the @p chThdInit() API.
+ * @details User initialization code added to the @p _thread_init() function.
*
- * @note It is invoked from within @p chThdInit() and implicitly from all
+ * @note It is invoked from within @p _thread_init() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
diff --git a/keyboards/xiaomi/mk02/halconf.h b/keyboards/xiaomi/mk02/halconf.h
index 9bcb477c03..921803762e 100644
--- a/keyboards/xiaomi/mk02/halconf.h
+++ b/keyboards/xiaomi/mk02/halconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,8 +25,11 @@
* @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
+
+#define _CHIBIOS_HAL_CONF_
+#define _CHIBIOS_HAL_CONF_VER_7_0_
#include "mcuconf.h"
@@ -34,140 +37,181 @@
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
-#define HAL_USE_PAL TRUE
+#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
-#define HAL_USE_ADC FALSE
+#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the cryptographic subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
+#define HAL_USE_CRY FALSE
#endif
/**
- * @brief Enables the EXT subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
-#define HAL_USE_EXT FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
-#define HAL_USE_GPT FALSE
+#define HAL_USE_GPT FALSE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C FALSE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
-#define HAL_USE_I2S FALSE
+#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
-#define HAL_USE_ICU FALSE
+#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
-#define HAL_USE_MAC FALSE
+#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
+#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
-#define HAL_USE_PWM TRUE
+#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
-#define HAL_USE_RTC FALSE
+#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#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
+#define HAL_USE_SERIAL_USB FALSE
+#endif
+
+/**
+ * @brief Enables the SIO subsystem.
+ */
+#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
+#define HAL_USE_SIO FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the TRNG subsystem.
+ */
+#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
+#define HAL_USE_TRNG FALSE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
-#define HAL_USE_UART FALSE
+#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
-#define HAL_USE_WDG FALSE
+#define HAL_USE_WDG FALSE
+#endif
+
+/**
+ * @brief Enables the WSPI subsystem.
+ */
+#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
+#define HAL_USE_WSPI FALSE
+#endif
+
+/*===========================================================================*/
+/* PAL driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define PAL_USE_CALLBACKS FALSE
+#endif
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
+#define PAL_USE_WAIT FALSE
#endif
/*===========================================================================*/
@@ -179,7 +223,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
-#define ADC_USE_WAIT TRUE
+#define ADC_USE_WAIT TRUE
#endif
/**
@@ -187,7 +231,7 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define ADC_USE_MUTUAL_EXCLUSION TRUE
+#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -198,7 +242,56 @@
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
-#define CAN_USE_SLEEP_MODE TRUE
+#define CAN_USE_SLEEP_MODE TRUE
+#endif
+
+/**
+ * @brief Enforces the driver to use direct callbacks rather than OSAL events.
+ */
+#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
+#define CAN_ENFORCE_USE_CALLBACKS FALSE
+#endif
+
+/*===========================================================================*/
+/* CRY driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the SW fall-back of the cryptographic driver.
+ * @details When enabled, this option, activates a fall-back software
+ * implementation for algorithms not supported by the underlying
+ * hardware.
+ * @note Fall-back implementations may not be present for all algorithms.
+ */
+#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_USE_FALLBACK FALSE
+#endif
+
+/**
+ * @brief Makes the driver forcibly use the fall-back implementations.
+ */
+#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
+#define HAL_CRY_ENFORCE_FALLBACK FALSE
+#endif
+
+/*===========================================================================*/
+/* DAC driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
+#define DAC_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define DAC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -209,7 +302,7 @@
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
-#define I2C_USE_MUTUAL_EXCLUSION TRUE
+#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
@@ -217,17 +310,17 @@
/*===========================================================================*/
/**
- * @brief Enables an event sources for incoming packets.
+ * @brief Enables the zero-copy API.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
-#define MAC_USE_ZERO_COPY FALSE
+#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
+#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
@@ -243,7 +336,7 @@
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
-#define MMC_NICE_WAITING TRUE
+#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
@@ -255,7 +348,7 @@
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
-#define SDC_INIT_RETRY 100
+#define SDC_INIT_RETRY 100
#endif
/**
@@ -264,7 +357,7 @@
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
-#define SDC_MMC_SUPPORT FALSE
+#define SDC_MMC_SUPPORT FALSE
#endif
/**
@@ -274,7 +367,21 @@
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
-#define SDC_NICE_WAITING TRUE
+#define SDC_NICE_WAITING TRUE
+#endif
+
+/**
+ * @brief OCR initialization constant for V20 cards.
+ */
+#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR_V20 0x50FF8000U
+#endif
+
+/**
+ * @brief OCR initialization constant for non-V20 cards.
+ */
+#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
+#define SDC_INIT_OCR 0x80100000U
#endif
/*===========================================================================*/
@@ -287,18 +394,18 @@
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
-#define SERIAL_DEFAULT_BITRATE 38400
+#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
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 16
+#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
@@ -309,11 +416,19 @@
* @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
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_USB_BUFFERS_SIZE 1
+#define SERIAL_USB_BUFFERS_SIZE 1
+#endif
+
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
@@ -325,17 +440,53 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
-#define SPI_USE_WAIT TRUE
+#define SPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables circular transfers APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
+#define SPI_USE_CIRCULAR FALSE
#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
+#define SPI_USE_MUTUAL_EXCLUSION TRUE
+#endif
+
+/**
+ * @brief Handling method for SPI CS line.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+#endif
+
+/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
#endif
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
/*===========================================================================*/
/* USB driver related settings. */
@@ -346,9 +497,29 @@
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
-#define USB_USE_WAIT TRUE
+#define USB_USE_WAIT TRUE
+#endif
+
+/*===========================================================================*/
+/* WSPI driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
+#define WSPI_USE_WAIT TRUE
+#endif
+
+/**
+ * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define WSPI_USE_MUTUAL_EXCLUSION TRUE
#endif
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */