Compare commits

...

54 Commits

Author SHA1 Message Date
65150984bd ARM split - Add uart half duplex transport support ()
* ARM split - Add uart half duplex transport support

* Fix for f103

* initial full duplex pass

* partially remove full duplex

* Correct speeds within driver docs

Co-authored-by: Nick Brassel <nick@tzarc.org>

Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-05-21 18:00:21 +01:00
205321c377 Slight speed increases for matrix scanning () 2020-05-21 17:59:56 +01:00
1816ad01d0 Use LUFA funcs for split_util () 2020-05-21 17:59:01 +01:00
9c8f61dfa0 [Docs] newbs_flashing.md: place bootloader instructions before Toolbox intro ()
* newbs_flashing.md: place bootloader instructions before Toolbox intro

* Update docs/newbs_flashing.md

* More wordsmithing, point ARM users at Discord if all else fails

* Link Discord
2020-05-21 09:24:39 -07:00
d1df576ece Allow for overriding RAW endpoint usage page and ID. ()
* Allow for overriding RAW endpoint usage page and ID.

* Move usb_descriptor_common.h.

* Docs update.
2020-05-21 20:31:42 +10:00
83ebbf57b3 Fix submodule check () 2020-05-21 10:15:18 +02:00
8e1f706ac6 Enable backlight breathing support for the TADA68 ()
The factory TMK firmware for the TADA68 supports backlight breathing,
so I was surprised when the BL_BRTG key I set up in the online QMK
configurator didn't work.

As far as I can tell, this was just a simple omission.
2020-05-20 23:11:52 +01:00
b0c780ed32 Fix ChibiOS FPU build logic () 2020-05-20 16:28:39 +01:00
3ad2be52a7 CLI: Improve experience when running qmk setup on FreeBSD. ()
* CLI: Improve experience when running `qmk setup` on FreeBSD.

* Install the `avrdude` package as well.
* Switch to installing python packages w/ `--user` flag.
* Basic getting started sections for FreeBSD.
* Update `util/freebsd_install.sh` for root/non-root branches.

* Add ID to doc section.

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Add ID to another docs section.

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Use `; then` in script for consistency.

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Updated to use sudo in one shot if available.

* Apply suggestions from code review

Co-authored-by: Erovia <Erovia@users.noreply.github.com>

* Style fixes for latest version in master.

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: skullydazed <skullydazed@users.noreply.github.com>
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-20 08:09:13 -07:00
0fbcb41c85 Reintegrate previous docker docs () 2020-05-19 21:54:55 -07:00
ddca422776 Add VIA Keymap to Liminal Directory ()
* add via keymap to liminal keyboard

* fix keymap clarifications

* Update keyboards/the_royal/liminal/keymaps/via/keymap.c

Co-Authored-By: Drashna Jaelre <drashna@live.com>

Co-authored-by: TheRoyalSweatshirt <TheRoyalSweatshirt@github.com>
Co-authored-by: Garret G <45295190+TheRoyalSweatshirt@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-05-20 02:08:34 +01:00
82bb7d2852 Adding Chimera Ortho Plus ()
* Added Chimera Ortho keymap

* Cleaning up the rules

* Removing firmware sizes

* Modified URLs to point to new locations

* Remove _quantum functions from custom matrix.c code

* Fix 1<col instead of 1<<col typo in matrix_is_on()

* Make PREVENT_STUCK_MODIFIERS the default

* Removing the IS_COMMAND custom definition

* Adding info.json

* Adding config overrides

* Adjusting for the reformat

* removing backlight reference

* fixing some compile issues

* Fixing a matrix issue

* Update keyboards/chimera_ortho_plus/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/chimera_ortho_plus.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/chimera_ortho_plus.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* lining up the matrix

* Update keyboards/chimera_ortho_plus/readme.md

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/chimera_ortho_plus/readme.md

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/chimera_ortho_plus/info.json

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/chimera_ortho_plus/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2020-05-19 23:01:54 +01:00
1044519f36 Added custom keymap with french mac layout. ()
* Added custom keymap with french mac layout.

* Update keyboards/xd60/keymaps/melka/config.h

Tested on my branch, seems to work well, thanks @drashna !

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Update keyboards/xd60/keymaps/melka/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/xd60/keymaps/melka/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/xd60/keymaps/melka/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Comitted changes from merge request

- Removed rules.mk

Co-authored-by: Kamel Makhloufi <fabmanager@esaaa.fr>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-19 22:42:09 +01:00
209942366b Art userspace ()
* added git codes

* started git layer

* finished structure for git layer. MOD: replaced mouse with mod keys on right hand

* layout changing layer

* mod enter. default qwerty layer. removed mods on number layer

* workman layout. git log, show. blank enter and bsspace

* config layer. toggleable ctrl/alt for OS

* removed keymap comments

* strings and combos layers. sarcasm and ctrl_ctv. RGB configs

* reintroduced enter and bspace. delete backspace as a function. git push -u and checkout -b

* string macros

* OS specific home/end

* OS mac & win keys. N delete global backspace

* refactored backspace functions

* ctrl lctv macro

* base layer toggle fix

* whitespace

* BS + L for FF and chrome

* replaced 1 keycode with userspace

* added userspace config

* remove comments

* add another keycode with a variable

* moved all keymaps and codes to common file

* ctrl z mod

* removed ctrl z

* sipmlified OS functions

* moved is_win to keyboard level

* added mac alt tab

* added ctrl tab in mac + clean up variables in art.h

* tild string macro. added mac left/right + home/end

* mac ctrl backspace

* enum layers for default layout

* added ergodone keymap

* ergodone compiles

* clean up

* clean up

* removed obsolete OS_HOME/END

* removed var

* added ctrl nav to split75

* ergodone clean up + caps lock fix 75

* fix mac ctrl alt on right handside. added mac alt tab left right

* fix ergodone config override

* fixed alt left right not working on mac

* added OS ctr_alt

* mac ctrl del. fix tild

* simplified tild macro

* git stash apply

* send_string_remembering_lenght

* shifted strings print

* restored KC_BSPACE functionality

* moved KC_BSPC

* numpad layer on Fn

* media lights

* ergodone final clean up

* ergodone GIT AND MEDIA layers

* ergodone GIT LAYER switch

* default behaviour for all modified keys on BASE layer

* refactored logic for default keycodes

* ergodone final layers

* ctrl_cav for translation and ctrl_l fix

* toggleable layer with numpad

* comments

* numpad layer

* Update users/art/config.h

Co-authored-by: Joel Challis <git@zvecr.com>

* enable dynamic macros for split75

* git branch and develop/master

* removed esc from Nav

* ergodone: ctrl alt for shift layer

* macros and right alt for ergodone

* fix ergodone N_backspace not working on git layers

* mac language switch with alt+shift

* Update users/art/art.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update users/art/art.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update users/art/art.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/ergodone/keymaps/art/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update users/art/art.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* flashing leds to indicate current os

* using rshift on shifted layers

Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-19 22:05:32 +01:00
494b34b63f Add Via support to the YMD09 ()
* Add Via support to the YMD09

* Update keyboards/ymdk/ymd09/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/ymdk/ymd09/keymaps/via/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-19 21:28:55 +01:00
58e3b01f37 Candybar: VIA support for lefty and righty ()
* Candybar: VIA support for lefty and righty

* Update keyboards/candybar/lefty/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/candybar/righty/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/candybar/lefty/keymaps/via/keymap.c

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
2020-05-19 21:15:16 +01:00
6c2008c688 Gherkin 26, 27, 28, 30 keys compatibility ()
* Gherkin 26, 27, 28, 30 compatibility

* Update readme.md

Co-authored-by: stevexyz <warste@removethisandleavegoogle.com>
2020-05-19 21:03:23 +01:00
bcedc80ec7 MSYS2 install: bodge out avrdude package installation for USBaspLoader 2020-05-19 04:39:52 -07:00
ef5fad137b Disable Mousekey Command interface when Constant speed is enabled () 2020-05-19 07:29:20 -04:00
15dd05c402 [Keyboard] Add Bakeneko 80 keyboard ()
* Add Bakeneko 80 keyboard

* Update keyboards/bakeneko80/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/bakeneko80/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/bakeneko80/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-19 04:22:12 -07:00
32d03db371 [Keymap] Add Via support to ALPS64 () 2020-05-19 03:27:43 -07:00
c9d396dd47 [Keyboard] add kbdfans/maja rgb keyboard ()
* add kbd67 rev2 via support, kbd67mkiirgb small change

add kbd67 rev2 via support, kbd67mkiirgb small change

* Update keyboards/kbdfans/kbd67/rev2/keymaps/via/keymap.c

* Update keyboards/kbdfans/kbd67/rev2/keymaps/via/keymap.c

* define DYNAMIC_KEYMAP_LAYER_COUNT 2

* add kbdfans/maja rgb keyboard

* Update keyboards/kbdfans/maja/maja.c

* Update keyboards/kbdfans/maja/readme.md

* Update keyboards/kbdfans/maja/keymaps/default/keymap.c

* Update keyboards/kbdfans/maja/maja.h

* Update keyboards/kbdfans/maja/maja.c

* Update keyboards/kbdfans/maja/keymaps/default/keymap.c

* Update keyboards/kbdfans/maja/keymaps/via/keymap.c

* Update keyboards/kbdfans/maja/maja.c

* Update keyboards/kbdfans/maja/keymaps/via/keymap.c

* Update readme.md

* Update readme.md

* Update keyboards/kbdfans/maja/rules.mk

* Update keyboards/kbdfans/maja/keymaps/via/keymap.c

* Update keyboards/kbdfans/maja/rules.mk

* Update keyboards/kbdfans/maja/rules.mk

* Update keyboards/kbdfans/maja/keymaps/default/keymap.c

* Update keyboards/kbdfans/maja/keymaps/via/keymap.c

* Update keyboards/kbdfans/maja/config.h

* Update keyboards/kbdfans/maja/readme.md
2020-05-19 02:23:07 -07:00
2afb29e095 [Keyboard] Add NumDiscipline Keyboard - Modified Version of Discipline With Numpad ()
* NumDiscipline firmware compiled

* renamed folder, deleted config.h from default

* deleted commented out code

* fix readme make example for lowercase foldername

* Update keyboards/ericrlau/numdiscipline/rev1/rules.mk

* Update product name

* Apply suggestions from code review - layout naming and key object ordering
2020-05-19 02:19:18 -07:00
fcf150bd82 Streamline the macos install process 2020-05-18 22:46:33 -07:00
umi
ee2eb01653 [Docs] Japanese translation of docs/feature_led_matrix.md ()
* add feature_led_matrix.md translation

* update based on comment

* update based on comment
2020-05-18 20:37:25 -07:00
umi
0bece1d442 [Docs] Japanese translation of docs/feature_layouts.md ()
* add feature_layouts.md translation

* update based on comment

* update based on comment
2020-05-18 20:29:04 -07:00
umi
be69dd22e8 [Docs] Japanese translation of docs/feature_thermal_printer.md ()
* add feature_thermal_printer.md translation
2020-05-18 19:58:04 -07:00
umi
b9675d2106 [Docs] Japanese translation of docs/feature_velocikey.md ()
* add feature_velocikey.md translation

* update based on comment

* update based on comment
2020-05-18 19:50:32 -07:00
umi
f689f043b1 [Docs] Japanese translation of docs/feature_leader_key.md ()
* add feature_leader_key.md translation

* update based on comment

* set link as lang dir

* update based on comment

* update based on comment

* update based on comment
2020-05-18 19:43:36 -07:00
54b04d9665 Add SPI 25xx EEPROM support. () 2020-05-19 10:34:00 +10:00
4604c70c4c [Keyboard] Add Bookerboard support ()
* 5/14/20 first push for bookerboard

* Update rules.mk

* Update keyboards/clawsome/bookerboard/rules.mk

Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>

* Update keyboards/clawsome/bookerboard/keymaps/default/keymap.c

Co-authored-by: Joel Challis <git@zvecr.com>

* Update keyboards/clawsome/bookerboard/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/clawsome/bookerboard/bookerboard.c

Co-authored-by: Joel Challis <git@zvecr.com>

* Update keyboards/clawsome/bookerboard/bookerboard.h

Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>

* 5/15/20

* 2

* 3

* Update keyboards/clawsome/bookerboard/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/clawsome/bookerboard/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/clawsome/bookerboard/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/clawsome/bookerboard/readme.md

Co-authored-by: Joel Challis <git@zvecr.com>

* Update keyboards/clawsome/bookerboard/readme.md

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-18 20:45:52 +01:00
010c5b12bd format code according to conventions [skip ci] 2020-05-18 13:42:23 +00:00
4adf4d5a89 Add SofleKeyboard support to QMK firmware. ()
* Add SofleKeyboard support to QMK firmware.

* Sofle: Remove LAYOUT_kc macro for default layout. Remove unnecessary code.

* Fix mistake in the latest commit

* Remove duplicated layers for MAC/WIN support

* Improve according to suggestion in PR

* Add more improvements from PR

* Fix a typo in README.md

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Remove unneeded break.

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Remove unneeded break.

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Apply suggestions from code review

Remove unneeded breaks.

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Apply suggestions from code review

Remove unneeded breaks (few more forgotten ones).

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Apply suggestions from code review

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Remove TAPPING_FORCE_HOLD from default keymap.

* Add TAP_CODE_DELAY 10. Fix a typo (compilation error)

Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-05-18 06:06:31 -07:00
d0e0202b27 Add query functions for RGB Light and RGB Matrix ()
* Add additional query functions for RGBLIGHT

* Add additional query functions for RGB Matrix

* Change names of enable check functions

* Fix macro for rgb matrix takeover of rgblight functions

* Add documentation for rgb_matrix_get_hsv()

* Add *_get_hsv function to rgblight
2020-05-18 06:05:35 -07:00
fb9425df82 Add TAP_CODE_DELAY 10. Fix a typo (compilation error) 2020-05-18 13:11:22 +02:00
22ad35b225 Remove TAPPING_FORCE_HOLD from default keymap. 2020-05-18 12:57:16 +02:00
f6cec668c7 Apply suggestions from code review
Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-05-18 12:56:08 +02:00
2651edc243 Apply suggestions from code review
Remove unneeded breaks (few more forgotten ones).

Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-05-18 12:45:38 +02:00
2a43989d30 Apply suggestions from code review
Remove unneeded breaks.

Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-05-18 12:43:35 +02:00
2f5521cd48 Remove unneeded break.
Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-05-18 12:42:32 +02:00
ac3d2a3810 Remove unneeded break.
Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-05-18 12:42:17 +02:00
1786490993 Fix a typo in README.md
Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-05-18 12:41:55 +02:00
e55d55edc0 [Keymap] added my gergo keymap ()
* added my gergo keymap

* updated personal bfo9000 keymap

* fixed redundancy, extended debounce time
2020-05-18 03:29:01 -07:00
ad014c2539 [Keyboard] Arabica37 ()
* adding arabica37

* jp_keymap

* update

* try refactor to use split_common

* fix and update to use split_common

* update and adjust

* clean up

* update

* update

* fix keymap.c

* update

* oled logo

* fix info.json

* remove pro_micro.h

* remove KC_ macro

* move font file
2020-05-18 03:28:00 -07:00
81698df056 [Keymap] Add Via keymap for Contra ()
* Add Via keymap for Contra

 * Added Via-enabled keymap
 * Changed VENDOR_ID from 0xFEED to 0x4354 (CT)

* Removed unnecessary RGB mappings

* PR changes

 * Removed empty via/config.h
 * Changed product ID from 0x6060 to 0x0001
2020-05-18 02:40:41 -07:00
fca35a3540 [Keyboard] handwired/twadlee/tp69 ()
Includes info.json for custom layout and a minimal default keymap.
2020-05-18 01:52:55 -07:00
5d01cc45be [Keyboard] KBDClack kaishi65 ()
* Added kaishi65 keyboard

* added kaishi65

* Update readme.md

* Updated info.json and keymap

* Updated folder structure

* Updated readme + keymap

* Updated info.json

* Update keyboards/KBDClack/kaishi65/readme.md

* Update keyboards/KBDClack/kaishi65/kaishi65.c

* Update keyboards/KBDClack/kaishi65/readme.md

* Deleted \keymaps\config.h

* Update keyboards/KBDClack/kaishi65/config.h

* Folder name changed

* Update keyboards/kbdclack/kaishi65/info.json

* Update keyboards/kbdclack/kaishi65/kaishi65.h

* Update keyboards/kbdclack/kaishi65/keymaps/default/keymap.c

* Update keyboards/kbdclack/kaishi65/rules.mk

* Update keyboards/kbdclack/kaishi65/keymaps/default/keymap.c
2020-05-18 01:36:27 -07:00
eaab0844e8 Fix typo in led_config for dztech/dz65rgb () 2020-05-18 03:38:38 +01:00
65c8ac9ac9 Add more improvements from PR 2020-05-02 10:03:17 +02:00
3d760caa85 Improve according to suggestion in PR 2020-05-01 16:37:07 +02:00
3de4c3ea6a Remove duplicated layers for MAC/WIN support 2020-04-30 20:21:08 +02:00
a84d239661 Fix mistake in the latest commit 2020-04-29 17:30:04 +02:00
41fd60d624 Sofle: Remove LAYOUT_kc macro for default layout. Remove unnecessary code. 2020-04-29 17:18:14 +02:00
168ba88ada Add SofleKeyboard support to QMK firmware. 2020-04-29 09:15:45 +02:00
173 changed files with 8907 additions and 399 deletions
common_features.mk
docs
drivers
keyboards
40percentclub/gherkin/keymaps/stevexyz
alps64
arabica37
bakeneko80
candybar
chimera_ortho_plus
clawsome/bookerboard
contra
dztech/dz65rgb
ergodone/keymaps/art
ericrlau/numdiscipline
gergo/keymaps/abstractkb
handwired
kbdclack/kaishi65
kbdfans/maja
keebio/bfo9000/keymaps/abstractkb
sofle
tada68
the_royal/liminal/keymaps/via
wheatfield/split75/keymaps
xd60/keymaps/melka
ymdk/ymd09
lib/python/qmk/cli
quantum
tmk_core
users/art
util

@ -70,7 +70,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/pointing_device.c
endif
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
@ -85,6 +85,11 @@ else
COMMON_VPATH += $(DRIVER_PATH)/eeprom
QUANTUM_LIB_SRC += i2c_master.c
SRC += eeprom_driver.c eeprom_i2c.c
else ifeq ($(strip $(EEPROM_DRIVER)), spi)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
COMMON_VPATH += $(DRIVER_PATH)/eeprom
QUANTUM_LIB_SRC += spi_master.c
SRC += eeprom_driver.c eeprom_spi.c
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
COMMON_VPATH += $(DRIVER_PATH)/eeprom

@ -34,7 +34,9 @@
* [Customizing Functionality](custom_quantum_functions.md)
* [Driver Installation with Zadig](driver_installation_zadig.md)
* [Keymap Overview](keymap.md)
* [Vagrant Guide](getting_started_vagrant.md)
* Development Environments
* [Docker Guide](getting_started_docker.md)
* [Vagrant Guide](getting_started_vagrant.md)
* Flashing
* [Flashing](flashing.md)
* [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md)
@ -126,6 +128,7 @@
* [SPI Driver](spi_driver.md)
* [WS2812 Driver](ws2812_driver.md)
* [EEPROM Driver](eeprom_driver.md)
* ['serial' Driver](serial_driver.md)
* [GPIO Controls](internals_gpio_control.md)
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)

@ -13,18 +13,17 @@ QMK requires Python 3.6 or greater. We try to keep the number of requirements sm
If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
```
brew tap qmk/qmk
brew install qmk
brew install qmk/qmk/qmk
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
```
### Install Using easy_install or pip :id=install-using-easy_install-or-pip
### Install Using pip :id=install-using-easy_install-or-pip
If your system is not listed above you can install QMK manually. First ensure that you have python 3.6 (or later) installed and have installed pip. Then install QMK with this command:
If your system is not listed above you can install QMK manually. First ensure that you have Python 3.6 (or later) installed and have installed pip. Then install QMK with this command:
```
pip3 install qmk
python3 -m pip install qmk
export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
```

@ -1,4 +1,4 @@
# EEPROM Driver Configuration
# EEPROM Driver Configuration :id=eeprom-driver-configuration
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
@ -6,15 +6,20 @@ Driver | Description
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`EEPROM_DRIVER = vendor` (default) | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
`EEPROM_DRIVER = spi` | Supports writing to SPI-based 25xx EEPROM chips. See the driver section below.
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
## Vendor Driver Configuration
## Vendor Driver Configuration :id=vendor-eeprom-driver-configuration
#### STM32 L0/L1 Configuration :id=stm32l0l1-eeprom-driver-configuration
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
No configurable options are available.
`config.h` override | Description | Default Value
------------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------
`#define STM32_ONBOARD_EEPROM_SIZE` | The size of the EEPROM to use, in bytes. Erase times can be high, so it's configurable here, if not using the default value. | Minimum required to cover base _eeconfig_ data, or `1024` if VIA is enabled.
## I2C Driver Configuration
## I2C Driver Configuration :id=i2c-eeprom-driver-configuration
Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h:
@ -41,7 +46,21 @@ MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/p
?> If you find that the EEPROM is not cooperating, ensure you've correctly shifted up your EEPROM address by 1. For example, the datasheet might state the address as `0b01010000` -- the correct value of `EXTERNAL_EEPROM_I2C_BASE_ADDRESS` needs to be `0b10100000`.
## Transient Driver configuration
## SPI Driver Configuration :id=spi-eeprom-driver-configuration
Currently QMK supports 25xx-series chips over SPI. As such, requires a working spi_master driver configuration. You can override the driver configuration via your config.h:
`config.h` override | Description | Default Value
-----------------------------------------------|--------------------------------------------------------------------------------------|--------------
`#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN` | SPI Slave select pin in order to inform that the EEPROM is currently being addressed | _none_
`#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR` | Clock divisor used to divide the peripheral clock to derive the SPI frequency | `64`
`#define EXTERNAL_EEPROM_BYTE_COUNT` | Total size of the EEPROM in bytes | 8192
`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32
`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2
!> There's no way to determine if there is an SPI EEPROM actually responding. Generally, this will result in reads of nothing but zero.
## Transient Driver configuration :id=transient-eeprom-driver-configuration
The only configurable item for the transient EEPROM driver is its size:

@ -113,26 +113,16 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048
```
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
The solution is to remove and reinstall all affected modules.
```
brew rm avr-gcc
brew rm avr-gcc@8
brew rm dfu-programmer
brew rm dfu-util
brew rm gcc-arm-none-eabi
brew rm arm-gcc-bin@8
brew rm avrdude
brew install avr-gcc@8
brew install dfu-programmer
brew install dfu-util
brew install arm-gcc-bin@8
brew install avrdude
brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk
brew install qmk/qmk/qmk
brew link --force avr-gcc@8
brew link --force arm-gcc-bin@8
```
### `avr-gcc` and LUFA

@ -44,7 +44,11 @@ To connect your host computer to your keyboard with raw HID you need four pieces
3. Usage Page
4. Usage
The first two can easily be found in your keyboard's `config.h` in the keyboard's main directory under `VENDOR_ID` and `PRODUCT_ID`. **Usage Page** is **`0xFF60`** and **Usage** is **`0x0061`**.
The first two can easily be found in your keyboard's `config.h` in the keyboard's main directory under `VENDOR_ID` and `PRODUCT_ID`.
The final two can be overridden in your keyboard's `config.h` in the keyboard's main directory by redefining the values: `#define RAW_USAGE_PAGE 0xFF60` and `#define RAW_USAGE_ID 0x61`.
By default, **Usage Page** is `0xFF60` and **Usage** is `0x61`.
### Building your host

@ -437,12 +437,16 @@ Where `28` is an unused index from `eeconfig.h`.
|`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
### Query Current Status :id=query-current-status
|Function |Description |
|-----------------------|-----------------|
|`rgb_matrix_get_mode()` |Get current mode |
|`rgb_matrix_get_hue()` |Get current hue |
|`rgb_matrix_get_sat()` |Get current sat |
|`rgb_matrix_get_val()` |Get current val |
|Function |Description |
|---------------------------------|---------------------------|
|`rgb_matrix_is_enabled()` |Gets current on/off status |
|`rgb_matrix_get_mode()` |Gets current mode |
|`rgb_matrix_get_hue()` |Gets current hue |
|`rgb_matrix_get_sat()` |Gets current sat |
|`rgb_matrix_get_val()` |Gets current val |
|`rgb_matrix_get_hsv()` |Gets hue, sat, and val and returns a [`HSV` structure](https://github.com/qmk/qmk_firmware/blob/7ba6456c0b2e041bb9f97dbed265c5b8b4b12192/quantum/color.h#L56-L61)|
|`rgb_matrix_get_speed()` |Gets current speed |
|`rgb_matrix_get_suspend_state()` |Gets current suspend state |
## Callbacks :id=callbacks

@ -376,12 +376,14 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2
|`rgblight_set_layer_state(i, is_on)` |Enable or disable lighting layer `i` based on value of `bool is_on` |
#### query
|Function |Description |
|-----------------------|-----------------|
|`rgblight_get_mode()` |Get current mode |
|`rgblight_get_hue()` |Get current hue |
|`rgblight_get_sat()` |Get current sat |
|`rgblight_get_val()` |Get current val |
|Function |Description |
|-----------------------|---------------------------|
|`rgblight_is_enabled()`|Gets current on/off status |
|`rgblight_get_mode()` |Gets current mode |
|`rgblight_get_hue()` |Gets current hue |
|`rgblight_get_sat()` |Gets current sat |
|`rgblight_get_val()` |Gets current val |
|`rgblight_get_speed()` |Gets current speed |
## Colors

@ -0,0 +1,47 @@
# Docker Quick Start
This project includes a Docker workflow that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else and the QMK build infrastructure. This makes it much easier for people to help you troubleshoot any issues you encounter.
## Requirements
The main prerequisite is a working `docker` install.
* [Docker CE](https://docs.docker.com/install/#supported-platforms)
## Usage
Acquire a local copy of the QMK's repository (including submodules):
```bash
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
cd qmk_firmware
```
Run the following command to build a keymap:
```bash
util/docker_build.sh <keyboard>:<keymap>
# For example: util/docker_build.sh planck/rev6:default
```
This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, all keymaps are used. Note that the parameter format is the same as when building with `make`.
There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:
```bash
util/docker_build.sh keyboard:keymap:target
# For example: util/docker_build.sh planck/rev6:default:flash
```
You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
```bash
util/docker_build.sh
# Reads parameters as input (leave blank for all keyboards/keymaps)
```
## FAQ
### Why can't I flash on Windows/macOS
On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead.
!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**.

114
docs/ja/feature_layouts.md Normal file

@ -0,0 +1,114 @@
# レイアウト: 複数のキーボードで1つのキーマップを使用
<!---
original document: 0.8.134:docs/feature_layouts.md
git diff 0.8.134 HEAD -- docs/feature_layouts.md | cat
-->
`layouts/` フォルダは、様々なキーボードに適用できる色々な物理キーレイアウトを含みます。
```
layouts/
+ default/
| + 60_ansi/
| | + readme.md
| | + layout.json
| | + a_good_keymap/
| | | + keymap.c
| | | + readme.md
| | | + config.h
| | | + rules.mk
| | + <keymap folder>/
| | + ...
| + <layout folder>/
+ community/
| + <layout folder>/
| + ...
```
`layouts/default/``layouts/community/` は、レイアウト「repositories」の2つの例です。現在のところ、`default` にはユーザの参考用に、レイアウトに関する全ての情報および、`default_<layout>` という名前の1つのデフォルトのキーマップが含まれています。`community` には全ての共有キーマップが含まれており、それらはユーザが `layouts/` にクローンするための別のリポジトリに分割することを最終的な目的としていますQMK は `layouts/` 内のすべてのフォルダを検索するため、ここに複数のリポジトリを持つことができます。
各レイアウトフォルダは、レイアウトの物理的な側面に基づいて、可能な限り一般的な名称で(`[a-z0-9_]`)という名前が付けられ、キーボードで定義されるレイアウトと一緒に `readme.md` を含みます。
```md
# 60_ansi
LAYOUT_60_ansi
```
新しい名前は既存のレイアウトで設定された標準に準拠しようと努力する必要があり、必要に応じて PR/Issue で議論することができます。
## レイアウトのサポート
キーボードがレイアウトをサポートするために、変数は `<keyboard>.h` で定義し、引数/キー (できれば物理レイアウト)の数に一致している必要があります。
#define LAYOUT_60_ansi KEYMAP_ANSI
レイアウトの名前は次の正規表現に一致しなければなりません: `[a-z0-9_]+`
フォルダ名はキーボードの `rules.mk` に追加する必要があります:
LAYOUTS = 60_ansi
`LAYOUTS` は任意のキーボードフォルダレべルの `rules.mk` に設定することができます:
LAYOUTS = 60_iso
ただし、`LAYOUT_<layout>` 変数は `<folder>.h` でも定義する必要があります。
## キーマップのビルド
以下の形式でコマンドを使ってキーボードキーマップを作成できるはずです:
make <keyboard>:<layout>
### レイアウトの競合
キーボードが複数のレイアウトオプションをサポートし、
LAYOUTS = ortho_4x4 ortho_4x12
なおかつ両方のオプションについてレイアウトが存在する場合、
```
layouts/
+ community/
| + ortho_4x4/
| | + <layout>/
| | | + ...
| + ortho_4x12/
| | + <layout>/
| | | + ...
| + ...
```
FORCE_LAYOUT 引数はどのレイアウトをビルドするかを指定するために使うことができます
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x4
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x12
## キーボードに依存しないレイアウトを作成するためのヒント
### インクルード
`#include "planck.h"` を使う代わりに、以下の行を使ってコンパイルされる `<keyboard>.h` (`<folder>.h` はここでインクルードすべきではありません)ファイルをインクルードすることができます:
#include QMK_KEYBOARD_H
キーボード固有のコードを保持したい場合は、これらの変数を使って `#ifdef` 文でエスケープすることができます:
* `KEYBOARD_<folder1>_<folder2>`
例えば:
```c
#ifdef KEYBOARD_planck
#ifdef KEYBOARD_planck_rev4
planck_rev4_function();
#endif
#endif
```
名前は小文字でキーボード/リビジョンのフォルダ/ファイル名と正確に一致することに注意してください。
### キーマップ
同じレイアウトで分割および非分割キーボードをサポートするためには、キーマップでキーボード非依存の `LAYOUT_<layout name>` マクロを使う必要があります。例えば、Let's Split および Planck が同じレイアウトを共有するには、`LAYOUT_planck_grid` や C 配列の場合の単なる `{}` の代わりに、`LAYOUT_ortho_4x12` を使う必要があります。

@ -0,0 +1,151 @@
# リーダーキー: 新しい種類のモディファイア
<!---
original document: 0.8.134:docs/feature_leader_key.md
git diff 0.8.134 HEAD -- docs/feature_leader_key.md | cat
-->
もしあなたが Vim を使ったことがある場合、リーダーキーは何であるかを知っています。そうでなければ、素晴らしい概念を発見しようとしています。:) 例えば、Alt+Shift+W を押す(3つのキーを同時に押す)代わりに、キーの_シーケンス_を押すことができたらどうでしょうつまり、特別なモディファイア (リーダーキー)を押して、続けて W と C を押すと (単純にキーを高速に繋げます)、何かが起こります。
それが `KC_LEAD` の機能です。以下は例です:
1. リーダーキーとして使いたいキーボードのキーを選択します。それにキーコード `KC_LEAD` を割り当てます。このキーはこのためだけの専用です -- 単一アクションのキーで、他の用途には使うことができません。
2. `config.h``#define LEADER_TIMEOUT 300` という行を追加します。これによって `KC_LEAD` キーのタイムアウトを設定します。具体的には、`KC_LEAD` キーを押してからリーダーキーのシーケンスを完了するまで一定の時間しかありません。ここでの `300` はそれを300msに設定します。この値を増やして、シーケンスを入力する時間を増やすことができます。ただし、この時間中に押されたキーは全て途中で遮られ、送信されません。そのためこの値は小さくしておいたほうが良いかもしれません。
* デフォルトでは、このタイムアウトは、`KC_LEAD` を押してからシーケンス全体が完了するまでに掛かる時間です。これは一部の人にとっては非常に短いかもしれません。そのため、このタイムアウトを増やしたほうが良い場合もあります。必要に応じて、`LEADER_PER_KEY_TIMING` オプションを有効にしたほうが良い場合もあります。これは各キーがタップされる度にタイムアウトまでの時間をリセットする機能です。これにより、タイムアウト時間を短くしつつも、比較的長いシーケンスを使うことができます。このオプションを有効にするには、`config.h``#define LEADER_PER_KEY_TIMING` を追加します。
3. `matrix_scan_user` 関数の中で、以下のようなものを追加します:
```c
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(KC_F) {
// マクロ内でできること
SEND_STRING("QMK is awesome.");
}
SEQ_TWO_KEYS(KC_D, KC_D) {
SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
}
SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
SEND_STRING("https://start.duckduckgo.com\n");
}
SEQ_TWO_KEYS(KC_A, KC_S) {
register_code(KC_LGUI);
register_code(KC_S);
unregister_code(KC_S);
unregister_code(KC_LGUI);
}
}
}
```
ご覧のとおり、幾つかの関数があります。`SEQ_ONE_KEY` を単一キーシーケンス (リーダーの後に1つのキーのみ)に使い、より長いシーケンスについては `SEQ_TWO_KEYS``SEQ_THREE_KEYS` から `SEQ_FIVE_KEYS` を使うことができます。
これらはそれぞれ1つ以上のキーコードを引数として受け付けます。これは重要な点です: **キーボードの任意のレイヤー**のキーコードを使うことができます。当たり前ですが、リーダーマクロが発動するにはそのレイヤーがアクティブである必要があります
## `rules.mk` にリーダーキーサポートを追加
リーダーキーのサポートを追加するには、単純にキーマップの `rules.mk` に1行を追加します:
```make
LEADER_ENABLE = yes
```
## リーダーキーのキーごとのタイミング
長いリーダーキー文字列のためや 200wpm のタイピングスキルが無い場合に、非常に長いタイムアウト時間に頼るのではなく、キーを押すごとに入力を完了するまでの時間を増やす機能を使用することができます。これは、リーダーキーを使ってタップダンスを再現する場合に非常に役立ちます (C, C, C のような同じキーを複数回タップする場合)。
これを有効にするには、以下を `config.h` に配置します:
```c
#define LEADER_PER_KEY_TIMING
```
この後、`LEADER_TIMEOUT` を 300ms 未満に下げることをお勧めします。
```c
#define LEADER_TIMEOUT 250
```
これで、リーダーキーのタイムアウト時間を 1000ms に設定することなく以下のようなことが可能になると思われます。
```c
SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
SEND_STRING("Per key timing is great!!!");
}
```
## 厳密なキー処理
デフォルトでは、リーダーキー機能は、リーダーシーケンスの確認時に [`モッドタップ`](ja/mod_tap.md) および [`レイヤータップ`](ja/feature_layers.md#switching-and-toggling-layers) 機能からのキーコードをフィルターします。つまり、`LT(3, KC_A)` を使っている場合、`LT(3, KC_A)` ではなくシーケンスの `KC_A` として取り出され、新しいユーザにとってより期待される動作を提供します。
ほとんどの場合これで問題ありませんが、シーケンスでキーコード全体(例えば、上の例での `LT(3, KC_A)`) を指定したい場合は、`config.h` ファイルに `#define LEADER_KEY_STRICT_KEY_PROCESSING` を追加することこのような機能を有効にすることができます。これでフィルタリングが無効になり、キーコード全体を指定する必要があります。
## カスタマイズ
リーダーキー機能には、リーダーキー機能の動作にいくらかのカスタマイズを追加する方法があります。リーダーキー機能のプロセスの特定の部分で呼び出すことができる2つの関数、`leader_start()``leader_end()` です。
`KC_LEAD` キーがタップされた時に `leader_start()` 関数が呼ばれ、リーダーシーケンスが完了するか、リーダータイムアウトの時間に達した時に `leader_end()` 関数が呼ばれます。
リーダーシーケンスにフィードバック(ビープまたは音楽を再生するなど)を追加するために、これらの関数をコード (通常 は`keymap.c`)に追加することができます。
```c
void leader_start(void) {
// シーケンスの開始
}
void leader_end(void) {
// シーケンスの終了 (成功しない/失敗を検知)
}
```
### 例
この例では、リーダーシーケンスを開始するために `KC_LEAD` を押すとマリオの "One Up" 音が再生され、正常に完了した場合は "All Star" が再生され、失敗した場合は "Rick Roll" を再生されます。
```c
bool did_leader_succeed;
#ifdef AUDIO_ENABLE
float leader_start[][2] = SONG(ONE_UP_SOUND );
float leader_succeed[][2] = SONG(ALL_STAR);
float leader_fail[][2] = SONG(RICK_ROLL);
#endif
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
did_leader_succeed = leading = false;
SEQ_ONE_KEY(KC_E) {
// マクロ内でできること
SEND_STRING(SS_LCTL(SS_LSFT("t")));
did_leader_succeed = true;
} else
SEQ_TWO_KEYS(KC_E, KC_D) {
SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c"));
did_leader_succeed = true;
}
leader_end();
}
}
void leader_start(void) {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_start);
#endif
}
void leader_end(void) {
if (did_leader_succeed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_succeed);
#endif
} else {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_fail);
#endif
}
}
```

@ -0,0 +1,95 @@
# LED マトリックスライト
<!---
original document: 0.8.141:docs/feature_led_matrix.md
git diff 0.8.141 HEAD -- docs/feature_led_matrix.md | cat
-->
この機能により、外部ドライバによって駆動される LED マトリックスを使うことができます。この機能は、バックライト制御と同じキーコードを使えるようにするため、バックライトシステムに接続します。
RGB LED を使いたい場合は、代わりに [RGB マトリックスサブシステム](ja/feature_rgb_matrix.md) を使うべきです。
## ドライバ設定
### IS31FL3731
I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します:
LED_MATRIX_ENABLE = IS31FL3731
1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_<N>` 定義を指定しないでください。`config.h` に以下の項目を定義することができます:
| 変数 | 説明 | デフォルト |
|----------|-------------|---------|
| `ISSI_TIMEOUT` | (オプション) i2c メッセージを待つ時間 | 100 |
| `ISSI_PERSISTENCE` | (オプション) 失敗したメッセージをこの回数再試行する | 0 |
| `LED_DRIVER_COUNT` | (必須) LED ドライバ IC の数 | |
| `LED_DRIVER_LED_COUNT` | (必須) 全てのドライバの LED ライトの数 | |
| `LED_DRIVER_ADDR_1` | (必須) 最初の LED ドライバのアドレス | |
| `LED_DRIVER_ADDR_2` | (オプション) 2番目の LED ドライバのアドレス | |
| `LED_DRIVER_ADDR_3` | (オプション) 3番目の LED ドライバのアドレス | |
| `LED_DRIVER_ADDR_4` | (オプション) 4番目の LED ドライバのアドレス | |
2つのドライバを使う例です。
// これは7ビットのアドレスで、左シフトされます
// ビット0に0を設定すると書き込み、1を設定すると読み込みです (I2C プロトコルに従う)
// アドレスは配線によって変わります:
// 0b1110100 AD <-> GND
// 0b1110111 AD <-> VCC
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define LED_DRIVER_ADDR_1 0b1110100
#define LED_DRIVER_ADDR_2 0b1110110
#define LED_DRIVER_COUNT 2
#define LED_DRIVER_1_LED_COUNT 25
#define LED_DRIVER_2_LED_COUNT 24
#define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
現在、2つのドライバのみがサポートされますが、4つの組み合わせ全てをサポートすることは簡単です。
`<keyboard>.c` に全ての LED を列挙する配列を定義します:
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* これらの位置については IS31 マニュアルを参照してください
* driver
* | LED address
* | | */
{0, C3_3},
....
}
ここで、`Cx_y` は[データシート](http://www.issi.com/WW/pdf/31FL3731.pdf)およびヘッダファイル `drivers/issi/is31fl3731-simple.h` で定義されるマトリックス内の LED の位置です。`driver``config.h` で定義したドライバのインデックス(`0``1``2``3`のいずれか)です。
## キーコード
現在のところ、全ての LED マトリックスのキーコードは[バックライトシステム](ja/feature_backlight.md)と共有されます。
## LED マトリックス効果
現在のところ、LED マトリックス効果は作成されていません。
## カスタムレイヤー効果
カスタムレイヤー効果は `<keyboard>.c` 内で以下を定義することで行うことができます:
void led_matrix_indicators_kb(void) {
led_matrix_set_index_value(index, value);
}
同様の関数がキーマップ内で `led_matrix_indicators_user` として動作します。
## サスペンド状態
サスペンド機能を使うには、以下を `<keyboard>.c` に追加します:
void suspend_power_down_kb(void)
{
led_matrix_set_suspend_state(true);
}
void suspend_wakeup_init_kb(void)
{
led_matrix_set_suspend_state(false);
}

@ -0,0 +1,15 @@
# 感熱式プリンタ
<!---
original document: 0.8.147:docs/feature_thermal_printer.md
git diff 0.8.147 HEAD -- docs/feature_thermal_printer.md | cat
-->
<!-- FIXME: Describe thermal printers support here. -->
## 感熱式プリンタのキーコード
| キー | 説明 |
|-----------|----------------------------------------|
| `PRINT_ON` | ユーザが入力した全ての印刷を開始 |
| `PRINT_OFF` | ユーザが入力した全ての印刷を停止 |

@ -0,0 +1,35 @@
# Velocikey
<!---
original document: 0.8.147:docs/feature_velocikey.md
git diff 0.8.147 HEAD -- docs/feature_velocikey.md | cat
-->
Velocikey は入力の速度を使って(レインボー渦巻効果のような)ライト効果の速度を制御できる機能です。速く入力すればするほどライトが速くなります!
## 使用法
Velocikey を使うためには、2つのステップがあります。最初に、キーボードをコンパイルする時に、`rules.mk``VELOCIKEY_ENABLE=yes` を設定する必要があります。例えば:
```
BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
STENO_ENABLE = no
EXTRAKEY_ENABLE = yes
VELOCIKEY_ENABLE = yes
```
次に、キーボードの使用中に、VLK_TOG キーコードを使って Velocikey を有効にする必要もあります。これは機能をオンおよびオフにします。
以下の全てのライト効果が、Velocikey を有効にすることで制御されます:
- RGB 明滅動作
- RGB レインボームード
- RGB レインボー渦巻
- RGB スネーク
- RGB ナイト
LED 明滅動作の効果のサポートは計画されていますがまだ利用できません。
Velocikey が有効になっている限り、現在オンになっている RGB ライトの他の全ての速度設定に関係なく、速度が制御されます。
## 設定
Velocikey は現在のところキーボード設定を介したどのような設定もサポートしません。速度の増加あるいは減少率などを調整したい場合は、`velocikey.c` を編集し、そこで値を調整して、好みの速度を実現する必要があります。

@ -1,18 +1,41 @@
# Flashing Your Keyboard
# Flashing Your Keyboard
Now that you've built a custom firmware file you'll want to flash your keyboard.
Now that you've built a custom firmware file you'll want to flash your keyboard.
## Put Your Keyboard into DFU (Bootloader) Mode
In order to flash your custom firmware you must first put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug the keyboard or otherwise interrupt the flashing process while the firmware is being written.
Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK, TMK, or PS2AVRGB (Bootmapper Client) and you have not been given specific instructions, try the following, in order:
* Hold down both shift keys and press `Pause`
* Hold down both shift keys and press `B`
* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys
* Unplug your keyboard, hold down the top or bottom left key (usually Escape or Left Control) and plug in your keyboard
* Press the physical `RESET` button, usually located on the underside of the PCB
* Locate header pins on the PCB labeled `RESET` and `GND`, and short them together while plugging your PCB in
If you've attempted all of the above to no avail, and the main chip on the board says `STM32` on it, this may be a bit more complicated. Generally your best bet is to ask on [Discord](https://discord.gg/Uq7gcHh) for assistance. It's likely some photos of the board will be asked for -- if you can get them ready beforehand it'll help move things along!
Otherwise, you should see a message in yellow, similar to this in QMK Toolbox:
```
*** DFU device connected: Atmel Corp. ATmega32U4 (03EB:2FF4:0000)
```
and this bootloader device will also be present in Device Manager, System Information.app, or `lsusb`.
## Flashing Your Keyboard with QMK Toolbox
The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases).
The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases).
However, the QMK Toolbox is only available for Windows and macOS currently. If you're using Linux (or just wish to flash the firmware from the command line), proceed down to [Flash Your Keyboard From The Command Line](#flash-your-keyboard-from-the-command-line).
However, the Toolbox is currently only available for Windows and macOS. If you're using Linux (or just wish to flash the firmware from the command line), skip to the [Flash your Keyboard from the Command Line](#flash-your-keyboard-from-the-command-line) section.
### Load The File Into QMK Toolbox
### Load the File into QMK Toolbox
Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory.
If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
If you are on Windows or macOS, there are commands you can use to easily open the current folder in Explorer or Finder.
#### Windows
@ -38,65 +61,44 @@ For example, the `planck/rev5` with a `default` keymap will have this filename:
planck_rev5_default.hex
```
Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
### Put Your Keyboard Into DFU (Bootloader) Mode
In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written.
Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order:
* Hold down both shift keys and press `Pause`
* Hold down both shift keys and press `B`
* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys
* Press the physical `RESET` button on the bottom of the PCB
* Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in
When you are successful you will see a message similar to this in QMK Toolbox:
```
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
*** DFU device connected
```
Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
### Flash Your Keyboard
Click the `Flash` button in QMK Toolbox. You will see output similar to the following:
```
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
*** DFU device connected
*** DFU device connected: Atmel Corp. ATmega32U4 (03EB:2FF4:0000)
*** Attempting to flash, please don't remove device
>>> dfu-programmer atmega32u4 erase --force
>>> dfu-programmer.exe atmega32u4 erase --force
Erasing flash... Success
Checking memory from 0x0 to 0x6FFF... Empty.
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
Checking memory from 0x0 to 0x55FF... Empty.
0% 100% Programming 0x5600 bytes...
>>> dfu-programmer.exe atmega32u4 flash "D:\Git\qmk_firmware\gh60_satan_default.hex"
Checking memory from 0x0 to 0x3F7F... Empty.
0% 100% Programming 0x3F80 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
0% 100% Reading 0x7000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
Validating... Success
0x5600 bytes written into 0x7000 bytes memory (76.79%).
>>> dfu-programmer atmega32u4 reset
0x3F80 bytes written into 0x7000 bytes memory (56.70%).
>>> dfu-programmer.exe atmega32u4 reset
*** DFU device disconnected
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
*** DFU device disconnected: Atmel Corp: ATmega32U4 (03EB:2FF4:0000)
```
## Flash your Keyboard from the Command Line
This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the flash command:
This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the flash command:
qmk flash
If you have not configured your keyboard/keymap name, or you have multiple keyboards, you can specify the keyboard and keymap:
If you have not configured your keyboard/keymap name in the CLI, or you have multiple keyboards, you can specify the keyboard and keymap:
qmk flash -kb <my_keyboard> -km <my_keymap>
This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting.
This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting.
However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error:
However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error:
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.

@ -57,10 +57,9 @@ You may be asked to close and reopen the window. Do this and keep running the ab
You will need to install Homebrew. Follow the instructions on the [Homebrew homepage](https://brew.sh).
After Homebrew is installed run these commands:
After Homebrew is installed run this command:
brew tap qmk/qmk
brew install qmk
brew install qmk/qmk/qmk
### Linux
@ -70,10 +69,21 @@ You will need to install Git and Python. It's very likely that you already have
* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
Install the global CLI to bootstrap your system:
`python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`)
`python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`)
### FreeBSD
You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
pkg install git python3
Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally install Python packages are available.
Once installed, you can install QMK CLI:
python3 -m pip install --user qmk
## 3. Run QMK Setup :id=set-up-qmk
@ -89,6 +99,12 @@ This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155)
Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc`
?>**Note on FreeBSD**:
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
Once that completes, re-run `qmk setup` to complete the setup and checks.
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
## 4. Test Your Build Environment

59
docs/serial_driver.md Normal file

@ -0,0 +1,59 @@
# 'serial' Driver
This driver powers the [Split Keyboard](feature_split_keyboard.md) feature.
!> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards.
All drivers in this category have the following characteristics:
* Provides data and signaling over a single conductor
* Limited to single master, single slave
## Supported Driver Types
| | AVR | ARM |
|-------------------|--------------------|--------------------|
| bit bang | :heavy_check_mark: | Soon™ |
| USART Half-duplex | | :heavy_check_mark: |
## Driver configuration
### Bitbang
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
```make
SERIAL_DRIVER = bitbang
```
Configure the driver via your config.h:
```c
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
// 0: about 189kbps (Experimental only)
// 1: about 137kbps (default)
// 2: about 75kbps
// 3: about 39kbps
// 4: about 26kbps
// 5: about 20kbps
```
### USART Half-duplex
Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk:
```make
SERIAL_DRIVER = usart
```
Configure the hardware via your config.h:
```c
#define SOFT_SERIAL_PIN B6 // USART TX pin
#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5
// 0: about 460800 baud
// 1: about 230400 baud (default)
// 2: about 115200 baud
// 3: about 57600 baud
// 4: about 38400 baud
// 5: about 19200 baud
#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
```
You must also turn on the SERIAL feature in your halconf.h and mcuconf.h

62
drivers/chibios/serial.h Normal file

@ -0,0 +1,62 @@
#pragma once
#include <stdbool.h>
// /////////////////////////////////////////////////////////////////
// Need Soft Serial defines in config.h
// /////////////////////////////////////////////////////////////////
// ex.
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
// // 1: about 137kbps (default)
// // 2: about 75kbps
// // 3: about 39kbps
// // 4: about 26kbps
// // 5: about 20kbps
//
// //// USE simple API (using signle-type transaction function)
// /* nothing */
// //// USE flexible API (using multi-type transaction function)
// #define SERIAL_USE_MULTI_TRANSACTION
//
// /////////////////////////////////////////////////////////////////
// Soft Serial Transaction Descriptor
typedef struct _SSTD_t {
uint8_t *status;
uint8_t initiator2target_buffer_size;
uint8_t *initiator2target_buffer;
uint8_t target2initiator_buffer_size;
uint8_t *target2initiator_buffer;
} SSTD_t;
#define TID_LIMIT(table) (sizeof(table) / sizeof(SSTD_t))
// initiator is transaction start side
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
// target is interrupt accept side
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
// initiator result
#define TRANSACTION_END 0
#define TRANSACTION_NO_RESPONSE 0x1
#define TRANSACTION_DATA_ERROR 0x2
#define TRANSACTION_TYPE_ERROR 0x4
#ifndef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_transaction(void);
#else
int soft_serial_transaction(int sstd_index);
#endif
// target status
// *SSTD_t.status has
// initiator:
// TRANSACTION_END
// or TRANSACTION_NO_RESPONSE
// or TRANSACTION_DATA_ERROR
// target:
// TRANSACTION_DATA_ERROR
// or TRANSACTION_ACCEPTED
#define TRANSACTION_ACCEPTED 0x8
#ifdef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_get_and_clean_status(int sstd_index);
#endif

@ -0,0 +1,234 @@
#include "quantum.h"
#include "serial.h"
#include "printf.h"
#include "ch.h"
#include "hal.h"
#ifndef USART_CR1_M0
# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so
#endif
#ifndef USE_GPIOV1
// The default PAL alternate modes are used to signal that the pins are used for USART
# ifndef SERIAL_USART_TX_PAL_MODE
# define SERIAL_USART_TX_PAL_MODE 7
# endif
#endif
#ifndef SERIAL_USART_DRIVER
# define SERIAL_USART_DRIVER SD1
#endif
#ifndef SERIAL_USART_CR1
# define SERIAL_USART_CR1 (USART_CR1_PCE | USART_CR1_PS | USART_CR1_M0) // parity enable, odd parity, 9 bit length
#endif
#ifndef SERIAL_USART_CR2
# define SERIAL_USART_CR2 (USART_CR2_STOP_1) // 2 stop bits
#endif
#ifndef SERIAL_USART_CR3
# define SERIAL_USART_CR3 0
#endif
#ifdef SOFT_SERIAL_PIN
# define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN
#endif
#ifndef SELECT_SOFT_SERIAL_SPEED
# define SELECT_SOFT_SERIAL_SPEED 1
#endif
#ifdef SERIAL_USART_SPEED
// Allow advanced users to directly set SERIAL_USART_SPEED
#elif SELECT_SOFT_SERIAL_SPEED == 0
# define SERIAL_USART_SPEED 460800
#elif SELECT_SOFT_SERIAL_SPEED == 1
# define SERIAL_USART_SPEED 230400
#elif SELECT_SOFT_SERIAL_SPEED == 2
# define SERIAL_USART_SPEED 115200
#elif SELECT_SOFT_SERIAL_SPEED == 3
# define SERIAL_USART_SPEED 57600
#elif SELECT_SOFT_SERIAL_SPEED == 4
# define SERIAL_USART_SPEED 38400
#elif SELECT_SOFT_SERIAL_SPEED == 5
# define SERIAL_USART_SPEED 19200
#else
# error invalid SELECT_SOFT_SERIAL_SPEED value
#endif
#define TIMEOUT 100
#define HANDSHAKE_MAGIC 7
static inline msg_t sdWriteHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size) {
msg_t ret = sdWrite(driver, data, size);
// Half duplex requires us to read back the data we just wrote - just throw it away
uint8_t dump[size];
sdRead(driver, dump, size);
return ret;
}
#undef sdWrite
#define sdWrite sdWriteHalfDuplex
static inline msg_t sdWriteTimeoutHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size, uint32_t timeout) {
msg_t ret = sdWriteTimeout(driver, data, size, timeout);
// Half duplex requires us to read back the data we just wrote - just throw it away
uint8_t dump[size];
sdReadTimeout(driver, dump, size, timeout);
return ret;
}
#undef sdWriteTimeout
#define sdWriteTimeout sdWriteTimeoutHalfDuplex
static inline void sdClear(SerialDriver* driver) {
while (sdGetTimeout(driver, TIME_IMMEDIATE) != MSG_TIMEOUT) {
// Do nothing with the data
}
}
static SerialConfig sdcfg = {
(SERIAL_USART_SPEED), // speed - mandatory
(SERIAL_USART_CR1), // CR1
(SERIAL_USART_CR2), // CR2
(SERIAL_USART_CR3) // CR3
};
void handle_soft_serial_slave(void);
/*
* This thread runs on the slave and responds to transactions initiated
* by the master
*/
static THD_WORKING_AREA(waSlaveThread, 2048);
static THD_FUNCTION(SlaveThread, arg) {
(void)arg;
chRegSetThreadName("slave_transport");
while (true) {
handle_soft_serial_slave();
}
}
__attribute__((weak)) void usart_init(void) {
#if defined(USE_GPIOV1)
palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
#else
palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
#endif
}
void usart_master_init(void) {
usart_init();
sdcfg.cr3 |= USART_CR3_HDSEL;
sdStart(&SERIAL_USART_DRIVER, &sdcfg);
}
void usart_slave_init(void) {
usart_init();
sdcfg.cr3 |= USART_CR3_HDSEL;
sdStart(&SERIAL_USART_DRIVER, &sdcfg);
// Start transport thread
chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL);
}
static SSTD_t* Transaction_table = NULL;
static uint8_t Transaction_table_size = 0;
void soft_serial_initiator_init(SSTD_t* sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
usart_master_init();
}
void soft_serial_target_init(SSTD_t* sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
usart_slave_init();
}
void handle_soft_serial_slave(void) {
uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id
SSTD_t* trans = &Transaction_table[sstd_index];
// Always write back the sstd_index as part of a basic handshake
sstd_index ^= HANDSHAKE_MAGIC;
sdWrite(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index));
if (trans->initiator2target_buffer_size) {
sdRead(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size);
}
if (trans->target2initiator_buffer_size) {
sdWrite(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size);
}
if (trans->status) {
*trans->status = TRANSACTION_ACCEPTED;
}
}
/////////
// start transaction by initiator
//
// int soft_serial_transaction(int sstd_index)
//
// Returns:
// TRANSACTION_END
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
#ifndef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_transaction(void) {
uint8_t sstd_index = 0;
#else
int soft_serial_transaction(int index) {
uint8_t sstd_index = index;
#endif
if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
SSTD_t* trans = &Transaction_table[sstd_index];
msg_t res = 0;
sdClear(&SERIAL_USART_DRIVER);
// First chunk is always transaction id
sdWriteTimeout(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index), TIME_MS2I(TIMEOUT));
uint8_t sstd_index_shake = 0xFF;
// Which we always read back first so that we can error out correctly
// - due to the half duplex limitations on return codes, we always have to read *something*
// - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready
res = sdReadTimeout(&SERIAL_USART_DRIVER, &sstd_index_shake, sizeof(sstd_index_shake), TIME_MS2I(TIMEOUT));
if (res < 0 || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) {
dprintf("serial::usart_shake NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
}
if (trans->initiator2target_buffer_size) {
res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(TIMEOUT));
if (res < 0) {
dprintf("serial::usart_transmit NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
}
}
if (trans->target2initiator_buffer_size) {
res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(TIMEOUT));
if (res < 0) {
dprintf("serial::usart_receive NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
}
}
return TRANSACTION_END;
}

@ -20,19 +20,19 @@
#include "eeprom_driver.h"
uint8_t eeprom_read_byte(const uint8_t *addr) {
uint8_t ret;
uint8_t ret = 0;
eeprom_read_block(&ret, addr, 1);
return ret;
}
uint16_t eeprom_read_word(const uint16_t *addr) {
uint16_t ret;
uint16_t ret = 0;
eeprom_read_block(&ret, addr, 2);
return ret;
}
uint32_t eeprom_read_dword(const uint32_t *addr) {
uint32_t ret;
uint32_t ret = 0;
eeprom_read_block(&ret, addr, 4);
return ret;
}

@ -50,7 +50,7 @@ static inline void init_i2c_if_required(void) {
}
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
intptr_t p = (intptr_t)addr;
uintptr_t p = (uintptr_t)addr;
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF;
p >>= 8;
@ -60,11 +60,19 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) {
void eeprom_driver_init(void) {}
void eeprom_driver_erase(void) {
#ifdef CONSOLE_ENABLE
uint32_t start = timer_read32();
#endif
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
memset(buf, 0x00, EXTERNAL_EEPROM_PAGE_SIZE);
for (intptr_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
eeprom_write_block(buf, (void *)addr, EXTERNAL_EEPROM_PAGE_SIZE);
for (uint32_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
eeprom_write_block(buf, (void *)(uintptr_t)addr, EXTERNAL_EEPROM_PAGE_SIZE);
}
#ifdef CONSOLE_ENABLE
dprintf("EEPROM erase took %ldms to complete\n", ((long)(timer_read32() - start)));
#endif
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
@ -72,8 +80,8 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
fill_target_address(complete_packet, addr);
init_i2c_if_required();
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), buf, len, 100);
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), buf, len, 100);
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM R] 0x%04X: ", ((int)addr));
@ -85,14 +93,14 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE];
uint8_t *read_buf = (uint8_t *)buf;
intptr_t target_addr = (intptr_t)addr;
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE];
uint8_t * read_buf = (uint8_t *)buf;
uintptr_t target_addr = (uintptr_t)addr;
init_i2c_if_required();
while (len > 0) {
intptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
if (write_length > len) {
write_length = len;
}
@ -110,7 +118,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
wait_ms(EXTERNAL_EEPROM_WRITE_TIME);
read_buf += write_length;

231
drivers/eeprom/eeprom_spi.c Normal file

@ -0,0 +1,231 @@
/* Copyright 2020 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <string.h>
/*
Note that the implementations of eeprom_XXXX_YYYY on AVR are normally
provided by avr-libc. The same functions are reimplemented below and are
rerouted to the external SPI equivalent.
Seemingly, as this is compiled from within QMK, the object file generated
during the build overrides the avr-libc implementation during the linking
stage.
On other platforms such as ARM, there are no provided implementations, so
there is nothing to override during linkage.
*/
#include "wait.h"
#include "spi_master.h"
#include "eeprom.h"
#include "eeprom_spi.h"
#define CMD_WREN 6
#define CMD_WRDI 4
#define CMD_RDSR 5
#define CMD_WRSR 1
#define CMD_READ 3
#define CMD_WRITE 2
#define SR_WIP 0x01
// #define DEBUG_EEPROM_OUTPUT
#ifndef EXTERNAL_EEPROM_SPI_TIMEOUT
# define EXTERNAL_EEPROM_SPI_TIMEOUT 100
#endif
#ifdef CONSOLE_ENABLE
# include "print.h"
#endif // CONSOLE_ENABLE
static void init_spi_if_required(void) {
static int done = 0;
if (!done) {
spi_init();
done = 1;
}
}
static bool spi_eeprom_start(void) { return spi_start(EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN, EXTERNAL_EEPROM_SPI_LSBFIRST, EXTERNAL_EEPROM_SPI_MODE, EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR); }
static spi_status_t spi_eeprom_wait_while_busy(int timeout) {
uint32_t deadline = timer_read32() + timeout;
spi_status_t response;
do {
spi_write(CMD_RDSR);
response = spi_read();
if (timer_read32() >= deadline) {
return SPI_STATUS_TIMEOUT;
}
} while (response & SR_WIP);
return SPI_STATUS_SUCCESS;
}
static void spi_eeprom_transmit_address(uintptr_t addr) {
uint8_t buffer[EXTERNAL_EEPROM_ADDRESS_SIZE];
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = addr & 0xFF;
addr >>= 8;
}
spi_transmit(buffer, EXTERNAL_EEPROM_ADDRESS_SIZE);
}
//----------------------------------------------------------------------------------------------------------------------
void eeprom_driver_init(void) {}
void eeprom_driver_erase(void) {
#ifdef CONSOLE_ENABLE
uint32_t start = timer_read32();
#endif
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
memset(buf, 0x00, EXTERNAL_EEPROM_PAGE_SIZE);
for (uint32_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
eeprom_write_block(buf, (void *)(uintptr_t)addr, EXTERNAL_EEPROM_PAGE_SIZE);
}
#ifdef CONSOLE_ENABLE
dprintf("EEPROM erase took %ldms to complete\n", ((long)(timer_read32() - start)));
#endif
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
init_spi_if_required();
//-------------------------------------------------
// Wait for the write-in-progress bit to be cleared
bool res = spi_eeprom_start();
if (!res) {
dprint("failed to start SPI for WIP check\n");
memset(buf, 0, len);
return;
}
spi_status_t response = spi_eeprom_wait_while_busy(EXTERNAL_EEPROM_SPI_TIMEOUT);
spi_stop();
if (response == SPI_STATUS_TIMEOUT) {
dprint("SPI timeout for WIP check\n");
memset(buf, 0, len);
return;
}
//-------------------------------------------------
// Perform read
res = spi_eeprom_start();
if (!res) {
dprint("failed to start SPI for read\n");
memset(buf, 0, len);
return;
}
spi_write(CMD_READ);
spi_eeprom_transmit_address((uintptr_t)addr);
spi_receive(buf, len);
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM R] 0x%08lX: ", ((uint32_t)(uintptr_t)addr));
for (size_t i = 0; i < len; ++i) {
dprintf(" %02X", (int)(((uint8_t *)buf)[i]));
}
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
spi_stop();
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
init_spi_if_required();
bool res;
uint8_t * read_buf = (uint8_t *)buf;
uintptr_t target_addr = (uintptr_t)addr;
while (len > 0) {
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
if (write_length > len) {
write_length = len;
}
//-------------------------------------------------
// Wait for the write-in-progress bit to be cleared
res = spi_eeprom_start();
if (!res) {
dprint("failed to start SPI for WIP check\n");
return;
}
spi_status_t response = spi_eeprom_wait_while_busy(EXTERNAL_EEPROM_SPI_TIMEOUT);
spi_stop();
if (response == SPI_STATUS_TIMEOUT) {
dprint("SPI timeout for WIP check\n");
return;
}
//-------------------------------------------------
// Enable writes
res = spi_eeprom_start();
if (!res) {
dprint("failed to start SPI for write-enable\n");
return;
}
spi_write(CMD_WREN);
spi_stop();
//-------------------------------------------------
// Perform the write
res = spi_eeprom_start();
if (!res) {
dprint("failed to start SPI for write\n");
return;
}
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM W] 0x%08lX: ", ((uint32_t)(uintptr_t)target_addr));
for (size_t i = 0; i < write_length; i++) {
dprintf(" %02X", (int)(uint8_t)(read_buf[i]));
}
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
spi_write(CMD_WRITE);
spi_eeprom_transmit_address(target_addr);
spi_transmit(read_buf, write_length);
spi_stop();
read_buf += write_length;
target_addr += write_length;
len -= write_length;
}
//-------------------------------------------------
// Disable writes
res = spi_eeprom_start();
if (!res) {
dprint("failed to start SPI for write-disable\n");
return;
}
spi_write(CMD_WRDI);
spi_stop();
}

@ -0,0 +1,80 @@
/* Copyright 2020 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*
The slave select pin of the EEPROM.
This needs to be a normal GPIO pin_t value, such as A7.
*/
#ifndef EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN
# error "No chip select pin defined -- missing EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN"
#endif
/*
The clock divisor for SPI to ensure that the MCU is within the
specifications of the EEPROM chip. Generally this will be PCLK divided by
the intended divisor -- check your clock settings and the datasheet of
your EEPROM.
*/
#ifndef EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR
# ifdef __AVR__
# define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 8
# else
# define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64
# endif
#endif
/*
The SPI mode to communicate with the EEPROM.
*/
#ifndef EXTERNAL_EEPROM_SPI_MODE
# define EXTERNAL_EEPROM_SPI_MODE 0
#endif
/*
Whether or not the SPI communication between the MCU and EEPROM should be
LSB-first.
*/
#ifndef EXTERNAL_EEPROM_SPI_LSBFIRST
# define EXTERNAL_EEPROM_SPI_LSBFIRST false
#endif
/*
The total size of the EEPROM, in bytes. The EEPROM datasheet will usually
specify this value in kbits, and will require conversion to bytes.
*/
#ifndef EXTERNAL_EEPROM_BYTE_COUNT
# define EXTERNAL_EEPROM_BYTE_COUNT 8192
#endif
/*
The page size in bytes of the EEPROM, as specified in the datasheet.
*/
#ifndef EXTERNAL_EEPROM_PAGE_SIZE
# define EXTERNAL_EEPROM_PAGE_SIZE 32
#endif
/*
The address size in bytes of the EEPROM. For EEPROMs with <=256 bytes, this
will likely be 1. For EEPROMs >256 and <=65536, this will be 2. For EEPROMs
>65536, this will likely need to be 4.
As expected, consult the datasheet for specifics of your EEPROM.
*/
#ifndef EXTERNAL_EEPROM_ADDRESS_SIZE
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
#endif

@ -16,7 +16,8 @@
/*
* see jj40/stevexyz for more information
* The 25% SuperMicro keyboard: a pure - full features - "Alpha 26" keymap on Gherkin, compatible also with 28 and 30 keys layouts
* See https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/readme.md for more information
*/
@ -56,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,---------------------------------------------------------------------.
* | | | | | | | | | | |
* | Q | W | E | R | T | Y | U | I | O | P |
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* | ____ | ____ | ____ | ____ | ____ | FnNav|NumSym| Alt | Ctrl | Shift|
* |------+------+------+------+-------------+------+------+------+------|
* | | | | | | | | | | |
* | A | S | D | F | G | H | J | K | L | Enter|
@ -68,83 +69,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '-------------------------------------------------------'
*/
[LAYER_HOME] = LAYOUT_ortho_3x10(
LT(LAYER_ARROWPAD, KC_Q), LT(LAYER_NUMPAD, KC_W), LT(LAYER_MEDIAPAD, KC_E), KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
MT(MOD_LSFT, KC_A), LT(LAYER_FUNC, KC_S), LT(LAYER_NUMSYM, KC_D), MT(MOD_RALT, KC_F), MT(MOD_LGUI, KC_G), MT(MOD_RGUI, KC_H), MT(MOD_RALT, KC_J), LT(LAYER_FUNC, KC_K), LT(LAYER_NUMSYM, KC_L), MT(MOD_RSFT, KC_ENT),
XXXXXXX, MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(LAYER_FUNC, KC_C), LT(LAYER_NUMSYM, KC_V), MT(MOD_LSFT, KC_B), MT(MOD_LALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_RSFT, KC_SPC), XXXXXXX ),
LT(LAYER_ARROWPAD, KC_Q), LT(LAYER_NUMPAD, KC_W), LT(LAYER_MEDIAPAD, KC_E), KC_R, KC_T, LT(LAYER_FUNC, KC_Y), LT(LAYER_NUMSYM, KC_U), MT(MOD_LALT, KC_I), MT(MOD_RCTL, KC_O), MT(MOD_RSFT, KC_P),
MT(MOD_LSFT, KC_A), LT(LAYER_FUNC, KC_S), LT(LAYER_NUMSYM, KC_D), MT(MOD_RALT, KC_F), MT(MOD_LGUI, KC_G), MT(MOD_RGUI, KC_H), MT(MOD_RALT, KC_J), LT(LAYER_FUNC, KC_K), LT(LAYER_NUMSYM, KC_L), MT(MOD_RSFT, KC_ENT),
KC_DOWN, MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(LAYER_FUNC, KC_C), LT(LAYER_NUMSYM, KC_V), MT(MOD_LSFT, KC_B), MT(MOD_LALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_RSFT, KC_SPC), KC_BSPC
),
/* Function and Navigation Layer
* ,---------------------------------------------------------------------.
* | | | | | | | | | | |
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* | ____ | ____ | ____ | ____ | ____ | ____ |SysLay| Alt | Ctrl | Shift|
* |------+------+------+------+-------------+------+------+------+------|
* | | | | | | | | | | |
* | ESC | Home | PgDn | PgUp | End | Left | Down | Up | Right| Baksp|
* | ESC | Home | PgDn | PgUp | End | Left | Down | Up | Right|Backsp|
* | Shift| ____ |SysLay| AltGr| OSkey| OSkey| AltGr| ____ |SysLay| Shift|
* '------+------+------+------+------+------|------+------+------+------'
* | | | | | | | | |
* | ____ | ____ | | ____ | ____ | ____ | ____ | ____ |
* | F11 | F12 | | Space|PrnScr|ScrLck|Pause |Backsp|
* | Ctrl | Alt | ____ |SysLay| Shift| Alt | Ctrl | Shift|
* '-------------------------------------------------------'
*/
[LAYER_FUNC] = LAYOUT_ortho_3x10(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
MT(MOD_LSFT, KC_ESC), KC_HOME, LT(LAYER_SYST, KC_PGDN), MT(MOD_RALT, KC_PGUP), MT(MOD_LGUI, KC_END), MT(MOD_RGUI, KC_LEFT), MT(MOD_RALT, KC_DOWN), KC_UP, LT(LAYER_SYST, KC_RGHT), MT(MOD_RSFT, KC_BSPC),
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, MO(LAYER_SYST), KC_LSFT, KC_LALT, KC_RCTL, MT(MOD_RSFT, KC_SPC), XXXXXXX ),
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, LT(LAYER_SYST, KC_F7), MT(MOD_LALT, KC_F8), MT(MOD_RCTL,KC_F9), MT(MOD_RSFT, KC_F10),
MT(MOD_LSFT, KC_ESC), KC_HOME, LT(LAYER_SYST, KC_PGDN), MT(MOD_RALT, KC_PGUP), MT(MOD_LGUI, KC_END), MT(MOD_RGUI, KC_LEFT), MT(MOD_RALT, KC_DOWN), KC_UP, LT(LAYER_SYST, KC_RGHT), MT(MOD_RSFT, KC_BSPC),
KC_DOWN, MT(KC_LCTL, KC_F11), MT(KC_LALT, KC_F12), KC_NO, LT(LAYER_SYST, KC_SPACE), MT(KC_LSFT, KC_PSCR), MT(KC_LALT, KC_SLCK), MT(KC_RCTL, KC_PAUS), MT(MOD_RSFT, KC_BSPC), KC_UP
),
/* Number and Symbols Layer
* ,---------------------------------------------------------------------.
* | ! | @ | # | $ | % | ^ | & | * | ( | ) |
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* | ____ | ____ | ____ | ____ | ____ |SysLay| ____ | Alt | Ctrl | Shift|
* |------+------+------+------+-------------+------+------+------+------|
* | | ~ | _ | + | { | } | | | : | " | |
* | TAB | ` | - | = | [ | ] | \ | ; | ' | Del |
* | Shift|SysLay| ____ | AltGr| OSkey| OSkey| AltGr|SysLay| ____ | Shift|
* ' -----+------+------+------+------+------|------+------+------+------'
* | | | | | < | > | ? | |
* | ____ | ____ | ____ | | , | . | / | ____ |
* |BackSp| Del | Enter| | , | . | / | Enter|
* | Ctrl | Alt |SysLay| ____ | Shift| Alt | Ctrl | Shift|
* '-------------------------------------------------------'
*/
[LAYER_NUMSYM] = LAYOUT_ortho_3x10(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
MT(MOD_LSFT, KC_TAB), LT(LAYER_SYST, KC_GRV), KC_MINS, MT(MOD_RALT, KC_EQL), MT(MOD_LGUI, KC_LBRC), MT(MOD_RGUI, KC_RBRC), MT(MOD_RALT, KC_BSLS), LT(LAYER_SYST, KC_SCLN), KC_QUOT, MT(MOD_RSFT, KC_DEL),
XXXXXXX, KC_LCTL, KC_LALT, MO(LAYER_SYST), KC_NO, MT(MOD_LSFT, KC_COMM), MT(MOD_LALT, KC_DOT), MT(MOD_RCTL, KC_SLSH), MT(MOD_RSFT, KC_SPC), XXXXXXX ),
KC_1, KC_2, KC_3, KC_4, KC_5, LT(LAYER_SYST, KC_6), KC_7, MT(MOD_LALT, KC_8), MT(MOD_RCTL,KC_9), MT(MOD_RSFT, KC_0),
MT(MOD_LSFT, KC_TAB), LT(LAYER_SYST, KC_GRV), KC_MINS, MT(MOD_RALT, KC_EQL), MT(MOD_LGUI, KC_LBRC), MT(MOD_RGUI, KC_RBRC), MT(MOD_RALT, KC_BSLS), LT(LAYER_SYST, KC_SCLN), KC_QUOT, MT(MOD_RSFT, KC_DEL),
KC_LEFT, MT(KC_LCTL, KC_BSPC), MT(KC_LALT, KC_DEL), LT(LAYER_SYST, KC_ENT), KC_NO, MT(MOD_LSFT, KC_COMM), MT(MOD_LALT, KC_DOT), MT(MOD_RCTL, KC_SLSH), MT(MOD_RSFT, KC_ENT), KC_RGHT
),
/* System Layer
* ,---------------------------------------------------------------------.
* | | | | | | | | | | |
* | F11 | F12 | Play | Next |MsWhlU|MsBtn1|OSMenu|SysReq|MsBtn2|Backsp|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* | Play | Stop | Prev | Next |MsBtn1|MsLeft|MSDown| MsUp |MsRigh|MsBtn2|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift|
* |------+------+------+------+-------------+------+------+------+------|
* | | | | | | | | | | |
* | Caps | Mute | Vol- | Vol+ |MsWhlD|MsLeft|MSDown| MsUp |MsRigh| Ins |
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift|
* |Backsp| Mute | Vol- | Vol+ |MsWhlD| Left | Down | Up | Right|Backsp|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* '------+------+------+------+------+------|------+------+------+------'
* | | | | | | | | |
* | ____ | ____ | | |PrnScr|ScrLck|Pause | ____ |
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift|
* '-------------------------------------------------------'
* simplified view (for media and mouse there are dedicated layers)
* ,---------------------------------------------------------------------.
* | | | | | | | | | | |
* | F11 | F12 | | | | |OSMenu|SysReq| |Backsp|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* |------+------+------+------+-------------+------+------+------+------|
* | | | | | | | | | | |
* | Caps | | | | | | | | | Ins |
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift|
* '------+------+------+------+------+------|------+------+------+------+
* | | | | | | | | |
* | | | | |PrnScr|ScrLck|Pause | |
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift|
* | ____ | ____ | Enter| Space| Mute | Vol- | Vol+ | Space|
* | Ctrl | Alt | ____ | ____ | Shift| Alt | Ctrl | ____ |
* '-------------------------------------------------------'
*/
[LAYER_SYST] = LAYOUT_ortho_3x10(
KC_F11, KC_F12, KC_MPLY, KC_MNXT, KC_MS_WH_UP, KC_MS_BTN1, KC_APP, KC_SYSREQ, KC_MS_BTN2, KC_BSPC,
MT(MOD_LSFT, KC_CAPS), KC_MUTE, KC_VOLD, KC_VOLU, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, MT(MOD_RSFT, KC_INS),
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, MT(MOD_RSFT, KC_SPC), XXXXXXX ),
KC_MPLY, KC_STOP, KC_MPRV, KC_MNXT, KC_MS_BTN1, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, MT(MOD_RSFT, KC_MS_BTN2),
KC_BSPC, KC_DEL, KC_PGDN, KC_PGUP, KC_APP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC,
KC_PGDN, MT(KC_LCTL, KC_CAPS), MT(KC_LALT, KC_INS), KC_ENT, KC_SPC, MT(MOD_RSFT, KC_MUTE), MT(MOD_LALT, KC_VOLD), MT(MOD_RCTL, KC_VOLU), KC_SPC, KC_PGUP
),
/* ArrowPad (mod su Q) /------mouse-------\ /-----cursor-------\
* ,---------------------------------------------------------------------.
@ -157,23 +148,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* '------+------+------+------+------+------|------+------+------+------'
* | | | | | | | | |
* | | |MsWhlU|MsDown|MsWhlD| End | Down | PdDn |
* | | |MsWhlU|MsDown|MsWhlD| End | PgDn | PgDn |
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | ____ |
* '-------------------------------------------------------'
*/
[LAYER_ARROWPAD] = LAYOUT_ortho_3x10(
KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_HOME, KC_UP, KC_PGUP, KC_BSPC,
KC_LSFT, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT,
XXXXXXX, KC_LCTL, KC_LALT, KC_MS_WH_UP, KC_MS_DOWN, KC_MS_WH_DOWN, KC_END, KC_DOWN, KC_PGDN, XXXXXXX ),
KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_HOME, KC_UP, KC_PGUP, KC_BSPC,
KC_LSFT, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT,
XXXXXXX, KC_LCTL, KC_LALT, KC_MS_WH_UP, KC_MS_DOWN, KC_MS_WH_DOWN, KC_END, KC_PGDN, KC_PGDN, XXXXXXX
),
/* NumPad (mod su W)
* ,---------------------------------------------------------------------.
* | | | | | | | | | | |
* | | | / | * | - |Backsp| 7 | 8 | 9 | 0 |
* | | | 3 | * | - |Backsp| 7 | 8 | 9 | 0 |
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* |------+------+------+------+-------------+------+------+------+------|
* | | | | | | | | | | |
* | | | | = | + | . | 4 | 5 | 6 | Enter|
* | | | / | = | + | . | 4 | 5 | 6 | Enter|
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
* '------+------+------+------+------+------|------+------+------+------'
* | | | | | | | | |
@ -182,9 +174,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '-------------------------------------------------------'
*/
[LAYER_NUMPAD] = LAYOUT_ortho_3x10(
KC_NO, KC_NO, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_BSPC, KC_7, KC_8, KC_9, KC_0,
KC_LSFT, KC_NO, KC_NO, KC_KP_EQUAL, KC_KP_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ENT,
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_TAB, KC_COMM, KC_1, KC_2, KC_3, XXXXXXX ),
KC_NO, KC_NO, KC_3, KC_KP_ASTERISK, KC_KP_MINUS, KC_BSPC, KC_7, KC_8, KC_9, KC_0,
KC_LSFT, KC_NO, KC_KP_SLASH, KC_KP_EQUAL, KC_KP_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ENT,
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_TAB, KC_COMM, KC_1, KC_2, KC_3, XXXXXXX
),
/* MediaPad (mod su E)
* ,---------------------------------------------------------------------.
@ -202,9 +195,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '-------------------------------------------------------'
*/
[LAYER_MEDIAPAD] = LAYOUT_ortho_3x10(
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU, KC_NO, KC_NO,
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO,
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_NO, XXXXXXX ),
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU, KC_NO, KC_NO,
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO,
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_NO, XXXXXXX
),
};
@ -225,15 +219,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case CK_TRIPLEZERO:
if (record->event.pressed) {
SEND_STRING("000");
} // else { when released... }
} // else { when released }
break;
}
return true;
};
void keyboard_pre_init_user(void) {
// Call the keyboard pre init code.
// Set our LED pins as output
setPinOutput(D5);
setPinOutput(B0);

@ -1,11 +1,15 @@
# gherkin super micro edition
# The 25% SuperMicro keyboard
## A full featured keymap on Gherkin compatible with a pure "Alpha 26" layout
With this configuration the "28" layout first experimented on the plank-like jj40 is being ported to a more proper board, leaving just two keys not used.
With this configuration the "SuperMicro" layout first experimented on the plank-like jj40 is being ported to a more proper board, and with the last changes, this layout has been made compatible also to a "26 keys" one. So you can now choose to leave all 30 keys on the keyboard, or remove the two on the bottom line corners to have the "old" and comfortable 28 keys layout, or remove also space and enter to have the simplest "pure alpha" one! And even the intermediate 27 keys one is an interesting compatible option!
For more information please have a look at https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/jj40/keymaps/stevexyz/readme.md
This keymap is for a generic usage, trying to avoid as much gimmick as possible (considering the number of keys) and retain muscle memory from people used to the standard Qwerty 104 keys one. Functions and numbers (with related symbols) are on the first row as expected; other examples of design coherency include the symbols on the central row laid out in the same order as you'll find on a standard full keyboard, and the cursor movement aligned to the common unix vi standard ("hjkl", and for symmetry "sdfg" for home/pgdn/pgup/end). I've personally used this layout for months on my home PC in parallel to my portable work PC.
The image below explain the main layers. In addition to them with q, w and e there are three specific dedicated layers for cursors/mouse, numpad and media.
![layers](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/layers.jpeg)
Relying just on the alphabetic keys this layout can be also very easily ported and tested on any qmk supported keyboard (ok, butterstick excluded).
The image below explains the main layers activated respectively with F, N or both modifiers pressed together. In addition to them there are available 5 layers that can be personalized as needed or completely removed without losing any functionality; three of them are currently setup in the default keymap for cursors/mouse, numpad and media (activated with q, w and e respectively).
![layers](https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/newlayout26272830.jpg)
![prototype](https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/gherkin28.jpeg)

@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6464
#define VENDOR_ID 0x6873 //hs "Hasu"
#define PRODUCT_ID 0x6464 //Alps"64"
#define DEVICE_VER 0x0001
#define MANUFACTURER Hasu
#define PRODUCT Alps64
@ -48,6 +48,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* Bootmagic Lite Support*/
#define BOOTMAGIC_LITE_ROW 3
#define BOOTMAGIC_LITE_COLUMN 6
/*
* Feature disable options
* These options are also useful to firmware size reduction.

@ -0,0 +1,37 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
[0] = LAYOUT_all(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NUHS, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESC,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL
),
[1] = LAYOUT_all(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};

@ -0,0 +1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = no

@ -0,0 +1 @@
#include "arabica37.h"

@ -0,0 +1,5 @@
#pragma once
#ifdef KEYBOARD_arabica37_rev1
#include "rev1.h"
#endif

Some files were not shown because too many files have changed in this diff Show More