Compare commits

..
91 Commits
Author SHA1 Message Date
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
504 changed files with 11507 additions and 6758 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:
+1 -1
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
+1
View File
@@ -105,6 +105,7 @@
* [I2C Driver](i2c_driver.md) * [I2C Driver](i2c_driver.md)
* [WS2812 Driver](ws2812_driver.md) * [WS2812 Driver](ws2812_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
+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) {}
```
+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`
+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
+13 -21
View File
@@ -17,27 +17,19 @@ 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 writePinHigh(D1);
writePinLow(D0); }
writePinLow(D1);
writePinLow(D4); bool led_update_kb(led_t led_state) {
writePinLow(D6); if (led_update_user(led_state)) {
} else { writePin(D1, !led_state.caps_lock);
// Turn on the lights }
writePinHigh(D0); return true;
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
}
} }
#endif
+2 -1
View File
@@ -37,7 +37,8 @@ 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
+13 -24
View File
@@ -17,30 +17,19 @@ 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 writePinHigh(D1);
writePinLow(D0); }
writePinLow(D1);
writePinLow(D4); bool led_update_kb(led_t led_state) {
writePinLow(D6); if (led_update_user(led_state)) {
} else { writePin(D1, !led_state.caps_lock);
// Turn on the lights }
writePinHigh(D0); return true;
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
}
} }
+3 -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,8 @@ 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
-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
@@ -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
+2
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
+11 -21
View File
@@ -16,32 +16,22 @@
#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(D0);
writePinHigh(D1); 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;
} }
+2 -1
View File
@@ -37,5 +37,6 @@ 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 -23
View File
@@ -16,32 +16,19 @@
#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(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 -23
View File
@@ -16,32 +16,19 @@
#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(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)
+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 -23
View File
@@ -16,32 +16,19 @@
#include "oe_bmc.h" #include "oe_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(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)
+2 -1
View File
@@ -39,7 +39,8 @@ 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
+23
View File
@@ -15,3 +15,26 @@
*/ */
#include "exent.h" #include "exent.h"
void keyboard_pre_init_kb(void) {
led_init_ports();
keyboard_pre_init_user();
}
void led_init_ports(void) {
setPinOutput(D0);
setPinOutput(D1);
setPinOutput(D6);
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D6);
}
bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
writePin(D0, !led_state.num_lock);
writePin(D1, !led_state.caps_lock);
writePin(D6, !led_state.scroll_lock);
}
return true;
}
+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 = yes RGBLIGHT_ENABLE = yes
WS2812_DRIVER = i2c WS2812_DRIVER = i2c
+2 -1
View File
@@ -37,5 +37,6 @@ 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
+15 -24
View File
@@ -17,30 +17,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "facew.h" #include "facew.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(D0);
// Turn out the lights setPinOutput(D1);
writePinLow(D0); writePinHigh(D0);
writePinLow(D1); writePinHigh(D1);
writePinLow(D4); }
writePinLow(D6);
} else { bool led_update_kb(led_t led_state) {
// Turn on the lights if (led_update_user(led_state)) {
writePinHigh(D0); writePin(D1, !led_state.caps_lock);
writePinHigh(D1); }
writePinHigh(D4); return true;
writePinHigh(D6);
}
} }
+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 { D3, D1, D0, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5 }
#define UNUSED_PINS #define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ /* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* /*
+2 -1
View File
@@ -38,7 +38,8 @@ 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
+12 -22
View File
@@ -16,32 +16,22 @@
#include "mars80.h" #include "mars80.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();
setPinOutput(D1); }
setPinOutput(D4);
setPinOutput(D6);
// turn backlight LEDs on void led_init_ports(void) {
writePinHigh(D0); setPinOutput(D1);
setPinOutput(D6);
writePinHigh(D1); writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6); 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); writePin(D6, !led_state.scroll_lock);
writePinLow(D1);
writePinLow(D4);
writePinLow(D6);
} else {
// turn backlight LEDs on
writePinHigh(D0);
writePinHigh(D1);
writePinHigh(D4);
writePinHigh(D6);
} }
return true;
} }
@@ -1,5 +1,6 @@
/* /*
Copyright 2018 Yiancar Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
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,21 +15,7 @@ GNU General Public License for more details.
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 overwrites for specific keymap */ #include "config_common.h"
#define HS60_HHKB
#undef PRODUCT_ID
#define PRODUCT_ID 0x4855
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3
#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111
+1
View File
@@ -0,0 +1 @@
#include "getta25.h"
+7
View File
@@ -0,0 +1,7 @@
#pragma once
#include "quantum.h"
#ifdef KEYBOARD_getta25_rev1
#include "rev1.h"
#endif
+38
View File
@@ -0,0 +1,38 @@
{
"keyboard_name": "Getta25",
"url": "https://salicylic-acid3.hatenablog.com/",
"maintainer": "Salicylic_acid3",
"width": 5.25,
"height": 6.25,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"ESC", "x":0, "y":0},
{"label":"F2", "x":1, "y":0},
{"label":"=", "x":2, "y":0},
{"label":"DEL", "x":3, "y":0},
{"label":"Num Lock", "x":0, "y":1.25},
{"label":"/", "x":1, "y":1.25},
{"label":"*", "x":2, "y":1.25},
{"label":"-", "x":3, "y":1.25},
{"label":"7", "x":0, "y":2.25},
{"label":"8", "x":1, "y":2.25},
{"label":"9", "x":2, "y":2.25},
{"label":"ESC", "x":4.25, "y":2.25},
{"label":"4", "x":0, "y":3.25},
{"label":"5", "x":1, "y":3.25},
{"label":"6", "x":2, "y":3.25},
{"label":"+", "x":3, "y":2.25, "h":2},
{"label":"F2", "x":4.25, "y":3.25},
{"label":"1", "x":0, "y":4.25},
{"label":"2", "x":1, "y":4.25},
{"label":"3", "x":2, "y":4.25},
{"label":"DEL", "x":4.25, "y":4.25},
{"label":"0", "x":0, "y":5.25, "w":2},
{"label":".", "x":2, "y":5.25},
{"label":"Enter", "x":3, "y":4.25, "h":2},
{"label":"BSPC", "x":4.25, "y":5.25}
]
}
}
}
@@ -0,0 +1,24 @@
/* Copyright 2018 Salicylic_acid3
*
* 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
/* Select hand configuration */
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 180
@@ -0,0 +1,61 @@
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_number {
_BASE,
_ARROW,
_ADJUST,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
//,-----------------------------------|
LT(_ADJUST,KC_ESC), KC_F2, KC_EQL, KC_DEL,
//|--------+--------+--------+--------|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
//|--------+--------+--------+--------+--------|
KC_P7, KC_P8, KC_P9, KC_ESC,
//|--------+--------+--------+--------+--------|
KC_P4, KC_P5, KC_P6, KC_PPLS, KC_F2,
//|--------+--------+--------+--------+--------|
KC_P1, KC_P2, KC_P3, KC_DEL,
//|--------+--------+--------+--------+--------|
LT(_ARROW, KC_P0), KC_PDOT, KC_PENT, KC_BSPC
//`--------------------------------------------'
),
[_ARROW] = LAYOUT(
//,-----------------------------------|
_______, _______, _______, _______,
//|--------+--------+--------+--------|
XXXXXXX, _______, _______, _______,
//|--------+--------+--------+--------+--------|
XXXXXXX, KC_UP, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______,
//|--------+--------+--------+--------+--------|
XXXXXXX, KC_DOWN, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
MO(_ARROW), _______, _______, _______
//`--------------------------------------------'
),
[_ADJUST] = LAYOUT( /* Base */
//,-----------------------------------|
MO(_ADJUST), _______, _______, _______,
//|--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
RGB_SAD, RGB_SAI, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, _______,
//|--------+--------+--------+--------+--------|
RGB_VAD, RGB_VAI, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
_______, _______, RGB_MOD, _______
//`--------------------------------------------'
)
};
+25
View File
@@ -0,0 +1,25 @@
/* Copyright 2018 Salicylic_acid3
*
* 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
/* Select hand configuration */
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 180
#define OLED_FONT_H "keyboards/getta25/keymaps/oled/glcdfont.c"
+231
View File
@@ -0,0 +1,231 @@
// 'loveLain', 128x32px
#include "progmem.h"
static const unsigned char font[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00, // 00
0x3E,0x5B,0x4F,0x5B,0x3E,0x00, // 01
0x3E,0x6B,0x4F,0x6B,0x3E,0x00, // 02
0x1C,0x3E,0x7C,0x3E,0x1C,0x00, // 03
0x18,0x3C,0x7E,0x3C,0x18,0x00, // 04
0x1C,0x57,0x7D,0x57,0x1C,0x00, // 05
0x1C,0x5E,0x7F,0x5E,0x1C,0x00, // 06
0x00,0x18,0x3C,0x18,0x00,0x00, // 07
0xFF,0xE7,0xC3,0xE7,0xFF,0x00, // 08
0x00,0x18,0x24,0x18,0x00,0x00, // 09
0xFF,0xE7,0xDB,0xE7,0xFF,0x00, // 0A
0x30,0x48,0x3A,0x06,0x0E,0x00, // 0B
0x26,0x29,0x79,0x29,0x26,0x00, // 0C
0x40,0x7F,0x05,0x05,0x07,0x00, // 0D
0x40,0x7F,0x05,0x25,0x3F,0x00, // 0E
0x5A,0x3C,0xE7,0x3C,0x5A,0x00, // 0F
0x7F,0x3E,0x1C,0x1C,0x08,0x00, // 10
0x08,0x1C,0x1C,0x3E,0x7F,0x00, // 11
0x14,0x22,0x7F,0x22,0x14,0x00, // 12
0x5F,0x5F,0x00,0x5F,0x5F,0x00, // 13
0x06,0x09,0x7F,0x01,0x7F,0x00, // 14
0x00,0x66,0x89,0x95,0x6A,0x00, // 15
0x60,0x60,0x60,0x60,0x60,0x00, // 16
0x94,0xA2,0xFF,0xA2,0x94,0x00, // 17
0x08,0x04,0x7E,0x04,0x08,0x00, // 18
0x10,0x20,0x7E,0x20,0x10,0x00, // 19
0x08,0x08,0x2A,0x1C,0x08,0x00, // 1A
0x08,0x1C,0x2A,0x08,0x08,0x00, // 1B
0x1E,0x10,0x10,0x10,0x10,0x00, // 1C
0x0C,0x1E,0x0C,0x1E,0x0C,0x00, // 1D
0x30,0x38,0x3E,0x38,0x30,0x00, // 1E
0x06,0x0E,0x3E,0x0E,0x06,0x00, // 1F
0x00,0x00,0x00,0x00,0x00,0x00, // 20
0x00,0x00,0x5F,0x00,0x00,0x00, // 21 !
0x00,0x07,0x00,0x07,0x00,0x00, // 22 "
0x14,0x7F,0x14,0x7F,0x14,0x00, // 23 #
0x24,0x2A,0x7F,0x2A,0x12,0x00, // 24 $
0x23,0x13,0x08,0x64,0x62,0x00, // 25 %
0x36,0x49,0x56,0x20,0x50,0x00, // 26 &
0x00,0x08,0x07,0x03,0x00,0x00, // 27 '
0x00,0x1C,0x22,0x41,0x00,0x00, // 28 (
0x00,0x41,0x22,0x1C,0x00,0x00, // 29 )
0x2A,0x1C,0x7F,0x1C,0x2A,0x00, // 2A *
0x08,0x08,0x3E,0x08,0x08,0x00, // 2B +
0x00,0x80,0x70,0x30,0x00,0x00, // 2C ,
0x08,0x08,0x08,0x08,0x08,0x00, // 2D -
0x00,0x00,0x60,0x60,0x00,0x00, // 2E .
0x20,0x10,0x08,0x04,0x02,0x00, // 2F /
0x3E,0x51,0x49,0x45,0x3E,0x00, // 30 0
0x00,0x42,0x7F,0x40,0x00,0x00, // 31 1
0x72,0x49,0x49,0x49,0x46,0x00, // 32 2
0x21,0x41,0x49,0x4D,0x33,0x00, // 33 3
0x18,0x14,0x12,0x7F,0x10,0x00, // 34 4
0x27,0x45,0x45,0x45,0x39,0x00, // 35 5
0x3C,0x4A,0x49,0x49,0x31,0x00, // 36 6
0x41,0x21,0x11,0x09,0x07,0x00, // 37 7
0x36,0x49,0x49,0x49,0x36,0x00, // 38 8
0x46,0x49,0x49,0x29,0x1E,0x00, // 39 9
0x00,0x00,0x14,0x00,0x00,0x00, // 3A :
0x00,0x40,0x34,0x00,0x00,0x00, // 3B ;
0x00,0x08,0x14,0x22,0x41,0x00, // 3C <
0x14,0x14,0x14,0x14,0x14,0x00, // 3D =
0x00,0x41,0x22,0x14,0x08,0x00, // 3E >
0x02,0x01,0x59,0x09,0x06,0x00, // 3F ?
0x3E,0x41,0x5D,0x59,0x4E,0x00, // 40 @
0x7C,0x12,0x11,0x12,0x7C,0x00, // 41 A
0x7F,0x49,0x49,0x49,0x36,0x00, // 42 B
0x3E,0x41,0x41,0x41,0x22,0x00, // 43 C
0x7F,0x41,0x41,0x41,0x3E,0x00, // 44 D
0x7F,0x49,0x49,0x49,0x41,0x00, // 45 E
0x7F,0x09,0x09,0x09,0x01,0x00, // 46 F
0x3E,0x41,0x41,0x51,0x73,0x00, // 47 G
0x7F,0x08,0x08,0x08,0x7F,0x00, // 48 H
0x00,0x41,0x7F,0x41,0x00,0x00, // 49 I
0x20,0x40,0x41,0x3F,0x01,0x00, // 4A J
0x7F,0x08,0x14,0x22,0x41,0x00, // 4B K
0x7F,0x40,0x40,0x40,0x40,0x00, // 4C L
0x7F,0x02,0x1C,0x02,0x7F,0x00, // 4D M
0x7F,0x04,0x08,0x10,0x7F,0x00, // 4E N
0x3E,0x41,0x41,0x41,0x3E,0x00, // 4F O
0x7F,0x09,0x09,0x09,0x06,0x00, // 50 P
0x3E,0x41,0x51,0x21,0x5E,0x00, // 51 Q
0x7F,0x09,0x19,0x29,0x46,0x00, // 52 R
0x26,0x49,0x49,0x49,0x32,0x00, // 53 S
0x03,0x01,0x7F,0x01,0x03,0x00, // 54 T
0x3F,0x40,0x40,0x40,0x3F,0x00, // 55 U
0x1F,0x20,0x40,0x20,0x1F,0x00, // 56 V
0x3F,0x40,0x38,0x40,0x3F,0x00, // 57 W
0x63,0x14,0x08,0x14,0x63,0x00, // 58 X
0x03,0x04,0x78,0x04,0x03,0x00, // 59 Y
0x61,0x59,0x49,0x4D,0x43,0x00, // 5A Z
0x00,0x7F,0x41,0x41,0x41,0x00, // 5B [
0x02,0x04,0x08,0x10,0x20,0x00, // 5C \ .
0x00,0x41,0x41,0x41,0x7F,0x00, // 5D ]
0x04,0x02,0x01,0x02,0x04,0x00, // 5E ^
0x40,0x40,0x40,0x40,0x40,0x00, // 5F _
0x00,0x03,0x07,0x08,0x00,0x00, // 60 `
0x20,0x54,0x54,0x78,0x40,0x00, // 61 a
0x7F,0x28,0x44,0x44,0x38,0x00, // 62 b
0x38,0x44,0x44,0x44,0x28,0x00, // 63 c
0x38,0x44,0x44,0x28,0x7F,0x00, // 64 d
0x38,0x54,0x54,0x54,0x18,0x00, // 65 e
0x00,0x08,0x7E,0x09,0x02,0x00, // 66 f
0x18,0xA4,0xA4,0x9C,0x78,0x00, // 67 g
0x7F,0x08,0x04,0x04,0x78,0x00, // 68 h
0x00,0x44,0x7D,0x40,0x00,0x00, // 69 i
0x20,0x40,0x40,0x3D,0x00,0x00, // 6A j
0x7F,0x10,0x28,0x44,0x00,0x00, // 6B k
0x00,0x41,0x7F,0x40,0x00,0x00, // 6C l
0x7C,0x04,0x78,0x04,0x78,0x00, // 6D m
0x7C,0x08,0x04,0x04,0x78,0x00, // 6E n
0x38,0x44,0x44,0x44,0x38,0x00, // 6F o
0xFC,0x18,0x24,0x24,0x18,0x00, // 70 p
0x18,0x24,0x24,0x18,0xFC,0x00, // 71 q
0x7C,0x08,0x04,0x04,0x08,0x00, // 72 r
0x48,0x54,0x54,0x54,0x24,0x00, // 73 s
0x04,0x04,0x3F,0x44,0x24,0x00, // 74 t
0x3C,0x40,0x40,0x20,0x7C,0x00, // 75 u
0x1C,0x20,0x40,0x20,0x1C,0x00, // 76 v
0x3C,0x40,0x30,0x40,0x3C,0x00, // 77 w
0x44,0x28,0x10,0x28,0x44,0x00, // 78 x
0x4C,0x90,0x90,0x90,0x7C,0x00, // 79 y
0x44,0x64,0x54,0x4C,0x44,0x00, // 7A z
0x00,0x08,0x36,0x41,0x00,0x00, // 7B {
0x00,0x00,0x77,0x00,0x00,0x00, // 7C |
0x00,0x41,0x36,0x08,0x00,0x00, // 7D }
0x02,0x01,0x02,0x04,0x02,0x00, // 7E ~
0x3C,0x26,0x23,0x26,0x3C,0x00, // 7F
0xC7,0xC7,0xC7,0x00,0x00,0x00, // 80
0x00,0x20,0x60,0x60,0x60,0x60, // 81
0x60,0xE0,0x20,0x20,0x20,0x20, // 82
0x20,0x60,0x60,0x00,0x00,0x00, // 83
0x00,0x00,0x00,0xC7,0xC7,0xC7, // 84
0xC7,0xC7,0xC7,0x00,0x00,0x00, // 85
0x00,0xE0,0x70,0x50,0xFE,0x7A, // 86
0x02,0x00,0x20,0x60,0xE0,0xF3, // 87
0x3E,0x30,0x10,0x10,0x00,0x00, // 88
0x00,0x00,0x00,0xC7,0xC7,0xC7, // 89
0xC7,0xC7,0xC7,0x00,0x00,0x80, // 8A
0xC0,0xC3,0xA1,0x90,0x98,0x84, // 8B
0x83,0x00,0x00,0x1E,0x09,0x0C, // 8C
0x04,0xC4,0x7C,0x18,0x00,0x00, // 8D
0x00,0x00,0x00,0xC7,0xC7,0xC7, // 8E
0x00,0x00,0x00,0x00,0x00,0x00, // 8F
0x00,0x00,0x00,0x00,0x00,0x00, // 90
0x00,0x00,0x00,0x00,0x00,0x00, // 91
0x00,0x00,0x00,0x00,0x00,0x00, // 92
0x00,0x00,0x00,0x00,0x00,0x00, // 93
0x00,0x00,0x00,0x00,0x00,0xE0, // 94
0xF0,0xF0,0xF0,0xE0,0xEC,0xEE, // 95
0xF7,0xF3,0x70,0x20,0x00,0x7C, // 96
0x7C,0x7C,0x7E,0x00,0x7E,0x7E, // 97
0x7E,0x7F,0x7F,0x7F,0x00,0x00, // 98
0x80,0xC0,0xE0,0x7E,0x5B,0x4F, // 99
0x5B,0xFE,0xC0,0x00,0x00,0xC0, // 9A
0x00,0xDC,0xD7,0xDE,0xDE,0xDE, // 9B
0xD7,0xDC,0x00,0xC0,0x00,0x00, // 9C
0x00,0x00,0x00,0x00,0x00,0x00, // 9D
0x00,0x00,0x00,0x00,0x00,0x00, // 9E
0x00,0x00,0x00,0x00,0x00,0xFF, // 9F
0x71,0x71,0x71,0x00,0x00,0x00, // A0
0x00,0x00,0x00,0x00,0x00,0x00, // A1 ?
0xC0,0xFF,0x00,0x08,0x0E,0x0E, // A2 ?
0x0C,0x00,0x00,0x00,0x00,0x00, // A3 ?
0x00,0x00,0x00,0x71,0x71,0x71, // A4 ?
0x71,0x71,0x71,0x00,0x00,0x08, // A5 ?
0x08,0x09,0x18,0x25,0x61,0x31, // A6 ?
0x1F,0x06,0x04,0x06,0x13,0x32, // A7 §
0x32,0x62,0x02,0x06,0x0C,0x08, // A8 ¨
0x00,0x00,0x00,0x71,0x71,0x71, // A9 ?
0x71,0x71,0x71,0x00,0x00,0x00, // AA ?
0x00,0x00,0x00,0x00,0x00,0x00, // AB ?
0x09,0x11,0x18,0x08,0x0C,0x06, // AC ?
0x03,0x00,0x00,0x00,0x00,0x00, // AD ?
0x00,0x00,0x00,0x71,0x71,0x71, // AE ?
0x00,0x00,0x00,0x00,0x00,0x00, // AF ?
0x00,0x00,0x00,0x00,0x00,0x00, // B0 °
0x00,0x00,0x00,0x00,0x00,0x00, // B1 ±
0x00,0x00,0x00,0x00,0x00,0x00, // B2 ?
0x00,0x00,0x00,0x00,0x00,0x00, // B3 ?
0x00,0x00,0x00,0x00,0x00,0x0F, // B4 ´
0x1F,0x3F,0x7F,0x7F,0x7F,0x7F, // B5 ?
0x7F,0x3F,0x1E,0x0C,0x00,0x1F, // B6 ¶
0x1F,0x1F,0x3F,0x00,0x3F,0x3F, // B7 ?
0x3F,0x7F,0x7F,0x7F,0x00,0x30, // B8 ?
0x7B,0x7F,0x78,0x30,0x20,0x20, // B9 ?
0x30,0x78,0x7F,0x3B,0x00,0x03, // BA ?
0x00,0x0F,0x7F,0x0F,0x0F,0x0F, // BB ?
0x7F,0x0F,0x00,0x03,0x00,0x00, // BC ?
0x00,0x00,0x00,0x00,0x00,0x00, // BD ?
0x00,0x00,0x00,0x00,0x00,0x00, // BE ?
0x00,0x00,0x00,0x00,0x00,0xFF, // BF ?
0x1C,0x1C,0x1C,0x00,0x00,0x00, // C0 ?
0x00,0x00,0x00,0x00,0x00,0x00, // C1 ?
0x07,0x0F,0x00,0x00,0x00,0x00, // C2 ?
0x00,0x00,0x00,0x00,0x00,0x00, // C3 ?
0x00,0x00,0x00,0x1C,0x1C,0x1C, // C4 ?
0x1C,0x1C,0x1C,0x00,0x00,0x00, // C5 ?
0x00,0x00,0x80,0x80,0xC0,0x40, // C6 ?
0x80,0x00,0x00,0x00,0xC0,0x40, // C7 ?
0x40,0xC0,0xC0,0xC0,0x00,0x00, // C8 ?
0x00,0x00,0x00,0x1C,0x1C,0x1C, // C9 ?
0x1C,0x1C,0x1C,0x00,0x00,0x00, // CA ?
0x00,0x00,0x00,0x00,0x00,0x00, // CB ?
0x00,0x00,0x00,0x00,0x00,0x00, // CC ?
0x00,0x00,0x00,0x00,0x00,0x00, // CD ?
0x00,0x00,0x00,0x1C,0x1C,0x1C, // CE ?
0x00,0x00,0x00,0x00,0x00,0x00, // CF ?
0x00,0x00,0x00,0x00,0x00,0x00, // D0 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D1 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D2 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D3 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D4 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D5 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D6 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D7 ×
0x00,0x00,0x00,0x00,0x00,0x00, // D8 ?
0x00,0x00,0x00,0x00,0x00,0x00, // D9 ?
0x00,0x00,0x00,0x00,0x00,0x00, // DA ?
0x00,0x00,0x00,0x00,0x00,0x00, // DB ?
0x00,0x00,0x00,0x00,0x00,0x00, // DC ?
0x00,0x00,0x00,0x00,0x00,0x00, // DD ?
0x00,0x00,0x00,0x00,0x00,0x00, // DE ?
0x00,0x00,0x00,0x00,0x00,0xFF, // DF ?
};
static const unsigned int fontLen = 512;
+204
View File
@@ -0,0 +1,204 @@
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
#ifdef OLED_DRIVER_ENABLE
static uint32_t oled_timer = 0;
#endif
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_number {
_BASE,
_ARROW,
_MACRO,
_ADJUST,
};
enum custom_keycodes {
RGB_RST = SAFE_RANGE,
SEND_SUM,
SEND_AVE,
SEND_CIF,
SEND_MAX,
SEND_MIN
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
//,-----------------------------------|
KC_ESC, KC_F2, JP_EQL, KC_DEL,
//|--------+--------+--------+--------|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
//|--------+--------+--------+--------+--------|
KC_P7, KC_P8, KC_P9, LCTL(JP_LBRC),
//|--------+--------+--------+--------+--------|
KC_P4, KC_P5, KC_P6, KC_PPLS, JP_EQL,
//|--------+--------+--------+--------+--------|
KC_P1, KC_P2, KC_P3, KC_DEL,
//|--------+--------+--------+--------+--------|
LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC
//`--------------------------------------------'
),
[_ARROW] = LAYOUT(
//,-----------------------------------|
_______, _______, _______, _______,
//|--------+--------+--------+--------|
XXXXXXX, _______, _______, _______,
//|--------+--------+--------+--------+--------|
XXXXXXX, KC_UP, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______,
//|--------+--------+--------+--------+--------|
XXXXXXX, KC_DOWN, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
MO(_ARROW), MO(_MACRO), _______, _______
//`--------------------------------------------'
),
[_MACRO] = LAYOUT(
//,-----------------------------------|
_______, _______, _______, _______,
//|--------+--------+--------+--------|
SEND_MIN,SEND_MAX,SEND_CIF,SEND_AVE,
//|--------+--------+--------+--------+--------|
KC_F7, KC_F8, KC_F9, _______,
//|--------+--------+--------+--------+--------|
KC_F4, KC_F5, KC_F6,SEND_SUM, _______,
//|--------+--------+--------+--------+--------|
KC_F11, KC_F12, KC_F3, _______,
//|--------+--------+--------+--------+--------|
_______, _______, JP_RPRN, _______
//`--------------------------------------------'
),
[_ADJUST] = LAYOUT( /* Base */
//,-----------------------------------|
_______, _______, _______, _______,
//|--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
RGB_SAD, RGB_SAI, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, _______,
//|--------+--------+--------+--------+--------|
RGB_VAD, RGB_VAI, XXXXXXX, _______,
//|--------+--------+--------+--------+--------|
_______, _______, RGB_MOD, _______
//`--------------------------------------------'
)
};
//A description for expressing the layer position in LED mode.
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _ARROW, _MACRO, _ADJUST);
#ifdef RGBLIGHT_ENABLE
switch (get_highest_layer(state)) {
case _ARROW:
rgblight_sethsv_at(HSV_BLUE, 0);
break;
case _MACRO:
rgblight_sethsv_at(HSV_RED, 0);
break;
case _ADJUST:
rgblight_sethsv_at(HSV_PURPLE, 0);
break;
default: // for any other layers, or the default layer
rgblight_sethsv_range( 0, 0, 0, 0, 1);
break;
}
rgblight_set_effect_range( 1, 8);
#endif
return state;
}
int RGB_current_mode;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool result = false;
if (record->event.pressed) {
#ifdef OLED_DRIVER_ENABLE
oled_timer = timer_read32();
#endif
}
switch (keycode) {
case SEND_SUM:
if (record->event.pressed) {
SEND_STRING("_SUM*");
}
break;
case SEND_AVE:
if (record->event.pressed) {
SEND_STRING("_AVERAGE*");
}
break;
case SEND_CIF:
if (record->event.pressed) {
SEND_STRING("_COUNTIF*");
}
break;
case SEND_MAX:
if (record->event.pressed) {
SEND_STRING("_MAX*");
}
break;
case SEND_MIN:
if (record->event.pressed) {
SEND_STRING("_MIN*");
}
break;
default:
result = true;
break;
}
return result;
}
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
void render_layer_state(void) {
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("LAYER"), false);
oled_write_P(PSTR("Arrow"), layer_state_is(_ARROW));
oled_write_P(PSTR("Macro"), layer_state_is(_MACRO));
oled_write_P(PSTR("Adjus"), layer_state_is(_ADJUST));
oled_write_P(PSTR(" "), false);
}
void render_keylock_status(led_t led_state) {
oled_write_P(PSTR("NumL "), led_state.num_lock);
}
void render_layer_messages(void) {
oled_write_P(PSTR("GETtA 25 For Your Good Job. "), false);
}
void render_status(void) {
/* Show Keyboard Layout */
render_layer_state();
render_keylock_status(host_keyboard_led_state());
}
void oled_task_user(void) {
static const char PROGMEM font_logo[] = {
0x80,0x81,0x82,0x83,0x84,
0xa0,0xa1,0xa2,0xa3,0xa4,
0xc0,0xc1,0xc2,0xc3,0xc4,
0x85,0x86,0x87,0x88,0x89,
0xa5,0xa6,0xa7,0xa8,0xa9,
0xc5,0xc6,0xc7,0xc8,0xc9,
0x8a,0x8b,0x8c,0x8d,0x8e,
0xaa,0xab,0xac,0xad,0xae,
0xca,0xcb,0xcc,0xcd,0xce,0
};
oled_write_P(font_logo, false);
render_status(); // Renders the current keyboard state (layer, lock)
}
#endif
+17
View File
@@ -0,0 +1,17 @@
# getta25
![getta25](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20191127/20191127005608.png)
This is 25 keys tenkeypad.
* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3)
* Hardware Supported: Getta25 PCB, Pro Micro
* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1700006)
Make example for this keyboard (after setting up your build environment):
make getta25:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
[Build guide](https://salicylic-acid3.hatenablog.com/entry/getta25-rev2-build-guide)
+76
View File
@@ -0,0 +1,76 @@
/*
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060
#define DEVICE_VER 0x0013
#define MANUFACTURER Salicylic_Acid
#define PRODUCT getta25
#define DESCRIPTION A custom keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 6
// wiring of each half
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B2 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLED_NUM 9 // Number of LEDs
#define RGBLIGHT_ANIMATIONS
#ifndef IOS_DEVICE_ENABLE
#define RGBLIGHT_LIMIT_VAL 180
#define RGBLIGHT_VAL_STEP 17
#else
#define RGBLIGHT_LIMIT_VAL 50
#define RGBLIGHT_VAL_STEP 4
#endif
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
+1
View File
@@ -0,0 +1 @@
#include "rev1.h"
Loaded 100 of 504 files, more files were not shown because too many files have changed in this diff. Show more