Compare commits

...
111 Commits
Author SHA1 Message Date
QMK Bot 09370a95db format code according to conventions [skip ci] 2020-01-25 22:04:42 +00:00
George Harris e9ffc53476 Fix unaligned access with LTO (#7801)
Forces 4 byte alignment for USB input & output buffers to prevent unaligned accesses by chibios with LTO enabled
2020-01-25 13:35:39 -08:00
fauxpark 480a391929 [Keyboard] Daisy refactor (#7985) 2020-01-25 12:43:43 -08:00
yohewi 154336ee27 [Keyboard] numatreus (#7929)
* Add files via upload

* Delete NumAtreus

* 20190405

* 20190405

* Delete keymap.c

* Delete config.h

* Delete keymap.c

* Delete rules.mk

* Delete rules_default.mk

* Delete readme.md

* Delete NumAtreus.c

* Delete NumAtreus.h

* Delete config.h

* Delete info.json

* 20190404

* Add files via upload

* Add files via upload

* 20190405

* Delete NumAtreus

* 20190406

* 20190407

* 20190408

* 20190408

* 20190410

* Update readme.md

* Update readme.md

* Add files via upload

大文字小文字の修正をしました。

* Update readme.md

* Update readme.md

* Update readme.md

* Delete NumAtreus.c

* Delete NumAtreus.h

* Add files via upload

* 20200118

* 20200118_default

* update

* readme

* Delete rules.mk

* Delete readme.md

* Delete numatreus.h

* Delete config.h

* Delete info.json

* Delete info.json_txt

* Delete numatreus.c

* Delete config.h

* Delete keymap.c

* Delete rules.mk

* Delete keymap.c

* Delete keymap.c

* del

* update

* update

* Update keyboards/numatreus/config.h

* Update keyboards/numatreus/config.h

* Update keyboards/numatreus/config.h

* Update keyboards/numatreus/keymaps/hdbx/keymap.c

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/keymaps/hdbx/keymap.c

* Update keyboards/numatreus/keymaps/like_jis/config.h

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* 20190119_Modified

* 20200119_Modified

* 20200119_uranuma

* Update keyboards/numatreus/keymaps/hdbx/keymap.c

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

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

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Delete info.json_txt

* 20200121_Modified

* 20200121_Modified

* 20200121_Modified

* 20200121_Modified

* 20200122

* Update keyboards/numatreus/config.h

* 20200122_Modified

* Update keyboards/uranuma/rules.mk

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/uranuma/rules.mk

* Update keyboards/uranuma/rules.mk

* Update keyboards/uranuma/rules.mk

* Update keyboards/uranuma/rules.mk

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/numatreus/keymaps/like_jis/keymap.c

* Update keyboards/uranuma/config.h

* Update keyboards/uranuma/readme.md

* Update keyboards/uranuma/readme.md

* Update keyboards/uranuma/readme.md

* 20200122

* Delete config.h

* Delete uranuma.h

* Delete uranuma.c

* Delete rules.mk

* Delete readme.md

* Delete keymap.c

* Delete info.json

* Update keyboards/numatreus/rules.mk
2020-01-24 19:33:04 -08:00
Joel Challis d4ccb2e0e6 Fix printf buffer overflow when cols>16 (#7998) 2020-01-24 21:57:30 -05:00
skullydazedandErovia 5e65af3a76 Beef up how qmk doctor works. (#7375)
* Beef up how `qmk doctor` works.

* improve the `git submodule status` parsing. h/t @erovia

* Fix whitespace and imports

* yapf

* Add documentation for the new doctor functionality

* Replace type_unchanged() with str()

* remove unused modules

* Update lib/python/qmk/cli/doctor.py

Co-Authored-By: Erovia <[email protected]>

Co-authored-by: Erovia <[email protected]>
2020-01-24 20:31:16 +01:00
Joel Challis e4a0f841e1 Update split serial code to use driver pattern (#7990)
* Move avr serial code to drivers

* Update src+= serial.c to driver pattern
2020-01-24 13:50:51 +00:00
James Young 4867a9b1e6 [Keyboard] HS60 v2 ISO: fix Configurator key ordering (#7958)
* white-space formatting

* reorder the objects
2020-01-24 01:09:55 -08:00
Wilba 9a9eaa8100 Added VIA support to Noxary 280 (#7960)
* Added VIA support to Noxary 280

* Added VIA support to Noxary 280

* Review changes
2020-01-23 21:03:04 -08:00
Xelus22 339e29d5af Add VIA support to TMO50 (#7986)
* via compatible

* disable mousekey

* remove unnecessary space
2020-01-23 19:28:25 -08:00
fauxpark b568999769 Fix LED configuration for PS2AVRGB boards (#7989)
* Fix LED configuration for PS2AVRGB boards

* Undo backlight on state changes
2020-01-23 19:24:10 -08:00
QMK Bot fe50883c15 format code according to conventions [skip ci] 2020-01-24 02:15:29 +00:00
Nick Brassel d13ada1162 Add customisable EEPROM driver selection (#7274)
- uprintf -> dprintf
- Fix atsam "vendor" eeprom.
- Bump Kinetis K20x to 64 bytes, too.
- Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value.
- Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage.
- Add 24LC128 by request.
2020-01-24 12:45:58 +11:00
Akaash Suresh 6ff093efbe Local Changes 2020-01-23 22:41:15 +11:00
Max Rumpf c3835262d8 [Keymap] Phoebe keymap improvements (#7963)
* [Phoebe] Allow to input pipe characters with only one modifier

* [Phoebe] Update RGB animations
2020-01-22 14:46:00 -08:00
yiancar 1a40af74da HS60 EEPROM size fix (#7968) 2020-01-23 08:28:42 +11:00
yiancar 9e6e01cabb eeprom size fix (#7969) 2020-01-22 12:44:12 -08:00
Cable Car Designs a561443fca [Keyboard] added support for new rev of cypher PCB (#7636)
* cleanup of existing branches to resync with upstream. removed old cyp…

…her files, added new cypher files.
2020-01-22 09:45:32 -08:00
MechMerlinandfauxpark e0a0430c31 Clueboard Rev4 Updates aka Volcano 660 (#7942)
* fix audio enable repetition

* remove RGB LED support as this board has no RGB LB LEDs

* use pragma once

* this board has no backlight support

* enable COMMAND_ENABLE

* comment cleanups

* setting bootmagic to lite as the first board thathat has this PCB has a solid bottom. If someone forgets to put in a RESET key on their keymap, they are not going to have fun resetting the board

* Update keyboards/clueboard/66/rev4/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/clueboard/66/rev4/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/clueboard/66/rev4/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/clueboard/66/rev4/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* convert the palset and palclear routines to setpinoutput and writepinlow

* remove scankb

* restore original guards instead of pragma once

Co-authored-by: fauxpark <[email protected]>
2020-01-22 04:14:14 +00:00
Brett InmanandJames Young 49c3a1cda5 Swap two columns to fix Skog Lite (#7940)
* Swap two cols to fix skog lite

* Fix readme

* Suggested formatting

Co-Authored-By: James Young <[email protected]>

Co-authored-by: James Young <[email protected]>
2020-01-21 19:58:17 -08:00
fauxpark ba264c69c2 [Keyboard] Cospad refactor (#7957)
* Cospad refactor

* Add num lock indicator code

* Add led_init_ports()

* Revert change to matrix position blanks

* Define BACKLIGHT_ON_STATE explicitly, in anticipation of PR6749
2020-01-21 18:21:47 -08:00
Joel Challis 8e500c3670 Align cformat rules with current CI implementation (#7936)
* Align cformat rules with current CI implementation

* Optimise file walking
2020-01-21 18:21:14 -08:00
Rossman360 bf4611c7b7 [Keymap] adding personal rebound keymap (#7956) 2020-01-21 18:18:18 -08:00
yiancar f773056750 [Keyboard] HS60 Refactor (Keymap restructure to be more standardized) (#7847)
* Keymap restructure to be more standardized

* made bootmagic lite default

* Dividing keymaps

* Update keyboards/hs60/v2/v2.c
2020-01-21 15:09:50 -08:00
Wilba b70500806a [Keyboard] Added WT60-B, WT60-BX (wilba.tech THERMAL) (#7948)
* Added WT60-B, WT60-BX

* Review changes
2020-01-21 13:28:12 -08:00
MechMerlin 9b6b54cdaa [Keyboard] Think 6.5 Soldered Matrix Fix (#7952)
* both backspace and left shift matrix positions off by one

* update the led_update routine

* update readme

* Update keyboards/gray_studio/think65/solder/solder.c
2020-01-21 13:26:00 -08:00
dsanchezseco 37db6012a7 keymap, fixed rgb effect name and deactivate oled (#7953)
* added rgblight controls to planck keymap

* fixed knight ridder offset to face me

* no oled for crkbd 'till fixed

* fixed RGB effect name
2020-01-21 09:12:07 -08:00
Dmitrijs MinajevsandJames Young 6f176dfc7c Add VIA support to DZ60 (#7814)
* Add DZ60 to VIA

* Changed vendor id from 'KF' to 'DZ'

* Capitalize hex

* Fix Via_layout_options size setting

* Update keyboards/dz60/keymaps/via/rules.mk

Co-Authored-By: James Young <[email protected]>

Co-authored-by: James Young <[email protected]>
2020-01-21 07:48:13 -08:00
QMK Bot dee1d68dde format code according to conventions [skip ci] 2020-01-21 14:48:06 +00:00
fauxpark 123ae73efc Fix lock LEDs for ChibiOS when using shared endpoints (#7877)
* Fix lock LEDs for ChibiOS when using shared endpoints

* Tweak comments

* Doesn't need to be uint16 anymore
2020-01-21 14:17:33 +00:00
fauxpark 2566992c9a Add DIODE_DIRECTION to Getta25 (#7951) 2020-01-21 14:07:53 +00:00
Alfred Maler 5f35203d1b [Keymap] Feature/preonic/rev3/alfrdmalr (#7870)
* WIP do not merge

* first pass at custom preonic layout

* add auto shift and reset via leader key

* Update readme

* update copyright notice

* formatting changes

* fix: use MO instead of process_record_user

* added backslash and moved grave position

* remove extraneous 'j' characer in NUMPAD template

* update template formatting

* remove process_record_user

* swap "!" with "@"

* fix readme formatting

* update readme layout image
2020-01-20 23:01:09 -08:00
Salicylic-acid3 c23b73530f [Keyboard] Add keyboard Getta25 (#7497)
* [Keyboard] Add keyboard Getta25

Add Getta25 keyboard.

A 25 keys Tenkey.
Salicylic-acid3

* Update keyboards/getta25/info.json

* Update keyboards/getta25/readme.md

* Update keyboards/getta25/readme.md

* Update keyboards/getta25/readme.md

* Update keyboards/getta25/info.json

* Update keyboards/getta25/info.json

* Update keyboards/getta25/info.json

* Update keyboards/getta25/info.json

* Update keyboards/getta25/keymaps/oled/glcdfont.c

* Update keyboards/getta25/keymaps/oled/glcdfont.c

* Keymap Update

Remove unnecessary code blocks

* Update keyboards/getta25/keymaps/oled/keymap.c

* Update keyboards/getta25/keymaps/oled/keymap.c

* Update keyboards/getta25/keymaps/oled/keymap.c
2020-01-20 14:40:33 -08:00
clovervidia 61dbb92679 Invert Num Lock LED state (#7945) 2020-01-20 10:49:15 -08:00
QMK Bot e3d59a72f9 format code according to conventions [skip ci] 2020-01-20 18:48:28 +00:00
Wilba 484a9b12bc Add VIA support for QMK backlight, QMK RGBLight (#7911)
* Add VIA support for QMK backlight, QMK RGBLight

* clang-format changes
2020-01-20 10:18:25 -08:00
Akaash Suresh ce81c4f89b curry layout (#7943) 2020-01-20 11:59:55 -05:00
fauxpark ef8a4e5aaf Remove all references to "CUSTOM_MATRIX" as a diode direction (#7937) 2020-01-19 23:05:51 -08:00
Erovia 1f86e8ae9a Fix attribute heritance for long commands.
This is needed for inheritance to work with commands that have dashes in
their names.
2020-01-19 21:29:36 -08:00
Erovia e7f6e90a22 Fix commandline arg merging, small improvements
Commandline args should be merged with the submodule's config.
Compare config values to None instead of False, so empty lines and False
can be used as values.
2020-01-19 21:29:36 -08:00
Erovia 20290a1cff MILC: Fix/complete attribute heritance
If an undefined attribute of a submodule is accessed, fall back to
same attribute of the submodule's parent.
2020-01-19 21:29:36 -08:00
Spaceman 80d329bb55 [Keyboard] Addition Eagle II keyboard (#7927)
* add EagleII Keyboard

* Update eagleii.c

* Update eagleii.h

* Update keymap.c

* Update eagleii.h

* Update keymap.c

* Update keyboards/handwired/eagleii/config.h

* Update keyboards/handwired/eagleii/config.h

* Update keyboards/handwired/eagleii/rules.mk

* Update config.h

* Update rules.mk

* Update eagleii.h

* Update eagleii.h

* Update keymap.c

* Update info.json

* Update keyboards/handwired/eagleii/rules.mk

* Update keyboards/handwired/eagleii/rules.mk

* Create readme.md

* Update keyboards/handwired/eagleii/readme.md

* Update keyboards/handwired/eagleii/config.h

* Update keyboards/handwired/eagleii/readme.md

* Update keyboards/handwired/eagleii/readme.md
2020-01-19 18:07:30 -08:00
Maarten Dekkers 251a69ea3d [Keyboard] Add mx5160 keyboard (#7142)
* Add mx5160 keyboard

* Make necessary changes for merging

rules.mk cleanup, QMK's built in alias for KC_TRNS and change readme blurb

* Add info.json as well

* Update readme, info.json

* Change layout name, update led function

* Fix info.json

* Update rules.mk
2020-01-19 16:23:03 -08:00
fauxpark 31c0fe69f6 [Docs] Misc cleanups for OLED documentation (#7864) 2020-01-19 14:05:54 -08:00
Joel Challis 65f7bfcc8d Fix unknown key 'IndentPPDirectives' on CI (#7933) 2020-01-19 13:59:57 -08:00
Rossman360 4da241968c [Keyboard] Rebound keyboard add (#7886)
* create Rebound keyboard

* proofread

* update decade

* layer enums

* revert enum layer changes

* line spacing and such

* product ID and punctuation

* terminating terminating slashes

* layer enums

* remove slashes

* rules change, rgb and spacing

* plural layouts rgb rulez
2020-01-19 13:08:09 -08:00
Rossman360 dd2b793c0c [Keyboard] Rebound keyboard add (#7886)
* create Rebound keyboard

* proofread

* update decade

* layer enums

* revert enum layer changes

* line spacing and such

* product ID and punctuation

* terminating terminating slashes

* layer enums

* remove slashes

* rules change, rgb and spacing

* plural layouts rgb rulez
2020-01-19 13:07:34 -08:00
ef33befa06 [Keyboard] Add Tartan keyboard (#7917)
* first commit

* update keymap and key layout

* Update for release

* Update keyboards/tartan/config.h

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/info.json

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/info.json

Co-Authored-By: James Young <[email protected]>

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

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/keymaps/default/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/keymaps/default/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/keymaps/test/keymap.c

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/keymaps/test/keymap.c

Co-Authored-By: James Young <[email protected]>

* Delete tartan/keymaps/test

* Update keyboards/tartan/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/readme.md

Co-Authored-By: James Young <[email protected]>

* Delete tartan/keymaps/default/config.h

* Update keyboards/tartan/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/rules.mk

Co-Authored-By: James Young <[email protected]>

* Update keyboards/tartan/rules.mk

Co-Authored-By: James Young <[email protected]>

* Delete unneccesary settings

* Fix tartan/rules.mk

* Delete unnecessary code from tartan.c

* Rearrange layout order in tartan.h

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <[email protected]>

* Update usb config

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <[email protected]>

* Delete unused defines

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <[email protected]>

Co-authored-by: James Young <[email protected]>
Co-authored-by: fauxpark <[email protected]>
2020-01-19 10:54:04 -08:00
fauxpark 2bddfb986d Remove tmk_core gitignore and gitmodules 2020-01-19 10:52:29 -08:00
Joel Challis 667045b492 Run clang-format manually to fix recently changed files (#7934)
* Run clang-format manually to fix recently changed files

* Run clang-format manually to fix recently changed files - revert template files

* Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
2020-01-19 16:30:34 +00:00
fauxpark f5209aa4e9 Remove custom backlight code for PS2AVRGB boards (#7775)
* Remove custom backlight code for PS2AVRGB boards

* Remove custom driver setting

* BACKLIGHT_BREATHING goes in config.h, not here

* Don't need to include backlight.c again here either

* Turn on backlight for Canoe

* Disable console on a few boards due to oversize
2020-01-18 23:00:32 -08:00
fauxpark eb5d267e63 Enforce definition of DIODE_DIRECTION for non-custom matrix boards (#7915)
* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
2020-01-19 14:11:57 +11:00
James Young eaed517c0b Added keymap for Space65 (#7562)
* Initial commit

* Modified keymap and updated readme.

* fixed numbering in readme

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Made requested changes in PR.

* Rename README.md to readme.md

* swapped media control keys

* updated right alt key to apply shift key for emacs

* updated R_Alt to remove shift

* Updated readme

* add layout 2 and rename existing folder to layout 4

- renamed existing folder with directional layout to layout 4
- udpated existing readme
- Added layout_60_2

* update flash script per pull request review

* Added keymap profile to space65

- This keymap profile is for MacOS with VIM key bindings
- See readme for more information

* Update keyboards/gray_studio/space65/keymaps/billiams/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/gray_studio/space65/keymaps/billiams/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/gray_studio/space65/keymaps/billiams/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/gray_studio/space65/keymaps/billiams/readme.md

Co-Authored-By: James Young <[email protected]>

* Update keyboards/gray_studio/space65/keymaps/billiams/keymap.c

Co-Authored-By: James Young <[email protected]>

* remove unnecessary code from keymap

* updated keys and cleaned up readme

Co-authored-by: James Young <[email protected]>
2020-01-18 17:00:09 -08:00
Joel Challis ba628a28bc Move rgblight and backlight task to common location (#7733) 2020-01-19 00:59:09 +00:00
Rob Haswell a1452db98a Configuration values for starting HSV and speed (#7740)
* Define default HSV and speed for RGB matrix.

* Documentation for configuration values RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT and RGB_MATRIX_STARTUP_VAL.

* Document RGB_MATRIX_STARTUP_SPD.

* Preserve the ordering.
2020-01-18 20:11:33 +00:00
M. de Verteuil 9b9a0f0bcb [Keymap] Added mverteuil keymaps and userspace common code (#7876)
* Added mverteuil content

- Userspace
- Knops keymap
- Preonic keymaps

* Simplified and replaced some magic numbers

* Convert tabs to spaces

* Clean up LED handling, better animation, better layer init

* Use get_highest_layer per @drashna suggestion

* Reorder prototypes/reformat

* Simplified/more expessive and fixed initial layer LED

* Remove changes to git ignored files
2020-01-18 11:24:56 -08:00
Nathan Gray 6b17067b15 [Keyboard] Fix the order of underglow LEDs on ergodash/rev1 (#7791)
On the v1.2 PCB the slave half leds go in reverse order compared to the master half.
With this change, the leds are all in order from left to right, so animations like
Knight Rider look like you'd expect.
2020-01-17 20:26:30 -08:00
fauxpark 055e940f06 [Keyboard] Wasdat matrix cleanup (#7909)
* Wasdat matrix cleanup

* Use _custom functions

* More deduping, and signature fix
2020-01-17 20:01:17 -08:00
3dd43d9cab [Keyboard] Support for a Southpaw Keyboard KVT (#7892)
* Support for KVT

This branch adds support for the southpaw keyboard KVT

* Updated readme.md and keymap.c

* Update readme.md

* Update keyboards/kv/revT/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/rules.mk

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/kv/revT/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Updated from suggestions from pull request

* Update readme.md

* Update rules.mk

* Update rules.mk

* Update rules.mk

* Update rules.mk

* Update rules.mk

* Update revT.c

* Update readme.md

* changing T to lowercase

* Change revT to revt

* edit

* Update keyboards/kv/revt/rules.mk

Co-Authored-By: James Young <[email protected]>

* Update readme.md

Co-authored-by: fauxpark <[email protected]>
Co-authored-by: James Young <[email protected]>
2020-01-17 19:56:13 -08:00
Joel Challisandfauxpark 6e710426a4 Add docs for 'CUSTOM_MATRIX = lite' (#7906)
* Add some docs to cover 'CUSTOM_MATRIX = lite'

* Apply suggestions from code review

Co-Authored-By: fauxpark <[email protected]>

* Add 'SRC += matrix.c' docs

* Update docs/custom_matrix.md

Co-Authored-By: fauxpark <[email protected]>

Co-authored-by: fauxpark <[email protected]>
2020-01-18 12:56:33 +11:00
Jeremy Bernhardt d11238f748 switching to you know whats up mode (#7921) 2020-01-17 16:15:58 -05:00
ridingqwertyandGeorgeKoenig 95c24bbaf8 Implement and document TAPPING_FORCE_HOLD_PER_KEY (#7859)
* Implement and document TAPPING_FORCE_HOLD_PER_KEY

* Added "record" parameter to "get_tapping_force_hold"

* Correct typo -- remove 'IGNORE_' from 'IGNORE_TAPPING_FORCE_HOLD_PER_KEY'

Co-authored-by: GeorgeKoenig <[email protected]>
2020-01-17 15:49:23 -05:00
Drashna Jaelre 1b0854fdca Cleanup check for PERMISSIVE_HOLD (#7861)
* Fix bug in PERMISSIVE_HOLD check

caused by #5009 (aka, me)

* Remove check for per key
2020-01-17 15:33:08 -05:00
Callum Oakley 1fcd0b2578 move caps because it can be triggered accidentally by sequences such as '("' (#7923)
Thanks!
2020-01-17 10:59:07 -05:00
Ben 619ee543b8 [Keyboard] Add Plaid-Pad 4x4 numpad (#7900)
* Add Plaid-Pad code

* Move ENCODER_ENABLE under Build Options

* Update keyboards/keycapsss/plaid_pad/info.json

* Update keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c

* Update keyboards/keycapsss/plaid_pad/plaid_pad.h

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/readme.md

* Update keyboards/keycapsss/plaid_pad/readme.md

* Update keyboards/keycapsss/plaid_pad/readme.md

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/config.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/rules.mk

* Update keyboards/keycapsss/plaid_pad/config.h

* Update keyboards/keycapsss/plaid_pad/config.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/usbconfig.h

* Update keyboards/keycapsss/plaid_pad/config.h
2020-01-17 00:30:32 -08:00
Josh Hinnebusch b6d8840915 [Keyboard] add VIA support for hiney PCBs (#7910)
* add VIA support for hiney PCBs

* update LED per request

* update LED text per request

* remove extra stuff
2020-01-16 23:15:08 -08:00
Xyverz d6e6feb377 Further changes to HHKB keymap (#7918)
* Changes to HHKB Keymap for useability

* Changes to HHKB Keymap for useability

* Added KC_GRV to _FL.
2020-01-17 09:34:25 +11:00
Rys Sommefeldt 919d69266e [Keyboard] Graystudio Space65 ISO UK layout and keymap (#7912)
* ISO UK layout for Graystudio Space65

* Quick line on how to build it in the readme

* Update ASCII art layout guide to match reality

* Whoops, space is actually K47, not K46

* Rename to 65_iso_blocker and remove uk designation
2020-01-16 10:06:42 -08:00
fauxpark 1e670f5e67 Remove KEYMAP_SECTION_ENABLE (#7882) 2020-01-17 00:32:09 +11:00
Maarten Dekkers bf397fdd9f [Keyboard] Add Eon40 keyboard (#7885)
* Add Eon40 files

* Make required changes

* Add missing comma

* Update rules.mk
2020-01-15 15:53:09 -08:00
James Young 5153580698 [Keyboard] Xbows Knight: Configurator layout polishing (#7903) 2020-01-15 09:38:17 -08:00
3a69232213 [Keymap] Massdrop ctrl keymap (#7639)
* RGB config overhaul

Changing RGB config from setrgb to sethsv, trying out different color values.

* Merged changes

* Various changes and a couple additions

Added Git Layer with git macros for most operations and LED config to show the macro keys on layer. Activated with FN+3.
Added VIM Layer, this is a normal keycode layer with no macros for now but it has LED config that highlights the navigation and edit keys in VIM.
Added a sticky CTRL and sticky SHIFT layers. I have no idea why I did this actually, it's mildly useful but oneshot and tapdance would be better, will be removed in later commit.
Changed the LED config from setrgb to sethsv and the key by key LED config to array.
Some code improvements in process_record_user.
Better way to manage string macros using char array. Inspired by drashna's secret macros.

* Various keymap changes and added documentation

Updated massdrop/ctrl endgame keymap:
    Added layers for git and vim.
    Better LED config method, using ledmap, similar to what's used in many other keymaps.
    Improved process_record_user() mainly with reduced conditionals.
    Cleaned things up in the header and config.
    Added pretty much all qmk feature headers to rules and config, commented out to be enabled if desired. Firmware size should be considered.
    Not many features added in this commit. Shifting for a while to work on implementing raw hid for the keyboard and expanding qmk terminal.

Added documentation.md for massdrop/ctrl at keyboard level to house all related information for future use.
Added documentation for raw hid in docs, added the doc to feature index. Need some review for this documentation and suggested additions/changes.

* Some fixes

Fixed keymap documentation to include changes.
Removed useless double tap keys and simplified layer maps.

* Fixed error in keymap

* Removed documentation changes. Will present in another PR

* Update keyboards/massdrop/ctrl/DOCUMENTATION.md

Co-Authored-By: fauxpark <[email protected]>

* Update DOCUMENTATION.md

* Update keymap.c

fixed mouse layout incomplete arrow cluster

* Update keyboards/massdrop/ctrl/keymaps/endgame/keymap.c

Fixed Git layer led config

Co-Authored-By: totolouis <[email protected]>

* Update DOCUMENTATION.md

Remove raw hid details

* Update rules.mk

Remove useless stuff

* fixed malformed led map causing compile fail, indentation fixes

* Update keyboards/massdrop/ctrl/keymaps/endgame/config.h

switch from TG_NKRO to NK_TOGG

Co-Authored-By: fauxpark <[email protected]>

* Update keymap.c

Switching from TG_NKRO to NK_TOGG

* Added yakuake layout

* Update keyboards/massdrop/ctrl/keymaps/endgame/keymap.c

Change biton32(layer_state) to get_highest_layer()

Co-Authored-By: fauxpark <[email protected]>

* Update keymap.c

Change from biton32 to get_highest_layer

* Fixed custom LED not toggling off

Co-authored-by: fauxpark <[email protected]>
Co-authored-by: totolouis <[email protected]>
2020-01-14 21:34:41 -08:00
Xyverz 2a6cb426ef Hhkb keymap (#7907)
* Initial commit of HHKB layout.

* Moved keymap to the correct location.

This keymap is for a hasu alt controller-equipped HHKB, so the keymap was in the wrong place.
Added comments to the keymap.
2020-01-15 16:01:58 +11:00
Joel Challis 2081c5e40e Fix CUSTOM_MATRIX lite matrix_scan return code (#7908) 2020-01-15 15:51:43 +11:00
Joel Challis 48cac9e3c8 Migrate more custom matrix 'lite' code to core (#7863)
* Migrate more custom matrix lite code to core

* Align function names

* fix up MATRIX_MASKED
2020-01-15 01:58:32 +00:00
James Young 537b8713e5 XD68 Configurator Layout Support and Minor Refactor (#7904)
* XD68: QMK Configurator layout support

* elevate backlight breathing settings to keyboard level

* remove empty keymap config.h files

* rules.mk templating

* keymap polishing

- four-space indent
- keycode alignment
2020-01-15 01:31:17 +00:00
William Chang dff4f13c19 updated keys and cleaned up readme 2020-01-01 22:31:00 -08:00
William Chang 051faf4b64 Merge branch 'feature/billiams_space65' of github.com:billiams/qmk_firmware into feature/billiams_space65 2019-12-08 10:41:53 -08:00
William Chang 2d94e02ea1 remove unnecessary code from keymap 2019-12-08 10:39:26 -08:00
William ChangandJames Young 013ac11c95 Update keyboards/gray_studio/space65/keymaps/billiams/keymap.c
Co-Authored-By: James Young <[email protected]>
2019-12-08 10:34:24 -08:00
William ChangandJames Young dc2ed13a1c Update keyboards/gray_studio/space65/keymaps/billiams/readme.md
Co-Authored-By: James Young <[email protected]>
2019-12-08 10:33:06 -08:00
William ChangandJames Young 6e463c8084 Update keyboards/gray_studio/space65/keymaps/billiams/readme.md
Co-Authored-By: James Young <[email protected]>
2019-12-08 10:32:55 -08:00
William ChangandJames Young 3cd7cb81d4 Update keyboards/gray_studio/space65/keymaps/billiams/readme.md
Co-Authored-By: James Young <[email protected]>
2019-12-08 10:32:38 -08:00
William ChangandJames Young d5e0f21798 Update keyboards/gray_studio/space65/keymaps/billiams/readme.md
Co-Authored-By: James Young <[email protected]>
2019-12-08 10:31:33 -08:00
William Chang 1290039d7e Added keymap profile to space65
- This keymap profile is for MacOS with VIM key bindings
- See readme for more information
2019-12-07 12:50:41 -08:00
William Chang e7541faadc update flash script per pull request review 2019-12-06 17:05:36 -08:00
William Chang 6bcaf01c3f add layout 2 and rename existing folder to layout 4
- renamed existing folder with directional layout to layout 4
- udpated existing readme
- Added layout_60_2
2019-11-20 23:03:47 -08:00
William Chang e7f4d56592 Merge remote-tracking branch 'upstream/master' 2019-11-20 22:17:07 -08:00
William Chang 71493b2f9b Merge branch 'master' of https://github.com/qmk/qmk_firmware 2019-07-13 10:18:33 -07:00
William Chang 86ad4988fe Merge branch 'master' of https://github.com/billiams/qmk_firmware 2019-05-10 16:45:29 -07:00
William Chang 10975bd4c0 fixed conflict in readme 2019-05-10 16:44:13 -07:00
William Chang 8d8f2d09cc Merge pull request #2 from billiams/feature/billiams
Updated readme
2019-05-09 21:18:39 -07:00
William Chang 9ce186860e Merge branch 'qmk-master' 2019-05-09 21:16:15 -07:00
William Chang 4b2d3288d0 resolved conflicts 2019-05-09 21:16:06 -07:00
William Chang 7b0200660e Updated readme 2019-05-09 20:59:11 -07:00
William Chang 57a6ea11df updated R_Alt to remove shift 2019-04-25 10:38:18 -07:00
William Chang 89e8e0d277 updated right alt key to apply shift key for emacs 2019-04-25 10:27:04 -07:00
William Chang d7c5cf6e5b Merge branch 'master' of https://github.com/billiams/qmk_firmware 2019-04-22 14:56:41 -07:00
William Chang a41e6804fc swapped media control keys 2019-04-22 14:56:30 -07:00
William Chang da1dc28d31 Rename README.md to readme.md 2019-04-20 17:06:32 -07:00
William Chang b42ca9bc5f Merge branch 'master' of https://github.com/billiams/qmk_firmware 2019-04-20 17:03:57 -07:00
William Chang 42cb78f98e Made requested changes in PR. 2019-04-20 17:01:18 -07:00
William Chang dc3a8ddb6b Update README.md 2019-04-20 13:59:07 -07:00
William Chang 472060d333 Update README.md 2019-04-20 13:11:16 -07:00
William Chang 5b80e10b82 Update README.md 2019-04-20 13:07:59 -07:00
William Chang 7f8b0906c6 Update README.md 2019-04-20 13:06:40 -07:00
William Chang fa73d43818 Update README.md 2019-04-20 13:05:34 -07:00
William Chang 5a86db2259 Update README.md 2019-04-20 13:04:48 -07:00
William Chang a5337b3495 fixed numbering in readme 2019-04-20 12:43:05 -07:00
William Chang cd379c69a0 Modified keymap and updated readme. 2019-04-20 12:41:28 -07:00
William Chang 156fd4e969 Initial commit 2019-04-20 12:09:47 -07:00
595 changed files with 14186 additions and 7395 deletions

No files matched your search

+12 -7
View File
@@ -12,6 +12,18 @@ env:
- MAKEFLAGS="-j3 --output-sync" - MAKEFLAGS="-j3 --output-sync"
services: services:
- docker - docker
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
packages:
- pandoc
- diffutils
- dos2unix
- doxygen
- clang-format-7
- libstdc++-7-dev
install: install:
- npm install -g moxygen - npm install -g moxygen
script: script:
@@ -20,13 +32,6 @@ script:
- bash util/travis_test.sh - bash util/travis_test.sh
- bash util/travis_build.sh - bash util/travis_build.sh
- bash util/travis_docs.sh - bash util/travis_docs.sh
addons:
apt:
packages:
- pandoc
- diffutils
- dos2unix
- doxygen
after_script: after_script:
bash util/travis_compiled_push.sh bash util/travis_compiled_push.sh
notifications: notifications:
+60 -3
View File
@@ -61,7 +61,7 @@ endif
ifeq ($(strip $(STENO_ENABLE)), yes) ifeq ($(strip $(STENO_ENABLE)), yes)
OPT_DEFS += -DSTENO_ENABLE OPT_DEFS += -DSTENO_ENABLE
VIRTSER_ENABLE := yes VIRTSER_ENABLE ?= yes
SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
endif endif
@@ -102,6 +102,57 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
endif endif
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
else
OPT_DEFS += -DEEPROM_ENABLE
ifeq ($(strip $(EEPROM_DRIVER)), custom)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
COMMON_VPATH += $(DRIVER_PATH)/eeprom
QUANTUM_LIB_SRC += i2c_master.c
SRC += eeprom_driver.c eeprom_i2c.c
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c eeprom_transient.c
else ifeq ($(strip $(EEPROM_DRIVER)), vendor)
OPT_DEFS += -DEEPROM_VENDOR
ifeq ($(PLATFORM),AVR)
# Automatically provided by avr-libc, nothing required
else ifeq ($(PLATFORM),CHIBIOS)
ifeq ($(MCU_SERIES), STM32F3xx)
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F303xC
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifeq ($(MCU_SERIES), STM32F1xx)
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F103xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB)
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else
# This will effectively work the same as "transient" if not supported by the chip
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
endif
else ifeq ($(PLATFORM),ARM_ATSAM)
SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
else ifeq ($(PLATFORM),TEST)
SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
endif
endif
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE OPT_DEFS += -DRGBLIGHT_ENABLE
@@ -418,9 +469,15 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \ QUANTUM_LIB_SRC += i2c_master.c \
i2c_master.c \
i2c_slave.c i2c_slave.c
SERIAL_DRIVER ?= bitbang
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
QUANTUM_LIB_SRC += serial.c
else
QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
endif
endif endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif endif
+2
View File
@@ -104,7 +104,9 @@
* [ADC Driver](adc_driver.md) * [ADC Driver](adc_driver.md)
* [I2C Driver](i2c_driver.md) * [I2C Driver](i2c_driver.md)
* [WS2812 Driver](ws2812_driver.md) * [WS2812 Driver](ws2812_driver.md)
* [EEPROM Driver](eeprom_driver.md)
* [GPIO Controls](internals_gpio_control.md) * [GPIO Controls](internals_gpio_control.md)
* [Custom Matrix](custom_matrix.md)
* [Proton C Conversion](proton_c_conversion.md) * [Proton C Conversion](proton_c_conversion.md)
* For a Deeper Understanding * For a Deeper Understanding
+16 -2
View File
@@ -141,14 +141,28 @@ qmk docs [-p PORT]
## `qmk doctor` ## `qmk doctor`
This command examines your environment and alerts you to potential build or flash problems. This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
**Usage**: **Usage**:
``` ```
qmk doctor qmk doctor [-y] [-n]
``` ```
**Examples**:
Check your environment for problems and prompt to fix them:
qmk doctor
Check your environment and automatically fix any problems found:
qmk doctor -y
Check your environment and report problems only:
qmk doctor -n
## `qmk json-keymap` ## `qmk json-keymap`
Creates a keymap.c from a QMK Configurator export. Creates a keymap.c from a QMK Configurator export.
+2
View File
@@ -149,6 +149,8 @@ If you define these options you will enable the associated feature, which may in
* makes it possible to use a dual role key as modifier shortly after having been tapped * makes it possible to use a dual role key as modifier shortly after having been tapped
* See [Hold after tap](feature_advanced_keycodes.md#tapping-force-hold) * See [Hold after tap](feature_advanced_keycodes.md#tapping-force-hold)
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle) * Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
* `#define TAPPING_FORCE_HOLD_PER_KEY`
* enables handling for per key `TAPPING_FORCE_HOLD` settings
* `#define LEADER_TIMEOUT 300` * `#define LEADER_TIMEOUT 300`
* how long before the leader key times out * how long before the leader key times out
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
+108
View File
@@ -0,0 +1,108 @@
# Custom Matrix
QMK provides a mechanism to supplement or replace the default matrix scanning routine with your own code.
The reasons to use this feature include:
* Extra hardware between the keyboard's switches and MCU pins
* I/O multiplexer
* Line decoder
* Irregular switch matrix
* Simultaneous use of `COL2ROW` and `ROW2COL`
## Prerequisites
Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`.
Add a new file to your keyboard directory:
```text
keyboards/<keyboard>/matrix.c
```
And to configure compilation for the new file, add this to your `rules.mk`:
```make
SRC += matrix.c
```
## 'lite'
Provides a default implementation for various scanning functions, reducing the boilerplate code when implementing custom matrix.
To configure it, add this to your `rules.mk`:
```make
CUSTOM_MATRIX = lite
```
And implement the following functions in a `matrix.c` file in your keyboard folder:
```c
void matrix_init_custom(void) {
// TODO: initialize hardware here
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
bool matrix_has_changed = false;
// TODO: add matrix scanning routine here
return matrix_has_changed;
}
```
## Full Replacement
When more control over the scanning routine is required, you can choose to implement the full scanning routine.
To configure it, add this to your rules.mk:
```make
CUSTOM_MATRIX = yes
```
And implement the following functions in a `matrix.c` file in your keyboard folder:
```c
matrix_row_t matrix_get_row(uint8_t row) {
// TODO: return the requested row data
}
void matrix_print(void) {
// TODO: use print() to dump the current matrix state to console
}
void matrix_init(void) {
// TODO: initialize hardware and global matrix state here
// Unless hardware debouncing - Init the configured debounce routine
debounce_init(MATRIX_ROWS);
// This *must* be called for correct keyboard behavior
matrix_init_quantum();
}
uint8_t matrix_scan(void) {
bool matrix_has_changed = false;
// TODO: add matrix scanning routine here
// Unless hardware debouncing - use the configured debounce routine
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
// This *must* be called for correct keyboard behavior
matrix_scan_quantum();
return matrix_has_changed;
}
```
And also provide defaults for the following callbacks:
```c
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
__attribute__((weak)) void matrix_init_user(void) {}
__attribute__((weak)) void matrix_scan_user(void) {}
```
+50
View File
@@ -0,0 +1,50 @@
# EEPROM Driver Configuration
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
Driver | Description
--------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`EEPROM_DRIVER = vendor` | 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. 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 = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
## Vendor Driver Configuration
No configurable options are available.
## I2C 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:
`config.h` override | Description | Default Value
------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------
`#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS` | Base I2C address for the EEPROM -- shifted left by 1 as per i2c_master requirements | 0b10100000
`#define EXTERNAL_EEPROM_I2C_ADDRESS(addr)` | Calculated I2C address for the EEPROM | `(EXTERNAL_EEPROM_I2C_BASE_ADDRESS)`
`#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
`#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`.
Alternatively, there are pre-defined hardware configurations for available chips/modules:
Module | Equivalent `#define` | Source
-----------------|---------------------------------|------------------------------------------
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
?> 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
The only configurable item for the transient EEPROM driver is its size:
`config.h` override | Description | Default Value
------------------------------- | ----------------------------------------- | -------------
`#define TRANSIENT_EEPROM_SIZE` | Total size of the EEPROM storage in bytes | 64
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_transient.h`.
+38
View File
@@ -291,6 +291,25 @@ Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` ena
?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. ?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
For more granular control of this feature, you can add the following to your `config.h`:
```c
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
```
You can then add the following function to your keymap:
```c
bool get_ignore_mod_tap_interrupt(uint16_t keycode) {
switch (keycode) {
case SFT_T(KC_SPC):
return true;
default:
return false;
}
}
```
## Tapping Force Hold ## Tapping Force Hold
To enable `tapping force hold`, add the following to your `config.h`: To enable `tapping force hold`, add the following to your `config.h`:
@@ -315,6 +334,25 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle). !> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
For more granular control of this feature, you can add the following to your `config.h`:
```c
#define TAPPING_FORCE_HOLD_PER_KEY
```
You can then add the following function to your keymap:
```c
bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case LT(1, KC_BSPC):
return true;
default:
return false;
}
}
```
## Retro Tapping ## Retro Tapping
To enable `retro tapping`, add the following to your `config.h`: To enable `retro tapping`, add the following to your `config.h`:
+112 -109
View File
@@ -1,139 +1,142 @@
# OLED Driver # OLED Driver
## OLED Supported Hardware ## Supported Hardware
OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C. OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
Tested combinations: Tested combinations:
| IC driver | Size | Keyboard Platform | Notes | |IC |Size |Platform|Notes |
|-----------|--------|-------------------|--------------------------| |---------|------|--------|------------------------|
| SSD1306 | 128x32 | AVR | Primary support | |SSD1306 |128x32|AVR |Primary support |
| SSD1306 | 128x64 | AVR | Verified working | |SSD1306 |128x64|AVR |Verified working |
| SSD1306 | 128x32 | ARM | | |SSD1306 |128x32|Arm | |
| SH1106 | 128x64 | AVR | No rotation or scrolling | |SH1106 |128x64|AVR |No rotation or scrolling|
Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested. Hardware configurations using Arm-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards. !> Warning: This OLED driver currently uses the new i2c_master driver from Split Common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest Split Common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses Split Common to detect keypresses, so you will need to implement custom timeout logic for non-Split Common keyboards.
## Usage ## Usage
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.: To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
``` ```make
OLED_DRIVER_ENABLE = yes OLED_DRIVER_ENABLE = yes
``` ```
This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g: Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```C++ ```c
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE
void oled_task_user(void) { void oled_task_user(void) {
// Host Keyboard Layer Status // Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case _FN:
oled_write_P(PSTR("FN\n"), false);
break;
case _ADJ:
oled_write_P(PSTR("ADJ\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard LED Status switch (get_highest_layer(layer_state)) {
uint8_t led_usb_state = host_keyboard_leds(); case _QWERTY:
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(PSTR("Default\n"), false);
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); break;
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); case _FN:
oled_write_P(PSTR("FN\n"), false);
break;
case _ADJ:
oled_write_P(PSTR("ADJ\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
} }
#endif #endif
``` ```
## Logo Example ## Logo Example
In the default font, ranges in the font file are reserved for a QMK Logo. To Render this logo to the oled screen, use the following code example: In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the OLED screen, use the following code example:
```C++ ```c
static void render_logo(void) { static void render_logo(void) {
static const char PROGMEM qmk_logo[] = { static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
};
oled_write_P(qmk_logo, false); oled_write_P(qmk_logo, false);
} }
``` ```
## Other Examples ## Other Examples
In split keyboards, it is very common to have two OLED displays that each render different content and oriented flipped differently. You can do this by switching which content to render by using the return from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g: In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
```C++ ```c
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master()) if (!is_keyboard_master()) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand return OLED_ROTATION_180; // flips the display 180 degrees if offhand
return rotation; }
return rotation;
} }
void oled_task_user(void) { void oled_task_user(void) {
if (is_keyboard_master()) { if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else { } else {
render_logo(); // Renders a statuc logo render_logo(); // Renders a static logo
oled_scroll_left(); // Turns on scrolling oled_scroll_left(); // Turns on scrolling
} }
} }
#endif #endif
``` ```
## Basic Configuration
## Basic Configuration |Define |Default |Description |
|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------|
| Define | Default | Description | |`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------| |`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display | |`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts | |`OLED_FONT_END` |`224` |The ending characer index for custom fonts |
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts | |`OLED_FONT_WIDTH` |`6` |The font width |
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts | |`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
| `OLED_FONT_WIDTH` | `6` | The font width | |`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) | |`OLED_SCROLL_TIMEOUT` |`0` |Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | |`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. |
| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. | |`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. | |`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC.|
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
## 128x64 & Custom sized OLED Displays ## 128x64 & Custom sized OLED Displays
The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind. We have added a define, `OLED_DISPLAY_128X64`, to switch all the values to be used in a 128x64 display, as well as added a custom define, `OLED_DISPLAY_CUSTOM`, that allows you to provide the necessary values to the driver. The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind. We have added a define, `OLED_DISPLAY_128X64`, to switch all the values to be used in a 128x64 display, as well as added a custom define, `OLED_DISPLAY_CUSTOM`, that allows you to provide the necessary values to the driver.
|Define |Default |Description | |Define |Default |Description |
|-----------------------|---------------|-----------------------------------------------------------------| |---------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------|
|`OLED_DISPLAY_128X64` |*Not defined* |Changes the display defines for use with 128x64 displays. | |`OLED_DISPLAY_128X64`|*Not defined* |Changes the display defines for use with 128x64 displays. |
|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. | |`OLED_DISPLAY_CUSTOM`|*Not defined* |Changes the display defines for use with custom displays.<br>Requires user to implement the below defines. |
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. | |`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. | |`OLED_DISPLAY_HEIGHT`|`32` |The height of the OLED display. |
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. | |`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. | |`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`. | |`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. | |`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br />Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. | |`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br>Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`.|
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. | |`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. | |`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
### 90 Degree Rotation - Technical Mumbo Jumbo ### 90 Degree Rotation - Technical Mumbo Jumbo
!> Rotation is unsupported on the SH1106. !> Rotation is unsupported on the SH1106.
```C ```c
// OLED Rotation enum values are flags // OLED Rotation enum values are flags
typedef enum { typedef enum {
OLED_ROTATION_0 = 0, OLED_ROTATION_0 = 0,
@@ -143,9 +146,9 @@ typedef enum {
} oled_rotation_t; } oled_rotation_t;
``` ```
OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms. OLED displays driven by SSD1306 drivers only natively support in hardware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an ATmega32U4 board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g: 90 degree rotation is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the display height, width, and block size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
| | | | | | | | | | | | | |
|---|---|---|---|---|---| |---|---|---|---|---|---|
@@ -167,8 +170,8 @@ So those precalculated arrays just index the memory offsets in the order in whic
## OLED API ## OLED API
```C++ ```c
// OLED Rotation enum values are flags // OLED rotation enum values are flags
typedef enum { typedef enum {
OLED_ROTATION_0 = 0, OLED_ROTATION_0 = 0,
OLED_ROTATION_90 = 1, OLED_ROTATION_90 = 1,
@@ -272,26 +275,26 @@ uint8_t oled_max_lines(void);
!> Scrolling and rotation are unsupported on the SH1106. !> Scrolling and rotation are unsupported on the SH1106.
## SSD1306.h driver conversion guide ## SSD1306.h Driver Conversion Guide
|Old API |Recommended New API | |Old API |Recommended New API |
|---------------------------|-----------------------------------| |-------------------------|---------------------------------|
|`struct CharacterMatrix` |*removed - delete all references* | |`struct CharacterMatrix` |*removed - delete all references*|
|`iota_gfx_init` |`oled_init` | |`iota_gfx_init` |`oled_init` |
|`iota_gfx_on` |`oled_on` | |`iota_gfx_on` |`oled_on` |
|`iota_gfx_off` |`oled_off` | |`iota_gfx_off` |`oled_off` |
|`iota_gfx_flush` |`oled_render` | |`iota_gfx_flush` |`oled_render` |
|`iota_gfx_write_char` |`oled_write_char` | |`iota_gfx_write_char` |`oled_write_char` |
|`iota_gfx_write` |`oled_write` | |`iota_gfx_write` |`oled_write` |
|`iota_gfx_write_P` |`oled_write_P` | |`iota_gfx_write_P` |`oled_write_P` |
|`iota_gfx_clear_screen` |`oled_clear` | |`iota_gfx_clear_screen` |`oled_clear` |
|`matrix_clear` |*removed - delete all references* | |`matrix_clear` |*removed - delete all references*|
|`matrix_write_char_inner` |`oled_write_char` | |`matrix_write_char_inner`|`oled_write_char` |
|`matrix_write_char` |`oled_write_char` | |`matrix_write_char` |`oled_write_char` |
|`matrix_write` |`oled_write` | |`matrix_write` |`oled_write` |
|`matrix_write_ln` |`oled_write_ln` | |`matrix_write_ln` |`oled_write_ln` |
|`matrix_write_P` |`oled_write_P` | |`matrix_write_P` |`oled_write_P` |
|`matrix_write_ln_P` |`oled_write_ln_P` | |`matrix_write_ln_P` |`oled_write_ln_P` |
|`matrix_render` |`oled_render` | |`matrix_render` |`oled_render` |
|`iota_gfx_task` |`oled_task` | |`iota_gfx_task` |`oled_task` |
|`iota_gfx_task_user` |`oled_task_user` | |`iota_gfx_task_user` |`oled_task_user` |
+4
View File
@@ -380,6 +380,10 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set
#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
``` ```
## EEPROM storage ## EEPROM storage
+1 -1
View File
@@ -135,7 +135,7 @@ As there is no standard split communication driver for ARM-based split keyboards
`CUSTOM_MATRIX` `CUSTOM_MATRIX`
Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan(). Lets you replace the default matrix scanning routine with your own code. For further details, see the [Custom Matrix page](custom_matrix.md).
`DEBOUNCE_TYPE` `DEBOUNCE_TYPE`
+4
View File
@@ -33,3 +33,7 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in
## IS31FL3733 ## IS31FL3733
Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
## 24xx series external I2C EEPROM
Support for an external I2C-based EEPROM instead of using the on-chip EEPROM. For more information on how to setup the driver see the [EEPROM Driver](eeprom_driver.md) page.
File renamed without changes.
File renamed without changes.
+46
View File
@@ -0,0 +1,46 @@
/* Copyright 2019 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>
#include "eeprom_driver.h"
void eeprom_driver_init(void) {
/* Any initialisation code */
}
void eeprom_driver_erase(void) {
/* Wipe out the EEPROM, setting values to zero */
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
/*
Read a block of data:
buf: target buffer
addr: 0-based offset within the EEPROM
len: length to read
*/
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
/*
Write a block of data:
buf: target buffer
addr: 0-based offset within the EEPROM
len: length to write
*/
}
+73
View File
@@ -0,0 +1,73 @@
/* Copyright 2019 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>
#include "eeprom_driver.h"
uint8_t eeprom_read_byte(const uint8_t *addr) {
uint8_t ret;
eeprom_read_block(&ret, addr, 1);
return ret;
}
uint16_t eeprom_read_word(const uint16_t *addr) {
uint16_t ret;
eeprom_read_block(&ret, addr, 2);
return ret;
}
uint32_t eeprom_read_dword(const uint32_t *addr) {
uint32_t ret;
eeprom_read_block(&ret, addr, 4);
return ret;
}
void eeprom_write_byte(uint8_t *addr, uint8_t value) { eeprom_write_block(&value, addr, 1); }
void eeprom_write_word(uint16_t *addr, uint16_t value) { eeprom_write_block(&value, addr, 2); }
void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_block(&value, addr, 4); }
void eeprom_update_block(const void *buf, void *addr, size_t len) {
uint8_t read_buf[len];
eeprom_read_block(read_buf, addr, len);
if (memcmp(buf, read_buf, len) != 0) {
eeprom_write_block(buf, addr, len);
}
}
void eeprom_update_byte(uint8_t *addr, uint8_t value) {
uint8_t orig = eeprom_read_byte(addr);
if (orig != value) {
eeprom_write_byte(addr, value);
}
}
void eeprom_update_word(uint16_t *addr, uint16_t value) {
uint16_t orig = eeprom_read_word(addr);
if (orig != value) {
eeprom_write_word(addr, value);
}
}
void eeprom_update_dword(uint32_t *addr, uint32_t value) {
uint32_t orig = eeprom_read_dword(addr);
if (orig != value) {
eeprom_write_dword(addr, value);
}
}
+22
View File
@@ -0,0 +1,22 @@
/* Copyright 2019 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
#include "eeprom.h"
void eeprom_driver_init(void);
void eeprom_driver_erase(void);
+120
View File
@@ -0,0 +1,120 @@
/* Copyright 2019 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 i2c 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 "i2c_master.h"
#include "eeprom.h"
#include "eeprom_i2c.h"
// #define DEBUG_EEPROM_OUTPUT
#ifdef DEBUG_EEPROM_OUTPUT
# include "print.h"
#endif // DEBUG_EEPROM_OUTPUT
static inline void init_i2c_if_required(void) {
static int done = 0;
if (!done) {
i2c_init();
done = 1;
}
}
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
intptr_t p = (intptr_t)addr;
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF;
p >>= 8;
}
}
void eeprom_driver_init(void) {}
void eeprom_driver_erase(void) {
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);
}
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE];
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);
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM R] 0x%04X: ", ((int)addr));
for (size_t i = 0; i < len; ++i) {
dprintf(" %02X", (int)(((uint8_t *)buf)[i]));
}
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
}
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;
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;
if (write_length > len) {
write_length = len;
}
fill_target_address(complete_packet, (const void *)target_addr);
for (uint8_t i = 0; i < write_length; i++) {
complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + i] = read_buf[i];
}
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM W] 0x%04X: ", ((int)target_addr));
for (uint8_t i = 0; i < write_length; i++) {
dprintf(" %02X", (int)(read_buf[i]));
}
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
wait_ms(EXTERNAL_EEPROM_WRITE_TIME);
read_buf += write_length;
target_addr += write_length;
len -= write_length;
}
}
+115
View File
@@ -0,0 +1,115 @@
/* Copyright 2019 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
/*
Default device configurations:
For the Sparkfun Qwiic I2C EEPROM module: https://www.sparkfun.com/products/14764
#define EEPROM_I2C_CAT24C512 // (part number 24512A)
#define EEPROM_I2C_RM24C512C // (part number 24512C)
For the Sparkfun I2C EEPROM chip: https://www.sparkfun.com/products/525
#define EEPROM_I2C_24LC256
For the Adafruit I2C FRAM chip: https://www.adafruit.com/product/1895
#define EEPROM_I2C_MB85RC256V
*/
#if defined(EEPROM_I2C_CAT24C512)
# define EXTERNAL_EEPROM_BYTE_COUNT 65536
# define EXTERNAL_EEPROM_PAGE_SIZE 128
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 5
#elif defined(EEPROM_I2C_RM24C512C)
# define EXTERNAL_EEPROM_BYTE_COUNT 65536
# define EXTERNAL_EEPROM_PAGE_SIZE 128
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 3
#elif defined(EEPROM_I2C_24LC256)
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
# define EXTERNAL_EEPROM_PAGE_SIZE 64
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 5
#elif defined(EEPROM_I2C_24LC128)
# define EXTERNAL_EEPROM_BYTE_COUNT 16384
# define EXTERNAL_EEPROM_PAGE_SIZE 64
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 5
#elif defined(EEPROM_I2C_MB85RC256V)
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
# define EXTERNAL_EEPROM_PAGE_SIZE 128
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 0
#endif
/*
The base I2C address of the EEPROM.
This needs to be shifted up by 1, to match i2c_master requirements.
*/
#ifndef EXTERNAL_EEPROM_I2C_BASE_ADDRESS
# define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000
#endif
/*
The calculated I2C address based on the input memory location.
For EEPROM chips that embed part of the memory location in the I2C address
such as AT24M02 you can use something similar to the following (ensuring the
result is shifted by left by 1):
#define EXTERNAL_EEPROM_I2C_ADDRESS(loc) \
(EXTERNAL_EEPROM_I2C_BASE_ADDRESS | ((((loc) >> 16) & 0x07) << 1))
*/
#ifndef EXTERNAL_EEPROM_I2C_ADDRESS
# define EXTERNAL_EEPROM_I2C_ADDRESS(loc) (EXTERNAL_EEPROM_I2C_BASE_ADDRESS)
#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 2 with the modified variant of
EXTERNAL_EEPROM_I2C_ADDRESS above.
As expected, consult the datasheet for specifics of your EEPROM.
*/
#ifndef EXTERNAL_EEPROM_ADDRESS_SIZE
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
#endif
/*
The write cycle time of the EEPROM in milliseconds, as specified in the
datasheet.
*/
#ifndef EXTERNAL_EEPROM_WRITE_TIME
# define EXTERNAL_EEPROM_WRITE_TIME 5
#endif
+52
View File
@@ -0,0 +1,52 @@
/* Copyright 2019 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>
#include "eeprom_driver.h"
#include "eeprom_transient.h"
__attribute__((aligned(4))) static uint8_t transientBuffer[TRANSIENT_EEPROM_SIZE] = {0};
size_t clamp_length(intptr_t offset, size_t len) {
if (offset + len > TRANSIENT_EEPROM_SIZE) {
len = TRANSIENT_EEPROM_SIZE - offset;
}
return len;
}
void eeprom_driver_init(void) { eeprom_driver_erase(); }
void eeprom_driver_erase(void) { memset(transientBuffer, 0x00, TRANSIENT_EEPROM_SIZE); }
void eeprom_read_block(void *buf, const void *addr, size_t len) {
intptr_t offset = (intptr_t)addr;
memset(buf, 0x00, len);
len = clamp_length(offset, len);
if (len > 0) {
memcpy(buf, &transientBuffer[offset], len);
}
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
intptr_t offset = (intptr_t)addr;
len = clamp_length(offset, len);
if (len > 0) {
memcpy(&transientBuffer[offset], buf, len);
}
}
+25
View File
@@ -0,0 +1,25 @@
/* Copyright 2019 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 size of the transient EEPROM buffer size.
*/
#ifndef TRANSIENT_EEPROM_SIZE
# include "eeconfig.h"
# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO
#endif
+1 -1
View File
@@ -217,7 +217,7 @@ void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
// If any of the transactions fail we risk writing dirty PG0, // If any of the transactions fail we risk writing dirty PG0,
// refresh page 0 just in case. // refresh page 0 just in case.
if (!IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index])){ if (!IS31FL3733_write_pwm_buffer(addr, g_pwm_buffer[index])) {
g_led_control_registers_update_required[index] = true; g_led_control_registers_update_required[index] = true;
} }
} }
+2
View File
@@ -19,6 +19,8 @@
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */ /* number of backlight levels */
#define BACKLIGHT_PIN B5 #define BACKLIGHT_PIN B5
#ifdef BACKLIGHT_PIN #ifdef BACKLIGHT_PIN
-3
View File
@@ -50,9 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
} }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
//#define DIODE_DIRECTION CUSTOM_MATRIX
/* ws2812 RGB LED */ /* ws2812 RGB LED */
#define RGB_DI_PIN D3 #define RGB_DI_PIN D3
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
+2
View File
@@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 }
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
+1 -1
View File
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F0, B6, B5 } #define MATRIX_COL_PINS { F0, B6, B5 }
#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 } #define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 }
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN C6 #define BACKLIGHT_PIN C6
+2
View File
@@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
#define DIODE_DIRECTION COL2ROW
#define SOFT_SERIAL_PIN D0 #define SOFT_SERIAL_PIN D0
/* define tapping term */ /* define tapping term */
+1 -1
View File
@@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* /*
+2
View File
@@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 } #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 }
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */ /* define if matrix has ghost */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+12 -21
View File
@@ -17,27 +17,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ares.h" #include "ares.h"
#ifdef BACKLIGHT_ENABLE void keyboard_pre_init_kb(void) {
void backlight_init_ports(void) { led_init_ports();
setPinOutput(D0); keyboard_pre_init_user();
setPinOutput(D1);
setPinOutput(D4);
setPinOutput(D6);
} }
void backlight_set(uint8_t level) { void led_init_ports(void) {
if (level == 0) { setPinOutput(D1);
// Turn out the lights }
writePinLow(D0);
writePinLow(D1); bool led_update_kb(led_t led_state) {
writePinLow(D4); if (led_update_user(led_state)) {
writePinLow(D6); writePin(D1, led_state.caps_lock);
} else { }
// Turn on the lights return true;
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
}
} }
#endif
+3 -1
View File
@@ -37,7 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
#define NO_UART 1 #define NO_UART 1
+1 -1
View File
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = no BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
WS2812_DRIVER = i2c WS2812_DRIVER = i2c
+12 -24
View File
@@ -17,30 +17,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "bfake.h" #include "bfake.h"
void backlight_init_ports(void) { void keyboard_pre_init_kb(void) {
setPinOutput(D0); led_init_ports();
setPinOutput(D1); keyboard_pre_init_user();
setPinOutput(D4);
setPinOutput(D6);
writePinLow(D0);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
} }
void backlight_set(uint8_t level) { void led_init_ports(void) {
if (level == 0) { setPinOutput(D1);
// Turn out the lights }
writePinLow(D0);
writePinLow(D1); bool led_update_kb(led_t led_state) {
writePinLow(D4); if (led_update_user(led_state)) {
writePinLow(D6); writePin(D1, led_state.caps_lock);
} else { }
// Turn on the lights return true;
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
}
} }
+4 -5
View File
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef BFAKE_CONFIG_H #pragma once
#define BFAKE_CONFIG_H
#include "config_common.h" #include "config_common.h"
@@ -38,9 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
#define NO_UART 1 #define NO_UART 1
#endif
+1 -1
View File
@@ -17,7 +17,7 @@ MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = no BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
WS2812_DRIVER = i2c WS2812_DRIVER = i2c
+2
View File
@@ -19,6 +19,8 @@
#define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 } #define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 }
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
+1 -1
View File
@@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN F5 // #define BACKLIGHT_PIN F5
+6
View File
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// dynamic keymaps start after this. // dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
// VIA lighting is handled by the keyboard-level code
#define VIA_CUSTOM_LIGHTING_ENABLE
// Let VIA handle the QMK RGBLIGHT
#define VIA_QMK_RGBLIGHT_ENABLE
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
+6
View File
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// dynamic keymaps start after this. // dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
// VIA lighting is handled by the keyboard-level code
#define VIA_CUSTOM_LIGHTING_ENABLE
// Let VIA handle the QMK RGBLIGHT
#define VIA_QMK_RGBLIGHT_ENABLE
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
+3
View File
@@ -54,6 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// dynamic keymaps start after this. // dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
// VIA lighting is handled by the keyboard-level code
#define VIA_CUSTOM_LIGHTING_ENABLE
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
@@ -73,6 +73,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 6 for 3x custom encoder settings, left, right, and press (18 bytes) // 6 for 3x custom encoder settings, left, right, and press (18 bytes)
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21
// VIA lighting is handled by the keyboard-level code
#define VIA_CUSTOM_LIGHTING_ENABLE
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
@@ -3,3 +3,5 @@
void backlight_task(void); void backlight_task(void);
void breathing_interrupt_disable(void); void breathing_interrupt_disable(void);
void breathing_interrupt_enable(void); void breathing_interrupt_enable(void);
void breathing_enable(void);
void breathing_disable(void);
@@ -55,6 +55,54 @@ backlight_config_t kb_backlight_config = {
}; };
#ifdef VIA_ENABLE #ifdef VIA_ENABLE
void backlight_get_value( uint8_t *data )
{
uint8_t *value_id = &(data[0]);
uint8_t *value_data = &(data[1]);
switch (*value_id)
{
case id_qmk_backlight_brightness:
{
// level / BACKLIGHT_LEVELS * 255
value_data[0] = ((uint16_t)kb_backlight_config.level) * 255 / BACKLIGHT_LEVELS;
break;
}
case id_qmk_backlight_effect:
{
value_data[0] = kb_backlight_config.breathing ? 1 : 0;
break;
}
}
}
void backlight_set_value( uint8_t *data )
{
uint8_t *value_id = &(data[0]);
uint8_t *value_data = &(data[1]);
switch (*value_id)
{
case id_qmk_backlight_brightness:
{
// level / 255 * BACKLIGHT_LEVELS
kb_backlight_config.level = ((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255;
backlight_set(kb_backlight_config.level);
break;
}
case id_qmk_backlight_effect:
{
if ( value_data[0] == 0 ) {
kb_backlight_config.breathing = false;
breathing_disable();
} else {
kb_backlight_config.breathing = true;
breathing_enable();
}
break;
}
}
}
void raw_hid_receive_kb( uint8_t *data, uint8_t length ) void raw_hid_receive_kb( uint8_t *data, uint8_t length )
{ {
uint8_t *command_id = &(data[0]); uint8_t *command_id = &(data[0]);
@@ -139,6 +187,21 @@ void raw_hid_receive_kb( uint8_t *data, uint8_t length )
} }
break; break;
} }
case id_lighting_set_value:
{
backlight_set_value(command_data);
break;
}
case id_lighting_get_value:
{
backlight_get_value(command_data);
break;
}
case id_lighting_save:
{
backlight_config_save();
break;
}
default: default:
{ {
// Unhandled message. // Unhandled message.
+6
View File
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// dynamic keymaps start after this. // dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
// VIA lighting is handled by the keyboard-level code
#define VIA_CUSTOM_LIGHTING_ENABLE
// Let VIA handle the QMK RGBLIGHT
#define VIA_QMK_RGBLIGHT_ENABLE
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
+78
View File
@@ -126,8 +126,86 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);; return process_record_user(keycode, record);;
} }
#ifdef VIA_ENABLE
void backlight_get_value( uint8_t *data )
{
uint8_t *value_id = &(data[0]);
uint8_t *value_data = &(data[1]);
switch (*value_id)
{
case id_qmk_backlight_brightness:
{
// level / BACKLIGHT_LEVELS * 255
value_data[0] = ((uint16_t)kb_backlight_config.level) * 255 / BACKLIGHT_LEVELS;
break;
}
case id_qmk_backlight_effect:
{
value_data[0] = kb_backlight_config.breathing ? 1 : 0;
break;
}
}
}
void backlight_set_value( uint8_t *data )
{
uint8_t *value_id = &(data[0]);
uint8_t *value_data = &(data[1]);
switch (*value_id)
{
case id_qmk_backlight_brightness:
{
// level / 255 * BACKLIGHT_LEVELS
kb_backlight_config.level = ((uint16_t)value_data[0]) * BACKLIGHT_LEVELS / 255;
backlight_set(kb_backlight_config.level);
break;
}
case id_qmk_backlight_effect:
{
if ( value_data[0] == 0 ) {
kb_backlight_config.breathing = false;
breathing_disable();
} else {
kb_backlight_config.breathing = true;
breathing_enable();
}
break;
}
}
}
void raw_hid_receive_kb( uint8_t *data, uint8_t length )
{
uint8_t *command_id = &(data[0]);
uint8_t *command_data = &(data[1]);
switch ( *command_id )
{
case id_lighting_set_value:
{
backlight_set_value(command_data);
break;
}
case id_lighting_get_value:
{
backlight_get_value(command_data);
break;
}
case id_lighting_save:
{
backlight_config_save();
break;
}
default:
{
// Unhandled message.
*command_id = id_unhandled;
break;
}
}
// DO NOT call raw_hid_send(data,length) here, let caller do this
}
#endif
// //
// In the case of VIA being disabled, we still need to check if // In the case of VIA being disabled, we still need to check if
@@ -4,3 +4,5 @@ void backlight_task(void);
void breathing_interrupt_disable(void); void breathing_interrupt_disable(void);
void breathing_interrupt_enable(void); void breathing_interrupt_enable(void);
void breathing_toggle(void); void breathing_toggle(void);
void breathing_enable(void);
void breathing_disable(void);
+6
View File
@@ -62,6 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// dynamic keymaps start after this. // dynamic keymaps start after this.
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1
// VIA lighting is handled by the keyboard-level code
#define VIA_CUSTOM_LIGHTING_ENABLE
// Let VIA handle the QMK RGBLIGHT
#define VIA_QMK_RGBLIGHT_ENABLE
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
+1 -1
View File
@@ -39,7 +39,7 @@
// #define UNUSED_PINS { B14 } // #define UNUSED_PINS { B14 }
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
//#define BACKLIGHT_PIN B7 //#define BACKLIGHT_PIN B7
-22
View File
@@ -54,25 +54,3 @@
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
/* Backlight configuration
*/
#define BACKLIGHT_LEVELS 1
/* Underlight configuration
*/
#define RGB_DI_PIN D7
#define RGBLED_NUM 18 // Number of LEDs
#define RGBLIGHT_HUE_STEP 32
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // How many LEDs wide to light up
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
+11 -42
View File
@@ -1,5 +1,4 @@
#include "rev4.h" #include "rev4.h"
//#include "backlight.h"
void matrix_init_kb(void) { void matrix_init_kb(void) {
// put your keyboard start-up code here // put your keyboard start-up code here
@@ -8,49 +7,19 @@ void matrix_init_kb(void) {
led_init_ports(); led_init_ports();
} }
void matrix_scan_kb(void) {
matrix_scan_user();
}
void backlight_init_ports(void) {
print("init_backlight_pin()\n");
// Set our LED pins as output
//DDRD |= (1<<6); // Esc
//DDRB |= (1<<7); // Page Up
//DDRD |= (1<<4); // Arrows
// Set our LED pins low
//PORTD &= ~(1<<6); // Esc
//PORTB &= ~(1<<7); // Page Up
//PORTD &= ~(1<<4); // Arrows
}
void backlight_set(uint8_t level) {
/*
if ( level == 0 ) {
// Turn off light
PORTD |= (1<<6); // Esc
PORTB |= (1<<7); // Page Up
PORTD |= (1<<4); // Arrows
} else {
// Turn on light
PORTD &= ~(1<<6); // Esc
PORTB &= ~(1<<7); // Page Up
PORTD &= ~(1<<4); // Arrows
}
*/
}
void led_init_ports() { void led_init_ports() {
// Set our LED pins as output // Set our LED pins as output
palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); // LED1 setPinOutput(B13); // LED1
palClearPad(GPIOB, 13); writePinLow(B13);
palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); // LED2
palClearPad(GPIOB, 14); setPinOutput(B14); // LED2
palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED3 writePinLow(B14);
palClearPad(GPIOA, 8);
palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); // Capslock LED setPinOutput(B8); // LED3
palClearPad(GPIOA, 0); writePinLow(B8);
setPinOutput(B0); // Capslock LED
writePinLow(B0);
} }
void led_set_kb(uint8_t usb_led) { void led_set_kb(uint8_t usb_led) {
+7 -8
View File
@@ -4,18 +4,17 @@ MCU = STM32F303
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BACKLIGHT_ENABLE = yes BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug
CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
AUDIO_ENABLE = no AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality
BACKLIGHT_ENABLE = no
MIDI_ENABLE = no # MIDI controls MIDI_ENABLE = no # MIDI controls
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = yes
LAYOUTS = 66_ansi 66_iso LAYOUTS = 66_ansi 66_iso
-2
View File
@@ -23,8 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once #pragma once
#define CUSTOM_MATRIX 2
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0001 #define PRODUCT_ID 0x0001
#define DEVICE_VER 0x0100 #define DEVICE_VER 0x0100
-2
View File
@@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#define CUSTOM_MATRIX 2
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3333 #define PRODUCT_ID 0x3333
#define DEVICE_VER 0x0100 #define DEVICE_VER 0x0100
-9
View File
@@ -18,12 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
// do not #include "config_common.h" because the pin names conflict with the USB HID code.
// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves.
// It's a hack, yeah...
#define CUSTOM_MATRIX 2
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x005B #define PRODUCT_ID 0x005B
@@ -36,9 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 16 #define MATRIX_ROWS 16
#define MATRIX_COLS 16 #define MATRIX_COLS 16
/* matrix scanning is done in custom_matrix.cpp */
//#define DIODE_DIRECTION
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
+1 -1
View File
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } #define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7 // #define BACKLIGHT_PIN B7
+1 -1
View File
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F0, C7, C6, B6, } #define MATRIX_COL_PINS { F0, C7, C6, B6, }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7 // #define BACKLIGHT_PIN B7
+177 -15
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2012 Jun Wako <[email protected]> Copyright 2020
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -21,11 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060 #define PRODUCT_ID 0xB1E5
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER KPREPUBLIC #define MANUFACTURER KPrepublic
#define PRODUCT COSPAD #define PRODUCT Cospad
#define DESCRIPTION QMK keyboard firmware for COSPAD #define DESCRIPTION 6x4 numpad with underglow and backlighting
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 6 #define MATRIX_ROWS 6
@@ -40,22 +40,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* *
*/ */
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 }
#define MATRIX_COL_PINS { F0, F1, E6, C7 } #define MATRIX_COL_PINS { F0, F1, E6, C7 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW or ROW2COL */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Backlight configuration */ /*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define BACKLIGHT_PIN F7 #define BACKLIGHT_PIN F7
#define BACKLIGHT_LEVELS 1 // #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_ON_STATE 0
/* Underlight configuration */
#define RGB_DI_PIN F6 #define RGB_DI_PIN F6
#define RGBLED_NUM 4 #ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 4
// #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// /*== all animations enable ==*/
#define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
// #define RGBLIGHT_EFFECT_SNAKE
// #define RGBLIGHT_EFFECT_KNIGHT
// #define RGBLIGHT_EFFECT_CHRISTMAS
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
// /*== customize breathing effect ==*/
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
// /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
@@ -64,10 +93,89 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE
/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP H
//#define MAGIC_KEY_HELP_ALT SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
@@ -83,8 +191,62 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING //#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION /* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#endif
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
/*
* HD44780 LCD Display Configuration
*/
/*
#define LCD_LINES 2 //< number of visible lines of the display
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
#if LCD_IO_MODE
#define LCD_PORT PORTB //< port for the LCD lines
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
#define LCD_RS_PORT LCD_PORT //< port for RS line
#define LCD_RS_PIN 3 //< pin for RS line
#define LCD_RW_PORT LCD_PORT //< port for RW line
#define LCD_RW_PIN 2 //< pin for RW line
#define LCD_E_PORT LCD_PORT //< port for Enable line
#define LCD_E_PIN 1 //< pin for Enable line
#endif
*/
/* Bootmagic Lite key configuration */ /* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_ROW 0
+11 -12
View File
@@ -1,5 +1,4 @@
/* Copyright 2020
/* Copyright 2019
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -16,18 +15,18 @@
*/ */
#include "cospad.h" #include "cospad.h"
#ifdef BACKLIGHT_ENABLE void keyboard_pre_init_kb(void) {
led_init_ports();
void backlight_init_ports(void) { keyboard_pre_init_user();
setPinOutput(F7);
} }
void backlight_set(uint8_t level) { void led_init_ports(void) {
writePin(F7, !!level); setPinOutput(B2);
} }
void backlight_task(void) { bool led_update_kb(led_t led_state) {
// do nothing - as default implementation of software PWM does not work if (led_update_user(led_state)) {
writePin(B2, !led_state.num_lock);
}
return true;
} }
#endif //BACKLIGHT_ENABLE
+82 -81
View File
@@ -1,5 +1,4 @@
/* Copyright 2020
/* Copyright 2019
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -14,12 +13,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include "quantum.h" #include "quantum.h"
#define ___ KC_NO #define ___ KC_NO
/* This a shortcut to help you visually see your layout. /* This is a shortcut to help you visually see your layout.
* *
* The first section contains all of the arguments representing the physical * The first section contains all of the arguments representing the physical
* layout of the board and position of the keys. * layout of the board and position of the keys.
@@ -28,100 +29,100 @@
* represents the switch matrix. * represents the switch matrix.
*/ */
/* COSPAD ortho matrix layout /* 6x4 ortholinear layout
* ,-------------------. * ,-------------------.
* | 00 | 01 | 02 | 03 | * | 00 | 01 | 02 | 03 |
* |----|----|----|----| * |----|----|----|----|
* | 10 | 11 | 12 | 13 | * | 10 | 11 | 12 | 13 |
* |----|----|----|----| * |----|----|----|----|
* | 20 | 21 | 22 | 23 | * | 20 | 21 | 22 | 23 |
* |----|----|----|----| * |----|----|----|----|
* | 30 | 31 | 32 | 33 | * | 30 | 31 | 32 | 33 |
* |----|----|----|----| * |----|----|----|----|
* | 40 | 41 | 42 | 43 | * | 40 | 41 | 42 | 43 |
* |----|----|----|----| * |----|----|----|----|
* | 50 | 51 | 52 | 53 | * | 50 | 51 | 52 | 53 |
* `-------------------' * `-------------------'
*/ */
#define LAYOUT_ortho_6x4( \ #define LAYOUT_ortho_6x4( \
k00, k01, k02, k03, \ k00, k01, k02, k03, \
k10, k11, k12, k13, \ k10, k11, k12, k13, \
k20, k21, k22, k23, \ k20, k21, k22, k23, \
k30, k31, k32, k33, \ k30, k31, k32, k33, \
k40, k41, k42, k43, \ k40, k41, k42, k43, \
k50, k51, k52, k53 \ k50, k51, k52, k53 \
) \ ) \
{ \ { \
{k00, k01, k02, k03}, \ { k00, k01, k02, k03 }, \
{k10, k11, k12, k13}, \ { k10, k11, k12, k13 }, \
{k20, k21, k22, k23}, \ { k20, k21, k22, k23 }, \
{k30, k31, k32, k33}, \ { k30, k31, k32, k33 }, \
{k40, k41, k42, k43}, \ { k40, k41, k42, k43 }, \
{k50, k51, k52, k53} \ { k50, k51, k52, k53 } \
} }
/* COSPAD gamepad matrix layout /* 6x4 gamepad layout
* ,-------------------. * ,-------------------.
* | 00 | 01 | 02 | 03 | * | 00 | 01 | 02 | 03 |
* |----|----|----|----| * |----|----|----|----|
* | 10 | 11 | 12 | 13 | * | 10 | 11 | 12 | 13 |
* |----|----|----|----| * |----|----|----|----|
* | 20 | 21 | 22 | | * | 20 | 21 | 22 | |
* |----|----|----| 23 | * |----|----|----| 23 |
* | 30 | 31 | 32 | | * | 30 | 31 | 32 | |
* |----|----|----|----| * |----|----|----|----|
* | 40 | 41 | 42 | 43 | * | 40 | 41 | 42 | 43 |
* |----|----|----|----| * |----|----|----|----|
* | 50 | 51 | 52 | 53 | * | 50 | 51 | 52 | 53 |
* `-------------------' * `-------------------'
*/ */
#define LAYOUT_gamepad_6x4( \ #define LAYOUT_gamepad_6x4( \
k00, k01, k02, k03, \ k00, k01, k02, k03, \
k10, k11, k12, k13, \ k10, k11, k12, k13, \
k20, k21, k22, \ k20, k21, k22, \
k30, k31, k32, k23, \ k30, k31, k32, k23, \
k40, k41, k42, k43, \ k40, k41, k42, k43, \
k50, k51, k52, k53 \ k50, k51, k52, k53 \
) \ ) \
{ \ { \
{k00, k01, k02, k03}, \ { k00, k01, k02, k03 }, \
{k10, k11, k12, k13}, \ { k10, k11, k12, k13 }, \
{k20, k21, k22, k23}, \ { k20, k21, k22, k23 }, \
{k30, k31, k32, ___}, \ { k30, k31, k32, ___ }, \
{k40, k41, k42, k43}, \ { k40, k41, k42, k43 }, \
{k50, k51, k52, k53} \ { k50, k51, k52, k53 } \
} }
/* COSPAD numpad matrix layout /* 6x4 numpad layout
* ,-------------------. * ,-------------------.
* | 00 | 01 | 02 | 03 | * | 00 | 01 | 02 | 03 |
* |----|----|----|----| * |----|----|----|----|
* | 10 | 11 | 12 | 13 | * | 10 | 11 | 12 | 13 |
* |----|----|----|----| * |----|----|----|----|
* | 20 | 21 | 22 | | * | 20 | 21 | 22 | |
* |----|----|----| 23 | * |----|----|----| 23 |
* | 30 | 31 | 32 | | * | 30 | 31 | 32 | |
* |----|----|----|----| * |----|----|----|----|
* | 40 | 41 | 42 | | * | 40 | 41 | 42 | |
* |----|----|----| 43 | * |----|----|----| 43 |
* | 50 | 52 | | * | 50 | 52 | |
* `-------------------' * `-------------------'
*/ */
#define LAYOUT_numpad_6x4( \ #define LAYOUT_numpad_6x4( \
k00, k01, k02, k03, \ k00, k01, k02, k03, \
k10, k11, k12, k13, \ k10, k11, k12, k13, \
k20, k21, k22, \ k20, k21, k22, \
k30, k31, k32, k23, \ k30, k31, k32, k23, \
k40, k41, k42, \ k40, k41, k42, \
k50, k52, k43 \ k50, k52, k43 \
) \ ) \
{ \ { \
{k00, k01, k02, k03}, \ { k00, k01, k02, k03 }, \
{k10, k11, k12, k13}, \ { k10, k11, k12, k13 }, \
{k20, k21, k22, k23}, \ { k20, k21, k22, k23 }, \
{k30, k31, k32, ___}, \ { k30, k31, k32, ___ }, \
{k40, k41, k42, k43}, \ { k40, k41, k42, k43 }, \
{k50, ___, k52, ___} \ { k50, ___, k52, ___ } \
} }
// Add backwards compatibility for existing keymaps // Add backwards compatibility for existing keymaps
+102 -90
View File
@@ -1,95 +1,107 @@
{ {
"keyboard_name": "Cospad", "keyboard_name": "Cospad",
"keyboard_folder": "cospad", "url": "",
"url": "", "maintainer": "qmk",
"maintainer": "qmk", "width": 4,
"width": 4, "height": 6,
"height": 6, "layouts": {
"layouts": { "LAYOUT_numpad_6x4": {
"LAYOUT_numpad_6x4": { "key_count": 21,
"key_count": 21, "layout": [
"layout": [ {"x":0, "y":0},
{"label":"Esc", "x":0, "y":0}, {"x":1, "y":0},
{"label":"Tab", "x":1, "y":0}, {"x":2, "y":0},
{"label":"Fn", "x":2, "y":0}, {"x":3, "y":0},
{"label":"Back", "x":3, "y":0},
{"label":"Num Lock", "x":0, "y":1},
{"label":"/", "x":1, "y":1},
{"label":"*", "x":2, "y":1},
{"label":"-", "x":3, "y":1},
{"label":"7", "x":0, "y":2},
{"label":"8", "x":1, "y":2},
{"label":"9", "x":2, "y":2},
{"label":"4", "x":0, "y":3},
{"label":"5", "x":1, "y":3},
{"label":"6", "x":2, "y":3},
{"label":"+", "x":3, "y":2, "h":2},
{"label":"1", "x":0, "y":4},
{"label":"2", "x":1, "y":4},
{"label":"3", "x":2, "y":4},
{"label":"0", "x":0, "y":5, "w":2},
{"label":".", "x":2, "y":5},
{"label":"Enter", "x":3, "y":4, "h":2}
]
},
"LAYOUT_gamepad_6x4": { {"x":0, "y":1},
"key_count": 23, {"x":1, "y":1},
"layout": [ {"x":2, "y":1},
{"label":"k00", "x":0, "y":0}, {"x":3, "y":1},
{"label":"k01", "x":1, "y":0},
{"label":"k02", "x":2, "y":0},
{"label":"k03", "x":3, "y":0},
{"label":"k10", "x":0, "y":1},
{"label":"k11", "x":1, "y":1},
{"label":"k12", "x":2, "y":1},
{"label":"k13", "x":3, "y":1},
{"label":"k20", "x":0, "y":2},
{"label":"k21", "x":1, "y":2},
{"label":"k22", "x":2, "y":2},
{"label":"k30", "x":0, "y":3},
{"label":"k31", "x":1, "y":3},
{"label":"k32", "x":2, "y":3},
{"label":"k23", "x":3, "y":2, "h":2},
{"label":"k40", "x":0, "y":4},
{"label":"k41", "x":1, "y":4},
{"label":"k42", "x":2, "y":4},
{"label":"k43", "x":3, "y":4},
{"label":"k50", "x":0, "y":5},
{"label":"k51", "x":1, "y":5},
{"label":"k52", "x":2, "y":5},
{"label":"k53", "x":3, "y":5}
]
},
"LAYOUT_ortho_6x4": { {"x":0, "y":2},
"key_count": 24, {"x":1, "y":2},
"layout": [ {"x":2, "y":2},
{"label":"k00", "x":0, "y":0},
{"label":"k01", "x":1, "y":0}, {"x":0, "y":3},
{"label":"k02", "x":2, "y":0}, {"x":1, "y":3},
{"label":"k03", "x":3, "y":0}, {"x":2, "y":3},
{"label":"k10", "x":0, "y":1}, {"x":3, "y":2, "h":2},
{"label":"k11", "x":1, "y":1},
{"label":"k12", "x":2, "y":1}, {"x":0, "y":4},
{"label":"k13", "x":3, "y":1}, {"x":1, "y":4},
{"label":"k20", "x":0, "y":2}, {"x":2, "y":4},
{"label":"k21", "x":1, "y":2},
{"label":"k22", "x":2, "y":2}, {"x":0, "y":5, "w":2},
{"label":"k23", "x":3, "y":2}, {"x":2, "y":5},
{"label":"k30", "x":0, "y":3}, {"x":3, "y":4, "h":2}
{"label":"k31", "x":1, "y":3}, ]
{"label":"k32", "x":2, "y":3}, },
{"label":"k33", "x":3, "y":3}, "LAYOUT_gamepad_6x4": {
{"label":"k40", "x":0, "y":4}, "key_count": 23,
{"label":"k41", "x":1, "y":4}, "layout": [
{"label":"k42", "x":2, "y":4}, {"x":0, "y":0},
{"label":"k43", "x":3, "y":4}, {"x":1, "y":0},
{"label":"k50", "x":0, "y":5}, {"x":2, "y":0},
{"label":"k51", "x":1, "y":5}, {"x":3, "y":0},
{"label":"k52", "x":2, "y":5},
{"label":"k53", "x":3, "y":5} {"x":0, "y":1},
] {"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},
{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},
{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":2, "h":2},
{"x":0, "y":4},
{"x":1, "y":4},
{"x":2, "y":4},
{"x":3, "y":4},
{"x":0, "y":5},
{"x":1, "y":5},
{"x":2, "y":5},
{"x":3, "y":5}
]
},
"LAYOUT_ortho_6x4": {
"key_count": 24,
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},
{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},
{"x":3, "y":2},
{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":3},
{"x":0, "y":4},
{"x":1, "y":4},
{"x":2, "y":4},
{"x":3, "y":4},
{"x":0, "y":5},
{"x":1, "y":5},
{"x":2, "y":5},
{"x":3, "y":5}
]
}
} }
}
} }
+50 -53
View File
@@ -1,60 +1,57 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below. // Defines names for use in layer keycodes and the keymap
// The underscores don't mean anything - you can have a layer called STUFF or any other name. enum layer_names {
// Layer names don't all need to be of the same length, obviously, and you can also skip them _BL,
// entirely and just use numbers. _FL
enum layers {
_BL = 0,
_FL
}; };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer /* Keymap _BL: (Base Layer) Default Layer
* ,-------------------. * ,-------------------.
* |Esc |TAB | FN | BS | * |Esc |TAB | FN | BS |
* |----|----|----|----| * |----|----|----|----|
* | NL | / | * | - | * | NL | / | * | - |
* |----|----|----|----| * |----|----|----|----|
* | 7 | 8 | 9 | | * | 7 | 8 | 9 | |
* |----|----|----| + | * |----|----|----| + |
* | 4 | 5 | 6 | | * | 4 | 5 | 6 | |
* |----|----|----|----| * |----|----|----|----|
* | 1 | 2 | 3 | | * | 1 | 2 | 3 | |
* |----|----|----| En | * |----|----|----| En |
* | 0 | . | | * | 0 | . | |
* `-------------------' * `-------------------'
*/ */
[_BL] = LAYOUT_numpad_6x4( [_BL] = LAYOUT_numpad_6x4(
KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \ KC_ESC, KC_TAB, MO(_FL), KC_BSPC,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, \ KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS, \ KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, \ KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT KC_P0, KC_PDOT, KC_PENT
), ),
/* Keymap _FL: Function Layer /* Keymap _FL: Function Layer
* ,-------------------. * ,-------------------.
* |RGBT| | | | * |RGBT| | | |
* |----|----|----|----| * |----|----|----|----|
* |RGBM|RGBP|BTOG| | * |RGBM|RGBP|BTOG| |
* |----|----|----|----| * |----|----|----|----|
* |HUD |HUI |BON | | * |HUD |HUI |BON | |
* |----|----|----| | * |----|----|----| |
* |SAD |SAI |BOFF| | * |SAD |SAI |BOFF| |
* |----|----|----|----| * |----|----|----|----|
* |VAD |VAS |BSTP| | * |VAD |VAS |BSTP| |
* |----|----|----| | * |----|----|----| |
* | |RST | | * | |RST | |
* `-------------------' * `-------------------'
*/ */
[_FL] = LAYOUT_numpad_6x4( [_FL] = LAYOUT_numpad_6x4(
RGB_TOG, _______, _______, _______, \ RGB_TOG, _______, _______, _______,
RGB_MOD, RGB_M_P, BL_TOGG, _______, \ RGB_MOD, RGB_M_P, BL_TOGG, _______,
RGB_HUD, RGB_HUI, BL_ON, \ RGB_HUD, RGB_HUI, BL_ON,
RGB_SAD, RGB_SAI, BL_OFF, _______, \ RGB_SAD, RGB_SAI, BL_OFF, _______,
RGB_VAD, RGB_VAI, BL_STEP, \ RGB_VAD, RGB_VAI, BL_STEP,
_______, RESET, _______ _______, RESET, _______
), )
}; };
+7 -10
View File
@@ -1,18 +1,15 @@
COSPAD # Cospad
===
A DIY Keypad Kit sold by KPRepublic, runs TKG natively. A DIY keypad kit sold by KPRepublic, runs TKG natively.
Keyboard Maintainer: QMK Community * Keyboard Maintainer: QMK Community
Hardware Supported: COSPAD * Hardware Supported: Cospad PCB
Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) * Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html)
Only supports on and off for the backlight leds, as they are not connected to a PWM pin.
Supported Layouts: Supported Layouts:
![Numpad Layout of COSPAD](https://i.imgur.com/t03lXJ4.png) ![Numpad layouts](https://i.imgur.com/t03lXJ4.png)
![Ortholinear Layout of COSPAD](https://i.imgur.com/mliUcCc.png) ![Ortholinear layouts](https://i.imgur.com/mliUcCc.png)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
+12 -12
View File
@@ -12,23 +12,23 @@ MCU = atmega32u4
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
# Build Options # Build Options
# comment out to disable the options. # change yes to no to disable
# #
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
BACKLIGHT_CUSTOM_DRIVER = yes RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) MIDI_ENABLE = no # MIDI support
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) HD44780_ENABLE = no # Enable support for HD44780 based LCDs
LAYOUTS = numpad_6x4 ortho_6x4 LAYOUTS = numpad_6x4 ortho_6x4
+2 -2
View File
@@ -6,8 +6,8 @@
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \ ) \
LAYOUT_wrapper( \ LAYOUT_wrapper( \
KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
MT_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ MT_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \
KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \ KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \
) )
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// lower maximum brightness to lower power usage and prevent unresponsiveness // lower maximum brightness to lower power usage and prevent unresponsiveness
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
//disable effects //disable effects
#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue
@@ -3,7 +3,7 @@
SRC += ./logo_reader.c SRC += ./logo_reader.c
# enable OLED displays # enable OLED displays
OLED_DRIVER_ENABLE = yes OLED_DRIVER_ENABLE = no
# enable media keys # enable media keys
EXTRAKEY_ENABLE = yes EXTRAKEY_ENABLE = yes
+106 -23
View File
@@ -1,13 +1,29 @@
#ifndef CONFIG_H /*
#define CONFIG_H Copyright 2020
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0x1209 #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x2328 #define PRODUCT_ID 0x7169
#define DEVICE_VER 0x501 #define DEVICE_VER 0x0501
#define MANUFACTURER K.T.E.C. #define MANUFACTURER KTEC
#define PRODUCT Daisy #define PRODUCT Daisy
#define DESCRIPTION qmk port for Daisy #define DESCRIPTION qmk port for Daisy
@@ -32,22 +48,59 @@
/* COL2ROW, ROW2COL*/ /* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define BACKLIGHT_PIN D0 #define BACKLIGHT_PIN D0
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 6 #define BACKLIGHT_LEVELS 6
#define RGB_DI_PIN C7
#ifdef RGB_DI_PIN
# define RGBLED_NUM 8
# define RGBLIGHT_HUE_STEP 12
# define RGBLIGHT_SAT_STEP 25
# define RGBLIGHT_VAL_STEP 12
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// /*== all animations enable ==*/
# define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
// #define RGBLIGHT_EFFECT_SNAKE
// #define RGBLIGHT_EFFECT_KNIGHT
// #define RGBLIGHT_EFFECT_CHRISTMAS
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
// /*== customize breathing effect ==*/
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
// /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* number of backlight levels */
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE
/* /*
* Force NKRO * Force NKRO
* *
@@ -81,6 +134,10 @@
* *
*/ */
/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
/* control how magic key switches layers */ /* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
@@ -90,8 +147,8 @@
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP1 H //#define MAGIC_KEY_HELP H
//#define MAGIC_KEY_HELP2 SLASH //#define MAGIC_KEY_HELP_ALT SLASH
//#define MAGIC_KEY_DEBUG D //#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X //#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K //#define MAGIC_KEY_DEBUG_KBD K
@@ -99,9 +156,8 @@
//#define MAGIC_KEY_VERSION V //#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S //#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C //#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0 //#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#define MAGIC_KEY_LAYER1 1 //#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2 //#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3 //#define MAGIC_KEY_LAYER3 3
@@ -111,9 +167,11 @@
//#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9 //#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER PAUSE //#define MAGIC_KEY_BOOTLOADER B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E //#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#define MAGIC_KEY_NKRO N //#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z //#define MAGIC_KEY_SLEEP_LED Z
@@ -132,17 +190,12 @@
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING //#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
// ws2812 options
#define RGB_DI_PIN C7 // pin the DI on the ws2812 is hooked-up to
#define RGBLIGHT_ANIMATIONS // run RGB animations
#define RGBLED_NUM 8 // number of LEDs
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
/* disable these deprecated features by default */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#endif
/* /*
* MIDI options * MIDI options
*/ */
@@ -166,4 +219,34 @@
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1 //#define MIDI_TONE_KEYCODE_OCTAVES 1
/*
* HD44780 LCD Display Configuration
*/
/*
#define LCD_LINES 2 //< number of visible lines of the display
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
#if LCD_IO_MODE
#define LCD_PORT PORTB //< port for the LCD lines
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
#define LCD_RS_PORT LCD_PORT //< port for RS line
#define LCD_RS_PIN 3 //< pin for RS line
#define LCD_RW_PORT LCD_PORT //< port for RW line
#define LCD_RW_PIN 2 //< pin for RW line
#define LCD_E_PORT LCD_PORT //< port for Enable line
#define LCD_E_PIN 1 //< pin for Enable line
#endif #endif
*/
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0
+33 -13
View File
@@ -1,15 +1,35 @@
/* Copyright 2020
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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 "daisy.h" #include "daisy.h"
void led_set_kb(uint8_t usb_led) { void keyboard_pre_init_kb(void) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here led_init_ports();
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { keyboard_pre_init_user();
// output low }
DDRC |= (1<<PC6);
PORTC &= ~(1<<PC6); void led_init_ports(void) {
} else { setPinOutput(C6);
// Hi-Z writePinHigh(C6);
DDRC &= ~(1<<PC6); }
PORTC &= ~(1<<PC6);
} bool led_update_kb(led_t led_state) {
led_set_user(usb_led); if (led_update_user(led_state)) {
} writePin(C6, !led_state.caps_lock);
}
return true;
}
+45 -13
View File
@@ -1,19 +1,51 @@
#ifndef DAISY_H /* Copyright 2020
#define DAISY_H *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h" #include "quantum.h"
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \ #define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
K30, K31, K32, K34, K35, K37, K38, K39 \ K30, K31, K32, K34, K35, K37, K38, K39 \
) \ ) { \
{ \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \ { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
{ K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \
} }
#endif #define LAYOUT_625_space( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \
K30, K31, K32, K35, K38, K39 \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \
{ K30, K31, K32, KC_NO, KC_NO, K35, KC_NO, KC_NO, K38, K39, K3A } \
}
+103 -14
View File
@@ -1,18 +1,107 @@
{ {
"keyboard_name": "Daisy", "keyboard_name": "Daisy",
"url": "", "url": "",
"maintainer": "qmk", "maintainer": "qmk",
"width": 12, "width": 12,
"height": 4, "height": 4,
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"key_count": 42, "key_count": 42,
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3, "w": 1.25}, {"label": "K34", "x": 3.5, "y": 3, "w": 2.25}, {"label": "K35", "x": 5.75, "y": 3, "w": 2.75}, {"label": "K37", "x": 8.5, "y": 3, "w": 1.25}, {"label": "K38", "x": 9.75, "y": 3}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}] "layout": [
}, {"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
"LAYOUT_625_space": { {"x": 0, "y": 1, "w": 1.25},
"key_count": 40, {"x": 1.25, "y": 1},
"layout": [{"label": "K00", "x": 0, "y": 0}, {"label": "K01", "x": 1, "y": 0}, {"label": "K02", "x": 2, "y": 0}, {"label": "K03", "x": 3, "y": 0}, {"label": "K04", "x": 4, "y": 0}, {"label": "K05", "x": 5, "y": 0}, {"label": "K06", "x": 6, "y": 0}, {"label": "K07", "x": 7, "y": 0}, {"label": "K08", "x": 8, "y": 0}, {"label": "K09", "x": 9, "y": 0}, {"label": "K0A", "x": 10, "y": 0}, {"label": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"label": "K20", "x": 0, "y": 2, "w": 1.75}, {"label": "K21", "x": 1.75, "y": 2}, {"label": "K22", "x": 2.75, "y": 2}, {"label": "K23", "x": 3.75, "y": 2}, {"label": "K24", "x": 4.75, "y": 2}, {"label": "K25", "x": 5.75, "y": 2}, {"label": "K26", "x": 6.75, "y": 2}, {"label": "K27", "x": 7.75, "y": 2}, {"label": "K28", "x": 8.75, "y": 2}, {"label": "K29", "x": 9.75, "y": 2}, {"label": "K2A", "x": 10.75, "y": 2, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3}, {"x": 3.25, "y": 3, "w": 6.25}, {"label": "K38", "x": 9.5, "y": 3, "w": 1.25}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}] {"x": 2.25, "y": 1},
{"x": 3.25, "y": 1},
{"x": 4.25, "y": 1},
{"x": 5.25, "y": 1},
{"x": 6.25, "y": 1},
{"x": 7.25, "y": 1},
{"x": 8.25, "y": 1},
{"x": 9.25, "y": 1},
{"x": 10.25, "y": 1, "w": 1.75},
{"x": 0, "y": 2, "w": 1.75},
{"x": 1.75, "y": 2},
{"x": 2.75, "y": 2},
{"x": 3.75, "y": 2},
{"x": 4.75, "y": 2},
{"x": 5.75, "y": 2},
{"x": 6.75, "y": 2},
{"x": 7.75, "y": 2},
{"x": 8.75, "y": 2},
{"x": 9.75, "y": 2},
{"x": 10.75, "y": 2, "w": 1.25},
{"x": 0, "y": 3, "w": 1.25},
{"x": 1.25, "y": 3},
{"x": 2.25, "y": 3, "w": 1.25},
{"x": 3.5, "y": 3, "w": 2.25},
{"x": 5.75, "y": 3, "w": 2.75},
{"x": 8.5, "y": 3, "w": 1.25},
{"x": 9.75, "y": 3},
{"x": 10.75, "y": 3, "w": 1.25}
]
},
"LAYOUT_625_space": {
"key_count": 40,
"layout": [
{"x": 0, "y": 0},
{"x": 1, "y": 0},
{"x": 2, "y": 0},
{"x": 3, "y": 0},
{"x": 4, "y": 0},
{"x": 5, "y": 0},
{"x": 6, "y": 0},
{"x": 7, "y": 0},
{"x": 8, "y": 0},
{"x": 9, "y": 0},
{"x": 10, "y": 0},
{"x": 11, "y": 0},
{"x": 0, "y": 1, "w": 1.25},
{"x": 1.25, "y": 1},
{"x": 2.25, "y": 1},
{"x": 3.25, "y": 1},
{"x": 4.25, "y": 1},
{"x": 5.25, "y": 1},
{"x": 6.25, "y": 1},
{"x": 7.25, "y": 1},
{"x": 8.25, "y": 1},
{"x": 9.25, "y": 1},
{"x": 10.25, "y": 1, "w": 1.75},
{"x": 0, "y": 2, "w": 1.75},
{"x": 1.75, "y": 2},
{"x": 2.75, "y": 2},
{"x": 3.75, "y": 2},
{"x": 4.75, "y": 2},
{"x": 5.75, "y": 2},
{"x": 6.75, "y": 2},
{"x": 7.75, "y": 2},
{"x": 8.75, "y": 2},
{"x": 9.75, "y": 2},
{"x": 10.75, "y": 2, "w": 1.25},
{"x": 0, "y": 3, "w": 1.25},
{"x": 1.25, "y": 3},
{"x": 2.25, "y": 3},
{"x": 3.25, "y": 3, "w": 6.25},
{"x": 9.5, "y": 3, "w": 1.25},
{"x": 10.75, "y": 3, "w": 1.25}
]
}
} }
}
} }
+75 -84
View File
@@ -1,92 +1,83 @@
/* Copyright 2020
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
// Layer shorthand enum layer_names {
#define _BL 0 _BL,
#define _LW 1 _LW,
#define _RS 2 _RS
enum layer_keycodes {
QWERTY = SAFE_RANGE, LOWER, RAISE
}; };
#define LOWER MO(_LW)
#define RAISE MO(_RS)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base Layer
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
* │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤
* │Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │  / │
* ├────┬─┴─┬─┴──┬┴───┴───┼───┴───┴──┬┴───┼───┼────┤
* │Ctrl│GUI│Alt │        │ Backspace│Lowr│Rse│ Alt│
* └────┴───┴────┴────────┴──────────┴────┴───┴────┘
*/
[_BL] = LAYOUT(
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT
),
/* Base Layer /* Function Layer 1 (Lower)
* .-----------------------------------------------------------------------. * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
* | ESC | Q | W | E | R | T | Y | U | I | O | P | \| | * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │
* |-----------------------------------------------------------------------| * └───┴┬──┴┬──┴┬──┴───┴───┴┬──┴┬──┴┬──┴┬──┴┬──┴───┘
* | TAB | A | S | D | F | G | H | J | K | L | ENTER | * │    │ = │ ▴ │   │   │   │ [ │ ] │ ; │ ' │      │
* |-----------------------------------------------------------------------| * ├────└─┬─┴─┬─┴─┬───┐─┴─┬─└───┴───┴───┴───┘─┬────┤
* | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? | * │      │ ◂ │ ▾ │ ▸ │   │   │   │   │   │   │    │
* |-----------------------------------------------------------------------| * ├────┬─└───┴───┴───┘───┌──────────┐┴───┼───┼────┤
* | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT | * │    │   │    │        │   Delete │    │   │    │
* '-----------------------------------------------------------------------' * └────┴───┴────┴────────└──────────┘────┴───┴────┘
*/ */
[_BL] = LAYOUT( [_LW] = LAYOUT(
GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, _______, KC_EQL, KC_UP, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT _______, _______, _______, _______, KC_DEL, _______, _______, _______
), ),
/* Function Layer
* .-----------------------------------------------------------------------.
* | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ |
* |-----------------------------------------------------------------------|
* | | =+ | UP | | | | [{ | ]} | ;: | '" | |
* |-----------------------------------------------------------------------|
* | | LEFT| DOWN |RIGHT| | | | | | | |
* |-----------------------------------------------------------------------|
* | | | | | DELETE | | | |
* '-----------------------------------------------------------------------'
*/
[_LW] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS
),
/* Second Function Layer
* .-----------------------------------------------------------------------.
* | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | |
* |-----------------------------------------------------------------------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| |
* |-----------------------------------------------------------------------|
* | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| |
* |-----------------------------------------------------------------------|
* | | | | | | | | |
* '-----------------------------------------------------------------------'
*/
[_RS] = LAYOUT(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS,
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
}; /* Function Layer 2 (Raise)
* ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐
bool process_record_user(uint16_t keycode, keyrecord_t *record) { * │Rst│F1 │F2 │F3 │F4 │F5 │F6 │   │Hom│PgU│   │   │
switch (keycode) { * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤
case LOWER: * │    │F7 │F8 │F9 │F10│F11│F12│   │ ; │ ' │      │
if(record->event.pressed){ * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤
layer_on(_LW); * │      │RGB│Mod│HuD│HuI│VaD│VaI│SaD│SaI│BLS│    │
} else { * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤
layer_off(_LW); * │    │   │    │        │          │    │   │    │
} * └────┴───┴────┴────────┴──────────┴────┴───┴────┘
return false; */
break; [_RS] = LAYOUT(
case RAISE: RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_HOME, KC_PGUP, _______, _______,
if(record->event.pressed){ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_END, KC_PGDN, _______,
layer_on(_RS); _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, _______,
} else { _______, _______, _______, _______, _______, _______, _______, _______
layer_off(_RS); )
}
return false;
break;
}
return true;
}; };
+1 -5
View File
@@ -1,5 +1 @@
![Daisy Layout Image](https://imgur.com/9mSF0yf) # The default keymap for Daisy
# Default Daisy Layout
This is the default layout as offered by KPRepublic's TMK firmware for the Daisy with a few minor tweaks for usability made by me.
+7 -21
View File
@@ -1,29 +1,15 @@
# Daisy # Daisy
A 40% keyboard kit sold by KPRepublic. ![Daisy PCB](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1Pj1UggMPMeJjy1Xcq6xpppXa7_1024x1024.jpg)
Keyboard Maintainer: westfoxtrot (https://github.com/westfoxtrot) A 40% keyboard kit sold by KPrepublic.
Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
Hardware Availability: http://tinyurl.com/yc26lq22 * Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot)
* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2
* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb)
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make daisy:default make daisy:default
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
# Other Keymaps
The "default" keymap included is the layout I personally use on the Daisy and the one I have found the most comfortable.
A printable picture showing this layout is available here: https://imgur.com/9mSF0yf
```
$ make daisy:[default|<name>]
```
# Bootloader
I personally had issues with the bootloader on my Daisy PCB and was unable to flash a firmware to the board after the first time. I replaced the bootloader with the one available in the repository at ../../util/bootloader_atmega32u4_1_0_0.hex
+16 -14
View File
@@ -11,20 +11,22 @@ MCU = atmega32u4
# ATmega328P USBasp # ATmega328P USBasp
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu
# QMK Build Options # Build Options
# change to "no" to disable the options, or define them in the Makefile in # change yes to no to disable
# the appropriate keymap folder that will get included automatically
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys(+4700) MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
+2 -1
View File
@@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 }
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
#define RGBLED_NUM 18 #define RGBLED_NUM 18
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
@@ -39,4 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_PIN D4 #define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
+11 -23
View File
@@ -16,32 +16,20 @@
#include "budget96.h" #include "budget96.h"
void backlight_init_ports(void) { void keyboard_pre_init_kb(void) {
// initialize pins D0, D1, D4 and D6 as output led_init_ports();
keyboard_pre_init_user();
}
void led_init_ports(void) {
setPinOutput(D0); setPinOutput(D0);
setPinOutput(D1); setPinOutput(D1);
setPinOutput(D4);
setPinOutput(D6);
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
void backlight_set(uint8_t level) { bool led_update_kb(led_t led_state) {
if (level == 0) { if (led_update_user(led_state)) {
// turn backlight LEDs off writePin(D0, led_state.num_lock);
writePinLow(D0); writePin(D1, led_state.caps_lock);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
} else {
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
return true;
} }
+3 -1
View File
@@ -37,5 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
+1 -1
View File
@@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID
BOOTMAGIC_ENABLE = no BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = yes MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes CONSOLE_ENABLE = no
COMMAND_ENABLE = yes COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
+1 -1
View File
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7 // #define BACKLIGHT_PIN B7
+5 -2
View File
@@ -4,7 +4,7 @@
#include "config_common.h" #include "config_common.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0x445A // "DZ"
#define PRODUCT_ID 0x2260 #define PRODUCT_ID 0x2260
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER KBDFans #define MANUFACTURER KBDFans
@@ -45,4 +45,7 @@
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP #define RGBLIGHT_SLEEP
#endif #endif
#endif #endif
/* VIA related config */
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2
@@ -3,7 +3,4 @@
# dfu-programmer atmega32u4 reset # dfu-programmer atmega32u4 reset
# run this in the qmk_firmware directory # run this in the qmk_firmware directory
make dz60:billiams make dz60:billiams_layout2:flash
dfu-programmer atmega32u4 erase --force && \
dfu-programmer atmega32u4 flash dz60_billiams.hex && \
dfu-programmer atmega32u4 reset
@@ -0,0 +1,48 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del |
* |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bkspc |
* |-----------------------------------------------------------------------------------------+
* | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | ESC |
* |-----------------------------------------------------------------------------------------+
* | Ctrl | Alt | Cmd | Space | Cmd | Alt | Ctrl | Fn |
* `-----------------------------------------------------------------------------------------'
*/
LAYOUT_60_2_function(
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESCAPE,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(1)
),
/* FN Layer
* ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ |
* |-----------------------------------------------------------------------------------------+
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute| Prev | Next |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | Left| Down| Up |Right| | | Play/Pause |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | |Scr- |Scr+ | | | |RESET|
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | |
* `-----------------------------------------------------------------------------------------'
*/
LAYOUT_60_2_function(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC__VOLDOWN, KC__VOLUP,
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC_MRWD, KC_MFFD,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, KC_MPLY,
_______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______
),
};
@@ -0,0 +1,68 @@
## Billiam's DZ60 60_2 layout (KBDFANS Layout 2 with split backspace and split right shift)
This layout is optimized for MacOS and is for a Build 2 DZ60 with a 2U left shift, 1.75U right shift and no arrow cluster. Don't use this layout if you didn't get Build 2, you will enter a world of pain Donny.
Settings:
* The `CAPS LOCK` key is a function key.
* The `ALT` and `CMD` keys are swapped to replicate the Mac layout.
* RESET is available as `Fn`+ ` ESC`
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
* vim-style arrow key bindings H J K L in layer 1
### Initial Installation
I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process.
1. Clone the qmk_firmware repo locally
```
# Choose one:
git clone [email protected]:qmk/qmk_firmware.git # OR
git clone https://github.com/qmk/qmk_firmware.git
```
2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`.
3. Build your hex file
```
make dz60:billiams_layout2 # be in the qmk_firmware directory to do this
```
A hex file `dz60_billiams_layout2.hex` will be created in the base qmk_firmware directory
4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down
5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode
6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away.
Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard.
Hope this helps!
### 0 Qwerty
```
,-----------------------------------------------------------------------------------------.
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | DEL |
|-----------------------------------------------------------------------------------------+
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|-----------------------------------------------------------------------------------------+
| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|-----------------------------------------------------------------------------------------+
| Shift | Z | X | C | V | B | N | M | , | . | ?/ | Shift | ESC |
|-----------------------------------------------------------------------------------------+
| Ctrl | Alt | Cmd | Space | Cmd | Alt | Ctrl | Fn |
`-----------------------------------------------------------------------------------------'
```
### 1 Fn Layer
```
FN Layer
,-----------------------------------------------------------------------------------------.
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Vol- |Vol+ |
|-----------------------------------------------------------------------------------------+
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next |
|-----------------------------------------------------------------------------------------+
| | | | | | | Left| Down| Up |Right| | | Play/Pause |
|-----------------------------------------------------------------------------------------+
| | | | | | | | |Scr- |Scr+ | | | | RESET |
|-----------------------------------------------------------------------------------------+
| | | | | | | | |
`-----------------------------------------------------------------------------------------'
```
@@ -0,0 +1,6 @@
# dfu-programmer atmega32u4 erase --force
# dfu-programmer atmega32u4 flash /path/to/firmware.hex
# dfu-programmer atmega32u4 reset
# run this in the qmk_firmware directory
make dz60:billiams_layout4:flash
@@ -0,0 +1 @@
#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
@@ -0,0 +1,48 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
* |-----------------------------------------------------------------------------------------+
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
* |-----------------------------------------------------------------------------------------+
* | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
* |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC |
* |-----------------------------------------------------------------------------------------+
* | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
* `-----------------------------------------------------------------------------------------'
*/
LAYOUT_directional(
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
),
/* FN Layer
* ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
* |-----------------------------------------------------------------------------------------+
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | Left| Down| Up |Right| | | Play/Pause |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
* |-----------------------------------------------------------------------------------------+
* | | | | | | | HOME|PG_DN| END |
* `-----------------------------------------------------------------------------------------'
*/
LAYOUT_directional(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MRWD, KC_MFFD,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
),
};
@@ -0,0 +1,71 @@
## Billiam's DZ60 Directional layout
This layout is optimized for MacOS and is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow
cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny.
Settings:
* The `CAPS LOCK` key is replaced with a second function key.
* The `ALT` and `CMD` keys are swapped to replicate the Mac layout.
* Del is available as `Fn` + `Backspace`
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
* RESET is available as `Fn`+ ` ESC`
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
* vim-style arrow key bindings H J K L in layer 1
### Initial Installation
I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process.
1. Clone the qmk_firmware repo locally
```
# Choose one:
git clone [email protected]:qmk/qmk_firmware.git # OR
git clone https://github.com/qmk/qmk_firmware.git
```
2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`.
3. Build your hex file
```
make dz60:billiams_layout4 # be in the qmk_firmware directory to do this
```
A hex file `dz60_billiams_layout4.hex` will be created in the base qmk_firmware directory
4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down
5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode
6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away.
Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard.
Hope this helps!
### 0 Qwerty
```
,-----------------------------------------------------------------------------------------.
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |
|-----------------------------------------------------------------------------------------+
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|-----------------------------------------------------------------------------------------+
| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|-----------------------------------------------------------------------------------------+
| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC |
|-----------------------------------------------------------------------------------------+
| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
`-----------------------------------------------------------------------------------------'
```
### 1 Fn Layer
```
FN Layer
,-----------------------------------------------------------------------------------------.
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|-----------------------------------------------------------------------------------------+
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|-----------------------------------------------------------------------------------------+
| | | | | | | Left| Down| Up |Right| | | Play/Pause |
|-----------------------------------------------------------------------------------------+
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|-----------------------------------------------------------------------------------------+
| | | | | | | HOME | PG_DN | END |
`-----------------------------------------------------------------------------------------'
```
+29
View File
@@ -0,0 +1,29 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_NO, MO(1), KC_RCTL),
LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
+2
View File
@@ -0,0 +1,2 @@
LINK_TIME_OPTIMIZATION_ENABLE = yes
VIA_ENABLE = yes
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 } { B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 } { B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
// #endif // #endif
+2
View File
@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
#define DIODE_DIRECTION COL2ROW
/* define tapping term */ /* define tapping term */
#define TAPPING_TERM 120 #define TAPPING_TERM 120
+6
View File
@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
#define DIODE_DIRECTION COL2ROW
/* define tapping term */ /* define tapping term */
#define TAPPING_TERM 120 #define TAPPING_TERM 120
@@ -69,6 +71,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SPLIT #define RGBLIGHT_SPLIT
#define RGBLED_SPLIT { 12, 12 } // Number of LEDs #define RGBLED_SPLIT { 12, 12 } // Number of LEDs
// The LEDs on the slave half go in reverse order
#define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, \
23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12}
#define SOFT_SERIAL_PIN D0 #define SOFT_SERIAL_PIN D0
#define SELECT_SOFT_SERIAL_SPEED 1 #define SELECT_SOFT_SERIAL_SPEED 1
/*Sets the protocol speed when using serial communication*/ /*Sets the protocol speed when using serial communication*/
-7
View File
@@ -25,13 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
USB_6KRO_ENABLE = no # USB 6key Rollover USB_6KRO_ENABLE = no # USB 6key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
KEYMAP_IN_EEPROM_ENABLE = no # External keymap in eeprom
KEYMAP_SECTION_ENABLE = no # Fixed address keymap for keymap editor
SOFTPWM_LED_ENABLE = no # Enable SoftPWM to drive backlight
FADING_LED_ENABLE = no # Enable fading backlight
BREATHING_LED_ENABLE = no # Enable breathing backlight
LEDMAP_ENABLE = no # Enable LED mapping
LEDMAP_IN_EEPROM_ENABLE = no # Read LED mapping from eeprom
SWAP_HANDS_ENABLE = no # Disable Onehand SWAP_HANDS_ENABLE = no # Disable Onehand
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = no
MIDI_ENABLE = no MIDI_ENABLE = no
+2 -1
View File
@@ -36,4 +36,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5 #define DEBOUNCE 5
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
+10 -24
View File
@@ -16,32 +16,18 @@
#include "meteor.h" #include "meteor.h"
void backlight_init_ports(void) { void keyboard_pre_init_kb(void) {
// initialize pins D0, D1, D4 and D6 as output led_init_ports();
setPinOutput(D0); keyboard_pre_init_user();
}
void led_init_ports(void) {
setPinOutput(D1); setPinOutput(D1);
setPinOutput(D4);
setPinOutput(D6);
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
void backlight_set(uint8_t level) { bool led_update_kb(led_t led_state) {
if (level == 0) { if (led_update_user(led_state)) {
// turn backlight LEDs off writePin(D1, led_state.caps_lock);
writePinLow(D0);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
} else {
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
return true;
} }
+3
View File
@@ -45,5 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
#define RGBLED_NUM 6 #define RGBLED_NUM 6
#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_ANIMATIONS
+10 -24
View File
@@ -16,32 +16,18 @@
#include "le_bmc.h" #include "le_bmc.h"
void backlight_init_ports(void) { void keyboard_pre_init_kb(void) {
// initialize pins D0, D1, D4 and D6 as output led_init_ports();
setPinOutput(D0); keyboard_pre_init_user();
}
void led_init_ports(void) {
setPinOutput(D1); setPinOutput(D1);
setPinOutput(D4);
setPinOutput(D6);
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
void backlight_set(uint8_t level) { bool led_update_kb(led_t led_state) {
if (level == 0) { if (led_update_user(led_state)) {
// turn backlight LEDs off writePin(D1, led_state.caps_lock);
writePinLow(D0);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
} else {
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
return true;
} }
+2 -2
View File
@@ -17,13 +17,13 @@ BOOTLOADER = bootloadHID
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
WS2812_DRIVER = i2c WS2812_DRIVER = i2c
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
Loaded 100 of 595 files, more files were not shown because too many files have changed in this diff. Show more