Compare commits

..

388 Commits

Author SHA1 Message Date
Ryan
d3932a104c Add padding to LUFA-MS .BIN files (#13922) 2021-08-10 18:03:04 +10:00
rate
076c8cc45f [Keyboard] Added pistachio_pro (#13466)
* Added pistachio_pro

* Apply suggestions from code review

* Apply suggestions from code review
2021-08-09 22:23:25 -07:00
Ryuki
8ef58e3291 adding my keymap "vayashiko" (#13049)
* adding my keymap

* changed some bugs

* removed include keymap.h
2021-08-09 21:07:14 -07:00
Brandon Lewis
760caaa9af Ristretto - Update bootloader (#13933)
* updated bootloader for 32u4 mcu

Should be atmel-dfu instead of caterina as the mcu is integrated instead of on a pro-micro/elite-c
2021-08-09 14:14:33 -07:00
Daniil Yastremskiy
26ea090190 Limit RGB max brightness on KPrepublic BM-series keyboards (#13132) 2021-08-09 11:32:35 -07:00
Pierre Chevalier
23becac3a6 Support all the 0.2 Ferris variants (#12653)
* Support all the 0.2 Ferris variants

For the Compact, the High and the Mini, create a new directory so each
keyboard may have the correct USB descriptor and a readme with more
specific information about it.

For the Bling, also add support for the underglow functionality.

Change the "MANUFACTURER" string to "Cuddly Keyboards Ltd.", the
name of the company I incorporated to sell keyboards, and change the
default descriptor from "Ferris the keeb" to "Ferris 0.2" which is more
descriptive.
I didn't update the 0.1 variants as I don't intend to sell these kits
with "Cuddly Keyboards". The firmware is mostly there to support
existing users.

Update the "hardware availability" to point to my new website:
cuddlykeyboards.com.

* Add RGB mode toggle to my keymap and to the default keymap

* Improve wording in the readme
2021-08-09 11:23:15 -07:00
Stick
5a59363e28 [User] changes to nstickney's keymaps (#11456)
0) Built a Bastyl, gave away the ErgoDoxEZ
1) UNICODEMAP
2) Iris left is now Elite-C
3) New QMK flashing instructions
2021-08-09 10:34:36 -07:00
Edvard Sire
8936d0ae4b [Keymap] new keymap for nui_mini (#13924) 2021-08-09 10:06:25 -07:00
Pascal Pfeil
9a1a35f681 [Keymap] Add kbd67 mkiirgb keymap (#13884)
Co-authored-by: Spaceman <rionlion100@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-08-09 10:04:40 -07:00
Michele Ferri
be72a64cf6 [Keyboard] Add TouhouPad (#13915)
* Touhoupad rev 2

* cleanup for PR

* fixes after review
2021-08-09 10:04:00 -07:00
Zach White
e6c171bdd6 Fix generate api (#13930)
* Add missing returncode to exit()

* fix the aozora/hotswap vendor id
2021-08-09 08:28:51 -07:00
Zach White
5eb0e406fd make json imports more robust (#13928) 2021-08-09 08:27:02 -07:00
Chris
79d5b27993 [Keymap] rootiest for planck/rev6/ (#13294)
* squashed commits to master

* Fix in case of missing user_song_list
Substitutes missing songs with safe versions
Also updated and added detail to keymap readme

* Adjust Readme to match qmk contrib conventions

* Update keyboards/planck/keymaps/rootiest/config.h

* Update keyboards/planck/keymaps/rootiest/keymap.c

* Update keyboards/planck/keymaps/rootiest/keymap.c

* Update keyboards/planck/keymaps/rootiest/keymap.c

* Update keyboards/planck/keymaps/rootiest/keymap.c

* Fixed license header to GPLv2+

* Fix Volume key delay
Use a static number instead of removed MEDIA_KEY_DELAY

* Use TAP_CODE_DELAY

* added license to config.h

* Clean up formatting
- Fixed markdown in readme
- Removed extra commented line from config.h

* Update keyboards/planck/keymaps/rootiest/config.h
2021-08-09 02:25:43 -07:00
jfescobar18
59b5c884ff [Keyboard] Undead 60M (#13735)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-08 23:17:46 -07:00
Phooood
7c2f48e55d [Keyboard] Add Aozora (hotswap) keyboard (#13919)
* Initial Commit

* added header to hotswap.c

* added keymap-specific reamdme.md

* minor adjustments

* Requested corrections to readme's
2021-08-08 20:31:33 -07:00
datafx
ac2090bf4e [Keyboard] Add kbdfans kbd67 mkii rgb v3 (#13714)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-07 21:45:43 -07:00
Spaceman
bfa7449041 [Keyboard] Add Pancake v2 (#13839)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-07 21:42:04 -07:00
Ananya Kirti
b046bffcb8 [Keyboard] Added CapsLED and ScrollLock LEDs (#13837)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-08-07 21:41:15 -07:00
8bits4ever
bc2b73f997 [Keyboard] a1200 converter minor changes (#13848)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-07 21:15:23 -07:00
jpuerto96
41d854048c [Keyboard] Gorthage Truck - New PCB (#13909)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-07 21:12:55 -07:00
Pascal Pfeil
27d0844efb [Keyboard] Clean up lfkpad and add keymap (#13881)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-08-07 20:37:13 -07:00
peott-fr
34689e348f [Keyboard] Adding my Nyquist keymap (#13858) 2021-08-07 20:24:24 -07:00
kb-elmo
07e2c11e55 [Keyboard] fixes for KBD67 rev2 (#13906) 2021-08-07 07:57:14 -07:00
kb-elmo
85c32da989 [Keyboard] Added 67mk_E PCB (#13869)
* added 67mk_E PCB

* add layouts
2021-08-06 23:52:39 -07:00
bomb
a9b0750f7b [Keyboard] Modify key drive pins for mojo68 (#13863) 2021-08-06 23:52:18 -07:00
Alex Ong
8a9688bc64 [Keyboard] Use new matrix_output_select_delay api (#13861)
* Use new matrix_output_select_delay api

* Updated delay to 15 after more spamming
2021-08-06 23:51:38 -07:00
Cian Johnston
9d88786b6f [Keyboard] add handwired/oem_ansi_fullsize (#13857)
* Add new keyboard oem_ansi_fullsize

* clang-fmt

* Update keyboards/handwired/oem_ansi_fullsize/rules.mk

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

* Update keyboards/handwired/oem_ansi_fullsize/readme.md

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

* update info.json using qmk c2json

* update info.json

* move diagram to readme

* add matrix cols/rows to info.json

* fixup! add matrix cols/rows to info.json

* rename layout, fix block comment

* s/ansi_fullsize/fullsize_ansi/g

Co-authored-by: Joel Challis <git@zvecr.com>
2021-08-06 23:51:03 -07:00
Jack Kenney
e4342f8630 [Keymap] JackKenney's keymap for GMMK Pro (#13853) 2021-08-06 23:49:25 -07:00
Drashna Jaelre
9c03d41f6a [Keyboard] Fix oled_task_user for chocolatebar (#13911) 2021-08-06 23:06:39 -07:00
James Young
95fed3bfcf clean up CRLF instances (#13910) 2021-08-07 15:59:03 +10:00
Moritz
a3cb3e139a [Keyboard] Add Fave87 (#13873)
Co-authored-by: Joel Challis <git@zvecr.com>
2021-08-06 22:48:17 -07:00
misonoworks
d917bfb277 [Keyboard] Add MisonoWorks Chocolate Bar keyboard (#13798)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: autumnisacutie <63772942+autumnisacutie@users.noreply.github.com>
2021-08-06 21:48:19 -07:00
mechlovin
744019c032 [Keyboard] Add Hex4B PCB (#13435)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: vuhopkep <boy9x0@gmail.com>
2021-08-06 17:02:46 -07:00
yfuku
6721825df5 [Keyboard] Add owl8 keyboard (#13380)
* add owl8

* use DIRECT_PINS

* fix encoder

* Changed to use action_exec.
2021-08-06 17:01:52 -07:00
Gigahawk
bdf86c4cbd Add replacement screw specifications to GMMK Pro readme (#13903) 2021-08-06 04:54:43 -07:00
Joel Challis
c588d232cb Avoid name conflicts with usb_hid Arduino code (#13870)
* Avoid name conflicts with usb_hid Arduino code

* Fix tests
2021-08-06 15:53:38 +10:00
James Young
b9a1b61f6a Flehrad Tradestation Refactor (#13897)
* add license headers

Apache 2.0 per the included `license` file.

* info.json: use human-friendly formatting

* refactor keymaps

- split `default` keymap into `default` and `tradestation` keymaps (one for each layout)
- remove boilerplate functions
- apply four-space indent

* partial clean up of rules.mk

- update section header comment blocks
2021-08-05 22:18:17 -07:00
James Young
28b59c30d2 MetaMechs Timber Wolf Configurator Fixes (#13895)
* info.json: use human-friendly formatting

* info.json: fix key sequences for ISO layouts

All the ISO layouts had the Enter key out-of-sequence, causing key-assignment mismatches in QMK Configurator.
2021-08-05 21:28:26 -07:00
James Young
f4c55db8dd cKeys Handwire 101 Refactor (#13879)
* update info.json

- use human-friendly formatting
- remove `key_count` key

* rename LAYOUT to LAYOUT_ortho_4x4

* refactor default keymap

- add license header
- qmk cformat pass
- keycode grid alignment

* remove empty config.h file from default keymap

* update Manufacturer and Product strings

* tidy up handwire_101.c

- add license header
- remove boilerplate functions

* tidy up handwire_101.h

- add license header
- remove instructive comment

* minor rules.mk tidy-up

- remove Bootloader selection sample comments

* rewrite SEND_STRING() statements per fauxpark

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-04 22:32:27 +01:00
James Young
4445455c1f BM65ISO: refactor layout macro (#13860) 2021-08-04 22:24:54 +10:00
Reza Jelveh
8e8803459f Updated Ducky 2 one mini support (#11112)
* Initial Ducky One 2 Mini keyboard and keymap

* Keymap macro issue, together with general polish suggestions

* Separate default keymap into proper default, iso and ansi versions

* info.json updates (Configurator support). DEBOUNCE define adjust.

* Unused keymap defines removed.

* update requested ducky one mini2 board changes

* ducky: don't trigger app key with left shift

* ducky: make default mouse key behavior more linear

* ducky: add GRAVE_ESC_GUI_OVERRIDE to allow for win+esc to work

* ducky: playpause on fn space

* ducky: disable RGB_MATRIX until driver is merged

* ducky: clang-format matrix and one2mini.c

* ducky: update requested changes

Remove WFI_IDLE since it's already in the rules.mk CORTEX_ENABLE_WFI_IDLE=TRUE

* ducky: update requested changes

* ducky: move winkey grave esc to default keymap

* ducky: remove dipswitch from keymap and use DIP_SWITCH_MATRIX_GRID instead

* ducky: info.json lint

* ducky: enable DIP_SWITCH_ENABLE rule

* ducky: update readme

* ducky: fix backslash on default keymap

* ducky: remove unused USB_LED_CAPSLOCK_INDEX 28

* ducky: move mbi5042 led driver to ducky keyboard

* ducky: cosmetics

* ducky: requested changes

* ducky: refactor matrix.c again so we can better compare it to other boards

* ducky: remove bootmagic_lite as the boards bootloader trigger is actually handled in its own bootloader

* ducky: remove custom matrix

* ducky: update for chibios-contrib changes

* ducky: debug new USB driver

* ducky: debug usb issues

* ducky: update chibios version

* ducky: remove halconf.h

* ducky: update rules.mk

* ducky: update chconf.h

* Matching submodules.

* Restructure to explicitly define which board is in use, remove RGB driver pending followup PR.

* Revert "Matching submodules."

This reverts commit 2fbb34e0c6.

Co-authored-by: GitWellBack <48095880+GitWellBack@users.noreply.github.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-08-04 20:35:17 +10:00
James Young
ae20574f84 barracuda: update info.json layout macro reference (#13874)
* barracuda: update info.json layout macro reference

- change LAYOUT to LAYOUT_ortho_3x11

* remove Community Layouts rule

ortho_3x11 isn't a valid Community Layout.
2021-08-04 03:09:25 +01:00
Drashna Jaelre
a0f2be18a4 Add bootloader section to keyboard template (#13774)
* Add bootloader section to keyboard template

* Apply suggestions from code review

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-08-04 01:23:18 +01:00
Changsu Park
9c69db4700 Updated settings.json file to fit VSC's docs (#13829)
This change fixes the warning caused by deprecated way of configuring terminal profiles.

The warning caused by old settings.json is the following:
This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in `#terminal.integrated.profiles.windows#` and setting its profile name as the default in `#terminal.integrated.defaultProfile.windows#`. This will currently take priority over the new profiles settings but that will change in the future.

Refer to the link below for more information:
https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration
2021-08-04 01:22:40 +01:00
James Young
8802d28aad boardsource/holiday/spooky: update info.json layout macro reference (#13875)
- change LAYOUT to LAYOUT_ortho_2x3
2021-08-04 00:29:41 +01:00
Ryan Baker
d1cbea685e rb86 (#13824)
* rb86

* adjudicate comments
2021-08-04 08:54:12 +10:00
Joakim Tufvegren
2b097d670a Fix overflows in WPM calculations (#13128)
* Fix overflow in WPM calculations.

First, the "fresh" WPM calculation could end up being up to 12000 (with
default `WPM_ESTIMATED_WORD_SIZE`) if keys were pressed more or less
simultaneously. This value has now been clamped down to 255, in effect
clamping WPM to its max value of 255.

Second, with `WPM_ALLOW_COUNT_REGRESSION` enabled, it was possible to
regress the WPM below 0 (i.e. to 255) by just repeatedly pressing
backspace.

* Fix WPM being limited to 235 due to float/int logic.
2021-08-04 07:40:08 +10:00
James Young
f2fc23d1b1 aves65: complete layout data (#13868)
add layout data for:
- LAYOUT_all
- LAYOUT_65_iso
- LAYOUT_65_iso_split_bs
- LAYOUT_65_iso_blocker_split_bs
- LAYOUT_65_ansi
- LAYOUT_65_ansi_split_bs
- LAYOUT_65_ansi_blocker
- LAYOUT_65_ansi_blocker_split_bs
2021-08-03 10:20:53 -07:00
James Young
e9a3e20813 4pplet/eagle_viper_rep/rev_a: fix missing key object (#13867)
Adds a key object for the KC_NUHS key to the info.json data.
2021-08-03 10:03:25 -07:00
Jonathan Rascher
853344235a [Keymap] Minor cleanup of bcat keymaps and userspace (#13224) 2021-08-03 09:39:43 -07:00
James Young
4d42fb2031 40percentclub/nori: fix matrix reference in LAYOUT_ortho_4x8 (#13866)
* 40percentclub/nori: fix matrix reference in LAYOUT_ortho_4x8

* remove ortho_4x8 from Community Layouts rule

ortho_4x8 isn't a valid option here.
2021-08-03 00:04:07 -07:00
James Young
2d78a43556 capsunlocked/cu7: fix missing key object (#13862)
Adds a key object for the encoder keypress.
2021-08-03 13:17:06 +10:00
plarso
fd9d531bd9 [Docs] Remove extra word it bootmagic page (#13855) 2021-08-02 18:01:38 -07:00
James Young
be9031d01d 0xCB Static: fix qmk info and Configurator issues (#13856) 2021-08-02 17:52:46 -07:00
JTM
c2f227d2a8 Function96 V2: Fixed info.json file (#13322)
Fixes the info.json data for the LAYOUT_default and LAYOUT_ansi_splitspace macros.
2021-08-02 01:24:25 -07:00
xyzz
720c676403 flash_stm32: don't unlock flash if already unlocked (#13841)
On stm32f4 after reboot from DFU it was observed that the flash is
already unlocked. In that case, attempting to unlock it again causes a
data abort.
2021-08-02 14:27:57 +10:00
James Young
4b630c46fe Duck Eagle/Viper V2 Refactor (#13828) 2021-07-31 13:12:49 -07:00
James Young
851d995a7d Merro60 Layout Macro Refactor (#13827) 2021-07-31 12:17:55 -07:00
James Young
1305b6d82e Momoka Ergo: layout macro/Configurator fix (#13825)
* momoka_ergo.h: use modified QMK 3-character notation

Renames the matrix position arguments to use QMK's K<row><column> notation, but using L or R for the left and right halves, respectively.

* physically arrange layout macro

Arrange the layout macro and keycodes to resemble the assembled keyboard.

* info.json: rebuild LAYOUT data

Fixes mispositioned keys in QMK Configurator.
2021-07-31 12:16:51 -07:00
slashbunny
3f5482bbb7 Update endgame keymap to work with suspend changes (#13805)
Updates the Massdrop CTRL keyboard engame keymap to work after the
changes to USB suspend in #12697

Fixes #13782
2021-07-31 16:28:09 +01:00
James Young
954806c80f DP60 layout macro renames (#13811)
* info.json: apply human-friendly formatting

* rename LAYOUT_60_wkl to LAYOUT_60_ansi_tsangan_split_rshift

* rename LAYOUT_60_wkl_split_bs to LAYOUT_60_tsangan_hhkb

* info.json: remove `key_count` keys
2021-07-31 14:25:47 +01:00
James Young
4604b58769 Charue Sunsetter: layout macro fixes (#13809)
* remove K214 from LAYOUT_1065_ansi macro

Position K214 is only used by the ISO layout (as KC_NUHS); it doesn't get used here. Removing it so the layout macro matches the info.json layout data.

Also updates info.json to use human-friendly formatting.

* add layout macros

Adds:

- LAYOUT_1065_ansi_split_bs macro
- LAYOUT_1065_iso macro
- LAYOUT_1065_iso_split_bs macro
- `default_iso` keymap

* add LAYOUT_all macro

Adds LAYOUT_all macro and a `default_all` keymap.

This PCB is unusual in that the ANSI Backslash and ANSI Enter do not share their matrix positions with the Non-US Backslash or ISO Enter keys at all. This layout macro supports both the ANSI and ISO positions in one macro/keymap.
2021-07-31 14:23:27 +01:00
James Young
56f84774d7 Rartland: add 65_ansi and 65_iso layouts (#13807)
* add 65_ansi and 65_iso layouts

... with Community Layout support

* add block comment of layouts to rartland.h
2021-07-31 14:22:12 +01:00
peott-fr
d191ccfdc5 [Keymap] Add peott-fr Kinesis keymap (#13812) 2021-07-31 06:14:56 -07:00
Jay Greco
56200de2eb [Keyboard] Reduce nibble oled_status keymap size (#13813) 2021-07-31 06:11:11 -07:00
Drashna Jaelre
e755c5fe1f [Keyboard] Fix RGBKB Pan Rev1 Encoder RGB handling (#13781) 2021-07-31 06:09:47 -07:00
MakotoKurauchi
fb6c66a14b change DIP_SWITCH_ENABLE to off (#13815) 2021-07-31 18:51:32 +09:00
James Young
ec2f6026b9 Neito: correct key sequence in info.json (#13808) 2021-07-31 02:47:00 -07:00
Nick Brassel
a4c050b5ae Fix up paths for bioi boards - parallel compilation failures due to file collisions. (#13806) 2021-07-31 10:34:14 +10:00
Nick Brassel
b459f314ec Explicitly state that VIA should not be enabled in the default keymap. (#13803) 2021-07-31 09:21:45 +10:00
Joel Challis
addb389a5e Move ergosaurus via keymap to correct location (#13802) 2021-07-31 00:15:11 +01:00
Ryan
7bfe53ee2f Fix onekey console keymap (#13797) 2021-07-30 22:00:14 +01:00
James Young
aece9ad5fa Xelus Dharma: add info.json file (#13796) 2021-07-30 11:44:50 -07:00
James Young
e180524c10 txuu: rename LAYOUT to LAYOUT_65_ansi_blocker_split_bs (#13794)
Renames the layout macro to be more conformant to the rest of QMK.
2021-07-30 11:17:48 -07:00
James Young
57ad8db60e Tiger910: fix Left Control key size in info.json (#13793) 2021-07-30 11:17:30 -07:00
James Young
4758ea2188 Stratos: fix layout macro reference in info.json (#13792)
- change LAYOUT_60_ansi_tsangan_hhkb to LAYOUT_60_tsangan_hhkb
2021-07-30 11:16:59 -07:00
James Young
069f479af4 Ristretto: fix Configurator layout data (#13791) 2021-07-30 11:16:37 -07:00
James Young
6af2d3a32c X-Bows Ranger: rename LAYOUT to LAYOUT_tkl_ansi (#13795) 2021-07-30 11:16:18 -07:00
Ryan
d1db008745 Onekey cleanup (#13786) 2021-07-30 18:10:05 +01:00
Matthew Dias
cfca970718 [Keyboard] Add portal 66 (#13767) 2021-07-30 10:01:43 -07:00
8bits4ever
1e2408af91 [Keyboard] Add Commodore Amiga 1200 Membrane Converter (#13705)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-30 09:53:55 -07:00
James Young
77735b0a56 Pearl Boards Pandora: correct layout macro reference in info.json (#13787) 2021-07-30 08:12:36 -07:00
James Young
6823e03b01 Ocean Sus Board: rename layout macro (#13785)
- rename LAYOUT_ortho_3x4 to LAYOUT_ortho_4x3
  - ... because ortho layouts in QMK are named by <rows>x<columns> instead of <columns>x<rows>
2021-07-30 08:11:37 -07:00
James Young
f2d34f38be Nack: rename layout macro to LAYOUT_ortho_4x13 (#13784) 2021-07-30 08:10:59 -07:00
Ryan
8b39a3c484 qmk docs: Add flag to open in browser (#13788)
* `qmk docs`: Add flag to open in browser

* Add docs
2021-07-30 14:47:34 +01:00
James Young
d93089d8ea MNK1800s: fix Configurator key sequence (#13783) 2021-07-30 17:17:11 +10:00
James Young
e1ce0d2836 Clawsome Luggage Rack: correct keymap directory name (#13780)
Rename `keyboards/clawsome/luggage_rack/keymap/` to `keyboards/clawsome/luggage_rack/keymaps/`.
2021-07-30 00:07:10 -07:00
officereso
6fd9b2feba [Docs] Added information on soldering diodes in parallel (#13117)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 22:56:27 -07:00
Álvaro A. Volpato
a1f7d86ef5 [Keyboard] Initial Noxary 378 support (#13156)
Co-authored-by: Gondolindrim <alvaro.augusto.volpato@gmail.com>
2021-07-29 22:54:06 -07:00
Jonavin
03212ced24 [Keymap] jonavin gmmk pro keymap add RGB functionality (#13591)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Jonavin <=>
2021-07-29 22:38:38 -07:00
James Young
7e1d28006f CherryB Studio CB1800: fix key sequence in info.json (#13779)
This commit fixes the position in sequence of the arrow keys.
2021-07-29 22:37:41 -07:00
Jonavin
219ce2b58a [Keymap] jonavin quefrency keymap (#13751)
add winkeylock and rgb functions
Co-authored-by: Jonavin <=>
2021-07-29 22:36:21 -07:00
James Young
104cdef329 Cannonkeys Balance: Configurator fixes (#13778) 2021-07-29 22:26:47 -07:00
Trent Hoh
327e5a08d9 [Keyboard] Added YMD40v2 VIA (#13770)
VIA support for YMD40v2
2021-07-29 22:24:21 -07:00
fvolpe83
86c0a6d3d7 [Keymap] Update keymaps for fvolpe83 (#13739)
changed folder name to match github username, changed caps from LT(1,KC_CAPS) to MO(1) and updated readme
2021-07-29 22:16:51 -07:00
James Young
fab1af4154 AnomalyKB a65i Configurator fixes (#13775) 2021-07-29 22:11:57 -07:00
Ramon Imbao
987e8e3529 [Keyboard] Add Mona v1.1 (#13721)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-29 22:08:05 -07:00
James Young
8ca6d835b9 Atomic Refactor (#13761)
* info.json: human-friendly formatting

- one key per line
- line breaks between physical rows
- four-space indent

* info.json: add data for LAYOUT_grid

* fix keymap paths

This commit corrects the paths for three keymaps that were in the wrong directory.

* refactor and bugfix abienz keymap

- remove extra commas
- use QMK-native aliases for KC_TRNS and KC_NO
- add include for Colemak keycode support
- use four-space indent

* refactor and bugfix michelle keymap

- remove inline comments for keymap layout
- remove extra commas
- use QMK-native aliases for KC_TRNS and KC_NO
- use four-space indent

* refactor and bugfix twolayer keymap

- remove extra commas
- refactor action_get_macro() keycode to QMK-native keycode
- use QMK-native aliases for KC_TRNS
- use four-space indent
- adjust grid alignment

* rename LAYOUT_grid to LAYOUT_ortho_5x15

* refactor config.h file

- use #pragma once include guard
- update MANUFACTURER and PRODUCT strings to be consistent with other OLKB boards
- remove Magic config (all settings are default)

* refactor atomic.c

- add license header
- use GPIO control functions

* refactor atomic.h

- add license header
- use #pragma once include guard
- remove redundant file includes

* refactor rules.mk

- remove Bootloader selection comments
- unify Build Option header comment to QMK template
- unify Build Option rules and inline comments

* alias LAYOUT_grid to LAYOUT_ortho_5x15
2021-07-29 12:14:26 -07:00
James Young
c0149dc376 Alu84 Refactor (#13760)
* info.json: human-friendly formatting

* use QMK 3-character notation for layout macro/data

* alu84.h: use #pragma once include guard

* clean up alu84.c

Remove unnecessary includes and functions.

* refactor config.h

- use #pragma once include guard
- enable Backlight Breathing
- align comments to QMK AVR template

* refactor default keymap

- add license header
- use layer_names enum
- refactor keymap to be more generic
- remove unnecessary and empty functions

* refactor turbomech keymap.c

- edit license header
- refactor keymap for readability (use QMK-native keycode aliases)
- remove unnecessary and empty functions

* refactor turbomech config.h

- use #pragma once include guard
- align to QMK template

* refactor turbomech rules.mk

Edit the file to make it conform to QMK template.

* align rules.mk to QMK template

* touch-up default keymap

* touch-up alu84.h

* rename LAYOUT to LAYOUT_75_ansi

Also enables Community Layout Support

* modernize readme.md

- update description
- convert keyboard data to list
- add flashing and bootloader instructions
- update Docs links

* alias LAYOUT to LAYOUT_75_ansi

* change readme image URL per fauxpark

* touch up turbomech keymap rules.mk per fauxpark

* rules.mk: convert tab to spaces
2021-07-29 11:09:16 -07:00
James Young
a78fdbb1f6 Draytronics Elise Configurator fixes (#13763) 2021-07-29 10:45:22 -07:00
TreasureTypes
5a0985aa4a [Keyboard] Add Treasure TYPE-9 Series II (#13725)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-29 09:50:05 -07:00
Alabahuy
aa0b7079a4 [Keyboard] add sus board (#13701) 2021-07-29 09:12:29 -07:00
Takeshi Nishio
441fd2ca5b [Keyboard] Match Vendor ID to my other keyboard, "unison". (#13699)
Co-authored-by: Takeshi Nishio <kkeennnn@gmail.com>
2021-07-29 09:11:40 -07:00
Uy Bui
6bdecb16c0 [Keyboard] we27 update info.json (#13678) 2021-07-29 09:03:21 -07:00
bomb
768072e824 [Keyboard] Add Mojo68 for Melgeek (#13578)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:50:28 -07:00
AquaCylinder
ae268596ce [Keyboard] Add Emi20 (#13603)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:49:51 -07:00
DA
ad6acb3a03 [Keyboard] add cherryb studio cb1800 keyboard (#13639)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:48:39 -07:00
X-Bows Tech
8fa674727d [Keyboard] Add X-Bows Ranger Keyboard (#13660)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:47:51 -07:00
Jonavin
8d611f6873 [Keymap] Jonavin keymap Mercutio add win key lockout function (#13670)
Co-authored-by: Jonavin <=>
2021-07-29 08:47:14 -07:00
N2-Sumikko
dc2dfe2a6c [Keyboard] Add halfcliff keyboard (#13515)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:42:28 -07:00
ESCA47
3a48cd64cb [Keyboard] Add GetawayVan (#13412)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:28:33 -07:00
Jordan Blackbourn
f3d7901950 [Keyboard] Added Orthocode keyboard (#13487)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-29 08:23:27 -07:00
Joel Challis
e646211919 Fix unit tests after recent refactor (#13765) 2021-07-29 12:00:39 +10:00
James Young
ccdb432f71 Allison Numpad: Configurator fix for LAYOUT_numpad_6x4 (#13759)
* info.json: human-friendly formatting

- one key object per line; line breaks between physical rows
- four-space indent
- remove trailing whitespace

* info.json: correct key object order for LAYOUT_numpad_6x4
2021-07-28 16:34:17 -07:00
Ryan
491b83aa32 Update "make format" message (#13741)
* Update "make format" message

* Add examples for `qmk` command as well
2021-07-28 12:02:29 +01:00
Shane Celis
fcce9f2a4f fix: Fix typo in documentation for one shot keys. ON_TOGG -> OS_TOGG (#13754)
`ON_TOGG` doesn't exist in the codebase.
2021-07-28 12:00:55 +01:00
Jonavin
9088df04c3 [Keyboard] fix short circuit in led_update_kb for quefrency rev3 (#13752)
Co-authored-by: Jonavin <=>
2021-07-28 00:24:51 -07:00
ForsakenRei
ae2c2358ec [Docs] Add default case in Tap Dance Example 6 (#13727)
Added a `default` case in `switch(ql_tap_state.state)` at line 493 and 494.
Without it compile firmware with Example 6 code will encounter 2 errors:
`enumeration value 'TD_NONE' not handled in switch`
`enumeration value 'TD_UNKNOWN' not handled in switch`
2021-07-26 19:45:08 -07:00
James Young
a617c8b80a [Keyboard] Ares refactor (#13730) 2021-07-26 19:43:48 -07:00
datafx
b1c5a53a68 Add bootloader size (#13729)
* Add bootloader size

Bootloader size needs to be 6144 to allow QMK to jump to the correct location with bootmagic

* Include dz60rgb v2.1

Add boot loader size to this pcb also
2021-07-27 10:07:29 +10:00
James Young
e6e4ec6267 40percentclub/nein: update info.json layout macro reference (#13726)
- change LAYOUT to LAYOUT_ortho_3x3
2021-07-26 21:02:44 +01:00
Cyril
a73e0a7b13 Revert "Fixed the ortho60 and ortho48 matrix layout after testing (#12106)" (#13456)
This reverts commit e25f05224f.
2021-07-25 22:51:23 -07:00
bomb
2e5cecd704 [Keyboard] Change RGB light defaults for melgeek/mj6xy (#13657)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-25 21:22:13 -07:00
Drashna Jaelre
d45da3f0fb [Keyboard] Update ZSA Keyboard Readmes and keymaps (#13041)
* [Keyboard] Update ZSA Keyboard Readmes and keymaps

* Apply suggestions from code review

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

* Remove custom rgb code for RGB_M_P

* Fix inevitable typo

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

* Update keyboards/planck/ez/readme.md

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-25 18:18:22 -07:00
Joel Challis
fc9fb2c775 Allow output of logging when running unit tests (#13556)
* Initial pass at enabling logging for unit tests

* Add to docs

* Bind debug for more test types

* Force everything

* Tidy up slightly
2021-07-25 17:18:09 +01:00
Drashna Jaelre
b69e7431aa [Keyboard] Fix keymaps for clueboard 66_hotswap (#13694)
* [Keyboard] Fix default keymap for clueboard proto

* Fix keymaps, because they're not actually revision compatible

* Add copyright headers
2021-07-25 12:07:46 +10:00
Joel Challis
b5bcd5b0a1 Refactor some platform dependent logic (#13675) 2021-07-24 19:56:45 +01:00
lokher
145d89ab91 [Keyboard] Add Keychron Q1 (#13397)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-24 09:37:24 -07:00
James Won
44a0aa924c [Keymap] add kinesis/keymaps/jwon (#13618)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-24 08:40:05 -07:00
Xelus22
1b002b7dcc [Keyboard] Dharma (#13663)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-24 08:39:26 -07:00
Shane Celis
d4bc77ac94 feature: Add swap hands support for sofle keyboard. (#13654) 2021-07-24 08:39:04 -07:00
Rafael Yumagulov
e08203f16a [Keyboard] Added Compound keyboard support (#12942)
* [Keyboard] Added Compound keyboard support

* Small fixes for Compound keyboard

* Fixed readme and header file for Compound keyboard

* Update keyboards/compound/rules.mk

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

* Changed info.json and readme.md for Compound Keyboard

info.json - removed key_count
readme.md - changed PCB picture url to low-resolution

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-23 20:45:24 -07:00
Matthew Dias
4a47ee937d [Keyboard] Add model-v keyboard (#13643)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-23 08:10:01 -07:00
Matthew Dias
cda1792ece [Keyboard] Add Txuu keyboard (#13650)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-22 21:45:35 -07:00
Jay Greco
a08c7087be [Keymap] Reduce NIBBLE oled_bongocat keymap size so it compiles (#13638) 2021-07-22 21:45:17 -07:00
Domantas
dfd795e48e Add backslash in lily58 domnantas keymap (#12713) 2021-07-23 14:24:16 +10:00
kb-elmo
4a8f540949 [Keyboard] Added another layer for VIA on the AEK II (#13100) 2021-07-22 18:51:29 -07:00
kb-elmo
270bf7a87a [Keyboard] Added Stratos keyboard (#13139) 2021-07-22 18:51:12 -07:00
KnoblesseOblige
79c8f035cc [Keyboard] Added Crin keyboard (#13630)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-22 18:47:32 -07:00
Joel Challis
5d7f2823c9 Implement GPIO abstraction for atsam (#13567)
* Implement GPIO abstraction for atsam

* Convert Drop boards to normal matrix config

* Work round pin conflicts and matrix delay
2021-07-22 23:01:19 +01:00
Tran Kim Tung
95a7c22824 [Keyboard] adds new revision: dztech/dz60rgb/v2_1 (#13636) 2021-07-22 09:39:08 -07:00
Md. Mashur Shalehin Sakib
58abdfc834 [Keyboard] Fixing info.json for h0oni/hotduck (#13640) 2021-07-22 09:35:28 -07:00
Trent Hoh
78a3f43c08 [Keyboard] Ymd40v2new layouts and fixed per-switch backlight (#13622) 2021-07-22 01:11:11 -07:00
Drashna Jaelre
8158473464 [Keyboard] Fix clawsome/hatchback and reviung5 compile issues (#13607) 2021-07-22 00:53:18 -07:00
drhigsby
336c8d3efe [Keyboard] add ogurec (#13242)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-22 00:17:47 -07:00
farfalleflickan
a400681ccf [Keyboard] Updated keyboard & keymaps (#12667)
Co-authored-by: pastapojken <6597735+pastapojken@users.noreply.github.com>
2021-07-21 23:57:35 -07:00
joedinkle
e9c3f71e74 [Keyboard] add SPRH keyboard (#12999)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-21 23:47:48 -07:00
Sắn
92cca84651 [Keyboard] Add keypad Satxri6key (#13423)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-21 23:40:24 -07:00
jmaynard
8e905a7a5c [Keyboard] Initial Tron Guy Labs keyboard implementation. (#13438)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Jay Maynard <jmaynard@conmicro.com>
2021-07-21 23:39:45 -07:00
Brandon Lewis
8c17a822a8 [Keyboard] Add Ristretto Keyboard (#13479)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Brandon Lewis <blewis308@users.noreply.github.com>
2021-07-21 23:31:03 -07:00
Kyle McCreery
5766b9bfb7 [Keyboard] New Keyboard - OBE (#13545)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-21 23:22:00 -07:00
Adam Abrams
fbe782534a [Keyboard] Add personal planck keymap (#13635) 2021-07-21 22:56:46 -07:00
Manassarn "Noom" Manoonchai
665af4fa8d [Keymap] narze/xd004 (#13634)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-21 22:46:15 -07:00
Md. Mashur Shalehin Sakib
5b8d2b5cde [Keyboard] Add h0oni hotduck keyboard (#13609) 2021-07-21 22:39:36 -07:00
Ryan
b564ba13ee Fix API generation failure caused by GRS-70EC (#13631) 2021-07-21 19:30:29 +01:00
Ryan
c79bc7c909 Fix MATRIX_COLS for peranekofactory/tone (#13632) 2021-07-21 19:28:58 +01:00
Alabahuy
2b260bd846 fixed number layer on keymap (#13627) 2021-07-21 19:25:21 +01:00
gkeyboard
ca1aa56c7f [Keyboard] Fix iso layout compile error (#13628)
Fix iso layout compile erreo on qmk web.
2021-07-21 10:14:04 -07:00
Xelus22
afc629210c [Bug] VIA compile fixes (#13626) 2021-07-21 08:35:10 -07:00
Alabahuy
ec1a6f6b8b [Keyboard] add rartland with via support (#13585)
* add rartland and via support

* moved encoder adn oled to c file

* update c file
2021-07-20 22:28:05 -07:00
Andrew Kannan
ddc2766537 Fix vicious40 rules (#13623) 2021-07-21 15:05:10 +10:00
Weirdo
dbca44ae8d [Keyboard] Add Tiger910 (#12605)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 13:09:53 -07:00
Conor Burns
81cac8eec6 [Keyboard] 0xcb 1337 - Added keymap "conor" and fixed some minor stuff (#12744)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-20 13:07:53 -07:00
kb-elmo
c1ba35363d [Keyboard] Added Kineticlabs Emu (#12968) 2021-07-20 10:48:17 -07:00
Paul Ewers
3591312fa3 [Keymap] Updates to personal Drop ALT keymap (#13058) 2021-07-20 10:46:52 -07:00
StefanGrindelwald
42ac7c0541 [Keyboard] Add Momoka ergo (#13127)
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 10:46:29 -07:00
gkeyboard
8c526703f8 [Keyboard] Update lm60n.h (#13249) 2021-07-20 10:43:44 -07:00
sekigon-gonnoc
c6698cfce3 [Keyboard] Add keyboard GRS-70EC (#11296) 2021-07-20 10:24:22 -07:00
aydenvis
8f6867ce95 [Docs] Added note about no split support (#12512)
Currently, this feature isn't supported on splits, spent about an hour troubleshooting my board and firmware before asking, and turns out it's not in place. Note added to save others from this in the future.
2021-07-20 10:11:49 -07:00
FateEverywhere
16e52980c4 [Keyboard] Hard Light - Add keyboard, basic keymap (#12654)
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 09:58:39 -07:00
imchipwood
ec78f8bca2 [Keymap] Adding user code & keymaps for dumbpad & hotdox (#12924)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 09:40:54 -07:00
AlisGraveNil
4f880801ec [Keyboard] luggage rack (#12959) 2021-07-20 09:34:56 -07:00
lfgberg
9d523499af [Keyboard] add anomalykb a65i (#12967)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 09:34:18 -07:00
Andrew Kannan
388a4ae817 [Keyboard] Add Vicious40 to QMK (#12981)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 09:19:26 -07:00
Carl-Fredrik Arvidson
3486870ee4 Adds Swedish Mac ISO and ANSI keymaps (#13055)
* Adds Swedish Mac ISO and ANSI keymaps

* Replaces NBSP with space

* Adds missing keys

* Remove duplicates

* Remove duplicates

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Change case and remove whitespace

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Fix uppercase

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Add specific files for Swedish Pro

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

Remove whitespace

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

* Update quantum/keymap_extras/keymap_swedish_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_pro_osx_ansi.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

* Update quantum/keymap_extras/keymap_swedish_osx_iso.h

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-20 09:16:17 -07:00
Ryan
7ea1b97785 Fix CRLF in xbows/knight:via config.h (#13614) 2021-07-20 14:04:36 +01:00
projectcain
815c17b726 [Keyboard] Add vault45 (#13119)
* adding my keymap

* Update keyboards/projectcain/vault45/keymaps/default/config.h

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

* Update keyboards/projectcain/vault45/keymaps/default/keymap.c

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

* Update keyboards/projectcain/vault45/keymaps/default/keymap.c

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

* Update keyboards/projectcain/vault45/vault45.c

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

* Update keyboards/projectcain/vault45/keymaps/default/keymap.c

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

* Update readme.md

* Update keyboards/projectcain/vault45/keymaps/default/config.h

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

* Update keymap.c

* Update keyboards/projectcain/vault45/keymaps/default/config.h

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

* Update keyboards/projectcain/vault45/readme.md

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

* Update info.json

* Update keyboards/projectcain/vault45/vault45.c

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

* Update keyboards/projectcain/vault45/readme.md

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

* Update keyboards/projectcain/vault45/readme.md

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

* Update keyboards/projectcain/vault45/readme.md

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

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 22:28:32 -07:00
Ryan Boone
b887a1b995 [Keyboard] Add q4z keyboard (#13198)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 22:27:18 -07:00
Uy Bui
1256915583 [Keyboard] Add we27 numpad (#13137)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 22:26:26 -07:00
Michael
35ee990bd0 [Keyboard] fix LED issue BOCC keyboard (#13175)
Co-authored-by: Michael Wamsley <wamsl@Michaels-MacBook-Pro.local>
2021-07-19 22:25:46 -07:00
yiancar
17933a884a [Keyboard] mnk1800s initial commit (#13444) 2021-07-19 22:24:40 -07:00
cole smith
6ab0593f44 [Keyboard] Boardsource technik (#13111)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 21:04:43 -07:00
TerryMathews
9941cf0051 [Keyboard] PORTICO: add support for wt_rgb (#13241)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 21:01:36 -07:00
ぺらねこ
8b0a996d5d [Keyboard] Add tone (#13337)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>
Co-authored-by: kakunpc <15257475+kakunpc@users.noreply.github.com>
2021-07-19 20:49:45 -07:00
Andrew Kannan
f439bfd543 [Keyboard] Aella Keyboard PCB (#13372)
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 20:46:01 -07:00
Andrew Kannan
46b8230468 [Keyboard] Add CannonKeys Balance PCB to QMK (#13489)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 18:49:26 -07:00
npspears
8e30ec1eee [Keyboard] enable RGB underglow on heckerboards/axon40 (#13490)
This PCB uses RGB underglow LEDs. If the user doesn't want them, they can turn them off with a keycode.
2021-07-19 18:48:58 -07:00
Adrian L Lange
1105f2eb47 [Keymap] Update bface p3lim keymap (#13582) 2021-07-19 18:48:00 -07:00
X-Bows Tech
5ee5280fa1 [Keyboard] Update the XBows/Knight keyboard (#13541)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-19 18:28:50 -07:00
Daegara
10905a6500 [Keyboard] CU65 layout update (#13589) 2021-07-19 17:52:19 -07:00
bomb
44a8ad265c [Keyboard] Repaired melgeek/mj63/ RGB lamp driver problem (#13579) 2021-07-19 17:52:00 -07:00
Giorgi Chavchanidze
8bc8eadaf9 [Keymap] Orthon keymap for idobo (#13584)
Co-authored-by: Giorgi Chavchanidze <giorgi@vivaldi.com>
2021-07-19 17:32:20 -07:00
Suschman
7e698c71cd Six Pack and ortho_ layout updates (#13587)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Suschman <suschman@gmail.com>
2021-07-19 17:30:09 -07:00
James Young
046429fa87 Knobgoblin: rename ortho keymap to default (#13592)
Keyboard did not previously have a `default` keymap.
2021-07-19 17:26:34 -07:00
James Young
4b55b7f852 converter/periboard_512: add Configurator layout data (#13600) 2021-07-19 17:06:45 -07:00
James Young
58f9321a77 fluxlab zplit: keymap restructuring (#13599) 2021-07-19 17:05:47 -07:00
Xelus22
5b6780f999 [Keyboard][Bug] Constellation Rev2 (#13595) 2021-07-19 17:04:14 -07:00
James Young
07ae72ea6b LazyDesigners Bolt: move via keymap to keymaps directory (#13581) 2021-07-17 17:41:29 -07:00
James Young
876f861715 Discipline layout macro/Configurator fixes (#13574)
* use human-friendly formatting in info.json

* move layout macro aliases to info.json

* correct and complete layout data

Corrects the layout data for a few layouts, adds the missing data, and renames some of the layout macros.

- rename LAYOUT_wkl_ansi_2_right_mods to LAYOUT_65_ansi_wkl
- rename LAYOUT_wkl_ansi_3_right_mods to LAYOUT_65_ansi_lwkl
- rename LAYOUT_wkl_iso_2_right_mods to LAYOUT_65_iso_wkl
- rename LAYOUT_wkl_iso_3_right_mods to LAYOUT_65_iso_lwkl
2021-07-17 16:25:56 -07:00
James Young
26e64f4fd3 ACR60 Refactor (#13575)
* modernize acr60.h

- use #pragma once include guard
- add license header
- use four-space indent
- use QMK three-character notation for layout macro arguments

* human-friendly format info.json

* remove `key_count` keys from info.json

* rename LAYOUT_2_shifts to LAYOUT_all

* move LAYOUT_all to top

* use QMK three-character notation in info.json

* refactor default keymap

- add license header
- remove third layer (does nothing)
- replace Shift-Escape keycode with KC_GESC
- use LAYOUT_all macro instead of LAYOUT

* modernize readme.md

- update header
- convert metadata section to list
- add flashing and bootloader jump instructions
- update Docs links

* use #pragma once include guard in config.h

* update LED Indicator API

* add license headers
2021-07-17 16:17:48 -07:00
James Young
ca0e7e7bd9 Cutie Club Giant Macro Pad: add info.json (#13576) 2021-07-17 10:16:20 -07:00
James Young
b127180c0c Xelus Akis Configurator Fixes (#13577)
* correct layout macro references

The keyboard's header file and info.json referenced different layout macro names.

* correct layout data

Insert an object for the Non-US Backslash key, which was previously missing.
2021-07-17 01:43:02 -07:00
Takeshi ISHII
d26537acc1 remove RGBLIGHT_H_DUMMY_DEFINE macro from rgblight.h (#13569) 2021-07-17 12:13:16 +09:00
Dasky
932a67ced2 Limit RGB brightness for crkbd when not defined (#13568) 2021-07-16 12:16:06 -07:00
Ryan
6c550cc7f7 Improve driver installation docs (#13562) 2021-07-17 02:49:33 +10:00
lukeski14
89eeb4987c adding tw40 via support (#13032) 2021-07-17 02:42:50 +10:00
Oliver Granlund
455a988aa6 [Keyboard] Neito + my DZ60 keymap tweaks (#11773) 2021-07-16 09:39:35 -07:00
shela
6cc03dd30a Remove unwanted notes (#13563) 2021-07-16 09:37:49 -07:00
Joel Challis
366be0f7e9 Migrate arm_atsam print logic to use common framework (#13554) 2021-07-16 17:08:34 +01:00
Takeshi ISHII
5fda0e2c04 remove #include "rgblight.h" when defined(RGB_MATRIX_ENABLE) from quantum.h (#13555) 2021-07-16 12:54:56 +09:00
Andre Brait
c330fa725d Set some default configurations for GMMK Pro (#13219)
* Set some default configurations for GMMK Pro

* Remove FORCE_NKRO to avoid issues with KVMs
2021-07-16 09:06:23 +10:00
bomb
68b1ef2d1d [Keyboard] correct the info.json for qmk configurator and add two empty layers for via (#13552) 2021-07-15 09:54:58 -07:00
Zach White
9d0b7ab9b9 [keyboard] Clueboard 2x1800 2021 Support (#13220)
* 2x1800 2021

* add support for writing a whole frame at a time

* improvements

* wip

* fix scrolling

* small tweak

* add a buffer that's larger than the display

* add the start of a font

* working upper and lower case letters

* add qmk animation

* integrate the message sign into the qmk task system

* add encoder defaults

* add MAX7219_LED_CUSTOM to config.h

* tweaks

* remove unneeded keymaps

* add a keymap showing how to control the signboard

* cleanup

* cleanup

* add a way to disable the startup test

* make it easier to define options at the keymap level

* Fix define names

Co-authored-by: Greg Cochard <gcochard@users.noreply.github.com>

* Apply suggestions from gcochard

Co-authored-by: Greg Cochard <gcochard@users.noreply.github.com>

* feedback from noroads

* format info.json

Co-authored-by: Greg Cochard <gcochard@users.noreply.github.com>
2021-07-14 21:24:15 -07:00
mechlovin
18c6e1d46d [Keyboard] Add Serratus PCB (#13281)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-14 13:55:52 -07:00
Koobaczech
867d60bd64 [Keyboard] Tidying up my projects and subprojects (#13289)
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ethan Madden <maddene@madden.ninja>
2021-07-14 13:55:12 -07:00
Ryan
99f637e82c Fix some RGB Matrix-enabled keymaps referring to RGBLight mode (#13509) 2021-07-15 03:50:09 +10:00
Zach White
ffdfe3798b switch to qmk-dotty-dict (#13460) 2021-07-14 09:08:48 -07:00
mechlovin
1c9af238dc correct data info.json (#13544)
rouge87 and rogue87
2021-07-14 08:46:44 -07:00
bomb
9c4916e2e8 [Keyboard] Add MelGeek MJ6xy which is a 60% keyboard that support mul… (#13494)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-14 08:39:54 -07:00
James Young
dd5ead676b Traveller handwired layout macro refactor (#13539) 2021-07-13 21:28:56 -07:00
James Young
70efc82c1c Lucid Phantom soldered: layout macro touch-up (#13540) 2021-07-13 21:27:11 -07:00
Albert Y
b29179de1a RGB Matrix support for Scylla (#13415)
Co-authored-by: filterpaper <filterpaper@localhost>
2021-07-13 21:26:00 -07:00
Joel Challis
ef8267d6a7 Refactor Drop boards to custom matrix lite (#13468) 2021-07-13 21:07:33 -07:00
Ian Klug
6cdba3a437 [Keyboard] Add ianklug grooveboard (#13536)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-13 21:04:14 -07:00
Anton
2fd4595955 [Keyboard} Add ISO support for the GMMK Pro (#13532)
* Added iso layer support for the GMMK Pro iso version

* Adjusted the mapping

* aligning with best practises
* aligning with comments from PR

* Added iso layout to info.json
2021-07-13 16:50:17 -07:00
James Young
d4399172d3 Ortho 5x14 handwired info.json correction (#13538)
* ortho5x14 handwired: correct info.json data

Last key was incorrectly positioned.

* fix readme typo
2021-07-13 14:15:38 -07:00
James Young
a3d60464ef 4pplet AEKISO60 keymap/macro touch-up (#13528)
Moves the ISO Enter keycode to the home row for more consistency with the rest of QMK. Also grid-aligns the keycodes and adds a block comment for the layout macro.
2021-07-13 14:04:22 -07:00
James Young
555a449488 Ergoarrows info.json touch-up (#13537)
* human-friendly formatting

Add line breaks between rows and halves.

* fix rounding issues

Fixes issues with y-offset values due to rounding in KLE.

* remove layout dead space; re-mirror halves

Removes the empty white space from the layout, and aligns the keys on the right half so they are a mirror of the left half.
2021-07-13 13:44:01 -07:00
AnthonyL
3cd6cb65bc [Keyboard] Montex add VIA support and keymap. (#13488)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Anthony Lowery <anthony.lowery@unity3d.com>
2021-07-13 10:11:02 -07:00
Cosmin
64e6ba0211 [Keyboard] fixes and additions to the Marauder keyboard (#13462)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-13 08:58:16 -07:00
James Young
bf70db479c AMJ60 Refactor (#13530)
* rename LAYOUT to LAYOUT_all

* refactor default keymap

- add license header
- use layer_names enum
- use LAYOUT_all macro
- update keymap to be more generic
- use QMK-native keycode aliases

* info.json: human-friendly formatting

* convert LAYOUT_iso into a proper LAYOUT_60_iso

* LAYOUT_all bugfix

In the physical sense, position k3d is to the left of k3c.

* rework LAYOUT_max into LAYOUT_60_ansi_split_bs_rshift

* remove LAYOUT_iso_splitrshift and iso_split_rshift keymap

* rework LAYOUT_hhkb into LAYOUT_60_hhkb

* amj60.h cleanup

- add license header
- use #pragma once include guard
- concatenate layout block comments
- remove unnecessary function headers

* add license header to amj60.c

* align config.h to QMK template

* align rules.mk to QMK template

* enable Community Layout support

* modernize readme.md

- add PCB image
- convert keyboard data to list
- add flashing and bootloader instructions
- update Docs links
2021-07-13 06:46:20 -07:00
Takeshi ISHII
b89abc402b [Keyboard] Update Symmetric70 keyboard prototype (#12707)
* update handwired/symmetric70_proto/matrix.c

* make keyboards/handwired/symmetric70_proto/promicro/

* add symmetric70_proto/debug_config.h, update symmetric70_proto/local_features.mk etc.

  set MATRIX_IO_DELAY macro
    make MTEST=mdelay0  symmetric70_proto/promicro:default:flash
    make MTEST=mdelay1  symmetric70_proto/promicro:default:flash
    make MTEST=mdelay10 symmetric70_proto/promicro:default:flash
    make MTEST=mdelay30 symmetric70_proto/promicro:default:flash
  set DEBUG_MATRIX_SCAN_RATE_ENABLE yes
    make MTEST=scan symmetric70_proto/promicro:default:flash
  set MATRIX_DEBUG_DELAY and MATRIX_IO_DELAY macro
    make MTEST=matrix_debug_delay,mdelay0 symmetric70_proto/promicro:default:flash
  set MATRIX_DEBUG_SCAN
    make MTEST=matrix_debug_scan symmetric70_proto/promicro:default:flash

* add symmetric70_proto/matrix_debug/readme.md

* update symmetric70_proto/matrix_debug/readme.md

* update handwired/symmetric70_proto/readme.md

* update handwired/symmetric70_proto/readme.md

* update handwired/symmetric70_proto/*/readme.md

* add handwired/symmetric70_proto/matrix_fast/

* update handwired/symmetric70_proto/matrix_fast/readme.md

* fix typo in handwired/symmetric70_proto/matrix_fast/readme.md

* update config.h under handwired/symmetric70_proto/promicro

* add Proton C support to handwired/symmetric70_proto

* add handwired/symmetric70_proto/proton_c/readme.md

* add promicro/*/readme.md proton_c/*/readme.md

* update handwired/symmetric70_proto/proton_c/proton_c.c

support MATRIX_IO_DELAY_DEFAULT for testing.

* Added another implementation of 'adaptive_delay'.

* update symmetric70_proto/local_features.mk

* update symmetric70_proto/matrix_fast/gpio_extr.h

* add matrix_output_unselect_delay_ports()

* add MTEST=adaptive_delay_fast option

* update symmetric70_proto/matrix_debug/readme.md

* update symmetric70_proto/matrix_fast/readme.md

* update symmetric70_proto/matrix_debug/readme.md

* Erase garbage

* fix symmetric70_proto/proton_c/proton_c.c

* improve adaptive_delay_fast in symmetric70_proto/matrix_debug/matrix.c

* update symmetric70_proto/matrix_debug/readme.md

* fix symmetric70_proto/matrix_debug/readme.md

* Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk

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

* Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk

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

* Update keyboards/handwired/symmetric70_proto/local_features.mk

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

* Update keyboards/handwired/symmetric70_proto/local_features.mk

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

* Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c

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

* Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c

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

* Update keyboards/handwired/symmetric70_proto/local_features.mk

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

* Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c

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

* Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md

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

* Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md

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

* Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md

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

* Update keyboards/handwired/symmetric70_proto/matrix_fast/matrix_config_expand.c

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

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-07-13 18:14:27 +09:00
James Young
6b6ee5fa28 1UP Keyboards 1UP60HTE layout macro touch-up (#13529)
* rename LAYOUT_tsangan to LAYOUT_60_tsangan_hhkb

... and enable Community Layout support.

* use four-space indent and QMK-native keycode aliases

* rules.mk touch-up

- remove Bootloader selection header comments
- unify Build Options comment header to QMK template
- align inline comments

* readme.md touch-up

- convert metadata to list
- add Flashing command

* move layout macro alias to info.json

* apply friendly formatting to info.json

* restore badger keymap to previous (don't edit user keymap)
2021-07-13 00:18:07 -07:00
James Young
92a029d6f3 Ergonomic Vertical Keyboard (EVK) handwired info.json touch-up (#13527)
* scale layout data

Seems the KLE data that was imported to make the original file was scaled 1.25x. This commit removes the scaling.

* human-friendly formatting

Insert line breaks between physical layout rows.

* remove instances where width or height is set to 1

The width and height of a key is defaulted to 1 if not provided by the JSON data, so there's no reason to set it manually.
2021-07-12 23:44:56 -07:00
James Young
7d2f70f398 Checker Boards NOP60 touch-up (#13526)
* apply human-friendly formatting to info.json

* fix JSON tree errors in info.json

* rename layout macros

- rename LAYOUT_2x3u to LAYOUT_60_tsangan_hhkb_split_space
- rename LAYOUT_7u to LAYOUT_60_tsangan_hhkb

* rename 2x3u keymap to default
2021-07-12 23:32:54 -07:00
James Young
8f0bf52b25 ID67 codebase touch-up (#13521)
* correct layout data

Fix incorrect key sizes/positions.

* rename LAYOUT to LAYOUT_65_ansi_blocker

* tweak human-friendly formatting for info.json

Add new lines for new rows.

* adjust keycode alignment in via keymap

* clean up extra lines in readme file

* enable 65_ansi_blocker Community Layout support

* clean up rules.mk

Aligns the inline comments.
2021-07-12 10:14:18 -07:00
Albert Y
c024acd752 [Keyboard] RGB Matrix support for TBK Mini (#13506)
Co-authored-by: filterpaper <filterpaper@localhost>
2021-07-12 08:52:32 -07:00
Kwabena Aduse-Poku
6b8168c378 [Keyboard] Add Bloop65 (#13388)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-12 00:23:33 -07:00
jackytrabbit
20a28d6752 [Keyboard] Update lazydesigners/the60/rev2/rev2.h (#13505)
Update lazydesigners/the60/rev2/rev2.h
2021-07-11 09:42:38 -07:00
Rys Sommefeldt
b71ee47c44 [Keyboard] CapsUnlocked CU7 (#13429)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-11 09:42:19 -07:00
Drashna Jaelre
4f3a4eca97 [Keymap] Fix Corne Via Layout properly (#13518) 2021-07-11 08:50:18 -07:00
James Young
0453b61e1a [Keyboard] Wuque Studio Ikki68 Aurora codebase touch-up (#13510) 2021-07-11 08:47:21 -07:00
Takeshi ISHII
877e81f963 Fixed the Helix keymap 'fraanrosi' compile issues (#13514)
According to `helix/rev2/keymaps/fraanrosi/readme.md`, this keymap should be compiled with the following command:

```
make helix/rev2/under:fraanrosi
```

Therefore, when compiling all helix keymaps with the following command, an error occurs when compiling `fraanrosi`.

```
make helix:all
```

Therefore, add `LED_UNDERGLOW_ENABLE = yes` to `keymaps/fraanrosi/rules.mk` to suppress the error.
2021-07-11 16:51:45 +09:00
Fredrik Salomonsson
0a8accae06 [Keymap] plattfot - Keymap updates for Kyria (#13449)
- Major change in the keymap to work with EurKey. Which relaxes some
  constraints it had before when it had to take in consideration two
  layouts.

  With this the parenthesis can be moved to a better location instead
  of being in the top right corner.

  This also allows esc, del and rctrl to be moved to the base layer.

  Only downside is that ctrl+lalt needed to be removed and instead
  AltGr takes it's place. Add rctrl on right thumb cluster to
  compensate for this which need some reorganization on the thumb
  cluster.

- Split the symbol and function keys layer into two layers, one for
  each hand. Make it easier to press symbols and function keys.

- Add some symbols specific for the EurKey layout.

- Change from running C-<tab> S-C-<tab> to page up/down for the right
  rotary. As holding ctrl and using page up/down works the same in
  firefox. Which allows the rotary to be useful for other things.

- Move scroll lock and insert to right rotary.

- Introducing close tap (CLO_TAP), which is a combination of the
  double tap feature and my macros. E.g. pressing CLO_TAP and ( will
  generate ()←. Which removes the need of the macros and makes it more
  useful than DBL_TAP as it now saves me some keypresses. CLO_TAP exist
  on both the left and right hand layers to make it easy to use.

- Use text for the secondary oled, firmware is too big after rebasing
  on upstream master.

- Update image in the readme to reflect my new layout.
2021-07-10 22:37:28 -07:00
GG
2c6cff4cb7 [Keyboard] add new firewave ikki68_aurora (#13364)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-10 22:08:26 -07:00
James Young
988942ce40 Clawsome Hatchback & SUV: fix improperly named keymap directories (#13508) 2021-07-10 17:35:27 +10:00
Drashna Jaelre
09474cbf04 Fix VIA compilation issues for RGB Matrix (#13503) 2021-07-10 02:32:56 +01:00
Zach White
baa65d2177 enable manual trigger for api data (#13000) 2021-07-09 09:10:45 -07:00
James Young
572a35d9a2 Mechmini V1 Refactor (#13498) 2021-07-09 19:40:59 +10:00
James Young
1e51bb39a3 nknl7en: correct key object order (#13482) 2021-07-08 10:58:42 -07:00
Takeshi ISHII
f44b48669d Updated docs/ja/feature_ps2_mouse.md. (#13472)
Changed following the change in the definition of `PS2_MOUSE_SCROLL_BTN_MASK` in the original document.
2021-07-08 18:47:39 +10:00
Takeshi ISHII
e10e67c9b9 [Update] Change Original TAGs of Japanese translations (#13473)
* Updated docs/ja/proton_c_conversion.md original tag.

* Updated docs/ja/other_vscode.md original tag.

* Updated docs/ja/feature_swap_hands.md original tag.

* Updated docs/ja/faq_general.md original tag.

* Updated docs/ja/feature_userspace.md original tag.

* Updated git co docs/ja/config_options.md original tag.
2021-07-08 18:47:09 +10:00
Takeshi ISHII
eab623f1ad [Docs] update Japanese translation of internals_gpio_control.md (#13401)
* Add 'Atomic Operation' section into docs/ja/internals_gpio_control.md

* Update docs/ja/internals_gpio_control.md

* Update docs/ja/internals_gpio_control.md

* Update docs/ja/internals_gpio_control.md
2021-07-08 18:46:28 +10:00
James Young
72540f7d83 Xelus Ninjin: rename LAYOUT_all to LAYOUT_tkl_ansi_tsangan; add info.json (#13477) 2021-07-07 11:28:11 +10:00
James Young
692d0268ca Kopibeng XT65: Layout Macro Refactor (#13476) 2021-07-07 11:27:23 +10:00
mfkiiyd
b976fcbb44 [Keyboard] Add poker87c and poker87d (#12810)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Water <mfkiiyd@163.com>
2021-07-06 18:06:39 -07:00
Blake
a0a57dc613 [Keyboard] Add new Elise, 65% Keyboard ANSI / ISO (#12782)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-06 18:05:53 -07:00
Simon
dba3f0d1eb [Keyboard] Add bm65iso (#13400)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-06 18:04:32 -07:00
gtips
09c4d536c3 [Keyboard] Add keyboard reviung5 (#13375) 2021-07-06 15:20:20 -07:00
KDon
c9c2916829 [Keyboard] Add kabedon98e (#13314) 2021-07-06 14:47:24 -07:00
Drashna Jaelre
792c4e7893 [Keyboard] Set reasonable defaults for Corne keyboard (#13440)
* [Keyboard] Set reasonable defaults for Corne keyboard

* Add note about bootmagic

* Make bootmagic config super weak

* cleanup

* Apply suggestions from code review

* Update keyboards/crkbd/readme.md
2021-07-06 10:47:26 -07:00
Kuba Tyszko
acf7de7a52 /bin/bash to /usr/bin/env bash (#13422) 2021-07-06 07:56:13 -07:00
Ryan
9ce6808015 Update MSG_PYTHON_MISSING (#13427) 2021-07-06 15:34:04 +10:00
David Luo
03a9baa44f [Keyboard] fix encoder_update_user for nullbitsco/nibble (#13451) 2021-07-05 10:15:24 -07:00
Ryan
4c1c112a16 Traveller cleanup (#13441)
* Traveller cleanup

* Update keyboards/handwired/traveller/info.json

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

Co-authored-by: Joel Challis <git@zvecr.com>
2021-07-05 11:45:31 +01:00
James Young
eb7178b542 LatinPadBLE: correct info.json data (#13452)
* correct info.json data

Removes an extra key object, and corrects the layout macro reference.

* refactor rules.mk file

- remove invalid `LAYOUTS` rule
- edits the rules.mk file to more closely resemble the file from QMK's AVR template.

* additional rules.mk cleanup per fauxpark

Apply suggestions from code review
2021-07-05 03:30:34 -07:00
James Young
5d52d01825 Jabberwocky: adjust key positioning in Configurator (#13447)
* adjust key positioning in Configurator

Some of the keys were visually overlapping when rendered. Adjusted the key positioning to remove the overlaps.

* update readme.md

- fix a broken URL
- rewrite the Bootloader access instructions
- remove trailing whitespace
2021-07-05 03:07:24 -07:00
James Young
673a5b0ea2 Molecule: Layout Macro Refactor (#13453) 2021-07-05 14:11:53 +10:00
wxyangf
fa309df895 [Docs] added list of MIDI keycodes (#13159) 2021-07-04 17:34:20 -07:00
James Young
b73f8de10b correct Configurator layout data (#13448)
The object for the rotary encoder was not previously included in the layout data.
2021-07-04 23:40:31 +01:00
James Young
af083b41cd Yampad: add info.json (#13445) 2021-07-04 08:34:50 -07:00
Yon Nor
4d4cac2d07 [Keyboard] Add CX60 (#13402)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-03 20:24:20 -07:00
James Young
6d8fac5e2d Specskeys Configurator Bugfix and Refactor (#13439) 2021-07-03 20:13:50 -07:00
AnthonyL
3e04e22edb [Keyboard] IDOBAO ID67 (#13378)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Anthony Lowery <anthony.lowery@unity3d.com>
2021-07-03 19:54:33 -07:00
cole smith
400844453a [Keyboard] ortho boards from the technik gb (#13382)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-03 18:06:05 -07:00
Drashna Jaelre
2161496d62 [Keyboard] Add soldered variant of Titan 65 keyboard. (#13270) 2021-07-03 16:48:51 -07:00
James Young
79751f5b15 Pisces: correct layout macro reference in info.json (#13410) 2021-07-03 09:44:15 -07:00
Manna Harbour
65f8da3034 [Keymap] Update Miryoku (#13307)
Fix reddit link

Duplicate open parenthesis next to close parenthesis on NSSL

Add customisation instructions

Add lily58

Add gergo
Co-authored-by: Jonathan Dayton <jonathandayton23@gmail.com>

Clean up LAYOUT macro formatting

Add alternative vi-style navigation layout

Add kyria

Add minidox

Change order of keyboards

Add iris

Expand TOC

Re-order userspace subheadings

Add atreus

Add customisation section

Add split_3x5_3 and split_3x6_3 layouts

Add for_science

Fix wrong paths in keyboard config.h and keymap.c headings

Fix keyboard ordering

Fix blank lines around headings

Add compatibility with new org-mode version.

Remove keyboards/crkbd now covered by layouts/split_3x6_3

Add Halmak

Alphabetise alternative alpha arrangements

Move build options out of base layer alphas headings

Add list of keyboards supporting split_3x5_3 layout

Enable Auto Shift and Retro Shift

Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping)

Change kyria thumb key mapping

Add planck_mit layout

Remove alternative bottom row support from ortho_4x12

Remove minidox
 - Covered by split_3x5_3 layout

Add moonlander

Remove KC_ macros

Add 60_ansi layout

Add ortho_5x15 layout
Closes manna-harbour/qmk_firmware#5
Co-authored-by: Rob <rob@debank.tv>

Fix typo (manna-harbour/qmk_firmware#7)
Author: sonnius <sonnius@users.noreply.github.com>

Add redox_w (manna-harbour/qmk_firmware#8)
Author: Brian Romanko <hello@bromanko.com>
Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com>

Add AUTO_SHIFT_NO_SETUP to reduce firmware size

Update image paths

Add instructions to checkout development branch

Add kyria extended thumbs option, change default, add KLE

Change clipboard keys
 - Change order to be mirror of windows bindings
 - Change default to use CUA bindings for Cut, Copy, and Paste, and Fun Cluster
bindings for Undo and Redo
 - Add alternative bindings
   - Fun Cluster (original miryoku bindings)
   - Mac
   - Windows
 - Change prefix for local macros from X_ to U_

Disable Retro Shift, enable Auto Shift for non-alphas

Revert "Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping)"

Add Experimental Features section

Update miryoku image link

Update cover image link

Add dactyl_manuform/4x5

Add cutomisation examples

Add https to remote example

Fix dactyl_manuform/4x5 subset mapping

Add extended thumbs to ortho_4x12

Update Colemak Mod-DH naming
Closes manna-harbour/qmk_firmware#13

Add dactyl_manuform/5x6
Resolves manna-harbour/qmk_firmware#14
Co-authored-by: Sebastian Morales <sebastian.moralesd@gmail.com>

Add note on FORCE_LAYOUT
 - Needed to use EXTENDED_THUMBS on planck

Add parent directories to keyboard headings and re-order

Add keyboardio/atreus
Resolves manna-harbour/qmk_firmware#15

Add torn
Resolves manna-harbour/qmk_firmware#16
Author: Brian Romanko <hello@bromanko.com>
Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com>

Change map to zip
 - Adds support for python3, still compatible with python2.
Resolves manna-harbour/qmk_firmware#10
Resolves manna-harbour/qmk_firmware#19
Co-authored-by: Ori <ori@oribarbut.com>

Add python-version

Add sofle

Add ergotravel

Add ortho_5x12

Add ortho_4x10

Add :main no header argument to C code blocks
resolves manna-harbour/qmk_firmware#11
resolves manna-harbour/qmk_firmware#12
Co-authored-by: RubioJr9 <u0893472@utah.edu>

Add flipped layers and inverted-T nav alternative layouts
 - Separate tap_table into alphas_table and thumbs_table
 - Add mode argument to table-layout-half
 - Remove layer_name
 - Rename layers
 - Add mods and clipboard to MBO and mirror
 - Add MIRYOKU_LAYERS=FLIP
 - Add MIRYOKU_NAV=INVERTEDT

Add layer diagrams

Update contact section

Update links for Bilateral Combinations and Retro Shift

Add description and no reverse angle option to 60_ansi layout

Update list of keyboards supporting community layouts
 - and example build command lines

Change moonlander thumb keys

Update list of keyboards supporting split_3x5_3

Add license to tangled C source files
2021-07-03 09:09:02 -07:00
yfuku
3b1506b741 [Keyboard] Add wings42 keyboard (#12734)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-03 09:04:30 -07:00
Faehriss
bec74aec1b [Keyboard] Added LAYOUT_60_iso_split_rshift to ok60 (#12902)
added lines to support split right shift ISO in QMK configurator.
2021-07-03 08:18:21 -07:00
Jonavin
002d90b357 [Keymap] Jonavin merc additional encoder functionality (#13039)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Jonavin <=>
2021-07-03 08:13:41 -07:00
Xelus22
4b6af0a507 [Bug] Pachi RGB - fix rgb placement (#13428) 2021-07-03 08:02:54 -07:00
Jonavin
d068b7c097 [Keymap] gmmk pro keymap with numpad, enhanced encoder functionality and Win key lock (#13406)
Co-authored-by: Jonavin <=>
2021-07-03 01:36:38 -07:00
Jonavin
5878e86c8a [Keymap] Jonavin quefrency keymap add encoder functionality + 2tap Shift CAPSLOCK (#13376)
Co-authored-by: Jonavin <=>
2021-07-03 01:16:16 -07:00
Albert Y
fdf71f1aa7 [Docs] RGB Matrix Caps Lock and Layer indicator example (#13367)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: filterpaper <filterpaper@localhost>
2021-07-03 01:07:01 -07:00
stanrc85
4b285d3f50 [Keymap] Add stanrc85 community layout (#13338) 2021-07-03 01:06:21 -07:00
Nick Abe
2ccca64514 [Keymap] 2Moons-JP Keymap Update (#13279)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-03 01:00:34 -07:00
rate
0339467814 [Keyboard] Added pistachio rev2 (#13248)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-03 00:59:52 -07:00
Nic Lake
7f41c5147b [Keymap] niclake - Keymap updates - Boardwalk updates & DZ60 create (#13245) 2021-07-03 00:59:30 -07:00
Rob Owens
c55bb3d478 [Keyboard] Add support for Idobao Montex (#13214)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-03 00:58:13 -07:00
X-Bows Tech
2af5d493e3 [Keyboard] Add X-Bows Knight_Plus Keyboard (#13221)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-03 00:57:27 -07:00
Manassarn "Noom" Manoonchai
45dec4911c [Keymap] Add narze lily58 keymap & update my other keymaps (#13110)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-03 00:50:32 -07:00
Ryan
06e0643541 Add "Ctrl+C to cancel" to "waiting for bootloader" messages (#13424) 2021-07-03 16:34:22 +10:00
Qiaowei Tang (Joel)
2ce8d26418 [Keymap] Think6.5v2 keymap with working caps-lock indicator (#12709)
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-02 23:31:32 -07:00
David Rambo
170de06475 [Keymap] Update personal keymaps, add Corne keymap, and update non-kc LAYOUT for Iris (#12273)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-02 22:30:32 -07:00
Dino Fizzotti
f51d929bd9 [Keyboard] Add FnRow v1 keyboard by dinofizz (#11817)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Dino Fizzotti <dinofizz@pop-os.localdomain>
2021-07-02 20:56:23 -07:00
Conor Burns
8bba77db0d added 0xCB Static (#13047)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-07-02 19:38:53 +01:00
James Young
11a406f046 correct info.json data (#13409) 2021-07-02 14:12:05 +01:00
James Young
73dedb96f2 add maintainer value to info.json (#13411)
Configurator isn't using the data in this file, and I think this may be why...
2021-07-02 14:09:24 +01:00
Joel Challis
9f49ec51a1 Fix up recent checkerboards additions (#13414) 2021-07-02 14:00:55 +01:00
Xelus22
a8f6a36e1e [Bug] fix Dystopia.h comma (#13413) 2021-07-02 16:21:27 +10:00
Ryan
5046883531 Cleanup gitignore (#13390) 2021-07-02 16:08:34 +10:00
npspears
6db4b49fec add support for Axon40 and G_IDB60 (#13075)
* add support for Axon40

* add support for G_IDB60

* added bootloader reset instructions

* added bootloader reset instructions
2021-07-02 10:45:31 +10:00
Danny
db7fd6c3a1 Add missing Quefrency layouts for QMK Configurator (#13384)
* Reformat info.json using Prettier

* Add missing layouts needed for QMK Configurators
2021-07-01 12:39:16 -07:00
AfterThought
79a46708f8 [Keyboard] Adding Via support to the GON NerD60 (#13395) 2021-07-01 12:17:28 -07:00
Jakob Hærvig
bef73f44aa [Keymap] Add haervig userspace and keymaps (#13362) 2021-07-01 10:12:19 -07:00
Caleb Lightfoot
c275828ac2 Changed Yeehaw Default Keymap (#13341) 2021-07-01 20:47:43 +10:00
umi
57d9f01125 [Docs] update Japanese translation of other_eclipse.md (#12776)
* update other_eclipse.md translation

* update based on comment

* update based on comment
2021-07-01 18:22:48 +09:00
umi
a1582c4411 update Japanese translation of config_options.md (#12695)
* update config_options.md translation

* update config_options.md translation

* update based on comment

* update based on comment
2021-07-01 18:22:10 +09:00
s-show
397d388862 Translated 'feature_advanced_keycodes.md'. (#12454)
* Translated 'feature_advanced_keycodes.md'.

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* Update docs/ja/feature_advanced_keycodes.md

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

* update based on comment.

* update based on comment.

Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>

* update based on comment.

Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>

* update based on comment.

Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>

Co-authored-by: shela <shelaf@users.noreply.github.com>
Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>
2021-07-01 18:21:37 +09:00
s-show
882b90b729 [Docs] Japanese translation of docs/keycodes_basic.md (#11044)
* 'keycodes_basic.md' copied.

* Translation completed.

* update to "breakpoint_2021_05_29".

* Update docs/ja/keycodes_basic.md

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

* Update docs/ja/keycodes_basic.md

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

* Update docs/ja/keycodes_basic.md

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

* Update docs/ja/keycodes_basic.md

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

* Update docs/ja/keycodes_basic.md

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

* update based on comment.

* update based on comment.

Co-authored-by: shela <shelaf@users.noreply.github.com>
2021-07-01 18:21:03 +09:00
James Young
e322462cd4 Illusion Rosa: correct layout macro names (#13387) 2021-07-01 01:24:06 -07:00
James Young
a001df5e80 FJLabs Midway60: physically arrange layout macro and fix info.json data (#13386) 2021-07-01 01:23:33 -07:00
James Young
1e809e28b7 Sanctified Dystopia: physically arrange layout macro (#13385)
Arranges the layout macro and keycodes to resemble the assembled keyboard.
2021-07-01 01:23:00 -07:00
Stefano Pace
c1813717a7 Updates for keymap: ut472/stefanopace (#13370) 2021-07-01 01:21:42 -07:00
Michael Stapelberg
2b8ad391ae [Keyboard] update debounce time on kint boards (#13351)
related to https://github.com/kinx-project/kint/issues/39
related to https://github.com/qmk/qmk_firmware/pull/12626
2021-07-01 01:07:37 -07:00
stanrc85
fb405c27ad [Keymap] RGB Timeout added to userspace (#13339) 2021-07-01 01:06:06 -07:00
kb-elmo
13533508e2 [Keyboard][Bug] Fix LED indicators on Skeletn87 (#13335) 2021-07-01 00:53:35 -07:00
Harshit Goel
4168e10c49 [Keyboard] Pteron36, open source 3x5_3 supporting layout (#13313) 2021-07-01 00:44:38 -07:00
Jesper Nellemann Jakobsen
54f429edd8 [Keymap] Create bingocaller keymap for DZ60RGB-ANSI (#13311)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-07-01 00:42:10 -07:00
Shandon Anderson
d8c491954e [Keyboard] Added flygone60 rev3 (#13280)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2021-07-01 00:29:30 -07:00
melonbred
cd68fd7e8d [Keyboard] mb44 - Update info.json and encoder (#13244) 2021-07-01 00:12:53 -07:00
Ryan
dc3896e31c Cleanup junk chars, part 4 (#13345) 2021-07-01 16:41:51 +10:00
Takeshi ISHII
8c982dba31 [Update] Change Original TAGs of Japanese translations (#13396)
* Updated docs/ja/how_a_matrix_works.md original tag.

* Updated docs/ja/api_overview.md original tag.

* Updated docs/ja/contributing.md original tag

* Updated docs/ja/coding_conventions_c.md original tag

* Updated docs/ja/reference_configurator_support.md original tag

* Updated docs/ja/reference_glossary.md original tag

* Updated docs/ja/api_docs.md original tag

* Updated docs/ja/feature_stenography.md original tag

* Updated docs/ja/documentation_templates.md original tag

* Updated docs/ja/faq_keymap.md original tag

* Updated docs/ja/understanding_qmk.md original tag
2021-07-01 14:04:38 +09:00
James Young
27d1e2909f Ergocheap handwired Layout Macro refactor (#13348)
* physically arrange layout macro

Arranges the layout macro and keycodes to resemble the assembled keyboard.

* update info.json data
2021-06-29 16:30:48 -07:00
jackytrabbit
2a07a87a7c Update lazydesigners/the40/the40.h (#13354)
Fix error in the40.h
2021-06-30 08:37:08 +10:00
nopunin10did
93e3e777d6 Jabberwocky quick fixes (#13369)
* cleaning up

* deleting to undelete

* Stub out defaults

* Jabberwocky firmware WIP

* Stubbing out keymap spacing

* Default keymap and layout updates

* start stubbing out JSON for configurator

* more WIP

* Update jabberwocky.h

* Add Readme

* Apply suggestions from code review

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

* Fix layout capitalization

* Updates to personal and default keymaps

* Add instructions for jumping the bootloader

* Update keyboards/nopunin10did/jabberwocky/rules.mk

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

* Add easier ctrl-alt-del to my keymap

* Undo changes from other master

* Add back DYNAMIC_KEYMAP_LAYER_COUNT constant

* Fix readme markup to use list items

* Give my layout VIA compatibility

Co-authored-by: Rossman360 <rmontsinger@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-06-29 18:19:02 +01:00
Danny
5538bffb8e [Keyboard] Add Quefrency Rev. 4 (#13368) 2021-06-28 20:38:59 -07:00
Xelus22
de8939aa5e [Keyboard] fix encoder void to bool (#13334) 2021-06-28 20:30:39 -07:00
James Young
2b2e8bfdb7 Swiftrax Nodu handwired: layout macro sequence fix (#13329) 2021-06-28 20:24:26 -07:00
Xelus22
e475c5bf38 [Bug] Missing empty line at the end of file (#13374) 2021-06-29 11:54:32 +10:00
James Young
f7faa7bfd0 FJLabs BKS65 Solder Layout Macro Refactor (#13347)
* grid align layout macro and keymaps

* physically arrange layout macro, phase 1

* physically arrange layout macro, phase 2

* replace KC_PAUSE with KC_PAUS

Makes the grid alignment nice. :)

* rename LAYOUT_65_ansi to LAYOUT_all

The included layout macro isn't actually correct for QMK's 65% ANSI community layout.

* add an actual LAYOUT_65_ansi

This is a semi-educated guess as to this macro; it may be wrong.
2021-06-28 10:30:52 -07:00
Ryan
53ace430fe Doctor: print CLI version (#13356) 2021-06-27 13:21:53 +10:00
Ryan
cbe761ea16 Exent cleanup (#13353) 2021-06-27 05:07:44 +10:00
Joel Challis
c232882fda Allow configuration of USB_VBUS_PIN on chibios (#13342) 2021-06-26 11:48:48 +01:00
Zach White
848da57d6e do not automatically format json (#13320) 2021-06-25 22:47:48 -07:00
yiancar
ad3169f500 [Keyboard] Add NK1 (#13212)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: yiancar <yiancar@gmail.com>
2021-06-25 21:42:09 -07:00
James Young
b1ea4842e3 FFKeebs Siris Configurator Layout Correction (#13328)
* physically arrange layout macro

Arranges the layout macro and keycodes to resemble the assembled keyboard.

* correct info.json data

Corrects the key sequence and positioning in info.json.
2021-06-25 21:27:37 -07:00
Gvalch-ca
234c129f1e [Keyboard] Add Gvalchca GA15.0 (#13114)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-06-25 21:12:36 -07:00
Xelus22
8783d0c73d [Keyboard] Enable RGB Matrix VIA side for Pachi RGB (#13308) 2021-06-25 21:06:36 -07:00
Drashna Jaelre
79cc6ce2d0 [Keyboard] Bugfixes and Readme additions for PloopyCo devices (#13043) 2021-06-25 20:57:48 -07:00
James Young
6ef0419bb0 SENDYYeah Bevi: correct Configurator layout data (#13327) 2021-06-25 20:56:46 -07:00
James Young
7770a491f6 Nix Studio Oxalys80 Configurator Layout Data Correction (#13326)
* apply human-friendly formatting to info.json

* correct LAYOUT_all data

Corrects the layout data for the LAYOUT_all macro.
2021-06-25 20:30:48 -07:00
James Young
03791ed92a Draytronics Daisy Configurator Refactor (#13325)
* correct layout data

* use LAYOUT as layout macro name

The defined LAYOUT_daisy is functional, but Configurator expects LAYOUT through the info.json file. As the board only supports one layout according to the open-source PCB files, use LAYOUT as the defined macro per QMK guidelines.

* add layout macro alias
2021-06-25 20:24:42 -07:00
James Young
39b1dc7672 GON Nerd60 Refactor (#13343) 2021-06-26 11:53:16 +10:00
Ryan
93bd34c6d3 Cleanup junk chars, part 3 (#13332) 2021-06-26 02:38:21 +01:00
Ryan
92a9fba353 Cleanup junk chars, part 2 (#13284) 2021-06-25 13:51:44 +10:00
Zach White
7c2bd4dd88 add doctor to safe_commands (#13324) 2021-06-24 20:31:46 -07:00
Nathan_Blais
61ec0023c4 Bop added via & unicode support (#13122)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-06-25 09:15:04 +10:00
shela
ca2259d986 Update Japanese document (#10673) 2021-06-24 23:59:30 +09:00
shela
a53128e958 [Docs] Update Japanese faq documents (#12842)
* Update Japanese faq documents.

* Update Japanese summary.

* Update docs/ja/faq_debug.md

Co-authored-by: s-show <s1shimz@gmail.com>

* Update docs/ja/faq_misc.md

Co-authored-by: s-show <s1shimz@gmail.com>

* Apply suggestions from code review

Co-authored-by: s-show <s1shimz@gmail.com>
2021-06-24 21:54:54 +09:00
shela
a726ada59b Update Japanese newbs_getting_started.md (#12841) 2021-06-24 21:53:47 +09:00
James Young
36d8d7df5a SAM SG81M Layout Macro Rework (#13291)
* grid-align layout macro and keymaps

* physically align layout macro and keycodes

Arrange the layout macro and keycodes to resemble the assembled keyboard.

* update info.json data

Updates the info.json data to be correct to the new layout macro.
2021-06-23 21:33:47 -07:00
Zach White
42f4528a45 expand the size of the textpad to allow for taller keyboards (#13319) 2021-06-23 20:35:36 -07:00
Will Wolff-Myren
2d60444df1 [Keymap] gmmk/pro: willwm (#12952)
* Create willwm keymap:
Modified GMMK Pro Default + VIA + Space-Cadet Unicode

* Temporarily remove unicode map calls; try using UNICODE_ENABLE instead

* RGBLIGHT_ENABLE = yes

* ...on second thought, don't enable RGBLIGHT =P

* Move Del to PrtSc, add Home, move PrtSc to Fn+Home

* willwm: Add keymap.json and readme.md

* willwm: Add layer0/layer1 images

* willwm: Update readme.md with info from PR #12952

* willwm: Update to better match template
(https://docs.qmk.fm/#/documentation_templates)
2021-06-24 12:54:44 +10:00
Ramon Imbao
02fcb1069a Add the SquishyTKL and SquishyFRL (#12764)
* Add SquishyTKL

* Add SquishyTKL-FRL

* Adjust readme.md and info.json

* Add JIS support for SquishyTKL

* Fix JIS layout macro

* Fix via layout and keymap

* Migrate SquishyTKL to STM32duino bootloader

* Make chibios conf files generic

* Change TKL via keymap to match number of layers

* Apply chibios changes to FRL as well

* Adjust README regarding flashing with dfu-util

* Add license and header guard
2021-06-24 12:53:38 +10:00
obosob
3cc037d8d8 Add "steal this keyboard" keybaord (#12898) 2021-06-24 12:51:15 +10:00
kb-elmo
543dca0d89 Added Skeletn87 PCBs (#12922)
* add Skeletn87

* update skeletn87 files

* update skeletn87 soldered

* update readme image

* update readme (again)
2021-06-24 12:48:43 +10:00
18438880
fc06c143b1 Latin6rgb use IS31FL3731 IC (#11819)
* Create config.h

* Add files via upload

* Create keymap.c

* Create keymap.c

* Create rules.mk

* Update readme.md

* Update keyboards/latin6rgb/rules.mk

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

* Update keyboards/latin6rgb/rules.mk

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

* Update keymap.c

* Update keymap.c

* Update config.h

* Update config.h

Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-06-24 12:46:03 +10:00
s-show
344b1b4395 Add ID to "## Advanced Macros". (#12830) 2021-06-24 12:32:51 +10:00
James Larkby-Lahet
b354ce94fe enable mouse keys in handwired/dactyl keymaps that use them (#12586) 2021-06-24 12:28:33 +10:00
James Young
fb78447ad6 Monstargear XO87 Solderable Configurator Refactor (#13317) 2021-06-24 12:27:21 +10:00
sendmmsg
d45a24a954 bug if macro definition and not integer is used to identify layers (#12648) 2021-06-24 12:27:10 +10:00
James Young
480b7e595e Studio Kestra Nue: fix info.json layout macro reference (#13318)
Corrected the info.json file to reference LAYOUT_all instead of LAYOUT.
2021-06-24 12:26:55 +10:00
gtips
8030f73f44 [Keymap]Add Keymap reviung34rgb (#12656)
* [Keyboard] Add keyboard Reviung41

* Modified files

* deleted keyboards/reviung41/keymaps/default/config.h

* modified keyboards/rebiung41/keymaps/default/keymap.c

* modified keyboards/reviung41/readme.md

* modified keyboards/reviung41/readme.md

* modified keyboards/reviung41/readme.md

* Update readme.md

Change the image photo of readme.md.

* [Keyboard] Add reviung61

* Update readme.md

* fix keyboards/reviung61/ and add keymap default_rgb

* fix keyboards/reviung61/info.json

* fix keyboards/reviung61/info.json

* remove keyboards/reviung61/keymaps/default/config.h

* [keyboard] Fixed readme.md for reviung39 and 61.

* add keymap keyboards/reviung34/keymaps/default_rgb/ ,default_rgb2u
2021-06-24 12:26:31 +10:00
Suryan Isaac
563de365a7 Added a custom keymap for XD60 (#12736)
* Added custom Keymap

* Added Images to README

* Added Layer 1 Keys for RGB control

* Added GPL2+ License to keymap.c

* Removed extra json files and added a few lines to README
2021-06-24 12:24:56 +10:00
Antoine R. Dumont
f5cecffab2 keymap/ardumont: Fix substitute keycode reset step (#12675)
It so happens that when releasing the control key prior to the main key (C-h, C-i, C-n,
...), the substituted keycode was continuously sent in a loop after that (even when
releasing said key). The workaround so far was to type any other key to stop the loop.

This commit fixes such behavior by resetting the substitution keycode sent when the ctrl
released situation conditional is detected (and that the substitution keycode was on).
2021-06-24 12:24:31 +10:00
Jose Luis Adelantado Torres
5e86a11a8d [keymap] Added new oled_status keymap to nullbitsco/nibble keyboard (#12824)
* Added new oled_status keymap to nullbitsco/nibble keyboard

* rm: Removed font from src imports
2021-06-24 12:24:11 +10:00
Robert Verst
3099630a11 [Keymap] Feature/extend keymap (#12778)
* Add F13-F24

* Add nvim macros

* Add debug switch

* Switch mode every time, add debug print
2021-06-24 12:23:43 +10:00
T.Shinohara
dee50c9cc8 [Keymap] fix key code. numpad to numkey (#12808)
* add keyboard new macro pad "Kuro"

* change main readme.md

* remove not used code from default/keymap.c

* Remove unnecessary code

* Supports info.json

* removed back slash and not used functions.

* update at product link. add japanese messages.

* Merge All

* [Shiro]Add MacKeymap

* Change key code. Numpad→Numkey
2021-06-24 12:23:00 +10:00
Jay Greco
0ec6d6daf7 Update oled_bongocat to match VIA keymap (#12875)
* Update to match VIA keymap

* Update with feedback from PR
2021-06-24 12:22:42 +10:00
Mike Tsao
909d9c228f Switch default layout to standard TKL; add custom (#12818) 2021-06-24 12:22:07 +10:00
Tyler Thrailkill
4a15eb593d snowe keymap/userspace and Ocean Dream animation (#12477)
* Add snowe keymap/userspace & Ocean Dream animation

* Add snowe userspace with keymap wrappers and two animations
* Add crkbd keymap
* Add Ocean Dream animation, a cool full screen animation with:
* * twinkling stars
* * meteor showers
* * ocean waves
* * island with palm tree
* * moon with phases

* Disable Luna so travis build succeeds.

* Add more copyrights

* Add pragma once to keycode_aliases.h

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

Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-06-24 12:21:40 +10:00
David Hoelscher
6e1ed1c9d3 Optional OLED splash screen and fixed OLED i2c execution time saving (#12294)
* Made OLED splash screen optional to reduce memory and fixed OLED i2c execution time saving

* moved OLED address updates into their respective conditional checks
2021-06-23 19:52:06 +10:00
Albert Y
a913db63aa Fix zero condition of reactive runners that will suspend RGB animation (#12710)
* Avoid zero or overflow from user's rgb_matrix_config.speed

* Avoid zero tick for reactive splash.

* Avoid zero time for animation runner.

Co-authored-by: filterpaper <filterpaper@localhost>
2021-06-23 19:45:05 +10:00
Xelus22
ced7e9a0ce [Keyboard][Bug] Makrosu VIA compile fix encoder and formatting (#13306)
* fix encoder and formatting

* remove redundant breaks

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

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

* Update keyboards/makrosu/keymaps/via/keymap.c

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

Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-06-22 20:30:42 -07:00
xyzz
268d0efa7e [Docs] pr_checklist: fix capitalization of Vial (#13301) 2021-06-22 17:45:13 -07:00
Muhammad Rivaldi
4ef2b0f818 adding my custom keypad to qmk repository (#12150)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-06-23 09:34:17 +10:00
James Young
0c5c39c18a Technika: add sample info.json data (#13292)
Adds a placeholder file with sample data, as the layout hasn't been published yet.
2021-06-23 09:32:37 +10:00
Albert Y
92dd1b977b Additional documentation for GUI mod combo (#13266)
Co-authored-by: filterpaper <filterpaper@localhost>
2021-06-22 12:41:57 +10:00
4pplet
d7f352de98 Adding "Eagle Viper Rep", open sourced Eagle/Viper V2/V3 PCB (#13020)
* adding revision A

* Update keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.h

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c

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

* Update readme.md

Adding instruction on how to enter bootloader

* adding instruction on how to enter bootloader (DFU)

adding instruction on how to enter bootloader (DFU)

* updated description

* Update keyboards/4pplet/eagle_viper_rep/rev_a/halconf.h

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/rev_a.c

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/config.h

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/chconf.h

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

* Update keyboards/4pplet/eagle_viper_rep/rev_a/chconf.h

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

* Update keyboards/4pplet/eagle_viper_rep/keymaps/default/keymap.c

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

* Restoring palSetLineMode for working underglow

I was experiencing the same issue as this: https://github.com/qmk/qmk_firmware/issues/12655#issuecomment-844104659

sigprof helped me resolve this issue.

* Update rev_a.c

removing palSetLineMode again, works great after rebase. Thanks!

Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-06-22 08:09:16 +10:00
James Young
19990a21a9 Geminate60 Codebase Touch-up (#13275)
* grid-align keycodes in keymaps

* rename LAYOUT to LAYOUT_all

* update LAYOUT_all macro

- use 3-character K<row><column> notation
- fix malformed electrical mapping

* update info.json

- correct maintainer
- update label fields
- remove meta key

* update readme

- update board description
- update keyboard maintainer
2021-06-21 13:47:47 -07:00
James Young
3f292ec723 Swiftrax Nodu handwired: Layout Macro rename and Community Layout support (#13276)
* rename LAYOUT to LAYOUT_60_ansi_split_bs_rshift

* enable Community Layout support
2021-06-21 13:32:51 -07:00
ploopyco
eba3d68394 Fixes for Ploopy devices (#13144)
Co-authored-by: Drashna Jael're <drashna@live.com>
2021-06-21 20:59:56 +01:00
James Young
224dcac08f ID80: fix LAYOUT_iso data (#13274) 2021-06-21 09:25:02 -07:00
James Young
36f3dba195 mech.studio Dawn: correct key sizes and positioning (#13277) 2021-06-21 09:23:04 -07:00
Nathan
c0dd142d9f [Keyboard] le_chiffre.c conditional led_config (#13285)
disabling RGB_MATRIX_ENABLE causes led_config to fail during compile. Setting this conditional allows you to turn off RGB
2021-06-21 09:04:18 -07:00
Ryan
59c572eaf0 Cleanup junk characters, part 1 (#13282) 2021-06-21 11:29:15 +01:00
2553 changed files with 98100 additions and 20790 deletions

View File

@@ -7,6 +7,7 @@ on:
paths:
- 'keyboards/**'
- 'layouts/community/**'
workflow_dispatch:
jobs:
api_data:

View File

@@ -7,6 +7,7 @@ on:
paths:
- 'keyboards/**'
- 'layouts/community/**'
workflow_dispatch:
jobs:
api_data:

93
.gitignore vendored
View File

@@ -1,36 +1,33 @@
.history/
.dep
*.o
*.bin
*.eep
# Junk files
*.bak
*.swp
*~
.DS_Store
# Build artifacts
.clang_complete
.build/
*.elf
*.hex
*.uf2
*.qmk
!util/bootloader.hex
!quantum/tools/eeprom_reset.hex
*.log
*.lss
*.lst
*.map
*.o
*.stackdump
*.sym
*.swp
tags
*~
# QMK-specific
api_data/v1
build/
.build/
*.bak
.vagrant/
quantum/version.h
.idea/
CMakeLists.txt
cmake-build-debug
.clang_complete
doxygen/
.DS_Store
/util/wsl_downloaded
/util/win_downloaded
quantum/version.h
!quantum/tools/eeprom_reset.hex
*.bin
*.eep
*.hex
*.qmk
*.uf2
# Old-style QMK Makefiles
/keyboards/*/Makefile
/keyboards/*/*/Makefile
/keyboards/*/*/*/Makefile
@@ -43,39 +40,49 @@ doxygen/
/keyboards/*/*/*/*/*/keymaps/Makefile
# Eclipse/PyCharm/Other IDE Settings
.cproject
.project
.settings/
.idea
*.iml
.browse.VC.db*
*.stackdump
.cproject
.idea
.idea/
.project
.settings/
.vagrant/
# ?
.dep
.history/
build/
cmake-build-debug
CMakeLists.txt
# Let these ones be user specific, since we have so many different configurations
*.code-workspace
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/tasks.json
.vscode/last.sql
.vscode/temp.sql
.vscode/ipch/
.stfolder
.tags
.vscode/c_cpp_properties.json
.vscode/ipch/
.vscode/last.sql
.vscode/launch.json
.vscode/tasks.json
.vscode/temp.sql
tags
# ignore image files
*.png
# Ignore image files
*.gif
*.jpg
*.png
# things travis sees
secrets.tar
id_rsa_*
# Things Travis sees
/.vs
id_rsa_*
secrets.tar
# python things
# Python things
__pycache__
.python-version
# prerequisites for updating ChibiOS
# Prerequisites for updating ChibiOS
/util/fmpp*
# Allow to exist but don't include it in the repo

View File

@@ -23,5 +23,8 @@
"editor.trimAutoWhitespace": false,
"files.trimTrailingWhitespace": false
},
"python.formatting.provider": "yapf"
"python.formatting.provider": "yapf",
"[json]": {
"editor.formatOnSave": false
}
}

View File

@@ -252,11 +252,20 @@ define PARSE_RULE
else
$$(info make: *** No rule to make target '$1'. Stop.)
$$(info |)
$$(info | QMK's make format recently changed to use folder locations and colons:)
$$(info | make project_folder:keymap[:target])
$$(info | Examples:)
$$(info | make dz60:default)
$$(info | make planck/rev6:default:flash)
$$(info | QMK's make format is:)
$$(info | make keyboard_folder:keymap_folder[:target])
$$(info |)
$$(info | Where `keyboard_folder` is the path to the keyboard relative to)
$$(info | `qmk_firmware/keyboards/`, and `keymap_folder` is the name of the)
$$(info | keymap folder under that board's `keymaps/` directory.)
$$(info |)
$$(info | Examples:)
$$(info | keyboards/dz60, keyboards/dz60/keymaps/default)
$$(info | -> make dz60:default)
$$(info | -> qmk compile -kb dz60 -km default)
$$(info | keyboards/planck/rev6, keyboards/planck/keymaps/default)
$$(info | -> make planck/rev6:default:flash)
$$(info | -> qmk flash -kb planck/rev6 -km default)
$$(info |)
endif
endef

2
Vagrantfile vendored
View File

@@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
config.vm.define "qmk_firmware"
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
config.vm.box = "generic/debian10"
config.vm.box = "generic/debian9"
config.vm.synced_folder '.', '/vagrant'

View File

@@ -1,22 +1,22 @@
# Look for a json keymap file
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
endif
@@ -27,5 +27,5 @@ ifneq ("$(wildcard $(KEYMAP_PATH))", "")
endif
# Generate the keymap.c
$(KEYMAP_C): $(KEYMAP_JSON)
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)

View File

@@ -103,15 +103,6 @@ MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
include $(INFO_RULES_MK)
ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif
# Object files and generated keymap directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
# Check for keymap.json first, so we can regenerate keymap.c
include build_json.mk
@@ -154,6 +145,10 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
endif
ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif
include quantum/mcu_selection.mk
# Find all the C source files to be compiled in subfolders.
@@ -332,6 +327,11 @@ endif
# Disable features that a keyboard doesn't support
-include disable_features.mk
# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H += $(KEYMAP_PATH)/config.h
endif

View File

@@ -24,7 +24,6 @@ GTEST_INTERNAL_INC :=\
$(GTEST_OUTPUT)_SRC :=\
googletest/src/gtest-all.cc\
googletest/src/gtest_main.cc\
googlemock/src/gmock-all.cc
$(GTEST_OUTPUT)_DEFS :=
@@ -35,7 +34,8 @@ CREATE_MAP := no
VPATH +=\
$(LIB_PATH)/googletest\
$(LIB_PATH)/googlemock
$(LIB_PATH)/googlemock\
$(LIB_PATH)/printf
all: elf
@@ -43,19 +43,27 @@ VPATH += $(COMMON_VPATH)
PLATFORM:=TEST
PLATFORM_KEY:=test
ifeq ($(strip $(DEBUG)), 1)
CONSOLE_ENABLE = yes
endif
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include tests/$(TEST)/rules.mk
endif
include common_features.mk
include $(TMK_PATH)/common.mk
include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include build_full_test.mk
endif
$(TEST)_SRC += \
tests/test_common/main.c \
$(LIB_PATH)/printf/printf.c \
$(COMMON_DIR)/printf.c
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)

View File

@@ -244,7 +244,7 @@ endif
endif
RGB_MATRIX_ENABLE ?= no
VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
@@ -261,13 +261,6 @@ endif
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
COMMON_VPATH += $(DRIVER_PATH)/awinic
SRC += aw20216.c
QUANTUM_LIB_SRC += spi_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
@@ -536,11 +529,7 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
$(QUANTUM_DIR)/split_common/transactions.c
OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
ifeq ($(PLATFORM),AVR)
@@ -561,11 +550,6 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
ifeq ($(strip $(CRC_ENABLE)), yes)
OPT_DEFS += -DCRC_ENABLE
QUANTUM_LIB_SRC += crc.c
endif
HAPTIC_ENABLE ?= no
ifneq ($(strip $(HAPTIC_ENABLE)),no)
COMMON_VPATH += $(DRIVER_PATH)/haptic
@@ -596,14 +580,6 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_driver.c
endif
ifeq ($(strip $(ST7565_ENABLE)), yes)
OPT_DEFS += -DST7565_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
COMMON_VPATH += $(DRIVER_PATH)/lcd
QUANTUM_LIB_SRC += spi_master.c
SRC += st7565.c
endif
include $(DRIVER_PATH)/qwiic/qwiic.mk
ifeq ($(strip $(UCIS_ENABLE)), yes)

View File

@@ -1,22 +1,34 @@
{
"$id": "qmk.api.keyboard.v1",
"allOf": [
{"$ref": "qmk.keyboard.v1"},
{ "$ref": "qmk.keyboard.v1" },
{
"properties": {
"keymaps": {
"type": "object",
"properties": {
"url": {"type": "string"}
}
},
"parse_errors": {"$ref": "qmk.definitions.v1#/string_array"},
"parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"},
"processor_type": {"type": "string"},
"protocol": {"type": "string"},
"keyboard_folder": {"type": "string"},
"platform": {"type": "string"}
"$id": "qmk.api.keyboard.v1",
"keymaps": {
"type": "string"
},
"parse_errors": {
"type": "array",
"items": {
"type": "string"
}
},
"parse_warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"processor_type": {
"type": "string"
},
"protocol": {
"type": "string"
},
"keyboard_folder": {
"type": "string"
},
"platform": {
"type": "string"
}
}
]

View File

@@ -1,107 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "qmk.definitions.v1",
"title": "Common definitions used across QMK's jsonschemas.",
"type": "object",
"boolean_array": {
"type": "object",
"additionalProperties": {"type": "boolean"}
},
"filename": {
"type": "string",
"minLength": 1,
"pattern": "^[0-9a-z_]*$"
},
"hex_number_2d": {
"type": "string",
"pattern": "^0x[0-9A-F]{2}$"
},
"hex_number_4d": {
"type": "string",
"pattern": "^0x[0-9A-F]{4}$"
},
"text_identifier": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"layout_macro": {
"oneOf": [
{
"type": "string",
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
},
{
"type": "string",
"pattern": "^LAYOUT_[0-9a-z_]*$"
}
]
},
"key_unit": {
"type": "number",
"min": 0.25
},
"mcu_pin_array": {
"type": "array",
"items": {"$ref": "#/mcu_pin"}
},
"mcu_pin": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "string",
"pattern": "^LINE_PIN\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
},
"signed_decimal": {
"type": "number"
},
"signed_int": {
"type": "number",
"multipleOf": 1
}
"signed_int_8": {
"type": "number",
"min": -127,
"max": 127,
"multipleOf": 1
}
"string_array": {
"type": "array",
"items": {
"type": "string"
}
},
"string_object": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"unsigned_decimal": {
"type": "number",
"min": 0
},
"unsigned_int": {
"type": "number",
"min": 0,
"multipleOf": 1
}
"unsigned_int_8": {
"type": "number",
"min": 0,
"max": 255,
"multipleOf": 1
}
}

View File

@@ -1,12 +1,24 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$schema": "http://json-schema.org/schema#",
"$id": "qmk.keyboard.v1",
"title": "Keyboard Information",
"type": "object",
"properties": {
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keyboard_name": {
"type": "string",
"minLength": 2,
"maxLength": 250
},
"maintainer": {
"type": "string",
"minLength": 2,
"maxLength": 250
},
"manufacturer": {
"type": "string",
"minLength": 2,
"maxLength": 250
},
"url": {
"type": "string",
"format": "uri"
@@ -28,25 +40,62 @@
"type": "string",
"enum": ["COL2ROW", "ROW2COL"]
},
"debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"height": {"$ref": "qmk.definitions.v1#/key_unit"},
"width": {"$ref": "qmk.definitions.v1#/key_unit"},
"debounce": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"height": {
"type": "number",
"min": 0.25
},
"width": {
"type": "number",
"min": 0.25
},
"community_layouts": {
"type": "array",
"items": {"$ref": "qmk.definitions.v1#/filename"}
"items": {
"type": "string",
"minLength": 2,
"pattern": "^[0-9a-z_]*$"
}
},
"features": {
"type": "object",
"additionalProperties": {"type": "boolean"}
},
"features": {"$ref": "qmk.definitions.v1#/boolean_array"},
"indicators": {
"type": "object",
"properties": {
"caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}
"caps_lock": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"num_lock": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"scroll_lock": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
}
}
},
"layout_aliases": {
"type": "object",
"additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"}
"additionalProperties": {
"oneOf": [
{
"type": "string",
"enum": ["LAYOUT", "LAYOUT_planck_1x2uC"]
},
{
"type": "string",
"pattern": "^LAYOUT_[0-9a-z_]*$"
}
]
}
},
"layouts": {
"type": "object",
@@ -60,7 +109,11 @@
"c_macro": {
"type": "boolean"
},
"key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
"key_count": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"layout": {
"type": "array",
"items": {
@@ -78,14 +131,34 @@
"multipleOf": 1
}
},
"key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
"r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"h": {"$ref": "qmk.definitions.v1#/key_unit"},
"w": {"$ref": "qmk.definitions.v1#/key_unit"},
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
"y": {"$ref": "qmk.definitions.v1#/key_unit"}
"h": {
"type": "number",
"min": 0.25
},
"r": {
"type": "number",
"min": 0
},
"rx": {
"type": "number",
"min": 0
},
"ry": {
"type": "number",
"min": 0
},
"w": {
"type": "number",
"min": 0.25
},
"x": {
"type": "number",
"min": 0
},
"y": {
"type": "number",
"min": 0
}
}
}
}
@@ -98,10 +171,61 @@
"properties": {
"direct": {
"type": "array",
"items": {$ref": "qmk.definitions.v1#/mcu_pin_array"}
"items": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
}
}
},
"cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
"rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
"cols": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
}
},
"rows": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
{
"type": "number",
"multipleOf": 1
},
{
"type": "null"
}
]
}
}
}
},
"rgblight": {
@@ -114,19 +238,47 @@
"type": "boolean"
}
},
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"brightness_steps": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"hue_steps": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"led_count": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"max_brightness": {
"type": "number",
"min": 0,
"max": 255,
"multipleOf": 1
},
"pin": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"saturation_steps": {
"type": "number",
"min": 0,
"multipleOf": 1
},
"sleep": {"type": "boolean"},
"split": {"type": "boolean"},
"split_count": {
"type": "array",
"minLength": 2,
"maxLength": 2,
"items": {"$ref": "qmk.definitions.v1#/unsigned_int"}
"items": {
"type": "number",
"min": 0,
"multipleOf": 1
}
}
}
},
@@ -134,19 +286,40 @@
"type": "object",
"additionalProperties": false,
"properties": {
"device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
"pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"},
"vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}
"device_ver": {
"type": "string",
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
},
"pid": {
"type": "string",
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
},
"vid": {
"type": "string",
"pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]"
}
}
},
"qmk_lufa_bootloader": {
"type": "object",
"additionalProperties": false,
"properties": {
"esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"led": {"$ref": "qmk.definitions.v1#/mcu_pin"},
"speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"}
"esc_output": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"esc_input": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"led": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
},
"speaker": {
"type": "string",
"pattern": "^[A-K]\\d{1,2}$"
}
}
}
}

View File

@@ -93,7 +93,6 @@
* Hardware Features
* Displays
* [HD44780 LCD Controller](feature_hd44780.md)
* [ST7565 LCD Driver](feature_st7565.md)
* [OLED Driver](feature_oled_driver.md)
* Lighting
* [Backlight](feature_backlight.md)

View File

@@ -100,7 +100,3 @@ This happens immediately after the previous `develop` branch is merged.
* [ ] `git pull --ff-only`
* [ ] `git merge --no-ff develop`
* [ ] `git push upstream master`
## Post-merge operations
* (Optional) [update ChibiOS + ChibiOS-Contrib on `develop`](chibios_upgrade_instructions.md)

View File

@@ -1,56 +0,0 @@
# ChibiOS Upgrade Procedure
ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a branch tied to the ChibiOS version in use and should not be mixed with different versions.
## Getting ChibiOS
* `svn` Initialisation:
* Only needed to be done once
* You might need to separately install `git-svn` package in your OS's package manager
* `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/`
* `git remote add qmk git@github.com:qmk/ChibiOS.git`
* Updating:
* `git svn fetch`
* First time around this will take several hours
* Subsequent updates will be incremental only
* Tagging example (work out which version first!):
* `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3`
* `git push qmk ver20.3.3`
* `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3`
* `git push qmk breaking_YYYY_qN`
## Getting ChibiOS-Contrib
* `git` Initialisation:
* `git clone git@github.com:qmk/ChibiOS-Contrib`
* `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib`
* `git checkout -b chibios-20.3.x upstream/chibios-20.3.x`
* Updating:
* `git fetch --all --tags --prune`
* `git checkout chibios-20.3.x`
* `git pull --ff-only`
* `git push origin chibios-20.3.x`
* `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x`
* `git push origin breaking_YYYY_qN`
## Updating submodules
* Update the submodules
* `cd $QMK_FIRMWARE`
* `git checkout develop`
* `git pull --ff-only`
* `git checkout -b chibios-version-bump`
* `cd lib/chibios`
* `git fetch --all --tags --prune`
* `git checkout breaking_YYYY_qN`
* `cd ../chibios-contrib`
* `git fetch --all --tags --prune`
* `git checkout breaking_YYYY_qN`
* Build everything
* `cd $QMK_FIRMWARE`
* `qmk multibuild -j4`
* Make sure there are no errors
* Push to the repo
* `git commit -am 'Update ChibiOS to XXXXXXXXX'`
* `git push --set-upstream origin chibios-version-bump`
* Make a PR to qmk_firmware with the new branch

View File

@@ -349,11 +349,12 @@ qmk cformat -b branch_name
## `qmk docs`
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
Use the `-b`/`--browser` flag to automatically open the local webserver in your default browser.
**Usage**:
```
qmk docs [-p PORT]
qmk docs [-b] [-p PORT]
```
## `qmk generate-docs`

View File

@@ -51,10 +51,8 @@ This is a C header file that is one of the first things included, and will persi
* the number of columns in your keyboard's matrix
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
* pins of the rows, from top to bottom
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
* pins of the columns, from left to right
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_IO_DELAY 30`
* the delay in microseconds when between changing matrix pin state and reading values
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
@@ -274,7 +272,7 @@ There are a few different ways to set handedness for split keyboards (listed in
### Other Options
* `#define USE_I2C`
* For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only)
* For using I2C instead of Serial (defaults to serial)
* `#define SOFT_SERIAL_PIN D0`
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
@@ -282,7 +280,6 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_ROW_PINS_RIGHT { <row pins> }`
* `#define MATRIX_COL_PINS_RIGHT { <col pins> }`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
* may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
@@ -303,7 +300,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_DETECT`
* Detect (with timeout) USB connection when delegating master/slave
* Default behavior for ARM
* Required for AVR Teensy (without hardware mods)
* Required for AVR Teensy
* `#define SPLIT_USB_TIMEOUT 2000`
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
@@ -311,28 +308,6 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_TIMEOUT_POLL 10`
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
* `#define FORCED_SYNC_THROTTLE_MS 100`
* Deadline for synchronizing data from master to slave when using the QMK-provided split transport.
* `#define SPLIT_TRANSPORT_MIRROR`
* Mirrors the master-side matrix on the slave when using the QMK-provided split transport.
* `#define SPLIT_LAYER_STATE_ENABLE`
* Ensures the current layer state is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_LED_STATE_ENABLE`
* Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_MODS_ENABLE`
* Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_WPM_ENABLE`
* Ensures the current WPM is available on the slave when using the QMK-provided split transport.
* `#define SPLIT_TRANSACTION_IDS_KB .....`
* `#define SPLIT_TRANSACTION_IDS_USER .....`
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information.
# The `rules.mk` File
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.

View File

@@ -144,14 +144,6 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw
* Keyboard/Revision: `void matrix_init_kb(void)`
* Keymap: `void matrix_init_user(void)`
### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides
* GPIO pin initialisation: `void matrix_init_pins(void)`
* This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override.
* `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)`
* `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
* `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
* These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override.
## Keyboard Post Initialization code

View File

@@ -30,18 +30,38 @@ If you find that you can no longer type with the keyboard, you may have accident
![A healthy keyboard as seen by Zadig](https://i.imgur.com/Hx0E5kC.png)
Open the Device Manager and look for a device that looks like your keyboard.
Open the Device Manager, select **View → Devices by container**, and look for an entry with your keyboard's name.
![The board with the wrong driver installed, in Device Manager](https://i.imgur.com/L3wvX8f.png)
![The board with the wrong driver installed, in Device Manager](https://i.imgur.com/o7WLvBl.png)
Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first.
Right-click each entry and hit **Uninstall device**. Make sure to tick **Delete the driver software for this device** first if it appears.
![The Device Uninstall dialog, with the "delete driver" checkbox ticked](https://i.imgur.com/aEs2RuA.png)
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! Otherwise, repeat the process until Zadig reports the correct driver.
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! Otherwise, repeat this process until Zadig reports the correct driver.
?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver.
## Uninstallation
Uninstallation of bootloader devices is a little more involved than installation.
Open the Device Manager, select **View → Devices by container**, and look for the bootloader device. Match up the USB VID and PID in Zadig with one from [the table below](#list-of-known-bootloaders).
Find the `Inf name` value in the Details tab of the device properties. This should generally be something like `oemXX.inf`:
![Device properties showing the Inf name value](https://i.imgur.com/Bu4mk9m.png)
Then, open a new Command Prompt window as an Administrator (type in `cmd` into the Start menu and press Ctrl+Shift+Enter). Run `pnputil /enum-drivers` to verify the `Inf name` matches the `Published Name` field of one of the entries:
![pnputil output with matching driver highlighted](https://i.imgur.com/3RrSjzW.png)
Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver and remove it from any devices using it. Note that this will not uninstall the device itself.
As with the previous section, this process may need to be repeated multiple times, as multiple drivers can be applicable to the same device.
!> **WARNING:** Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`.
## List of Known Bootloaders
This is a list of known bootloader devices and their USB vendor and product IDs, as well as the correct driver to assign for flashing with QMK. Note that the usbser and HidUsb drivers are built in to Windows, and cannot be assigned with Zadig - if your device has an incorrect driver, you must use the Device Manager to uninstall it as described in the previous section.

View File

@@ -28,7 +28,7 @@ For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can
Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
## Sending Your Own Debug Messages
## Sending Your Own Debug Messages :id=debug-api
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:

View File

@@ -2,24 +2,27 @@
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|Key |Aliases |Description |
|----------|-------------------------------|------------------------------------------------------|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|Key |Aliases |Description |
|----------|----------------------------------|------------------------------------------------------|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)` |Hold Left GUI and press `kc` |
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|`LSG(kc)` |`SGUI(kc)`, `SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|`LAG(kc)` | |Hold Left Alt and Left GUI and press `kc` |
|`RSG(kc)` | |Hold Right Shift and Right GUI and press `kc` |
|`RAG(kc)` | |Hold Right Alt and Right GUI and press `kc` |
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.

View File

@@ -146,7 +146,7 @@ And to trigger the bootloader, you hold this key down when plugging the keyboard
## Split Keyboards
When handedness is predetermined via an option like `SPLIT_HAND_PIN`, you might need to configure a different key between halves. This To do so, add these entries to your `config.h` file:
When handedness is predetermined via an option like `SPLIT_HAND_PIN`, you might need to configure a different key between halves. To do so, add these entries to your `config.h` file:
```c
#define BOOTMAGIC_LITE_ROW_RIGHT 4

View File

@@ -121,16 +121,16 @@ DEBOUNCE_TYPE = <name of algorithm>
Where name of algorithm is one of:
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.
### A couple algorithms that could be implemented in the future:
* ```sym_defer_pr```
* ```sym_eager_g```
* ```asym_eager_defer_pk```
### Use your own debouncing code
You have the option to implement you own debouncing algorithm. To do this:

View File

@@ -162,28 +162,4 @@ This will set what sequence HPT_RST will set as the active mode. If not defined,
### DRV2605L Continuous Haptic Mode
This mode sets continuous haptic feedback with the option to increase or decrease strength.
## Haptic Key Exclusion
The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record)` in haptic.c. This allows a re-definition at the required level with the specific requirement / exclusion.
### NO_HAPTIC_MOD
With the entry of `#define NO_HAPTIC_MOD` in config.h, modifiers from Left Control to Right GUI will not trigger a feedback. This also includes modifiers in a Mod Tap configuration.
### NO_HAPTIC_FN
With the entry of `#define NO_HAPTIC_FN` in config.h, layer keys will not rigger a feedback.
### NO_HAPTIC_ALPHA
With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback.
### NO_HAPTIC_PUNCTUATION
With the entry of `#define NO_HAPTIC_PUNCTUATION` in config.h, none of the following keys will trigger a feedback: Enter, ESC, Backspace, Space, Minus, Equal, Left Bracket, Right Bracket, Backslash, Non-US Hash, Semicolon, Quote, Grave, Comma, Slash, Dot, Non-US Backslash.
### NO_HAPTIC_LOCKKEYS
With the entry of `#define NO_HAPTIC_LOCKKEYS` in config.h, none of the following keys will trigger a feedback: Caps Lock, Scroll Lock, Num Lock.
### NO_HAPTIC_NAV
With the entry of `#define NO_HAPTIC_NAV` in config.h, none of the following keys will trigger a feedback: Print Screen, Pause, Insert, Delete, Page Down, Page Up, Left Arrow, Up Arrow, Right Arrow, Down Arrow, End, Home.
### NO_HAPTIC_NUMERIC
With the entry of `#define NO_HAPTIC_NUMERIC` in config.h, none of the following keys between 0 and 9 (KC_1 ... KC_0) will trigger a feedback.
This mode sets continuous haptic feedback with the option to increase or decrease strength.

View File

@@ -1,5 +1,7 @@
# LED Indicators
?> Currently, this feature is not supported for split keyboards
QMK provides methods to read 5 of the LEDs defined in the HID spec:
* Num Lock

View File

@@ -346,10 +346,6 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);
// Inverts the display
// Returns true if the screen was or is inverted
bool oled_invert(bool invert);
// Returns the maximum number of characters that will fit on a line
uint8_t oled_max_chars(void);

View File

@@ -227,74 +227,6 @@ Configure the hardware via your `config.h`:
#define DRIVER_LED_TOTAL 70
```
---
### AW20216 :id=aw20216
There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
```makefile
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = AW20216
```
You can use up to 2 AW20216 IC's. Do not specify `DRIVER_<N>_xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
| Variable | Description | Default |
|----------|-------------|---------|
| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
Here is an example using 2 drivers.
```c
#define DRIVER_1_CS B13
#define DRIVER_2_CS B14
// Hardware enable lines may be connected to the same pin
#define DRIVER_1_EN C13
#define DRIVER_2_EN C13
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 66
#define DRIVER_2_LED_TOTAL 32
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
```
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
```c
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
/* Each AW20216 channel is controlled by a register at some offset between 0x00
* and 0xD7 inclusive.
* See drivers/awinic/aw20216.h for the mapping between register offsets and
* driver pin locations.
* driver
* | R location
* | | G location
* | | | B location
* | | | | */
{ 0, CS1_SW1, CS2_SW1, CS3_SW1 },
{ 0, CS4_SW1, CS5_SW1, CS6_SW1 },
{ 0, CS7_SW1, CS8_SW1, CS9_SW1 },
{ 0, CS10_SW1, CS11_SW1, CS12_SW1 },
{ 0, CS13_SW1, CS14_SW1, CS15_SW1 },
...
{ 1, CS1_SW1, CS2_SW1, CS3_SW1 },
{ 1, CS13_SW1, CS14_SW1, CS15_SW1 },
{ 1, CS16_SW1, CS17_SW1, CS18_SW1 },
{ 1, CS4_SW2, CS5_SW2, CS6_SW2 },
...
};
```
---
## Common Configuration :id=common-configuration
@@ -692,6 +624,39 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
}
```
### Indicator Examples :id=indicator-examples
Caps Lock indicator on alphanumeric flagged keys:
```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
for (uint8_t i = led_min; i <= led_max; i++) {
if (g_led_config.flags[i] & LED_FLAG_KEYLIGHT) {
rgb_matrix_set_color(i, RGB_RED);
}
}
}
}
```
Layer indicator on all flagged keys:
```c
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t i = led_min; i <= led_max; i++) {
switch(get_highest_layer(layer_state|default_layer_state)) {
case RAISE:
rgb_matrix_set_color(i, RGB_BLUE);
break;
case LOWER:
rgb_matrix_set_color(i, RGB_YELLOW);
break;
default:
break;
}
}
}
```
### Suspended state :id=suspended-state
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.

View File

@@ -8,7 +8,8 @@ QMK Firmware has a generic implementation that is usable by any board, as well a
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.
!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity.
## Compatibility Overview
@@ -168,7 +169,7 @@ Because not every split keyboard is identical, there are a number of additional
#define USE_I2C
```
This configures the use of I<sup>2</sup>C support for split keyboard transport (AVR only).
This enables I<sup>2</sup>C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I<sup>2</sup>C-based devices.
```c
#define SOFT_SERIAL_PIN D0
@@ -192,115 +193,20 @@ If you're having issues with serial communication, you can change this value, as
* **`5`**: about 20kbps
```c
#define FORCED_SYNC_THROTTLE_MS 100
#define SPLIT_MODS_ENABLE
```
This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
This enables transmitting modifier state (normal, weak and oneshot) to the non
primary side of the split keyboard. This adds a few bytes of data to the split
communication protocol and may impact the matrix scan speed when enabled.
The purpose of this feature is to support cosmetic use of modifer state (e.g.
displaying status on an OLED screen).
```c
#define SPLIT_TRANSPORT_MIRROR
```
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_LAYER_STATE_ENABLE
```
This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_LED_STATE_ENABLE
```
This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_MODS_ENABLE
```
This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
```c
#define SPLIT_WPM_ENABLE
```
This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
### Custom data sync between sides :id=custom-data-sync
QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master.
To leverage this, a keyboard or user/keymap can define a comma-separated list of _transaction IDs_:
```c
// for keyboard-level data sync:
#define SPLIT_TRANSACTION_IDS_KB KEYBOARD_SYNC_A, KEYBOARD_SYNC_B
// or, for user:
#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A, USER_SYNC_B, USER_SYNC_C
```
These _transaction IDs_ then need a slave-side handler function to be registered with the split transport, for example:
```c
typedef struct _master_to_slave_t {
int m2s_data;
} master_to_slave_t;
typedef struct _slave_to_master_t {
int s2m_data;
} slave_to_master_t;
void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
const master_to_slave_t *m2s = (const master_to_slave_t*)in_data;
slave_to_master_t *s2m = (slave_to_master_t*)out_data;
s2m->s2m_data = m2s->m2s_data + 5; // whatever comes in, add 5 so it can be sent back
}
void keyboard_post_init_user(void) {
transaction_register_rpc(USER_SYNC_A, user_sync_a_slave_handler);
}
```
The master side can then invoke the slave-side handler - for normal keyboard functionality to be minimally affected, any keyboard- or user-level code attempting to sync data should be throttled:
```c
void housekeeping_task_user(void) {
if (is_keyboard_master()) {
// Interact with slave every 500ms
static uint32_t last_sync = 0;
if (timer_elapsed32(last_sync) > 500) {
master_to_slave_t m2s = {6};
slave_to_master_t s2m = {0};
if(transaction_rpc_exec(USER_SYNC_A, sizeof(m2s), &m2s, sizeof(s2m), &s2m)) {
last_sync = timer_read32();
dprintf("Slave value: %d\n", s2m.s2m_data); // this will now be 11, as the slave adds 5
} else {
dprint("Slave sync failed!\n");
}
}
}
}
```
!> It is recommended that any data sync between halves happens during the master side's _housekeeping task_. This ensures timely retries should failures occur.
If only one-way data transfer is needed, helper methods are provided:
```c
bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
bool transaction_rpc_send(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer);
bool transaction_rpc_recv(int8_t transaction_id, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
```
By default, the inbound and outbound data is limited to a maximum of 32 bytes each. The sizes can be altered if required:
```c
// Master to slave:
#define RPC_M2S_BUFFER_SIZE 48
// Slave to master:
#define RPC_S2M_BUFFER_SIZE 48
```
This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses).
### Hardware Configuration Options

View File

@@ -1,274 +0,0 @@
# ST7565 LCD Driver
## Supported Hardware
LCD modules using ST7565 driver IC, communicating over SPI.
|Module |IC |Size |Notes |
|------------------------------|-------|------|----------------------------------------------------------|
|Newhaven Display NHD-C12832A1Z|ST7565R|128x32|Used by Ergodox Infinity; primary consumer of this feature|
|Zolentech ZLE12864B |ST7565P|128x64|Requires contrast adjustment |
## Usage
To enable the feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
```make
ST7565_ENABLE = yes
```
Then in your `keymap.c` file, implement the ST7565 task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```c
#ifdef ST7565_ENABLE
void st7565_task_user(void) {
// Host Keyboard Layer Status
st7565_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
st7565_write_P(PSTR("Default\n"), false);
break;
case _FN:
st7565_write_P(PSTR("FN\n"), false);
break;
case _ADJ:
st7565_write_P(PSTR("ADJ\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
st7565_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
st7565_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
st7565_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
st7565_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
#endif
```
## Logo Example
In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the screen, use the following code example:
```c
static void render_logo(void) {
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,
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, 0x00
};
st7565_write_P(qmk_logo, false);
}
```
## Buffer Read Example
For some purposes, you may need to read the current state of the display buffer. The `st7565_read_raw` function can be used to safely read bytes from the buffer.
In this example, calling `fade_display` in the `st7565_task_user` function will slowly fade away whatever is on the screen by turning random pixels off over time.
```c
//Setup some mask which can be or'd with bytes to turn off pixels
const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254};
static void fade_display(void) {
//Define the reader structure
display_buffer_reader_t reader;
uint8_t buff_char;
if (random() % 30 == 0) {
srand(timer_read());
// Fetch a pointer for the buffer byte at index 0. The return structure
// will have the pointer and the number of bytes remaining from this
// index position if we want to perform a sequential read by
// incrementing the buffer pointer
reader = st7565_read_raw(0);
//Loop over the remaining buffer and erase pixels as we go
for (uint16_t i = 0; i < reader.remaining_element_count; i++) {
//Get the actual byte in the buffer by dereferencing the pointer
buff_char = *reader.current_element;
if (buff_char != 0) {
st7565_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i);
}
//increment the pointer to fetch a new byte during the next loop
reader.current_element++;
}
}
}
```
## Other Examples
In split keyboards, it is very common to have two 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
#ifdef ST7565_ENABLE
display_rotation_t st7565_init_user(display_rotation_t rotation) {
if (!is_keyboard_master()) {
return DISPLAY_ROTATION_180; // flips the display 180 degrees if offhand
}
return rotation;
}
void st7565_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo(); // Renders a static logo
}
}
#endif
```
## Basic Configuration
|Define |Default |Description |
|------------------------|--------------|-----------------------------------------------------------------------------------------------------|
|`ST7565_A0_PIN` |*Not defined* |(Required) The GPIO connected to the display's A0 (data/command) pin |
|`ST7565_RST_PIN` |*Not defined* |(Required) The GPIO connected to the display's reset pin |
|`ST7565_SS_PIN` |*Not defined* |(Required) The GPIO connected to the display's slave select pin |
|`ST7565_SPI_CLK_DIVISOR`|`4` |The SPI clock divisor to use |
|`ST7565_FONT_H` |`"glcdfont.c"`|The font code file to use for custom fonts |
|`ST7565_FONT_START` |`0` |The starting character index for custom fonts |
|`ST7565_FONT_END` |`223` |The ending character index for custom fonts |
|`ST7565_FONT_WIDTH` |`6` |The font width |
|`ST7565_FONT_HEIGHT` |`8` |The font height (untested) |
|`ST7565_TIMEOUT` |`60000` |Turns off the screen after 60000ms of keyboard inactivity. Helps reduce burn-in. Set to 0 to disable.|
|`ST7565_COLUMN_OFFSET` |`0` |Shift output to the right this many pixels. |
|`ST7565_CONTRAST` |`32` |The default contrast level of the display, from 0 to 255. |
|`ST7565_UPDATE_INTERVAL`|`0` |Set the time interval for updating the display in ms. This will improve the matrix scan rate. |
## Custom sized displays
The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind.
|Define |Default |Description |
|-----------------------|----------|-----------------------------------------------------------------------------------------------------------|
|`ST7565_DISPLAY_WIDTH` |`128` |The width of the display. |
|`ST7565_DISPLAY_HEIGHT`|`32` |The height of the display. |
|`ST7565_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH)`. |
|`ST7565_BLOCK_TYPE` |`uint16_t`|The unsigned integer type to use for dirty rendering. |
|`ST7565_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(ST7565_BLOCK_TYPE) * 8)`.|
|`ST7565_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)`. |
## API
```c
// Rotation enum values are flags
typedef enum {
DISPLAY_ROTATION_0,
DISPLAY_ROTATION_180
} display_rotation_t;
// Initialize the display, rotating the rendered output based on the define passed in.
// Returns true if the was initialized successfully
bool st7565_init(display_rotation_t rotation);
// Called at the start of st7565_init, weak function overridable by the user
// rotation - the value passed into st7565_init
// Return new display_rotation_t if you want to override default rotation
display_rotation_t st7565_init_user(display_rotation_t rotation);
// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
void st7565_clear(void);
// Renders the dirty chunks of the buffer to display
void st7565_render(void);
// Moves cursor to character position indicated by column and line, wraps if out of bounds
// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
void st7565_set_cursor(uint8_t col, uint8_t line);
// Advances the cursor to the next page, writing ' ' if true
// Wraps to the begining when out of bounds
void st7565_advance_page(bool clearPageRemainder);
// Moves the cursor forward 1 character length
// Advance page if there is not enough room for the next character
// Wraps to the begining when out of bounds
void st7565_advance_char(void);
// Writes a single character to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Main handler that writes character data to the display buffer
void st7565_write_char(const char data, bool invert);
// Writes a string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
void st7565_write(const char *data, bool invert);
// Writes a string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
void st7565_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
// Useful for moving the screen in preparation for new drawing
void st7565_pan(bool left);
// Returns a pointer to the requested start index in the buffer plus remaining
// buffer length as struct
display_buffer_reader_t st7565_read_raw(uint16_t start_index);
// Writes a string to the buffer at current cursor position
void st7565_write_raw(const char *data, uint16_t size);
// Writes a single byte into the buffer at the specified index
void st7565_write_raw_byte(const char data, uint16_t index);
// Sets a specific pixel on or off
// Coordinates start at top-left and go right and down for positive x and y
void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
void st7565_write_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
void st7565_write_ln_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
void st7565_write_raw_P(const char *data, uint16_t size);
// Can be used to manually turn on the screen if it is off
// Returns true if the screen was on or turns on
bool st7565_on(void);
// Called when st7565_on() turns on the screen, weak function overridable by the user
// Not called if the screen is already on
void st7565_on_user(void);
// Can be used to manually turn off the screen if it is on
// Returns true if the screen was off or turns off
bool st7565_off(void);
// Called when st7565_off() turns off the screen, weak function overridable by the user
// Not called if the screen is already off
void st7565_off_user(void);
// Returns true if the screen is currently on, false if it is
// not
bool st7565_is_on(void);
// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
void st7565_task(void);
// Called at the start of st7565_task, weak function overridable by the user
void st7565_task_user(void);
// Inverts the display
// Returns true if the screen was or is inverted
bool st7565_invert(bool invert);
// Returns the maximum number of characters that will fit on a line
uint8_t st7565_max_chars(void);
// Returns the maximum number of lines that will fit on the display
uint8_t st7565_max_lines(void);
```

View File

@@ -490,6 +490,8 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
layer_on(_MY_LAYER);
}
break;
default:
break;
}
}

View File

@@ -7,9 +7,9 @@
[![Contributeurs GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
[![Forks GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
## Qu'est-ce que QMK Firmware?
## Qu'est-ce que QMK Firmware?
QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMKFirmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](https://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](https://olkb.com), le clavier [ErgoDox EZ](https://www.ergodox-ez.com), et pour les [produits Clueboard](https://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé.
QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintient le firmware QMK, la QMK Toolbox (*Boite à outil*), qmk.fm et leurs documentations. QMK Firmware est un firmware dédié aux claviers qui est basé sur [tmk\_keyboard](https://github.com/tmk/tmk_keyboard). Il offre des fonctionnalités très utiles pour les contrôleurs Atmel AVR, et, plus spécifiquement pour [les produits d'OLKB](https://olkb.com), le clavier [ErgoDox EZ](https://www.ergodox-ez.com), et pour les [produits Clueboard](https://clueboard.co/). Il prend désormais aussi en charge les processeurs ARM qui utilisent ChibiOS. Vous pouvez l'utiliser pour contrôler un clavier personnalisé soudé à la main ou alors sur un clavier avec un PCB personnalisé.
## Comment l'obtenir
@@ -23,7 +23,7 @@ Avant d'être prêt à compiler vous allez devoir [installer un environnement](f
make planck/rev4:default
Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais «subprojects» ou «folder»). Cette option peut donc être omise:
Cette commande compilera la révision `rev4` du clavier `planck` avec la disposition `default`. Notez que tous les claviers n'ont pas forcément de révisions (aussi appelées sous-projects ou dossiers, ou en anglais «subprojects» ou «folder»). Cette option peut donc être omise:
make preonic:default

View File

@@ -9,7 +9,7 @@ Nous vous recommandons d'utiliser l'utilitaire [Zadig](https://zadig.akeo.ie/).
## Installation
Passez votre clavier en mode bootloader, soit en appuyant sur le keycode `RESET` (qui peut se trouver dans un calque différent) ou en appuyant sur le bouton reset qui se trouve en général sous la board. Si votre clavier n'a aucune de ces options, essayez de le brancher en maintenant Escape ou Espace+`B` appuyés (voir la documentation de [Bootmagic](feature_bootmagic.md) pour plus de détails). Certaines boards utilisent [Command](feature_command.md) à la place de Bootmagic. Dans ce cas, vous pouvez entrer en mode bootloader en appuyant, à n'importe quel moment lorsque le clavier est branché, sur les combinaisons de touches Shift Gauche+Shift Droit+`B` ou Shift Gauche+Shift Droit+Escape.
Certains claviers ont des instructions spécifiques pour passer en mode bootloader. Par exemple, la touche [Bootmagic Lite]](feature_bootmagic.md#bootmagic-lite) (défaut:Échap) peut être sur une touche différente telle que Contrôle Gauche. La combinaison pour la Command (défaut:Shift Gauche+Shift Droit) peut être différente, par exemple Contrôle Gauche+Contrôle Droit. Référez-vous au fichier README de votre clavier.
Certains claviers ont des instructions spécifiques pour passer en mode bootloader. Par exemple, la touche [Bootmagic Lite]](feature_bootmagic.md#bootmagic-lite) (défaut: Échap) peut être sur une touche différente telle que Contrôle Gauche. La combinaison pour la Command (défaut: Shift Gauche+Shift Droit) peut être différente, par exemple Contrôle Gauche+Contrôle Droit. Référez-vous au fichier README de votre clavier.
Pour mettre un clavier en mode bootloader avec USBaspLoader, appuyez sur le bouton `RESET` tout en maintenant le bouton `BOOT`. Vous pouvez aussi maintenir le bouton `BOOT` en branchant le câble USB.
@@ -43,4 +43,4 @@ Cliquez dessus avec le bouton droit et sélectionner **Désinstaller le périph
![Le dialogue Suppression de périphérique, avec la boîte "suppression de pilote" cochée](https://i.imgur.com/aEs2RuA.png)
Appuyez sur **Action → Analyser les changements de hardware**. A ce stade, vous devriez pouvoir saisir à nouveau. Vérifiez dans Zadig que les périphériques utilisent bien le pilote `HidUsb`. Si c'est le cas, vous avez corrigé le problème, votre clavier devrait fonctionner à nouveau!
Appuyez sur **Action → Analyser les changements de hardware**. A ce stade, vous devriez pouvoir saisir à nouveau. Vérifiez dans Zadig que les périphériques utilisent bien le pilote `HidUsb`. Si c'est le cas, vous avez corrigé le problème, votre clavier devrait fonctionner à nouveau!

View File

@@ -20,7 +20,7 @@ Veuillez noter que lancer `make` avec `sudo` est généralement une **mauvaise**
### Règles `udev` pour Linux
Sous Linux, vous aurez besoin des permissions appropriées pour accéder au MCU (le micro-contrôleur). Vous avez le choix d'utiliser `sudo` en flashant le firmware, ou placer ces fichiers dans `/etc/udev/rules.d`. Une fois ajouté, lancez les commandes suivantes:
Sous Linux, vous aurez besoin des permissions appropriées pour accéder au MCU (le micro-contrôleur). Vous avez le choix d'utiliser `sudo` en flashant le firmware, ou placer ces fichiers dans `/etc/udev/rules.d`. Une fois ajouté, lancez les commandes suivantes:
```console
sudo udevadm control --reload-rules

View File

@@ -6,13 +6,13 @@ Cette page détaille diverses questions fréquemment posées par les utilisateur
## `hid_listen` ne reconnaît pas de périphérique
Lorsque la console de débugage sur votre périphérique n'est pas prêt, vous obtiendrez un message similaire:
Lorsque la console de débugage sur votre périphérique n'est pas prêt, vous obtiendrez un message similaire:
```
Waiting for device:.........
```
Une fois le périphérique connecté, *hid_listen* le trouve et vous obtiendrez ce message:
Une fois le périphérique connecté, *hid_listen* le trouve et vous obtiendrez ce message:
```
Waiting for new device:.........................
@@ -61,7 +61,7 @@ Vous ne voulez probablement pas "briquer" votre clavier, rendre impossible d'éc
- Si votre map de clavier n'inclut pas de RESET, pour entrer en mode DFU, vous devrez appuyer sur le bouton reset du PCB. Cela implique que vous devrez certainement dévisser certaines pièces de votre clavier pour y accéder.
- Modifier les fichiers tmk_core / common peut rendre le clavier inutilisable
- Si un fichier .hex trop large est la cause du problème: `make dfu` supprime le bloc puis teste la taille (il ne fait pas les choses dans le bon ordre), ce qui provoque une erreur. En résultat, le flash naura pas été fait et le clavier restera en mode DFU.
- Si un fichier .hex trop large est la cause du problème: `make dfu` supprime le bloc puis teste la taille (il ne fait pas les choses dans le bon ordre), ce qui provoque une erreur. En résultat, le flash naura pas été fait et le clavier restera en mode DFU.
- Pour finir, notez que la taille maximale d'un fichier .hex sur un Plank est de 7000h (28672 decimal)
```
@@ -118,7 +118,7 @@ Sous Windows, activez l'option `Permettre au périphérique de sortir l'ordinate
Appuyer sur n'importe quelle touche en mode veille devrait sortir l'ordinateur de veille.
## Vous utilisez un Arduino?
## Vous utilisez un Arduino?
**Faites attention au fait que le nommage des pin d'un Arduino diffère de la puce**. Par exemple, la pin `D0` n'est pas `PD0`. Vérifiez le circuit avec la fiche technique.

View File

@@ -44,7 +44,7 @@ Le premier n'est reconnu que sur macOS, alors que le dernier, `KC_SLEP` et `KC_W
## Modificateur "One Shot"
Cette fonctionnalité permet de corriger un problème avec la touche Shift. En effet, il arrive de saisir plusieurs majuscules en ne voulant en saisir qu'une sur un mot. Ex:`CEtte` à la place de `Cette`. La fonctionnalité «One shot» shift permet de corriger ça.
Cette fonctionnalité permet de corriger un problème avec la touche Shift. En effet, il arrive de saisir plusieurs majuscules en ne voulant en saisir qu'une sur un mot. Ex: `CEtte` à la place de `Cette`. La fonctionnalité «One shot» shift permet de corriger ça.
https://github.com/tmk/tmk_keyboard/issues/67
@@ -59,7 +59,7 @@ Pour les touches de modification et les actions de calque, vous devez placer `KC
## Support de touche à verrouillage mécanique
Cette fonctionnalité permet l'usage de *touches à verrouillage mécanique* comme [ces interrupteurs Alps](https://deskthority.net/wiki/Alps_SKCL_Lock). Vous pouvez l'activer en ajoutant ceci à votre `config.h`:
Cette fonctionnalité permet l'usage de *touches à verrouillage mécanique* comme [ces interrupteurs Alps](https://deskthority.net/wiki/Alps_SKCL_Lock). Vous pouvez l'activer en ajoutant ceci à votre `config.h`:
```
#define LOCKING_SUPPORT_ENABLE

View File

@@ -27,15 +27,15 @@ Méthodes de flash compatibles :
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
Ordre des actions:
Ordre des actions:
1. Pressez le keycode `RESET`, ou appuyez sur le bouton physique RESET ou alors créez un contact entre RST et GND.
2. Attendez que l'OS detecte l'appareil.
3. Éffacez la mémoire, cela peut être fait automatiquement.
4. Flasher le fichier .hex.
5. Redémarrez l'appareil en mode «application», cela peut être fait automatiquement.
5. Redémarrez l'appareil en mode «application», cela peut être fait automatiquement.
Alternativement:
Alternativement:
make <keyboard>:<keymap>:dfu
@@ -48,11 +48,11 @@ QMK a un fork du bootloader LUFA DFU qui vous permet de faire un simple scan de
#define QMK_LED E6
#define QMK_SPEAKER C6
Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère «bootloader» est ajoutée au nom du produit.
Le fabricant et le nom du produit proviennent de vos définitions dans fichier `config.h`, et la chaîne de caractère «bootloader» est ajoutée au nom du produit.
Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple:`make planck/rev4:default:bootloader`.
Pour génerer le bootloader, utilisez la cible `bootloader`. Exemple: `make planck/rev4:default:bootloader`.
Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple:`make planck/rev4:default:production`.
Pour génerer un fichier .hex prêt pour la production qui contiendra tant l'application que le bootloader, utilisez la cible `production`. Exemple: `make planck/rev4:default:production`.
### Commandes DFU
@@ -67,7 +67,7 @@ Il y a plusieurs commandes DFU que vous pouvez utiliser pour flasher le firmware
Les cartes arduinos et leurs clones utilisent le [bootloader Caterina](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (tous les claviers utilisant un Pro Micro, ou un clone). Ils utilisent aussi le protocole avr109 pour communiquer en virtuellement en série (serial en anglais). Les bootloaders comme le [A-Star](https://www.pololu.com/docs/0J61/9) sont basés sur Caterina.
Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
```make
# Bootloader selection
@@ -81,20 +81,20 @@ Pour vérifier la compatibilité avec un bootloader Caterina, vérifiez que ce b
BOOTLOADER = caterina
```
Flashers compatibles:
Flashers compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandée)
* [avrdude](https://www.nongnu.org/avrdude/) avec avr109 / `:avrdude` (Outil en ligne de commande recommandé)
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
Séquence de flash :
Séquence de flash :
1. Pressez la touche avec le keycode `RESET`, ou reliez les ports GND et RST. Vous n'avez que 7 secondes pour flasher une fois que l'opération a été faite.
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Attendez que l'appareil redémarre automatiquement.
ou, utilisez:
ou, utilisez:
make <keyboard>:<keymap>:avrdude
@@ -111,7 +111,7 @@ Il existe un certain nombre de commandes DFU que vous pouvez utiliser pour mettr
Halfkay est un protocole ultra-simple développé par PJRC qui utilise HID et qui est fourni avec tous les Teensys après le modèle 2.0.
Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
```make
# Bootloader selection
@@ -125,24 +125,24 @@ Pour vérifier la compatibilité avec le booloader Halfkay, vérifiez que ce blo
BOOTLOADER = halfkay
```
Flasher compatibles:
Flasher compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recomandée)
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) (petit utilitaire ultra simple)
[Teensy Loader en ligne de commande](https://www.pjrc.com/teensy/loader_cli.html) (Outil en ligne de commande recommandé)
Séquence de flash:
Séquence de flash:
1. Pressez la touche du keycode `RESET`, ou reliez les ports RST et GND rapidement. Vous avez ensuite 7 secondes pour réaliser le flash.
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
## USBasploader
USBasploader est un bootloader développé par matrixstorm. Il est utilisé sur des processeurs AVR non-USB comme le ATmega328P, qui fonctionne grâce à V-USB.
Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que ce bloc est présent dans votre fichier `rules.mk`:
```make
# Bootloader selection
@@ -156,24 +156,24 @@ Pour vérifier la compatibilité avec le booloader USBasploader, vérifiez que c
BOOTLOADER = USBasp
```
Flashers compatibles:
Flashers compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (Interface graphique recommandé)
* [avrdude](https://www.nongnu.org/avrdude/) avec le programmeur `usbasp`.
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
Séquence de flash:
Séquence de flash:
1. Pressez la touche du keycode `RESET`, ou reliez le port de boot pendant que RST et GND snt reliés. Cela doit être fait très rapidement.
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
## BootloadHID
BootloadHID est un bootloader pour les microcontrôleurs AVR. L'utilitaire de téleversement ne demande pas de drivers au niveau du kernel et peut être lancé sans installer aucune DLLs.
Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :
Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que ce bloc existe dans votre fichier `rules.mk` :
```make
# Bootloader selection
@@ -187,50 +187,50 @@ Pour vérifier la compatibilité avec le bootloader bootloadHID, vérifiez que c
BOOTLOADER = bootloadHID
```
Utilitaires de flash compatibles:
Utilitaires de flash compatibles:
* [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) (Utilitaire avec interface graphique recommandé)
* [bootloadhid Command Line](https://www.obdev.at/products/vusb/bootloadhid.html) / `:BootloadHID` avec QMK (utilitaire en ligne de commande recommandé)
Séquence de flash
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
* Pressez la touche du keycode `RESET` (Cela ne fonctionnera pas sur certains appareils).
* Verrouillez la touche «Salt» tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier)
* Verrouillez la touche «Salt» tout en branchant le clavier (Généralement ce principe est documenté dans le fichier readme du clavier)
2. Attendez que l'OS détecte l'appareil.
3. Flasher le fichier .hex.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
4. Redémarrez l'appareil en mode «application». Cela peut être fait automatiquement.
Ou alors:
Ou alors:
make <keyboard>:<keymap>:bootloadHID
## STM32
Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex:STM32F103) mais le processus reste le même.
Tous les processeurs STM32 contiennent un bootloader installé en usine qui ne peut pas être modifié ou supprimé. Certains processeurs STM32 ont des bootloaders qui ne peuvent pas être programmés par USB (ex: STM32F103) mais le processus reste le même.
Pour le moment, aucune variable `BOOTLOADER` n'est nécessaire dans le fichier `rules.mk`.
Flashers compatibles:
Flashers compatibles:
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
* [dfu-util](https://github.com/Stefan-Schmidt/dfu-util) / `:dfu-util` (utilitaire en ligne de commande recommandé)
Séquence pour flasher:
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
1. Entrez dans le bootloader en utilisant l'une de ces méthodes:
* Utilisez une touche sur laquelle le keycode `RESET` (Cela peut ne pas fonctionner sur les appareils STM32F042)
* Si un circuit de réinitialisation (Reset) est présent alors utilisé le bouton qui lui est dédié.
* Autrement, vous devez réaliser une liaison entre BOOT0 et VCC (en appuyant sur le bouton ou à l'aide d'un pont) puis faire un pont entre RESET et GND et enfin relacher le pont BOOT0.
2. Attendre que l'os détecte l'appareil.
3. Flasher un fichier `.bin`.h
* Vous allez recevoir un avertissement à propos de la signature DFU. Ignorez-la.
4. Réinitialisez l'appareil en mode «application». Cela peut être fait automatiquement.
* Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex:`DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé.
4. Réinitialisez l'appareil en mode «application». Cela peut être fait automatiquement.
* Si vous êtes en train de travailler en ligne de commande, par exemple avec un `make planck/rev6:default:dfu-util` alors soyez bien sur que l'argument `:leave` est passé aux arguments DFU grâce à la variable `DFU_ARGS` à l'intérieur de votre fichier `rules.mk` (Ex: `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) afin que votre appareil redémarre après avoir été flashé.
### Commandes STM32
Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32:
Il y a différentes commandes que vous pouvez utiliser pour flasher un firmware dans un appareil STM32:
* `:dfu-util` - C'est l'option standard pour flasher un appareil STM32. Le script attendra qu'un bootloader STM32 soit présent.
* `:dfu-util-split-left` - Permet de flasher un firmware normalement, tout comme l'option précédente mais permet de configurer le côté gauche des paramètres EEPROM sur un clavier scindé.

View File

@@ -88,7 +88,7 @@ Par exemple, si votre keymap s'appelle "xyverz" et que vous fabriquez une keymap
La commande va vérifier la configuration du clavier, puis tentera de le flasher en fonction du bootloader (chargeur damorçage) spécifié. Cela signifie que vous n'avez pas besoin de savoir quel bootloader votre clavier utilise. Exécutez simplement la commande et laissez-le faire le gros du travail.
Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information nest pas configurée ou si vous tentez de flasher un clavier qui ne permet pas dêtre flashé alors vous obtiendrez cette erreur :
Cependant, tout dépend du bootloader qui est installé sur le clavier. Si cette information nest pas configurée ou si vous tentez de flasher un clavier qui ne permet pas dêtre flashé alors vous obtiendrez cette erreur:
WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time.
@@ -326,7 +326,7 @@ Il y aun certain nombre de commandes du DFU que vous pouvez utiliser pour flash
### BootloadHID
Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante :
Pour les claviers basés sur Bootmapper Client(BMC)/bootloadHID/ATmega32A, si vous êtes prêts à compiler et flasher le firmware, ouvrez votre fenêtre de terminal et lancez la commande suivante:
make <my_keyboard>:<my_keymap>:bootloaderHID
@@ -351,7 +351,7 @@ Error opening HIDBoot device: The specified device was not found
Trying again in 5s.
```
Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait safficher :
Une fois ce résultat obtenu, réinitialisez le contrôleur. Le résultat suivant devrait safficher:
```
Page size = 128 (0x80)

View File

@@ -113,7 +113,7 @@ Don't hold the iron on the solder/joint longer than necessary. Heat will be cond
#### Soldering the Diodes
Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The input lead of the diode should be touching the left contact on the switch, and the bent, output end should be facing to the right and resting on the switch there, like this:
Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. Make sure the diodes are soldered in parallel (diode outputs shouldn't connect to diode inputs). The input lead of the diode should be touching the left contact on the switch, and the bent, output end should be facing to the right and resting on the switch there, like this:
![soldering-diodes-01.png](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/docs/hand_wire/soldering-diodes-01.png)

View File

@@ -3,7 +3,6 @@
* [セットアップ](ja/newbs_getting_started.md)
* [初めてのファームウェアの構築](ja/newbs_building_firmware.md)
* [ファームウェアのフラッシュ](ja/newbs_flashing.md)
* [テストとデバッグ](ja/newbs_testing_debugging.md)
* [手助けを得る/サポート](ja/support.md)
* [他のリソース](ja/newbs_learn_more_resources.md)
* [シラバス](ja/syllabus.md)
@@ -11,7 +10,8 @@
* FAQ
* [一般的な FAQ](ja/faq_general.md)
* [QMK のビルド/コンパイル](ja/faq_build.md)
* [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md)
* [QMK のデバッグ](ja/faq_debug.md)
* [QMK のトラブルシューティング](ja/faq_misc.md)
* [キーマップ FAQ](ja/faq_keymap.md)
* [用語](ja/reference_glossary.md)
@@ -23,11 +23,13 @@
* [概要](ja/api_overview.md)
* [API ドキュメント](ja/api_docs.md)
* [キーボードサポート](ja/reference_configurator_support.md)
* [デフォルトキーマップの追加](ja/configurator_default_keymaps.md)
* CLI
* [概要](ja/cli.md)
* [設定](ja/cli_configuration.md)
* [コマンド](ja/cli_commands.md)
* [Tab 補完](ja/cli_tab_complete.md)
* QMK を使う
* ガイド
@@ -41,8 +43,8 @@
* [書き込み](ja/flashing.md)
* [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md)
* IDE
* [Eclipse で QMK を使用](ja/other_eclipse.md)
* [VSCode で QMK を使用](ja/other_vscode.md)
* [QMK での Eclipse 使用](ja/other_eclipse.md)
* [QMK での VSCode の使用](ja/other_vscode.md)
* Git のベストプラクティス
* [入門](ja/newbs_git_best_practices.md)
* [フォーク](ja/newbs_git_using_your_master_branch.md)
@@ -79,6 +81,7 @@
* [ワンショットキー](ja/one_shot_keys.md)
* [ポインティング デバイス](ja/feature_pointing_device.md)
* [ロー HID](ja/feature_rawhid.md)
* [シーケンサー](ja/feature_sequencer.md)
* [スワップハンド](ja/feature_swap_hands.md)
* [タップダンス](ja/feature_tap_dance.md)
* [タップホールド設定](ja/tap_hold.md)
@@ -103,6 +106,7 @@
* [DIP スイッチ](ja/feature_dip_switch.md)
* [エンコーダ](ja/feature_encoders.md)
* [触覚フィードバック](ja/feature_haptic_feedback.md)
* [ジョイスティック](ja/feature_joystick.md)
* [LED インジケータ](ja/feature_led_indicators.md)
* [Proton C 変換](ja/proton_c_conversion.md)
* [PS/2 マウス](ja/feature_ps2_mouse.md)
@@ -116,11 +120,8 @@
* 互換性を破る変更/Breaking changes
* [概要](ja/breaking_changes.md)
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
* 履歴
* [2020年8月29日](ja/ChangeLog/20200829.md)
* [2020年5月30日](ja/ChangeLog/20200530.md)
* [2020年2月29日](ja/ChangeLog/20200229.md)
* [2019年8月30日](ja/ChangeLog/20190830.md)
* [最近の変更履歴](ChangeLog/20210227.md "QMK v0.12.0 - 2021 Feb 27")
* [過去の互換性を破る変更](ja/breaking_changes_history.md)
* C 開発
* [ARM デバッグ ガイド](ja/arm_debugging.md)
@@ -129,11 +130,13 @@
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
* [ドライバ](ja/hardware_drivers.md)
* [ADC ドライバ](ja/adc_driver.md)
* [オーディオドライバ](ja/audio_driver.md)
* [I2C ドライバ](ja/i2c_driver.md)
* [SPI ドライバ](ja/spi_driver.md)
* [WS2812 ドライバ](ja/ws2812_driver.md)
* [EEPROM ドライバ](ja/eeprom_driver.md)
* [シリアル ドライバ](ja/serial_driver.md)
* [UART ドライバ](ja/uart_driver.md)
* [GPIO 制御](ja/internals_gpio_control.md)
* [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md)

View File

@@ -1,8 +1,8 @@
# QMK API
<!---
original document: 0.9.50:docs/api_docs.md
git diff 0.9.50 HEAD -- docs/api_docs.md | cat
original document: 0.13.15:docs/api_docs.md
git diff 0.13.15 HEAD -- docs/api_docs.md | cat
-->
このページは QMK API の使い方を説明します。もしあなたがアプリケーション開発者であれば、全ての [QMK](https://qmk.fm) キーボードのファームウェアをコンパイルするために、この API を使うことができます。

View File

@@ -1,8 +1,8 @@
# QMK API
<!---
original document: 0.9.50:docs/api_overview.md
git diff 0.9.50 HEAD -- docs/api_overview.md | cat
original document: 0.13.15:docs/api_overview.md
git diff 0.13.15 HEAD -- docs/api_overview.md | cat
-->
QMK API は、Web と GUI ツールが [QMK](https://qmk.fm/) によってサポートされるキーボード用の任意のキーマップをコンパイルするために使うことができる、非同期 API を提供します。標準のキーマップテンプレートは、C コードのサポートを必要としない全ての QMK キーコードをサポートします。キーボードのメンテナは独自のカスタムテンプレートを提供して、より多くの機能を実現することができます。

View File

@@ -74,7 +74,7 @@ default.keymap: None -> default
qmk config compile
### 単一キーの例
### 単一キーの例 :id=single-key-example
qmk config compile.keyboard

View File

@@ -1,8 +1,8 @@
# コーディング規約 (C)
<!---
original document: 0.9.19:docs/coding_conventions_c.md
git diff 0.9.19 HEAD -- docs/coding_conventions_c.md | cat
original document: 0.13.15:docs/coding_conventions_c.md
git diff 0.13.15 HEAD -- docs/coding_conventions_c.md | cat
-->
私たちのスタイルのほとんどはかなり理解しやすいですが、現時点では完全に一貫しているわけではありません。変更箇所周辺のコードのスタイルと一致させる必要がありますが、そのコードに一貫性が無い場合や不明瞭な場合は以下のガイドラインに従ってください:

View File

@@ -1,8 +1,8 @@
# QMK の設定
<!---
original document: 0.10.33:docs/config_options.md
git diff 0.10.33 HEAD -- docs/config_options.md | cat
original document: 0.13.17:docs/config_options.md
git diff 0.13.17 HEAD -- docs/config_options.md | cat
-->
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
@@ -72,16 +72,22 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* (循環させるために)代替音声を有効にします
* `#define C4_AUDIO`
* ピン C4 のオーディオを有効にします
* 非推奨。`#define AUDIO_PIN C4` を使ってください
* `#define C5_AUDIO`
* ピン C5 のオーディオを有効にします
* 非推奨。`#define AUDIO_PIN C5` を使ってください
* `#define C6_AUDIO`
* ピン C6 のオーディオを有効にします
* 非推奨。`#define AUDIO_PIN C6` を使ってください
* `#define B5_AUDIO`
* ピン B5 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
* ピン B5 のオーディオを有効にします (C ピンの1つとともに B ピンの1つが有効にされている場合、疑似ステレオが有効にされます)
* 非推奨。もし `AUDIO_PIN``C` ピンを有効にしている場合は、`#define AUDIO_PIN_ALT B5` を使い、そうでなければ `#define AUDIO_PIN B5` を使います。
* `#define B6_AUDIO`
* ピン B6 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
* ピン B6 のオーディオを有効にします (C ピンの1つとともに B ピンの1つが有効にされている場合、疑似ステレオが有効にされます)
* 非推奨。もし `AUDIO_PIN``C` ピンを有効にしている場合は、`#define AUDIO_PIN_ALT B6` を使い、そうでなければ `#define AUDIO_PIN B6` を使います。
* `#define B7_AUDIO`
* ピン B7 のオーディオを有効にします (C[4-6]\_AUDIO の1つとともに B[5-7]\_AUDIO の1つが有効にされている場合、疑似ステレオが有効にされます)
* ピン B7 のオーディオを有効にします (C ピンの1つとともに B ピンの1つが有効にされている場合、疑似ステレオが有効にされます)
* 非推奨。もし `AUDIO_PIN``C` ピンを有効にしている場合は、`#define AUDIO_PIN_ALT B7` を使い、そうでなければ `#define AUDIO_PIN B7` を使います。
* `#define BACKLIGHT_PIN B7`
* バックライトのピン
* `#define BACKLIGHT_LEVELS 3`
@@ -93,7 +99,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* `#define DEBOUNCE 5`
* ピンの値を読み取る時の遅延 (5がデフォルト)
* `#define LOCKING_SUPPORT_ENABLE`
* メカニカルロックのサポート。キーマップで KC_LCAP、 KC_LNUM そして KC_LSCR を使えるようにします
* メカニカルロックのサポート。キーマップで KC_LCAP、KC_LNUM そして KC_LSCR を使えるようにします
* `#define LOCKING_RESYNC_ENABLE`
* キーボードの LED の状態をスイッチの状態と一致させ続けようとします
* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
@@ -102,6 +108,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* デバイスの USB 経由の最大電力(mA) を設定します (デフォルト: 500)
* `#define USB_POLLING_INTERVAL_MS 10`
* キーボード、マウス および 共有 (NKRO/メディアキー) インタフェースのための USB ポーリングレートをミリ秒で設定します
* `#define USB_SUSPEND_WAKEUP_DELAY 200`
* ウェイクアップパケットを送信した後で一時停止するミリ秒を設定します
* `#define F_SCL 100000L`
* I2C を使用するキーボードのための I2C クロックレート速度を設定します。デフォルトは `400000L` ですが、`split_common` を使っているキーボードは別でデフォルトは `100000L` です。
@@ -142,6 +150,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* `#define RETRO_TAPPING`
* 押下とリリースの間に他のキーによる中断がなければ、TAPPING_TERM の後であってもとにかくタップします
* 詳細は [Retro Tapping](ja/tap_hold.md#retro-tapping) を見てください
* `#define RETRO_TAPPING_PER_KEY`
* キーごとの `RETRO_TAPPING` 設定の処理を有効にします
* `#define TAPPING_TOGGLE 2`
* トグルを引き起こす前のタップ数
* `#define PERMISSIVE_HOLD`
@@ -240,7 +250,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* DFU ブートローダを搭載したボードでは、これらの EEPROM ファイルを書き込むために `:dfu-split-left`/`:dfu-split-right` を使うことができます
* Caterina ブートローダを搭載したボード (標準的な Pro Micros など)では、`:avrdude-split-left`/`:avrdude-split-right` を使ってください
* ARM DFU ブートローダを搭載したボード (Proton C など)では、`:dfu-util-split-left`/`:dfu-util-split-right` を使ってください
3. `MASTER_RIGHT` を設定します: USBポートに差し込まれた側はマスター側で右側であると決定されます(デフォルトの逆)
3. `MASTER_RIGHT` を設定します: USB ポートに差し込まれた側はマスター側で右側であると決定されます(デフォルトの逆)
4. デフォルト: USB ポートに差し込まれている側がマスター側であり、左側であると見なされます。スレーブ側は右側です
#### 左右を定義します

View File

@@ -1,8 +1,8 @@
# 貢献方法
<!---
original document: 0.8.62:docs/contributing.md
git diff 0.8.62 HEAD -- docs/contributing.md | cat
original document: 0.13.15:docs/contributing.md
git diff 0.13.15 HEAD -- docs/contributing.md | cat
-->
👍🎉 まず、これを読み貢献する時間を作ってくれてありがとうございます!🎉👍

View File

@@ -1,8 +1,8 @@
# ドキュメントテンプレート
<!---
original document: 0.9.19:docs/documentation_templates.md
git diff 0.9.19 HEAD -- docs/documentation_templates.md | cat
original document: 0.13.15:docs/documentation_templates.md
git diff 0.13.15 HEAD -- docs/documentation_templates.md | cat
-->
このページでは、新しいキーマップやキーボードを QMK に提出する際に使うべきテンプレートをまとめています。

View File

@@ -1,13 +1,100 @@
# デバッグの FAQ
<!---
original document: 0.10.33:docs/faq_debug.md
git diff 0.10.33 HEAD -- docs/faq_debug.md | cat
original document: 0.12.45:docs/faq_debug.md
git diff 0.12.45 HEAD -- docs/faq_debug.md | cat
-->
このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。
# デバッグコンソール
## デバッグ :id=debugging
`rules.mk``CONSOLE_ENABLE = yes` の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの `DEBUG` キーコードを使用するか、デバッグモードを有効にする[コマンド](ja/feature_command.md)機能を使用するか、以下のコードをキーマップに追加します。
```c
void keyboard_post_init_user(void) {
// 希望する動作に合わせて値をカスタマイズします
debug_enable=true;
debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}
```
## デバッグツール
キーボードのデバッグに使えるツールは2つあります。
### QMK Toolbox を使ったデバッグ
互換性のある環境では、[QMK Toolbox](https://github.com/qmk/qmk_toolbox) を使うことでキーボードからのデバッグメッセージを表示できます。
### hid_listen を使ったデバッグ
ターミナルベースの方法がお好みですかPJRC が提供する [hid_listen](https://www.pjrc.com/teensy/hid_listen.html) もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルは Windows、Linux、MacOS 用が用意されています。
## 独自のデバッグメッセージを送信する
[カスタムコード](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に `print.h` のインクルードを追加します:
```c
#include "print.h"
```
その後は、いくつかの異なった print 関数を使用することが出来ます:
* `print("string")`: シンプルな文字列を出力します
* `uprintf("%s string", var)`: フォーマットされた文字列を出力します
* `dprint("string")` デバッグモードが有効な場合のみ、シンプルな文字列を出力します
* `dprintf("%s string", var)`: デバッグモードが有効な場合のみ、フォーマットされた文字列を出力します
## デバッグの例
以下は現実世界での実際のデバッグ手法の例を集めたものです。
### マトリックス上のどの場所でキー押下が起こったか?
移植する場合や、PCB の問題を診断する場合、キー入力が正しくスキャンされているかどうかを確認することが役立つ場合があります。この手法でのロギングを有効化するには、`keymap.c` へ以下のコードを追加します。
```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// コンソールが有効化されている場合、マトリックス上の位置とキー押下状態を出力します
#ifdef CONSOLE_ENABLE
uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
#endif
return true;
}
```
出力例
```text
Waiting for device:.......
Listening:
KL: kc: 169, col: 0, row: 0, pressed: 1
KL: kc: 169, col: 0, row: 0, pressed: 0
KL: kc: 174, col: 1, row: 0, pressed: 1
KL: kc: 174, col: 1, row: 0, pressed: 0
KL: kc: 172, col: 2, row: 0, pressed: 1
KL: kc: 172, col: 2, row: 0, pressed: 0
```
### キースキャンにかかる時間の測定
パフォーマンスの問題をテストする場合、スイッチマトリックスをスキャンする頻度を知ることが役立ちます。この手法でのロギングを有効化するには `config.h` へ以下のコードを追加します。
```c
#define DEBUG_MATRIX_SCAN_RATE
```
出力例
```text
> matrix scan frequency: 315
> matrix scan frequency: 313
> matrix scan frequency: 316
> matrix scan frequency: 316
> matrix scan frequency: 316
> matrix scan frequency: 316
```
## `hid_listen` がデバイスを認識できない
デバイスのデバッグコンソールの準備ができていない場合、以下のように表示されます:
@@ -25,116 +112,20 @@ Listening:
この 'Listening:' のメッセージが表示されない場合は、[Makefile] を `CONSOLE_ENABLE=yes` に設定してビルドしてみてください
Linux のような OS でデバイスにアクセスするには、権が必要かもしれません。
- `sudo hid_listen` を試してください
Linux のような OS でデバイスにアクセスするには、権が必要かもしれません。`sudo hid_listen` を試してください。
多くの Linux ディストリビューションでは、次の内容で `/etc/udev/rules.d/70-hid-listen.rules` というファイルを作成することで、root として hid_listen を実行する必要がなくなります:
```
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="def1", TAG+="uaccess", RUN{builtin}+="uaccess"
```
abcd と def1 をキーボードのベンダーとプロダクト IDに置き換えてください。文字は小文字でなければなりません。`RUN{builtin}+="uaccess"` の部分は、古いディストリビューションでのみ必要です。
## コンソールにメッセージが表示されない
以下を調べてください:
- *hid_listen* がデバイスを検出する。上記を見てください。
- **Magic**+d を使ってデバッグを有効にする。[マジックコマンド](https://github.com/tmk/tmk_keyboard#magic-commands)を見てください。
- `debug_enable=true` を設定します。[テストとデバッグ](ja/newbs_testing_debugging.md#debugging)を見てください
- デバッグ print の代わりに 'print' 関数を使ってみてください。**common/print.h** を見てください。
- `debug_enable=true` を設定します。[デバッグ](#debugging)を見てください
- デバッグプリントの代わりに `print` 関数を使ってみてください。**common/print.h** を見てください。
- コンソール機能を持つ他のデバイスを切断します。[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97) を見てください。
***
# 雑多なこと
## 安全性の考慮
あなたはおそらくキーボードを「文鎮化」したくないでしょう。文鎮化するとファームウェアを書き換えられないようになります。リスクがあまりに高い(そしてそうでないかもしれない)ものの一部のリストを示します。
- キーボードマップに RESET が含まれない場合、DFU モードに入るには、PCB のリセットボタンを押す必要があります。底部のネジを外す必要があります。
- tmk_core / common にあるファイルを触るとキーボードが操作不能になるかもしれません。
- .hex ファイルが大きすぎると問題を引き起こします; `make dfu` コマンドはブロックを削除し、
サイズを検査し(おっと、間違った順序です!)、エラーを出力し、
キーボードへの書き込みに失敗し、DFU モードのままになります。
- この目的のためには、Planck の最大の .hex ファイルサイズは 7000h (10進数で28672)であることに注意してください。
```
Linking: .build/planck_rev4_cbbrowne.elf [OK]
Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
Size after:
text data bss dec hex filename
0 22396 0 22396 577c planck_rev4_cbbrowne.hex
```
- 上のファイルのサイズは 22396/577ch で、28672/7000h より小さいです
- 適切な替わりの .hex ファイルがある限り、それをロードして再試行することができます
- あなたがキーボードの Makefile で指定したかもしれない一部のオプションは、余分なメモリを消費します; BOOTMAGIC_ENABLE、MOUSEKEY_ENABLE、EXTRAKEY_ENABLE、CONSOLE_ENABLE、API_SYSEX_ENABLE に注意してください
- DFU ツールは(オプションの余計なフルーツサラダを投げ込まない限り)ブートローダに書き込むことを許可しないので、
ここにはリスクはほとんどありません。
- EEPROM の書き込みサイクルは、約100000です。ファームウェアを繰り返し継続的に書き換えるべきではありません。それは最終的に EEPROM を焼き焦がします。
## NKRO が動作しません
最初に、**Makefile** 内でビルドオプション `NKRO_ENABLE` を使ってファームウェアをコンパイルする必要があります。
**NKRO** がまだ動作しない場合は、`Magic` **N** コマンド(デフォルトでは `LShift+RShift+N`)を試してみてください。**NKRO** モードと **6KRO** モード間を一時的に切り替えるためにこのコマンドを使うことができます。**NKRO** が機能しない状況、特に BIOS の場合は **6KRO** モードに切り替える必要があります。
ファームウェアを `BOOTMAGIC_ENABLE` でビルドした場合、`ブートマジック` **N** コマンドで切り替える必要があります (デフォルトでは `Space+N`)。この設定は EEPROM に格納され、電源を入れ直しても保持されます。
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
## TrackPoint はリセット回路が必要です (PS/2 マウスサポート)
リセット回路が無いとハードウェアの不適切な初期化のために一貫性の無い結果になります。TPM754 の回路図を見てください。
- https://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
- https://www.mikrocontroller.net/attachment/52583/tpm754.pdf
## 16 を超えるマトリックの列を読み込めない
列が 16 を超える場合、[matrix.h] の `read_cols()` 内の `1<<16` の代わりに `1UL<<16` を使ってください。
C では、AVR の場合 `1` は [16 bit] である [int] 型の1を意味し、15 を超えて左にシフトすることはできません。`1<<16` すると予期しないゼロが発生します。`1UL` として [unsigned long] 型を使う必要があります。
https://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
## 特別なエクストラキーが動作しない (システム、オーディオコントロールキー)
QMK でそれらを使うには、`rules.mk` 内で `EXTRAKEY_ENABLE` を定義する必要があります。
```
EXTRAKEY_ENABLE = yes # オーディオ制御とシステム制御
```
## スリープから復帰しない
Windows では、**デバイスマネージャ**の**電源の管理**タブ内の `このデバイスで、コンピュータのスタンバイ状態を解除できるようにする` 設定を調べてください。また BIOS 設定も調べてください。
スリープ中に任意のキーを押すとホストが起動するはずです。
## Arduino を使っていますか?
**Arduino のピンの命名は実際のチップと異なることに注意してください。** 例えば、Arduino のピン `D0``PD0` ではありません。回路図を自身で確認してください。
- https://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
- https://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
Arduino の Leonardo と micro には **ATMega32U4** が載っていて、TMK 用に使うことができますが、Arduino のブートローダが問題になることがあります。
## JTAG を有効にする
デフォルトでは、キーボードが起動するとすぐに JTAG デバッグインタフェースが無効になります。JTAG 対応 MCU は `JTAGEN` ヒューズが設定された状態で出荷されており、キーボードがスイッチマトリックス、LED などに使用している可能性のある MCU の特定のピンを乗っ取ります。
JTAG を有効にしたままにしたい場合は、単に以下のものを `config.h` に追加します:
```c
#define NO_JTAG_DISABLE
```
## USB 3 の互換性
USB 3 ポートで問題がある人がいると聞きました。USB 2 ポートを試してください。
## Mac の互換性
### OS X 10.11 と Hub
https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
## リジューム (スリープとウェークアップ)/電源サイクルの問題
一部の人がキーボードが BIOS で動作しなくなった、またはリジューム(電源サイクル)の後で動作しなくなったと報告しました。
今のところ、この問題の根本は明確ではないですが、幾つかのビルドオプションが関係しているようです。Makefileで、`CONSOLE_ENABLE``NKRO_ENABLE``SLEEP_LED_ENABLE` あるいは他のオプションを無効にしてみてください。
https://github.com/tmk/tmk_keyboard/issues/266
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778

View File

@@ -1,8 +1,8 @@
# よくある質問
<!---
original document: 0.8.62:docs/faq_general.md
git diff 0.8.62 HEAD -- docs/faq_general.md | cat
original document: 0.13.17:docs/faq_general.md
git diff 0.13.17 HEAD -- docs/faq_general.md | cat
-->
## QMK とは何か?

View File

@@ -1,8 +1,8 @@
# キーマップの FAQ
<!---
original document: 0.8.62:docs/faq_keymap.md
git diff 0.8.62 HEAD -- docs/faq_keymap.md | cat
original document: 0.13.15:docs/faq_keymap.md
git diff 0.13.15 HEAD -- docs/faq_keymap.md | cat
-->
このページは人々がキーマップについてしばしば持つ疑問について説明します。まだ読んだことが無い場合には、[キーマップの概要](ja/keymap.md)を最初に読むべきです。

107
docs/ja/faq_misc.md Normal file
View File

@@ -0,0 +1,107 @@
# その他の FAQ
<!---
original document: 0.12.45:docs/faq_misc.md
git diff 0.12.45 HEAD -- docs/faq_misc.md | cat
-->
## どうやってキーボードをテストすればいいですか? :id=testing
通常、キーボードのテストは非常に簡単です。全てのキーをひとつずつ押して、期待するキーが送信されることを確認します。例え QMK で動作していない場合でも、[QMK Configurator](https://config.qmk.fm/#/test/) のテストモードを使用すると、キーボードをチェックできます。
## 安全性の考慮
あなたはおそらくキーボードを「文鎮化」したくないでしょう。文鎮化するとファームウェアを書き換えられないようになります。リスクがあまりに高い(そしてそうでないかもしれない)ものの一部のリストを示します。
- キーボードマップに RESET が含まれない場合、DFU モードに入るには、PCB のリセットボタンを押す必要があります。底部のネジを外す必要があります。
- tmk_core / common にあるファイルを触るとキーボードが操作不能になるかもしれません。
- .hex ファイルが大きすぎると問題を引き起こします; `make dfu` コマンドはブロックを削除し、サイズを検査し(おっと、間違った順序です!)、エラーを出力し、
キーボードへの書き込みに失敗し、DFU モードのままになります。
- この目的のためには、Planck の最大の .hex ファイルサイズは 7000h (10進数で28672)であることに注意してください。
```
Linking: .build/planck_rev4_cbbrowne.elf [OK]
Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
Size after:
text data bss dec hex filename
0 22396 0 22396 577c planck_rev4_cbbrowne.hex
```
- 上のファイルのサイズは 22396/577ch で、28672/7000h より小さいです。
- 適切な代わりの .hex ファイルがある限り、それをロードして再試行することができます。
- あなたがキーボードの Makefile で指定したかもしれない一部のオプションは、余分なメモリを消費します; BOOTMAGIC_ENABLE、MOUSEKEY_ENABLE、EXTRAKEY_ENABLE、CONSOLE_ENABLE、API_SYSEX_ENABLE に注意してください。
- DFU ツールは(オプションの余計なフルーツサラダを投げ込まない限り)ブートローダに書き込むことを許可しないので、ここにはリスクはほとんどありません。
- EEPROM の書き込みサイクルは、約100000(10万)です。ファームウェアを繰り返し継続的に書き換えるべきではありません。それは最終的に EEPROM を焼き焦がします。
## NKRO が動作しません
最初に、**Makefile** 内でビルドオプション `NKRO_ENABLE` を使ってファームウェアをコンパイルする必要があります。
**NKRO** がまだ動作しない場合は、`Magic` **N** コマンド(デフォルトでは `LShift+RShift+N`)を試してみてください。**NKRO** モードと **6KRO** モード間を一時的に切り替えるためにこのコマンドを使うことができます。**NKRO** が機能しない状況、特に BIOS の場合は **6KRO** モードに切り替える必要があります。
ファームウェアを `BOOTMAGIC_ENABLE` でビルドした場合、`ブートマジック` **N** コマンドで切り替える必要があります(デフォルトでは `Space+N`)。この設定は EEPROM に格納され、電源を入れ直しても保持されます。
https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch
## トラックポイントははリセット回路が必要です (PS/2 マウスサポート)
リセット回路が無いとハードウェアの不適切な初期化のために一貫性の無い結果になります。TPM754 の回路図を見てください:
- https://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
- https://www.mikrocontroller.net/attachment/52583/tpm754.pdf
## 16 を超えるマトリックの列を読み込めない
列が 16 を超える場合、[matrix.h] の `read_cols()` 内の `1<<16` の代わりに `1UL<<16` を使ってください。
C では、AVR の場合 `1` は [16 bit] である [int] 型の1を意味し、15を超えて左にシフトすることはできません。従って、`1<<16` を計算すると予期せずゼロになります。これを回避するには `1UL` として [unsigned long] 型を使う必要があります。
https://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
## 特別なエクストラキーが動作しない(システム、オーディオコントロールキー)
QMK でそれらを使うには、`rules.mk` 内で `EXTRAKEY_ENABLE` を定義する必要があります。
```
EXTRAKEY_ENABLE = yes # オーディオ制御とシステム制御
```
## スリープから復帰しない
**デバイスマネージャ**の**電源の管理**タブ内の `このデバイスで、コンピュータのスタンバイ状態を解除できるようにする` 設定を調べてください。また BIOS 設定も調べてください。スリープ中に任意のキーを押すとホストが起動するはずです。
## Arduino を使っていますか?
**Arduino のピンの命名は実際のチップと異なることに注意してください。** 例えば、Arduino のピン `D0``PD0` ではありません。回路図を自身で確認してください。
- https://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
- https://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
Arduino の Leonardo と micro には **ATMega32U4** が載っていて、TMK 用に使うことができますが、Arduino のブートローダが問題になることがあります。
## JTAG を有効にする
デフォルトでは、キーボードが起動するとすぐに JTAG デバッグインタフェースが無効になります。JTAG 対応 MCU は `JTAGEN` ヒューズが設定された状態で出荷されており、キーボードがスイッチマトリックス、LED などに使用している可能性のある MCU の特定のピンを乗っ取ります。
JTAG を有効にしたままにしたい場合は、単に以下のものを `config.h` に追加します:
```c
#define NO_JTAG_DISABLE
```
## USB 3 の互換性
一部の問題は、USB 3.x ポートから USB 2.0 ポートに切り替えることで修正できます。
## Mac の互換性
### OS X 10.11 と Hub
こちらを見てください: https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
## BIOS (UEFI) 設定/リジューム (スリープとウェークアップ)/電源サイクルの問題
一部の人がキーボードが BIOS で動作しなくなった、またはリジューム(電源サイクル)の後で動作しなくなったと報告しました。
今のところ、この問題の根本は明確ではないですが、幾つかのビルドオプションが関係しているようです。Makefile で、`CONSOLE_ENABLE``NKRO_ENABLE``SLEEP_LED_ENABLE` あるいは他のオプションを無効にしてみてください。
より詳しい情報:
- https://github.com/tmk/tmk_keyboard/issues/266
- https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778

View File

@@ -1,30 +1,166 @@
# 修飾キー :id=modifier-keys
<!---
original document: 0.9.0:docs/feature_advanced_keycodes.md
git diff 0.9.0 HEAD -- docs/feature_advanced_keycodes.md | cat
original document: 0.12.29:docs/feature_advanced_keycodes.md
git diff 0.12.29 HEAD -- docs/feature_advanced_keycodes.md | cat
-->
以下のようにキーコードとモディファイアを組み合わせることができます。押すと、モディファイアのキーダウンイベントが送信され、次に `kc` のキーダウンイベントが送信されます。放すと、`kc` のキーアップイベントが送信され、次にモディファイアのキーアップイベントが送信されます。
| キー | エイリアス | 説明 |
|----------|-------------------------------|----------------------------------------------------|
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 |
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 |
| `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 |
| `LCAG(kc)` | | 左 Control、左 Alt、左 GUI を押しながら `kc` を押します。 |
| `MEH(kc)` | | 左 Control、左 Shift、左 Alt を押しながら `kc` を押します。 |
| `HYPR(kc)` | | Control、左 Shift、左 Alt、左 GUI を押しながら `kc` を押します。 |
| キー | エイリアス | 説明 |
| ---------- | ------------------------------- | ------------------------------------------------------------------- |
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 |
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 |
| `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 |
| `LSA(kc)` | | 左 Shift と左 Alt を押しながら `kc` を押します。 |
| `RSA(kc)` | `SAGR(kc)` | 右 Shift と右 Alt (AltGr) を押しながら `kc` を押します。 |
| `RCS(kc)` | | Control と右 Shift を押しながら `kc` を押します。 |
| `LCAG(kc)` | | 左 Control、左 Alt、左 GUI を押しながら `kc` を押します。 |
| `MEH(kc)` | | 左 Control、左 Shift、左 Alt を押しながら `kc` を押します。 |
| `HYPR(kc)` | | 左 Control、左 Shift、左 Alt、左 GUI を押しながら `kc` を押します。 |
また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` または `C(A(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。
# モディファイアの状態を確認 :id=checking-modifier-state
現在のモディファイアの状態は、2つの関数によって主にアクセスされます。: `get_mods()` 関数は通常のモディファイアとモッドタップの状態を、`get_oneshot_mods()` 関数はワンショットモディファイアの状態を確認する関数です。(ワンショットモディファイアはキーが押されていない限り、通常のモディファイアキーのように動作します。)
1つ以上の特定のモディファイアが現在のモディファイアの状態に含まれているかどうかは、モディファイアの状態と、照合したいモディファイアの組み合わせに相当するモッドマスクとを AND 演算することで検出できます。
ビット演算が使われる理由は、モディファイアの状態が (GASC)<sub>R</sub>(GASC)<sub>L</sub> の形式で1バイトとして格納されるためです。
従って、例を挙げると、`01000010` は LShift+RALT の内部表現です。
C 言語におけるビット演算のより詳しい情報は、[ここ](https://en.wikipedia.org/wiki/Bitwise_operations_in_C) をクリックして、Wikipedia のページのトピックを開いてください。
実際には、`get_mods() & MOD_BIT(KC_<modifier>)`([モディファイアキーコードのリスト](ja/keycodes_basic.md#modifiers) 参照) で、あるモディファイアが有効かどうかをチェックできるということです、また左右のモディファイアの違いが重要ではなく、両方にマッチさせたい場合は、`get_mods() & MOD_MASK_<modifier>`とします。ワンショットモディファイアについても、`get_mods()``get_oneshot_mods()` に置き換えれば同じことができます。
モディファイアの特定の組み合わせが同時にアクティブなのか確認する*だけ*なら、上で説明したモディファイアの状態とモッドマスクの論理積と、モッドマスク自身の結果を比較します。: `get_mods() & <mod mask> == <mod mask>`
例えば、左 Control キーと 左 Shift キーのワンショットモディファイアがオンで、その他のワンショットモディファイアがオフの場合にカスタムコードを起動したいとしましょう。そうするには、`(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))` で左 Control キーと Shift キーのモッドビットを組み合わせて目的のモッドマスクを構成し、それらを差し込みます: `get_oneshot_mods & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT))`。モッドビットマスクの代わりに `MOD_MASK_CS` 使うと、条件を満たすために4つのモディファイアキー (左右両方の Control キーと Shift キー) を押す必要があります。
モッドマスクの完全なリストは、以下のとおりです。
| モッドマスク名 | マッチするモディファイア |
|--------------------|-------------------------------------------------------------|
| `MOD_MASK_CTRL` | 左 Control , 右 Control |
| `MOD_MASK_SHIFT` | 左 Shift , 右 Shift |
| `MOD_MASK_ALT` | 左 Alt , 右 Alt |
| `MOD_MASK_GUI` | 左 GUI , 右 GUI |
| `MOD_MASK_CS` | Control , Shift |
| `MOD_MASK_CA` | (左/右) Control , (左/右) Alt |
| `MOD_MASK_CG` | (左/右) Control , (左/右) GUI |
| `MOD_MASK_SA` | (左/右) Shift , (左/右) Alt |
| `MOD_MASK_SG` | (左/右) Shift , (左/右) GUI |
| `MOD_MASK_AG` | (左/右) Alt , (左/右) GUI |
| `MOD_MASK_CSA` | (左/右) Control , (左/右) Shift , (左/右) Alt |
| `MOD_MASK_CSG` | (左/右) Control , (左/右) Shift , (左/右) GUI |
| `MOD_MASK_CAG` | (左/右) Control , (左/右) Alt , (左/右) GUI |
| `MOD_MASK_SAG` | (左/右) Shift , (左/右) Alt , (左/右) GUI |
| `MOD_MASK_CSAG` | (左/右) Control , (左/右) Shift , (左/右) Alt , (左/右) GUI |
`get_mods()` 関数を使って現在アクティブなモディファイアにアクセスする以外に、モディファイアの状態を変更するために使えるいくつかの関数があります。ここでは、`mods` 引数はモディファイアビットマスクを表します。
* `add_mods(mods)`: その他のモディファイアに影響を与えずに `mods` を有効にします。
* `register_mods(mods)`: `add_mods` に似ていますが、キーボードにすぐにレポートを送信します。
* `del_mods(mods)`: その他のモディファイアに影響を与えずに `mods` を無効にします。
* `unregister_mods(mods)`: `del_mods` に似ていますが、キーボードにすぐにレポートを送信します。
* `set_mods(mods)`: `mods` で現在のモディファイアの状態を上書きします
* `clear_mods()`: 全てのモディファイアを無効にすることによって、モディファイアの状態をリセットします。
同様に、`get_oneshot_mods()` 関数に加えて、ワンショットモディファイアのための関数もあります。
* `add_oneshot_mods(mods)`: その他のワンショットモディファイアに影響を与えずに `mods` を有効にします
* `del_oneshot_mods(mods)`: その他のワンショットモディファイアに影響を与えずに `mods` を無効にします
* `set_oneshot_mods(mods)`: `mods` で現在のワンショットモディファイアの状態を上書きします
* `clear_oneshot_mods()`: 全てのワンショットモディファイアを無効にすることによって、ワンショットモディファイアの状態をリセットします。
## 例 :id=examples
次の例は、[マクロについてのページ](ja/feature_macros.md) で読める [高度なマクロ](ja/feature_macros.md?id=advanced-macro-functions) を使っています。
### Alt + Tab の代わりの Alt + Escape :id=alt-escape-for-alt-tab
左 Alt と `KC_ESC` が押されたときに、アプリ切り替えの(左 Alt と) `KC_TAB` のように振る舞うことを実現する単純な例です。この例は、左 Alt だけがアクティブになっているかを厳格に確認します。つまり、Alt+Shift+Esc によるアプリの逆順での切り替えはできません。また、この例は、実際の Alt+Escape キーボードショートカットを起動することはできなくなりますが、AltGr+Escape キーボードショートカットを起動することはできることに留意してください。
```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_ESC:
// 左 Alt だけがアクティブか検知します
if ((get_mods() & MOD_BIT(KC_LALT)) == MOD_BIT(KC_LALT)) {
if (record->event.pressed) {
// KC_LALT を登録する必要はありません。既にアクティブだからです。
// Alt モディファイアはこの KC_TAB に適用されます。
register_code(KC_TAB);
} else {
unregister_code(KC_TAB);
}
// QMK にこれ以上キーコードの処理をさせません。
return false;
}
// それ以外の場合は、QMK に通常通り KC_ESC の処理をさせます。
return true;
}
return true;
};
```
### Delete の代わりの Shift + Backspace :id=shift-backspace-for-delete
`KC_BSPC` と組み合わせることで Shift の本来の動作が取り消され、そして、`KC_DEL` に完全に置き換えられる高度な例です。この例を適切に動作させるために2つのメイン変数が作られます。: `mod_state``delkey_registered` です。最初の1つ目の変数は、モディファイアの状態を記憶し、`KC_DEL` を登録した後に元に戻すために使われます。2つ目の変数はブール型変数 (true または false) で、`KC_DEL` の状態を追跡して Backspace/Delete キー全体のリリースを正確に管理します。
前の例と対照的に、この例は厳格なモディファイアの確認を行いません。このカスタムコードを起動するには、1つまたは2つの Shift キーがアクティブな間に `KC_BSPC` を押せば十分で、他のモディファイアの状態は関係ありません。この方法は、いくつかの特典を提供します。: Ctrl+Shift+Backspace は次の単語を削除 (Control+Delete) し、Ctrl+Alt+Shift+Backspace は Ctrl+Alt+Del キーボードショートカットを実行します。
```c
// アクティブなモディファイアを表すバイナリデータを保持する変数を初期化します
uint8_t mod_state;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// 後々の参照のために現在のモディファイアの状態を変数に格納します
mod_state = get_mods();
switch (keycode) {
case KC_BSPC:
{
// Delete キーの状態(登録されているかどうか)を追跡するブール型変数を初期化します。
static bool delkey_registered;
if (record->event.pressed) {
// いずれかの Shift がアクティブか検知します
if (mod_state & MOD_MASK_SHIFT) {
// 最初に、 Shift キーを KC_DEL に適用しないため、
// 一時的に左右両方の Shift キーをキャンセルします
del_mods(MOD_MASK_SHIFT);
register_code(KC_DEL);
// KC_DEL の状態を反映させるためにブール型変数を更新します
delkey_registered = true;
// Backspace/Delete キーをタップした後でも押し続けている Shift キーが機能するように、
// モディファイアの状態を再適用します。
set_mods(mod_state);
return false;
}
} else { // KC_BSPC キーを離した場合
// KC_BSPC を離しても KC_DEL が送信されている場合
if (delkey_registered) {
unregister_code(KC_DEL);
delkey_registered = false;
return false;
}
}
// QMK に Shift キーを除いて KC_BSPC を通常通り処理させます
return true;
}
}
return true;
};
```
# 過去の内容 :id=legacy-content
このページには多くの機能が含まれていました。このページを構成していた多くのセクションをそれぞれのページに移動しました。これより下は全て単なるリダイレクトであるため、web上で古いリンクをたどっている人は探しているものを見つけることができます。

View File

@@ -210,7 +210,7 @@ SEND_STRING(".."SS_TAP(X_END));
```
## 高度なマクロ関数
## 高度なマクロ関数 :id=advanced-macro-functions
マクロの生成に役立つ関数が幾つかあります。マクロの中にかなり高度なコードを書くことができますが、機能が複雑になりすぎる場合は、代わりにカスタムキーコードを定義することをお勧めします。マクロはシンプルにしなければなりません。

View File

@@ -1,8 +1,8 @@
# PS/2 マウスサポート :id=ps2-mouse-support
<!---
original document: 0.9.44:docs/feature_ps2_mouse.md
git diff 0.9.44 HEAD -- docs/feature_ps2_mouse.md | cat
original document: 0.13.17:docs/feature_ps2_mouse.md
git diff 0.13.17 HEAD -- docs/feature_ps2_mouse.md | cat
-->
PS/2 マウス (例えばタッチパッドあるいはトラックポイント)を複合デバイスとしてキーボードに接続することができます。
@@ -210,7 +210,7 @@ void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate);
この機能を有効にするには、以下のようにスクロールボタンマスクを設定する必要があります:
```c
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BUTTON_MIDDLE) /* Default */
#define PS2_MOUSE_SCROLL_BTN_MASK (1<<PS2_MOUSE_BTN_MIDDLE) /* Default */
```
スクロールボタン機能を無効にするには:

View File

@@ -1,8 +1,8 @@
# QMK での速記 :id=stenography-in-qmk
<!---
original document: 0.10.33:docs/feature_stenography.md
git diff 0.10.33 HEAD -- docs/feature_stenography.md | cat
original document: 0.13.15:docs/feature_stenography.md
git diff 0.13.15 HEAD -- docs/feature_stenography.md | cat
-->
[速記](https://en.wikipedia.org/wiki/Stenotype)は裁判所のレポート、字幕および耳が不自由な人のためのリアルタイムの文字起こしで最もよく使われる記述方法です。速記では単語はスペル、音声およびショートカット(短い)ストロークが混在する音節ごとに音節化されます。プロの速記者は、標準的なタイピングで通常見られる負担を掛けずに、はるかに少ないエラー(99.9%より高い精度)で、200-300 WPM に到達できます。

View File

@@ -1,8 +1,8 @@
# スワップハンドアクション
<!---
original document: 0.8.177:docs/feature_swap_hands.md
git diff 0.8.177 HEAD -- docs/feature_swap_hands.md | cat
original document: 0.13.17:docs/feature_swap_hands.md
git diff 0.13.17 HEAD -- docs/feature_swap_hands.md | cat
-->
スワップハンドアクションにより、別のレイヤーを必要とせずに片手入力をサポートします。Makefile に `SWAP_HANDS_ENABLE` を設定し、キーマップに `hand_swap_config` エントリを定義します。これで `ACTION_SWAP_HANDS` コマンドキーが押されるたびにキーボードがミラーされます。例えば、QWERTY で "Hello, World" を入力するには、`^Ge^s^s^w^c W^wr^sd` を入力します。

View File

@@ -1,8 +1,8 @@
# ユーザスペース: キーマップ間でのコードの共有
<!---
original document: 0.9.43:docs/feature_userspace.md
git diff 0.9.43 HEAD -- docs/feature_userspace.md | cat
original document: 0.13.17:docs/feature_userspace.md
git diff 0.13.17 HEAD -- docs/feature_userspace.md | cat
-->
似たキーマップを複数のキーボードで使う場合、それらの間でコードを共有できるという利点が得られることがあります。`users/`に以下の構造でキーマップ(理想的には GitHub のユーザ名、`<name>`)と同じ名前の独自のフォルダを作成します:

View File

@@ -1,8 +1,8 @@
# キーボードマトリックスの仕組み
<!---
original document: 0.9.32:docs/how_a_matrix_works.md
git diff 0.9.32 HEAD -- docs/how_a_matrix_works.md | cat
original document: 0.13.15:docs/how_a_matrix_works.md
git diff 0.13.15 HEAD -- docs/how_a_matrix_works.md | cat
-->
キーボードスイッチのマトリックスは行と列に配置されます。マトリックス回路がなければ、各スイッチはコントローラに直接配線する必要があります。

View File

@@ -1,8 +1,8 @@
# GPIO 制御 :id=gpio-control
<!---
original document: 0.9.34:docs/internals_gpio_control.md
git diff 0.9.34 HEAD -- docs/internals_gpio_control.md | cat
original document: 0.13.15:docs/internals_gpio_control.md
git diff 0.13.15 HEAD -- docs/internals_gpio_control.md | cat
-->
QMK には、マイクロコントローラに依存しない GPIO 制御抽象レイヤーがあります。これは異なるプラットフォーム間でピン制御に簡単にアクセスできるようにするためのものです。
@@ -26,3 +26,22 @@ QMK には、マイクロコントローラに依存しない GPIO 制御抽象
## 高度な設定 :id=advanced-settings
各マイクロコントローラは GPIO に関して複数の高度な設定を持つことができます。この抽象レイヤーは、アーキテクチャー固有の機能の使用法を制限しません。上級ユーザは、目的のデバイスのデータシートを参照し、必要なライブラリを含めてください。AVR については、標準 avr/io.h ライブラリが使われます; STM32 については ChibiOS [PAL ライブラリ](https://chibios.sourceforge.net/docs3/hal/group___p_a_l.html)が使われます。
## アトミック操作 :id=atomic-operation
上記の関数は、必ずしもアトミックに動作することが保証されているわけではありません。そのため、上記の関数を複数組み合わせて使用する際に、操作の途中での割り込みを防ぎたい場合は、以下の `ATOMIC_BLOCK_FORCEON` マクロを使用してください。
例:
```c
void some_function() {
// 通常の処理
ATOMIC_BLOCK_FORCEON {
// アトミックであることが必要な処理
}
// 通常の処理
}
```
`ATOMIC_BLOCK_FORCEON` は、ブロックが実行される前に、割り込みが有効か無効かに関わらず、強制的に割り込みを無効にします。そして、ブロックが実行された後に、割り込みを有効にします。
したがって、`ATOMIC_BLOCK_FORCEON`は、ブロックの実行前に割り込みが有効になっていることがわかっている場合や、ブロックの完了時に割り込みを有効にしても問題ないことがわかっている場合のみ使用できることに注意してください。

261
docs/ja/keycodes_basic.md Normal file
View File

@@ -0,0 +1,261 @@
# 基本的なキーコード
<!---
original document: 0.11.25:docs/keycodes_basic.md
git diff 0.11.25 HEAD -- docs/keycodes_basic.md | cat
-->
基本的なキーコードのセットは、`KC_NO``KC_TRNS``0xA5-DF` の範囲のキーコードを除いて、[HID Keyboard/Keypad Usage Page (0x07)](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) に基づいています。
## 文字と数字
|キー |説明 |
|------|----------|
|`KC_A`|`a``A`|
|`KC_B`|`b``B`|
|`KC_C`|`c``C`|
|`KC_D`|`d``D`|
|`KC_E`|`e``E`|
|`KC_F`|`f``F`|
|`KC_G`|`g``G`|
|`KC_H`|`h``H`|
|`KC_I`|`i``I`|
|`KC_J`|`j``J`|
|`KC_K`|`k``K`|
|`KC_L`|`l``L`|
|`KC_M`|`m``M`|
|`KC_N`|`n``N`|
|`KC_O`|`o``O`|
|`KC_P`|`p``P`|
|`KC_Q`|`q``Q`|
|`KC_R`|`r``R`|
|`KC_S`|`s``S`|
|`KC_T`|`t``T`|
|`KC_U`|`u``U`|
|`KC_V`|`v``V`|
|`KC_W`|`w``W`|
|`KC_X`|`x``X`|
|`KC_Y`|`y``Y`|
|`KC_Z`|`z``Z`|
|`KC_1`|`1``!`|
|`KC_2`|`2``@`|
|`KC_3`|`3``#`|
|`KC_4`|`4``$`|
|`KC_5`|`5``%`|
|`KC_6`|`6``^`|
|`KC_7`|`7``&`|
|`KC_8`|`8``*`|
|`KC_9`|`9``(`|
|`KC_0`|`0``)`|
## ファンクションキー
|キー |説明 |
|--------|-----|
|`KC_F1` |F1 |
|`KC_F2` |F2 |
|`KC_F3` |F3 |
|`KC_F4` |F4 |
|`KC_F5` |F5 |
|`KC_F6` |F6 |
|`KC_F7` |F7 |
|`KC_F8` |F8 |
|`KC_F9` |F9 |
|`KC_F10`|F10 |
|`KC_F11`|F11 |
|`KC_F12`|F12 |
|`KC_F13`|F13 |
|`KC_F14`|F14 |
|`KC_F15`|F15 |
|`KC_F16`|F16 |
|`KC_F17`|F17 |
|`KC_F18`|F18 |
|`KC_F19`|F19 |
|`KC_F20`|F20 |
|`KC_F21`|F21 |
|`KC_F22`|F22 |
|`KC_F23`|F23 |
|`KC_F24`|F24 |
## パンクチュエーション
|キー |エイリアス |説明 |
|-----------------|-------------------|----------------------------------------------|
|`KC_ENTER` |`KC_ENT` |Return (Enter) |
|`KC_ESCAPE` |`KC_ESC` |Escape |
|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |
|`KC_TAB` | |Tab |
|`KC_SPACE` |`KC_SPC` |Spacebar |
|`KC_MINUS` |`KC_MINS` |`-``_` |
|`KC_EQUAL` |`KC_EQL` |`=``+` |
|`KC_LBRACKET` |`KC_LBRC` |`[``{` |
|`KC_RBRACKET` |`KC_RBRC` |`]``}` |
|`KC_BSLASH` |`KC_BSLS` |`\``\|` |
|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#``~` |
|`KC_SCOLON` |`KC_SCLN` |`;``:` |
|`KC_QUOTE` |`KC_QUOT` |`'``"` |
|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK`|<code>&#96;</code>`~`, JIS 全角/半角 |
|`KC_COMMA` |`KC_COMM` |`,``<` |
|`KC_DOT` | |`.``>` |
|`KC_SLASH` |`KC_SLSH` |`/``?` |
|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\``\|` |
## ロックキー
|キー |エイリアス |説明 |
|-------------------|--------------------|---------------------------------------|
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock |
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, 画面の明るさダウン (macOS)|
|`KC_NUMLOCK` |`KC_NLCK` |テンキー Num Lock と Clear |
|`KC_LOCKING_CAPS` |`KC_LCAP` |Caps Lock のロック |
|`KC_LOCKING_NUM` |`KC_LNUM` |Num Lock のロック |
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Scroll Lock のロック |
## 修飾キー
|キー |エイリアス |説明 |
|-----------|--------------------|---------------------------------|
|`KC_LCTRL` |`KC_LCTL` |左 Control |
|`KC_LSHIFT`|`KC_LSFT` |左 Shift |
|`KC_LALT` |`KC_LOPT` |左 Alt (Option) |
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|左 GUI (Windows/Command/Meta キー)|
|`KC_RCTRL` |`KC_RCTL` |右 Control |
|`KC_RSHIFT`|`KC_RSFT` |右 Shift |
|`KC_RALT` |`KC_ROPT`, `KC_ALGR`|右 Alt (Option/AltGr) |
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|右 GUI (Windows/Command/Meta キー)|
## 国際化対応キー
|キー |エイリアス|説明 |
|----------|----------|---------------------|
|`KC_INT1` |`KC_RO` |JIS `\`` _` |
|`KC_INT2` |`KC_KANA` |JIS カタカナ/ひらがな|
|`KC_INT3` |`KC_JYEN` |JIS `¥``\ |` |
|`KC_INT4` |`KC_HENK` |JIS 変換 |
|`KC_INT5` |`KC_MHEN` |JIS 無変換 |
|`KC_INT6` | |JIS テンキー `,` |
|`KC_INT7` | |International 7 |
|`KC_INT8` | |International 8 |
|`KC_INT9` | |International 9 |
|`KC_LANG1`|`KC_HAEN` |ハングル/英語 |
|`KC_LANG2`|`KC_HANJ` |韓文漢字 |
|`KC_LANG3`| |JIS カタカナ |
|`KC_LANG4`| |JIS ひらがな |
|`KC_LANG5`| |JIS 全角/半角 |
|`KC_LANG6`| |Language 6 |
|`KC_LANG7`| |Language 7 |
|`KC_LANG8`| |Language 8 |
|`KC_LANG9`| |Language 9 |
## コマンドキー
|キー |エイリアス |説明 |
|------------------|------------------------------|-------------------------------------------------------|
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, 画面の明るさアップ (macOS) |
|`KC_INSERT` |`KC_INS` |Insert |
|`KC_HOME` | |Home |
|`KC_PGUP` | |Page Up |
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|`KC_END` | |End |
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|`KC_RIGHT` |`KC_RGHT` |右矢印 |
|`KC_LEFT` | |左矢印 |
|`KC_DOWN` | |下矢印 |
|`KC_UP` | |上矢印 |
|`KC_APPLICATION` |`KC_APP` |アプリケーションキー (Windows コンテキストメニューキー)|
|`KC_POWER` | |システム電源 |
|`KC_EXECUTE` |`KC_EXEC` |Execute |
|`KC_HELP` | |Help |
|`KC_MENU` | |Menu |
|`KC_SELECT` |`KC_SLCT` |Select |
|`KC_STOP` | |Stop |
|`KC_AGAIN` |`KC_AGIN` |Again |
|`KC_UNDO` | |アンドゥ |
|`KC_CUT` | |カット |
|`KC_COPY` | |コピー |
|`KC_PASTE` |`KC_PSTE` |ペースト |
|`KC_FIND` | |検索 |
|`KC__MUTE` | |ミュート |
|`KC__VOLUP` | |音量アップ |
|`KC__VOLDOWN` | |音量ダウン |
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase |
|`KC_SYSREQ` | |SysReq/Attention |
|`KC_CANCEL` | |Cancel |
|`KC_CLEAR` |`KC_CLR` |Clear |
|`KC_PRIOR` | |Prior |
|`KC_RETURN` | |Return |
|`KC_SEPARATOR` | |Separator |
|`KC_OUT` | |Out |
|`KC_OPER` | |Oper |
|`KC_CLEAR_AGAIN` | |Clear/Again |
|`KC_CRSEL` | |CrSel/Props |
|`KC_EXSEL` | |ExSel |
## メディアキー
これらのキーコードは、HID Keyboard/Keypad usage ページにはありません。`SYSTEM_` キーコードは、Generic Desktop ページで見つかります。また、その他は Consumer ページにあります。
?> これらのキーコードのいくつかは、OS によって異なる動作をする可能性があります。例として、macOS では `KC_MEDIA_FAST_FORWARD``KC_MEDIA_REWIND``KC_MEDIA_NEXT_TRACK``KC_MEDIA_PREV_TRACK` は、押している間は現在の曲の中でスキップしますが、タップした時は曲全体をスキップします。
|キー |エイリアス |説明 |
|-----------------------|-----------|----------------------|
|`KC_SYSTEM_POWER` |`KC_PWR` |システム電源オフ |
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |システムスリープ |
|`KC_SYSTEM_WAKE` |`KC_WAKE` |システムスリープ解除 |
|`KC_AUDIO_MUTE` |`KC_MUTE` |ミュート |
|`KC_AUDIO_VOL_UP` |`KC_VOLU` |音量アップ |
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |音量ダウン |
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |次の曲へ |
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |前の曲へ |
|`KC_MEDIA_STOP` |`KC_MSTP` |再生停止 |
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |再生/一時停止 |
|`KC_MEDIA_SELECT` |`KC_MSEL` |Media Player 起動 |
|`KC_MEDIA_EJECT` |`KC_EJCT` |イジェクト |
|`KC_MAIL` | |メール起動 |
|`KC_CALCULATOR` |`KC_CALC` |電卓起動 |
|`KC_MY_COMPUTER` |`KC_MYCM` |マイコンピュータを開く|
|`KC_WWW_SEARCH` |`KC_WSCH` |ブラウザ検索 |
|`KC_WWW_HOME` |`KC_WHOM` |ブラウザホーム画面 |
|`KC_WWW_BACK` |`KC_WBAK` |ブラウザ戻る |
|`KC_WWW_FORWARD` |`KC_WFWD` |ブラウザ進む |
|`KC_WWW_STOP` |`KC_WSTP` |ブラウザ読み込み中止 |
|`KC_WWW_REFRESH` |`KC_WREF` |ブラウザ再読み込み |
|`KC_WWW_FAVORITES` |`KC_WFAV` |ブラウザお気に入り |
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |次の曲へ |
|`KC_MEDIA_REWIND` |`KC_MRWD` |前の曲へ |
|`KC_BRIGHTNESS_UP` |`KC_BRIU` |画面の明るさアップ |
|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |画面の明るさダウン |
## テンキー
|キー |エイリアス |説明 |
|-------------------|-----------|-------------------------------|
|`KC_KP_SLASH` |`KC_PSLS` |テンキー `/` |
|`KC_KP_ASTERISK` |`KC_PAST` |テンキー `*` |
|`KC_KP_MINUS` |`KC_PMNS` |テンキー `-` |
|`KC_KP_PLUS` |`KC_PPLS` |テンキー `+` |
|`KC_KP_ENTER` |`KC_PENT` |テンキー Enter |
|`KC_KP_1` |`KC_P1` |テンキー `1` と End |
|`KC_KP_2` |`KC_P2` |テンキー `2` と 下矢印 |
|`KC_KP_3` |`KC_P3` |テンキー `3` と Page Down |
|`KC_KP_4` |`KC_P4` |テンキー `4` と 左矢印 |
|`KC_KP_5` |`KC_P5` |テンキー `5` |
|`KC_KP_6` |`KC_P6` |テンキー `6` と 右矢印 |
|`KC_KP_7` |`KC_P7` |テンキー `7` と Home |
|`KC_KP_8` |`KC_P8` |テンキー `8` と 上矢印 |
|`KC_KP_9` |`KC_P9` |テンキー `9` と Page Up |
|`KC_KP_0` |`KC_P0` |テンキー `0` と Insert |
|`KC_KP_DOT` |`KC_PDOT` |テンキー `.` と Delete |
|`KC_KP_EQUAL` |`KC_PEQL` |テンキー `=` |
|`KC_KP_COMMA` |`KC_PCMM` |テンキー `,` |
|`KC_KP_EQUAL_AS400`| |AS/400 キーボードのテンキー `=`|
## 特別なキー
これらのキーコードに加えて、`0xA5-DF` の範囲のキーコードは、内部処理のために予約されています。
|キー |エイリアス |説明 |
|----------------|--------------------|-----------------------------------|
|`KC_NO` |`XXXXXXX` |このキーを無視します (NOOP) |
|`KC_TRANSPARENT`|`KC_TRNS`, `_______`|次に低いレイヤーの非透過キーを使う |

View File

@@ -2,125 +2,180 @@
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: 0.9.44:docs/newbs_getting_started.md
git diff 0.9.44 HEAD -- docs/newbs_getting_started.md | cat
original document: 0.13.20:docs/newbs_getting_started.md
git diff 0.13.20 HEAD -- docs/newbs_getting_started.md | cat
-->
キーマップをビルドする前に、いくつかのソフトウェアをインストールしてビルド環境を構築する必要があります。
ファームウェアをコンパイルするキーボードの数に関わらず、この作業を一度だけ実行する必要があります。
## 1. ソフトウェアのダウンロード
## 1. 前提条件
始めるために必要なソフトウェアがいくつかあります。
### テキストエディタ
* [テキストエディタ](ja/newbs_learn_more_resources.md#text-editor-resources)
* プレーンテキストファイルを編集して保存できるプログラムが必要です。多くの OS に付属するデフォルトのエディタはプレーンテキストファイルを保存しないため、選択したエディタがプレーンテキストファイルを保存することを確認する必要があります。
* [Toolbox (オプション)](https://github.com/qmk/qmk_toolbox)
* Windows と macOS で使える GUI を備えたプログラムで、カスタムキーボードのプログラミングとデバッグの両方ができます。
**プレーンテキスト** ファイルを編集して保存できるプログラムが必要です。
Windows の場合、メモ帳が使えます。Linux の場合、gedit が使えます。どちらもシンプルですが機能的なテキストエディタです。
macOS では、デフォルトのテキストエディットアプリに注意してください。_フォーマット_ メニューから _標準テキストにする_ を選択しない限り、プレーンテキストとして保存されません。
[Sublime Text](https://www.sublimetext.com/) や [VS Code](https://code.visualstudio.com/) のような専用のテキストエディタをダウンロードしてインストールすることもできます。これらのプログラムはコードを編集するために特別に作成されているため、これはプラットフォームに関係なくベストな方法です。
?> どのエディタを使えば良いか分からない場合、Laurence Bradford が書いたこの記事 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) を読んでください。
### QMK Toolbox
QMK Toolbox は、Windows と macOS で使える GUI を備えたプログラムで、カスタムキーボードのプログラミングとデバッグの両方ができます。
このプログラムは、キーボードに簡単にファームウェアを書き込んだり、出力されるデバッグメッセージを確認する際に、かけがえのないものであることがわかるでしょう。
[QMK Toolbox の最新版](https://github.com/qmk/qmk_toolbox/releases/latest)
* Windows 版: `qmk_toolbox.exe` (portable) または `qmk_toolbox_install.exe` (installer)
* macOS 版: `QMK.Toolbox.app.zip` (portable) または `QMK.Toolbox.pkg` (installer)
### Unix ライクな環境
Linux や macOS には既に実行可能な unix シェルが付属しています。ビルド環境を構築するだけで済みます。
Windows では、MSYS2 や WSL をインストールして、これらの環境を使う必要があります。MSYS2 の構築手順を以下に示します。
?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。[これらの教材](ja/newbs_learn_more_resources.md#command-line-resources)で QMK を使うのに必要なことを学ぶことができます。
## 2. ビルド環境を準備する :id=set-up-your-environment
私たちは、QMK を可能な限り簡単に構築できるように努力しています。
Linux か Unix 環境を用意するだけで、QMK に残りをインストールさせることができます。
私たちは、QMK を可能な限り簡単に構築できるように努力しています。Linux か Unix 環境を用意するだけで、QMK に残りをインストールさせることができます。
?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。これらの教材で QMK を使うのに必要なことを学ぶことができます:<br>
[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
<!-- tabs:start -->
### Windows
### ** Windows **
MSYS2 と Git と QMK CLI のインストールが必要です。
QMK は、MSYS2、CLI、および必要な全ての依存関係のバンドルを保守しています。また、正しい環境で直接起動するための便利な `QMK MSYS` ターミナルショートカットも提供しています。
[MSYS2 homepage](https://www.msys2.org) のインストール手順に従ってください。開いている MSYS2 の全ターミナル画面を閉じて、新しい MinGW 64-bit ターミナル画面を開きます。**注意: これはインストールが完了した時に開く MSYS ターミナルと同じ *ではありません*。**
#### 前提条件
[QMK MSYS](https://msys.qmk.fm/) をインストールする必要があります。最新リリースは[ここ](https://github.com/qmk/qmk_distro_msys/releases/latest)から入手できます。
または、MSYS2 を手動でインストールしたい場合、次のセクションでプロセスを説明します。
<details>
<summary>手動インストール</summary>
?> `QMK MSYS` を使う場合、次のステップは無視してください。
#### 前提条件
MSYS2 と Git と Python をインストールする必要があります。https://www.msys2.org のインストール手順に従ってください。
MSYS2 をインストールしたら、開いている MSYS の全ターミナル画面を閉じて、新しい MinGW 64-bit ターミナル画面を開きます。
!> **注意:** MinGW 64-bit ターミナルは、インストールが完了した時に開く MSYS ターミナルと*同じではありません*。プロンプトには、「MSYS」ではなく、紫色のテキストで「MINGW64」と表示されます。違いについての詳細は[このページ](https://www.msys2.org/wiki/MSYS2-introduction/#subsystems)を参照してください。
それから、次のように実行します:
pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip
#### インストール
次のコマンドを実行して、QMK CLI をインストールします:
python3 -m pip install qmk
### macOS
</details>
Homebrew のインストールが必要です。[Homebrew homepage](https://brew.sh) の手順に従ってください。
### ** macOS **
Homebrew をインストールした後で、以下のコマンドを実行します:
QMK は CLI と全ての必要な依存関係を自動的にインストールする Homebrew tap と formula を保守しています
#### 前提条件
Homebrew のインストールが必要です。https://brew.sh の手順に従ってください。
#### インストール
次のコマンドを実行して、QMK CLI をインストールします:
brew install qmk/qmk/qmk
### Linux
### ** Linux/WSL **
?> **WSL ユーザーへの注意**: デフォルトでは、インストールプロセスは QMK リポジトリを WSL ホームディレクトリに clone しますが、手動で clone した場合、Windows ファイルシステムではなく、WSL インスタンス内にある(つまり `/mnt` 内にない)ことを確認してください。これは、現在アクセスが[非常に遅い](https://github.com/microsoft/WSL/issues/4197)ためです。
#### 前提条件
Git と Python をインストールする必要があります。両方とも既にインストールされている可能性は高いですが、そうでない場合、次のコマンドのいずれかでそれらをインストールできます:
* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip`
* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip`
* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip`
* Arch / Manjaro: `sudo pacman --needed --noconfirm -S git python-pip libffi`
* Void: `sudo xbps-install -y git python3-pip`
* Solus: `sudo eopkg -y install git python3`
* Sabayon: `sudo equo install dev-vcs/git dev-python/pip`
* Gentoo: `sudo emerge dev-vcs/git dev-python/pip`
グローバル CLI をインストールして、システムをブートストラップします:
#### インストール
`python3 -m pip install --user qmk` (Arch ベースのディストリビューションでは AUR から `qmk` パッケージを試すこともできます(**メモ**: コミュニティメンバーによって保守されています): `yay -S qmk`)
### FreeBSD
Git と Python をインストールする必要があります。両方とも既にインストールされている可能性は高いですが、そうでない場合、次のコマンドを実行してそれらをインストールします:
pkg install git python3
ローカルにインストールした Python パッケージが利用できるように、`$HOME/.local/bin``$PATH` に追加されていることを確認してください。
インストール完了後、QMK CLI をインストールできます:
次のコマンドを実行して、QMK CLI をインストールします:
python3 -m pip install --user qmk
#### コミュニティパッケージ
これらのパッケージはコミュニティメンバーによって保守されているため、最新ではないか、完全には機能しない可能性があります。問題が発生した場合は、それぞれのメンテナに報告してください。
Arch ベースのディストリビューションでは、公式リポジトリから CLI をインストールできます(注意: 執筆時点では、このパッケージは一部の依存関係をオプションとしてマークしていますが、そうではありません):
sudo pacman -S qmk
AUR から `qmk-git` パッケージを試すこともできます:
yay -S qmk-git
### ** FreeBSD **
#### インストール
次のコマンドを実行して、QMK CLI の FreeBSD パッケージをインストールします:
pkg install -g "py*-qmk"
注意: インストールの最後に表示された指示に従うことを忘れないでください(再度表示するには、`pkg info -Dg "py*-qmk"` を使ってください)。
<!-- tabs:end -->
## 3. QMK の設定を行う :id=set-up-qmk
<!-- tabs:start -->
### ** Windows **
QMK のインストール後に、このコマンドで設定できます:
qmk setup
ほとんどの場合、全てのプロンプトに Yes と答えます。
ほとんどの場合、全てのプロンプトに `y` と答えます。
### ** macOS **
QMK のインストール後に、このコマンドで設定できます:
qmk setup
ほとんどの場合、全てのプロンプトに `y` と答えます。
### ** Linux/WSL **
QMK のインストール後に、このコマンドで設定できます:
qmk setup
ほとんどの場合、全てのプロンプトに `y` と答えます。
?>**Debian、Ubuntu、それらの派生に関する注意**:
次のようなエラーが表示される可能性があります: `bash: qmk: command not found`.
これは Debian の Bash 4.4 リリースで導入された [バグ](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) で、`$HOME/.local/bin` が PATH から削除されました。このバグは後に Debian や Ubuntu で修正されました。
これは Debian の Bash 4.4 リリースで導入された[バグ](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155)で、`$HOME/.local/bin` が PATH から削除されました。このバグは後に Debian や Ubuntu で修正されました。
残念なことに、Ubuntu はこのバグを再導入し、[まだ修正していません](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562)。
幸い、修正は簡単です。これをあなたのユーザで実行します: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc`
?>**FreeBSD に関する注意**:
まず、`root` 以外のユーザで `qmk setup` を実行することをお勧めしますが、これはおそらく `pkg` を使って基本システムにインストールする必要があるパッケージを識別します。
しかし、特権のないユーザで実行すると、インストールはおそらく失敗します。
基本的な依存関係を手動でインストールするには、`./util/qmk_install.sh``root` として実行するか、`sudo` をつけて実行します。
それが完了したら、`qmk setup` を再実行して設定と確認を完了させます。
### ** FreeBSD **
?> 既に [GitHub の使いかた](ja/getting_started_github.md)を知っているなら、fork を作成し、`qmk setup <github_username>/qmk_firmware` を使って個人用の fork から clone することをお勧めします。この一文の意味が分からない場合、このメッセージは無視してかまいません。
QMK のインストール後に、このコマンドで設定できます:
qmk setup
ほとんどの場合、全てのプロンプトに `y` と答えます。
<!-- tabs:end -->
?> qmk ホームフォルダは、セットアップ時に `qmk setup -H <path>` を使って指定し、[cli 構成](ja/cli_configuration.md?id=single-key-example)と変数 `user.qmk_home` を使って変更できます。利用可能な全てのオプションについては、`qmk setup --help` を実行します。
?> 既に GitHub の使い方を知っている場合、[これらの手順に従うことをお勧めします](ja/getting_started_github.md)。そして `qmk setup <github_username>/qmk_firmware` を使って個人用の fork から clone します。この一文の意味が分からない場合、このメッセージは無視してかまいません。
## 4. ビルド環境の確認
これで QMK のビルド環境が用意できたので、キーボードのファームウェアをビルドできます。
キーボードのデフォルトキーマップをビルドすることから始めます。次の形式のコマンドでビルドできるはずです。
これで QMK のビルド環境が用意できたので、キーボードのファームウェアをビルドできます。キーボードのデフォルトキーマップをビルドすることから始めます。次の形式のコマンドでビルドできるはずです:
qmk compile -kb <keyboard> -km default
例えば、Clueboard 66% のファームウェアをビルドする場合:
例えば、Clueboard 66% のファームウェアをビルドする場合、次のようにします:
qmk compile -kb clueboard/66/rev3 -km default
@@ -152,5 +207,4 @@ QMK を初めて使うほとんどの人は、キーボードを1つしか持っ
# キーマップの作成
これであなた専用のキーマップを作成する準備ができました!
次は [初めてのファームウェアの構築](ja/newbs_building_firmware.md) で専用のキーマップを作成します。
これであなた専用のキーマップを作成する準備ができました!次は[初めてのファームウェアの構築](ja/newbs_building_firmware.md)で専用のキーマップを作成します。

View File

@@ -2,105 +2,14 @@
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: 0.9.0:docs/newbs_testing_debugging.md
git diff 0.9.0 HEAD -- docs/newbs_testing_debugging.md | cat
original document: 0.12.45:docs/newbs_testing_debugging.md
git diff 0.12.45 HEAD -- docs/newbs_testing_debugging.md | cat
-->
カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。
## テスト
通常、キーボードをテストするのは非常に簡単です。
全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。
QMK を実行していなくても、[QMK Configurator](https://config.qmk.fm/#/test/) のテストモードを使ってキーボードを確認することができます。
[ここに移動しました](ja/faq_misc.md#testing)
## デバッグ :id=debugging
`rules.mk``CONSOLE_ENABLE = yes`の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの`DEBUG`キーコードを使用するか、デバッグモードを有効にする [コマンド](ja/feature_command.md) 機能を使用するか、以下のコードをキーマップに追加します。
```c
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
debug_enable=true;
debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}
```
## デバッグツール :id=debugging-tools
キーボードのデバッグに使えるツールは2つあります。
### QMK Toolboxを使ったデバッグ
互換性のある環境では、[QMK Toolbox](https://github.com/qmk/qmk_toolbox)を使うことでキーボードからのデバッグメッセージを表示できます。
### hid_listenを使ったデバッグ
ターミナルベースの方法がお好みですかPJRC が提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルは Windows, Linux, MacOS 用が用意されています。
## 独自のデバッグメッセージを送信する
[custom code](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します:
```c
#include "print.h"
```
そのあとは、いくつかの異なった print 関数を使用することが出来ます。
* `print("string")`: シンプルな文字列を出力します
* `uprintf("%s string", var)`: フォーマットされた文字列を出力します
* `dprint("string")` デバッグモードが有効な場合のみ、シンプルな文字列を出力します
* `dprintf("%s string", var)`: デバッグモードが有効な場合のみ、フォーマットされた文字列を出力します
## デバッグの例
以下は現実世界での実際のデバッグ手法の例を集めたものです。追加情報は[Debugging/Troubleshooting QMK](ja/faq_debug.md)を参照してください。
### マトリックス上のどの場所でキー押下が起こったか?
移植する、PCBの問題を診断する場合、キー入力が正しくスキャンされているかどうかを確認することが役立つ場合があります。この手法でのロギングを有効化するには、`keymap.c`へ以下のコードを追加します。
```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// コンソールが有効化されている場合、マトリックス上の位置とキー押下状態を出力します
#ifdef CONSOLE_ENABLE
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
#endif
return true;
}
```
出力の例
```text
Waiting for device:.......
Listening:
KL: kc: 169, col: 0, row: 0, pressed: 1
KL: kc: 169, col: 0, row: 0, pressed: 0
KL: kc: 174, col: 1, row: 0, pressed: 1
KL: kc: 174, col: 1, row: 0, pressed: 0
KL: kc: 172, col: 2, row: 0, pressed: 1
KL: kc: 172, col: 2, row: 0, pressed: 0
```
### キースキャンにかかる時間の測定
パフォーマンスの問題をテストする場合、スイッチマトリックスをスキャンする頻度を知ることが役立ちます。この手法でのロギングを有効化するには`config.h`へ以下のコードを追加します。
```c
#define DEBUG_MATRIX_SCAN_RATE
```
出力例
```text
> matrix scan frequency: 315
> matrix scan frequency: 313
> matrix scan frequency: 316
> matrix scan frequency: 316
> matrix scan frequency: 316
> matrix scan frequency: 316
```
[ここに移動しました](ja/faq_debug.md#debugging)

View File

@@ -1,8 +1,8 @@
# QMK 開発のための Eclipse セットアップ
<!---
original document: 0.9.34:docs/other_eclipse.md
git diff 0.9.34 HEAD -- docs/other_eclipse.md | cat
original document: 0.12.41:docs/other_eclipse.md
git diff 0.12.41 HEAD -- docs/other_eclipse.md | cat
-->
[Eclipse][1]は Java 開発のために広く使われているオープンソースの [統合開発環境](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) ですが、他の言語および用途のためにカスタマイズできる拡張可能なプラグインシステムがあります。
@@ -55,7 +55,7 @@ Workspace 選択で入力を促された場合は、Eclipse メタデータと
### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console)
このプラグインは QMK makefile によって生成された色付きビルド出力を適切に表示するために必要です。
1. <kbd><kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd></kbd> を開きます
1. <kbd>Help</kbd> > <kbd>Eclipse Marketplace…</kbd> を開きます
2. _ANSI Escape in Console_ を検索します
3. プラグインの <samp>Install</samp> ボタンをクリックします
4. 指示に従い、未署名コンテンツのセキュリティ警告に再度同意します。
@@ -64,7 +64,7 @@ Workspace 選択で入力を促された場合は、Eclipse メタデータと
# QMK 用の Eclipse の設定
## プロジェクトのインポート
1. <kbd><kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd></kbd> をクリックします
1. <kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd> をクリックします
2. 次の画面で:
* _Existing Code Location_ としてリポジトリをクローンしたディレクトリを選択します。
* (オプション) プロジェクトに別の名前を付けます¹ 例えば _QMK_ あるいは _Quantum_;
@@ -78,16 +78,12 @@ Workspace 選択で入力を促された場合は、Eclipse メタデータと
¹ カスタム名でプロジェクトをインポートすると問題が発生するかもしれません。正しく動作しない場合は、デフォルトのプロジェクト名 (つまり、ディレクトリの名前、おそらく `qmk_firmware`) のままにしてみてください。
## キーボードのビルド
ここで、プロジェクトをクリーンし、選択したキーマップをビルドする make target を設定します。
1. 画面の右側で、<kbd>Make Target</kbd> タブを選択します
2. フォルダツリーを選択したキーボードまで展開します。例えば、`qmk_firmware/keyboards/ergodox`
3. キーボードフォルダを右クリックして、<kbd>New…</kbd> を選択します (あるいはフォルダを選択し、ツリーの上にある <kbd>New Make Target</kbd> アイコンをクリックします)
4. ビルド target の名前を選択します。例えば、_clean \<your keymap\>_
5. Make Target: これはコマンドラインからビルドする時に `make` に渡す引数です。target 名がこれらの引数と一致しない場合は、<kbd>Same as target name</kbd> のチェックを外し、正しい引数を入力します。例えば、`clean <your keymap>`
6. 他のオプションはチェックしたままにして、<kbd>OK</kbd> をクリックします。これで、選択されたキーボードの下に、make target が表示されます。
7. (オプション) target ツリーの上にある <kbd>Hide Empty Folders</kbd> アイコンボタンを、ビルド target だけが表示されるように切り替えます。
8. 作成したビルド target をダブルクリックし、ビルドを起動します。
9. 下部の <kbd>Console</kbd> ビューを選択し、実行中のビルドを眺めます。
プロジェクトのデフォルトの make 対象を `all` から私たちが取り組んでいる特定のキーボードとキーマップの組み合わせ、例えば `kinesis/kint36:stapelberg` に変更します。このようにすると、プロジェクトのクリーニングやビルドのようなプロジェクト全体のアクションは迅速に完了し、長い時間がかかったり Eclipse が完全にロックしたりすることがなくなります。
1. プロジェクト内の editor タブへフォーカスします
2. `Project` > `Properties` ウィンドウを開き、`C/C++ Build` リストエントリを選択して、`Behavior` タブに切り替えます。
3. 有効な全てのビルドのデフォルトの `Make build target` テキストフィールドを、`all` から例えば `kinesis/kint41:stapelberg` に変更します。
4. `Project` > `Clean...` を選択して、セットアップが動作することを確認します。
[1]: https://en.wikipedia.org/wiki/Eclipse_(software)

View File

@@ -1,8 +1,8 @@
# QMK 開発用の Visual Studio Code のセットアップ
<!---
original document: 0.10.33:docs/other_vscode.md
git diff 0.10.33 HEAD -- docs/other_vscode.md | cat
original document: 0.13.17:docs/other_vscode.md
git diff 0.13.17 HEAD -- docs/other_vscode.md | cat
-->
[Visual Studio Code](https://code.visualstudio.com/) (VS Code) は多くの異なるプログラミング言語をサポートするオープンソースのコードエディタです。

View File

@@ -2,8 +2,8 @@
<!---
grep --no-filename "^[ ]*git diff" docs/ja/*.md | sh
original document: 0.9.46:docs/proton_c_conversion.md
git diff 0.9.46 HEAD -- docs/proton_c_conversion.md | cat
original document: 0.13.17:docs/proton_c_conversion.md
git diff 0.13.17 HEAD -- docs/proton_c_conversion.md | cat
-->
Proton C は Pro Micro の差し替え可能品であるため、簡単に使用することができます。

View File

@@ -1,8 +1,8 @@
# QMK Configurator でのキーボードのサポート
<!---
original document: 0.9.46:docs/reference_configurator_support.md
git diff 0.9.46 HEAD -- docs/reference_configurator_support.md | cat
original document: 0.13.15:docs/reference_configurator_support.md
git diff 0.13.15 HEAD -- docs/reference_configurator_support.md | cat
-->
このページは [QMK Configurator](https://config.qmk.fm/) でキーボードを適切にサポートする方法について説明します。

View File

@@ -1,8 +1,8 @@
# QMK 用語集
<!---
original document: 0.9.46:docs/reference_glossary.md
git diff 0.9.46 HEAD -- docs/reference_glossary.md | cat
original document: 0.13.15:docs/reference_glossary.md
git diff 0.13.15 HEAD -- docs/reference_glossary.md | cat
-->
## ARM

View File

@@ -1,8 +1,8 @@
# QMK のコードの理解
<!---
original document: 0.9.55:docs/understanding_qmk.md
git diff 0.9.55 HEAD -- docs/understanding_qmk.md | cat
original document: 0.13.15:docs/understanding_qmk.md
git diff 0.13.15 HEAD -- docs/understanding_qmk.md | cat
-->
このドキュメントでは、QMK ファームウェアがどのように機能するかを非常に高いレベルから説明しようとしています。基本的なプログラミングの概念を理解していることを前提としていますが、(実例を示す必要がある場合を除き) C に精通していることを前提にはしていません。以下のドキュメントの基本的な知識があることを前提としています。

View File

@@ -354,6 +354,157 @@ See also: [Leader Key](feature_leader_key.md)
|---------|------------------------|
|`KC_LEAD`|Begins a leader sequence|
## MIDI :id=midi
See also: [MIDI](feature_midi.md)
|Key |Aliases |Description |
|------------|---------|---------------------------------|
|`MI_ON` | |Turn MIDI on |
|`MI_OFF` | |Turn MIDI off |
|`MI_TOG` | |Toggle MIDI enabled |
|`MI_C` | |C octave 0 |
|`MI_Cs` |`MI_Db` |C♯/D♭ octave 0 |
|`MI_D` | |D octave 0 |
|`MI_Ds` |`MI_Eb` |D♯/E♭ octave 0 |
|`MI_E` | |E octave 0 |
|`MI_F` | |F octave 0 |
|`MI_Fs` |`MI_Gb` |F♯/G♭ octave 0 |
|`MI_G` | |G octave 0 |
|`MI_Gs` |`MI_Gs` |G♯/A♭ octave 0 |
|`MI_A` | |A octave 0 |
|`MI_As` |`MI_Bb` |A♯/B♭ octave 0 |
|`MI_B` | |B octave 0 |
|`MI_C_1` | |C octave 1 |
|`MI_Cs_1` |`MI_Db_1`|C♯/D♭ octave 1 |
|`MI_D_1` | |D octave 1 |
|`MI_Ds_1` |`MI_Eb_1`|D♯/E♭ octave 1 |
|`MI_E_1` | |E octave 1 |
|`MI_F_1` | |F octave 1 |
|`MI_Fs_1` |`MI_Gb_1`|F♯/G♭ octave 1 |
|`MI_G_1` | |G octave 1 |
|`MI_Gs_1` |`MI_Ab_1`|G♯/A♭ octave 1 |
|`MI_A_1` | |A octave 1 |
|`MI_As_1` |`MI_Bb_1`|A♯/B♭ octave 1 |
|`MI_B_1` | |B octave 1 |
|`MI_C_2` | |C octave 2 |
|`MI_Cs_2` |`MI_Db_2`|C♯/D♭ octave 2 |
|`MI_D_2` | |D octave 2 |
|`MI_Ds_2` |`MI_Eb_2`|D♯/E♭ octave 2 |
|`MI_E_2` | |E octave 2 |
|`MI_F_2` | |F octave 2 |
|`MI_Fs_2` |`MI_Gb_2`|F♯/G♭ octave 2 |
|`MI_G_2` | |G octave 2 |
|`MI_Gs_2` |`MI_Ab_2`|G♯/A♭ octave 2 |
|`MI_A_2` | |A octave 2 |
|`MI_As_2` |`MI_Bb_2`|A♯/B♭ octave 2 |
|`MI_B_2` | |B octave 2 |
|`MI_C_3` | |C octave 3 |
|`MI_Cs_3` |`MI_Db_3`|C♯/D♭ octave 3 |
|`MI_D_3` | |D octave 3 |
|`MI_Ds_3` |`MI_Eb_3`|D♯/E♭ octave 3 |
|`MI_E_3` | |E octave 3 |
|`MI_F_3` | |F octave 3 |
|`MI_Fs_3` |`MI_Gb_3`|F♯/G♭ octave 3 |
|`MI_G_3` | |G octave 3 |
|`MI_Gs_3` |`MI_Ab_3`|G♯/A♭ octave 3 |
|`MI_A_3` | |A octave 3 |
|`MI_As_3` |`MI_Bb_3`|A♯/B♭ octave 3 |
|`MI_B_3` | |B octave 3 |
|`MI_C_4` | |C octave 4 |
|`MI_Cs_4` |`MI_Db_4`|C♯/D♭ octave 4 |
|`MI_D_4` | |D octave 4 |
|`MI_Ds_4` |`MI_Eb_4`|D♯/E♭ octave 4 |
|`MI_E_4` | |E octave 4 |
|`MI_F_4` | |F octave 4 |
|`MI_Fs_4` |`MI_Gb_4`|F♯/G♭ octave 4 |
|`MI_G_4` | |G octave 4 |
|`MI_Gs_4` |`MI_Ab_4`|G♯/A♭ octave 4 |
|`MI_A_4` | |A octave 4 |
|`MI_As_4` |`MI_Bb_4`|A♯/B♭ octave 4 |
|`MI_B_4` | |B octave 4 |
|`MI_C_5` | |C octave 5 |
|`MI_Cs_5` |`MI_Db_5`|C♯/D♭ octave 5 |
|`MI_D_5` | |D octave 5 |
|`MI_Ds_5` |`MI_Eb_5`|D♯/E♭ octave 5 |
|`MI_E_5` | |E octave 5 |
|`MI_F_5` | |F octave 5 |
|`MI_Fs_5` |`MI_Gb_5`|F♯/G♭ octave 5 |
|`MI_G_5` | |G octave 5 |
|`MI_Gs_5` |`MI_Ab_5`|G♯/A♭ octave 5 |
|`MI_A_5` | |A octave 5 |
|`MI_As_5` |`MI_Bb_5`|A♯/B♭ octave 5 |
|`MI_B_5` | |B octave 5 |
|`MI_OCT_N2` | |Set octave to -2 |
|`MI_OCT_N1` | |Set octave to -1 |
|`MI_OCT_0` | |Set octave to 0 |
|`MI_OCT_1` | |Set octave to 1 |
|`MI_OCT_2` | |Set octave to 2 |
|`MI_OCT_3` | |Set octave to 3 |
|`MI_OCT_4` | |Set octave to 4 |
|`MI_OCT_5` | |Set octave to 5 |
|`MI_OCT_6` | |Set octave to 6 |
|`MI_OCT_7` | |Set octave to 7 |
|`MI_OCTD` | |Move down an octave |
|`MI_OCTU` | |Move up an octave |
|`MI_TRNS_N6`| |Set transposition to -6 semitones|
|`MI_TRNS_N5`| |Set transposition to -5 semitones|
|`MI_TRNS_N4`| |Set transposition to -4 semitones|
|`MI_TRNS_N3`| |Set transposition to -3 semitones|
|`MI_TRNS_N2`| |Set transposition to -2 semitones|
|`MI_TRNS_N1`| |Set transposition to -1 semitone |
|`MI_TRNS_0` | |No transposition |
|`MI_TRNS_1` | |Set transposition to +1 semitone |
|`MI_TRNS_2` | |Set transposition to +2 semitones|
|`MI_TRNS_3` | |Set transposition to +3 semitones|
|`MI_TRNS_4` | |Set transposition to +4 semitones|
|`MI_TRNS_5` | |Set transposition to +5 semitones|
|`MI_TRNS_6` | |Set transposition to +6 semitones|
|`MI_TRNSD` | |Decrease transposition |
|`MI_TRNSU` | |Increase transposition |
|`MI_VEL_0` | |Set velocity to 0 |
|`MI_VEL_1` | |Set velocity to 12 |
|`MI_VEL_2` | |Set velocity to 25 |
|`MI_VEL_3` | |Set velocity to 38 |
|`MI_VEL_4` | |Set velocity to 51 |
|`MI_VEL_5` | |Set velocity to 64 |
|`MI_VEL_6` | |Set velocity to 76 |
|`MI_VEL_7` | |Set velocity to 89 |
|`MI_VEL_8` | |Set velocity to 102 |
|`MI_VEL_9` | |Set velocity to 114 |
|`MI_VEL_10` | |Set velocity to 127 |
|`MI_VELD` | |Decrease velocity |
|`MI_VELU` | |Increase velocity |
|`MI_CH1` | |Set channel to 1 |
|`MI_CH2` | |Set channel to 2 |
|`MI_CH3` | |Set channel to 3 |
|`MI_CH4` | |Set channel to 4 |
|`MI_CH5` | |Set channel to 5 |
|`MI_CH6` | |Set channel to 6 |
|`MI_CH7` | |Set channel to 7 |
|`MI_CH8` | |Set channel to 8 |
|`MI_CH9` | |Set channel to 9 |
|`MI_CH10` | |Set channel to 10 |
|`MI_CH11` | |Set channel to 11 |
|`MI_CH12` | |Set channel to 12 |
|`MI_CH13` | |Set channel to 13 |
|`MI_CH14` | |Set channel to 14 |
|`MI_CH15` | |Set channel to 15 |
|`MI_CH16` | |Set channel to 16 |
|`MI_CHD` | |Decrease channel |
|`MI_CHU` | |Increase channel |
|`MI_ALLOFF` | |Stop all notes |
|`MI_SUS` | |Sustain |
|`MI_PORT` | |Portmento |
|`MI_SOST` | |Sostenuto |
|`MI_SOFT` | |Soft Pedal |
|`MI_LEG` | |Legato |
|`MI_MOD` | |Modulation |
|`MI_MODSD` | |Decrease modulation speed |
|`MI_MODSU` | |Increase modulation speed |
|`MI_BENDD` | |Bend pitch down |
|`MI_BENDU` | |Bend pitch up |
## Mouse Keys :id=mouse-keys
See also: [Mouse Keys](feature_mouse_keys.md)

View File

@@ -19,7 +19,7 @@ You can control the behavior of one shot keys by defining these in `config.h`:
* `OSL(layer)` - momentary switch to *layer*.
* `OS_ON` - Turns on One Shot keys.
* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
* `ON_TOGG` - Toggles the one shot key status.
* `OS_TOGG` - Toggles the one shot key status.
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.

View File

@@ -65,14 +65,17 @@ Now, we will set up the MSYS2 window to show up in VSCode as the integrated term
```json
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.env.windows": {
"MSYSTEM": "MINGW64",
"CHERE_INVOKING": "1"
"terminal.integrated.profiles.windows": {
"QMK_MSYS": {
"path": "C:/QMK_MSYS/usr/bin/bash.exe",
"env": {
"MSYSTEM": "MINGW64",
"CHERE_INVOKING": "1"
},
"args": ["--login"]
}
},
"terminal.integrated.shellArgs.windows": [
"--login"
],
"terminal.integrated.cursorStyle": "line"
}
```

View File

@@ -68,7 +68,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- bare minimum required code for a board to boot into QMK should be present
- initialisation code for the matrix and critical devices
- mirroring existing functionality of a commercial board (like custom keycodes and special animations etc.) should be handled through non-`default` keymaps
- VIAL-related files or changes will not be accepted, as they are not used by QMK firmware (no VIAL-specific core code has been submitted or merged)
- Vial-related files or changes will not be accepted, as they are not used by QMK firmware (no Vial-specific core code has been submitted or merged)
- `keyboard.c`
- empty `xxxx_xxxx_kb()` or other weak-defined default implemented functions removed
- commented-out functions removed too
@@ -93,6 +93,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
- default (and via) keymaps should be "pristine"
- bare minimum to be used as a "clean slate" for another user to develop their own user-specific keymap
- standard layouts preferred in these keymaps, if possible
- default keymap should not enable VIA -- the VIA integration documentation requires a keymap called `via`
- submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap
- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board
- Do not include VIA json files in the PR. These do not belong in the QMK repository as they are not used by QMK firmware -- they belong in the [VIA Keyboard Repo](https://github.com/the-via/keyboards)

View File

@@ -36,12 +36,20 @@ Note how there's several different tests, each mocking out a separate part. Also
## Running the Tests
To run all the tests in the codebase, type `make test`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
To run all the tests in the codebase, type `make test:all`. You can also run test matching a substring by typing `make test:matchingsubstring` Note that the tests are always compiled with the native compiler of your platform, so they are also run like any other program on your computer.
## Debugging the Tests
If there are problems with the tests, you can find the executable in the `./build/test` folder. You should be able to run those with GDB or a similar debugger.
To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example
```console
make test:all DEBUG=1
```
Alternatively, add `CONSOLE_ENABLE=yes` to the tests `rules.mk`.
## Full Integration Tests
It's not yet possible to do a full integration test, where you would compile the whole firmware and define a keymap that you are going to test. However there are plans for doing that, because writing tests that way would probably be easier, at least for people that are not used to unit testing.

View File

@@ -28,14 +28,8 @@
# define F_SCL 400000UL // SCL frequency
#endif
#ifndef I2C_START_RETRY_COUNT
# define I2C_START_RETRY_COUNT 20
#endif // I2C_START_RETRY_COUNT
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
void i2c_init(void) {
TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;
@@ -53,7 +47,7 @@ void i2c_init(void) {
#endif
}
static i2c_status_t i2c_start_impl(uint8_t address, uint16_t timeout) {
i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
// reset TWI control register
TWCR = 0;
// transmit START condition
@@ -92,17 +86,6 @@ static i2c_status_t i2c_start_impl(uint8_t address, uint16_t timeout) {
return I2C_STATUS_SUCCESS;
}
i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
// Retry i2c_start_impl a bunch times in case the remote side has interrupts disabled.
uint16_t timeout_timer = timer_read();
uint16_t time_slice = MAX(1, (timeout == (I2C_TIMEOUT_INFINITE)) ? 5 : (timeout / (I2C_START_RETRY_COUNT))); // if it's infinite, wait 1ms between attempts, otherwise split up the entire timeout into the number of retries
i2c_status_t status;
do {
status = i2c_start_impl(address, time_slice);
} while ((status < 0) && ((timeout == I2C_TIMEOUT_INFINITE) || (timer_elapsed(timeout_timer) < timeout)));
return status;
}
i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
// load data into data register
TWDR = data;

View File

@@ -17,7 +17,6 @@
* GitHub repository: https://github.com/g4lvanix/I2C-slave-lib
*/
#include <stddef.h>
#include <avr/io.h>
#include <util/twi.h>
#include <avr/interrupt.h>
@@ -25,12 +24,6 @@
#include "i2c_slave.h"
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
# include "transactions.h"
static volatile bool is_callback_executor = false;
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
static volatile uint8_t buffer_address;
@@ -55,14 +48,11 @@ ISR(TWI_vect) {
case TW_SR_SLA_ACK:
// The device is now a slave receiver
slave_has_register_set = false;
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
is_callback_executor = false;
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
break;
case TW_SR_DATA_ACK:
// This device is a slave receiver and has received data
// First byte is the location then the bytes will be writen in buffer with auto-increment
// First byte is the location then the bytes will be writen in buffer with auto-incriment
if (!slave_has_register_set) {
buffer_address = TWDR;
@@ -70,25 +60,10 @@ ISR(TWI_vect) {
ack = 0;
buffer_address = 0;
}
slave_has_register_set = true; // address has been received now fill in buffer
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
// Work out if we're attempting to execute a callback
is_callback_executor = buffer_address == split_transaction_table[I2C_EXECUTE_CALLBACK].initiator2target_offset;
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
slave_has_register_set = true; // address has been receaved now fill in buffer
} else {
i2c_slave_reg[buffer_address] = TWDR;
buffer_address++;
#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
// If we're intending to execute a transaction callback, do so, as we've just received the transaction ID
if (is_callback_executor) {
split_transaction_desc_t *trans = &split_transaction_table[split_shmem->transaction_id];
if (trans->slave_callback) {
trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
}
}
#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
}
break;

View File

@@ -22,18 +22,7 @@
#pragma once
#ifndef I2C_SLAVE_REG_COUNT
# if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
# include "transport.h"
# define I2C_SLAVE_REG_COUNT sizeof(split_shared_memory_t)
# else // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
# define I2C_SLAVE_REG_COUNT 30
# endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
#endif // I2C_SLAVE_REG_COUNT
_Static_assert(I2C_SLAVE_REG_COUNT < 256, "I2C target registers must be single byte");
#define I2C_SLAVE_REG_COUNT 30
extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];

View File

@@ -224,8 +224,15 @@
# define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY / 2)
# define SLAVE_INT_WIDTH_US 1
# define SLAVE_INT_ACK_WIDTH_UNIT 2
# define SLAVE_INT_ACK_WIDTH 4
# ifndef SERIAL_USE_MULTI_TRANSACTION
# define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
# else
# define SLAVE_INT_ACK_WIDTH_UNIT 2
# define SLAVE_INT_ACK_WIDTH 4
# endif
static SSTD_t *Transaction_table = NULL;
static uint8_t Transaction_table_size = 0;
inline static void serial_delay(void) ALWAYS_INLINE;
inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); }
@@ -252,12 +259,16 @@ inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); }
inline static void serial_high(void) ALWAYS_INLINE;
inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); }
void soft_serial_initiator_init(void) {
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
serial_output();
serial_high();
}
void soft_serial_target_init(void) {
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
serial_input_with_pullup();
// Enable INT0-INT7
@@ -384,14 +395,19 @@ static inline uint8_t nibble_bits_count(uint8_t bits) {
// interrupt handle to be used by the target device
ISR(SERIAL_PIN_INTERRUPT) {
# ifndef SERIAL_USE_MULTI_TRANSACTION
serial_low();
serial_output();
SSTD_t *trans = Transaction_table;
# else
// recive transaction table index
uint8_t tid, bits;
uint8_t pecount = 0;
sync_recv();
bits = serial_read_chunk(&pecount, 8);
bits = serial_read_chunk(&pecount, 7);
tid = bits >> 3;
bits = (bits & 7) != (nibble_bits_count(tid) & 7);
if (bits || pecount > 0 || tid > NUM_TOTAL_TRANSACTIONS) {
bits = (bits & 7) != nibble_bits_count(tid);
if (bits || pecount > 0 || tid > Transaction_table_size) {
return;
}
serial_delay_half1();
@@ -399,22 +415,18 @@ ISR(SERIAL_PIN_INTERRUPT) {
serial_high(); // response step1 low->high
serial_output();
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT * SLAVE_INT_ACK_WIDTH);
split_transaction_desc_t *trans = &split_transaction_table[tid];
SSTD_t *trans = &Transaction_table[tid];
serial_low(); // response step2 ack high->low
// If the transaction has a callback, we can execute it now
if (trans->slave_callback) {
trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
}
# endif
// target send phase
if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size);
if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size);
// target switch to input
change_sender2reciver();
// target recive phase
if (trans->initiator2target_buffer_size > 0) {
if (serial_recive_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) {
if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size)) {
*trans->status = TRANSACTION_ACCEPTED;
} else {
*trans->status = TRANSACTION_DATA_ERROR;
@@ -436,12 +448,14 @@ ISR(SERIAL_PIN_INTERRUPT) {
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
// this code is very time dependent, so we need to disable interrupts
# ifndef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_transaction(void) {
SSTD_t *trans = Transaction_table;
# else
int soft_serial_transaction(int sstd_index) {
if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
SSTD_t *trans = &Transaction_table[sstd_index];
# endif
cli();
// signal to the target that we want to start a transaction
@@ -449,11 +463,27 @@ int soft_serial_transaction(int sstd_index) {
serial_low();
_delay_us(SLAVE_INT_WIDTH_US);
# ifndef SERIAL_USE_MULTI_TRANSACTION
// wait for the target response
serial_input_with_pullup();
_delay_us(SLAVE_INT_RESPONSE_TIME);
// check if the target is present
if (serial_read_pin()) {
// target failed to pull the line low, assume not present
serial_output();
serial_high();
*trans->status = TRANSACTION_NO_RESPONSE;
sei();
return TRANSACTION_NO_RESPONSE;
}
# else
// send transaction table index
int tid = (sstd_index << 3) | (7 & nibble_bits_count(sstd_index));
sync_send();
_delay_sub_us(TID_SEND_ADJUST);
serial_write_chunk(tid, 8);
serial_write_chunk(tid, 7);
serial_delay_half1();
// wait for the target response (step1 low->high)
@@ -474,11 +504,12 @@ int soft_serial_transaction(int sstd_index) {
}
_delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
}
# endif
// initiator recive phase
// if the target is present syncronize with it
if (trans->target2initiator_buffer_size > 0) {
if (!serial_recive_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) {
if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size)) {
serial_output();
serial_high();
*trans->status = TRANSACTION_DATA_ERROR;
@@ -492,7 +523,7 @@ int soft_serial_transaction(int sstd_index) {
// initiator send phase
if (trans->initiator2target_buffer_size > 0) {
serial_send_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size);
serial_send_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size);
}
// always, release the line when not in use
@@ -503,8 +534,9 @@ int soft_serial_transaction(int sstd_index) {
return TRANSACTION_END;
}
# ifdef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_get_and_clean_status(int sstd_index) {
split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
SSTD_t *trans = &Transaction_table[sstd_index];
cli();
int retval = *trans->status;
*trans->status = 0;
@@ -512,6 +544,8 @@ int soft_serial_get_and_clean_status(int sstd_index) {
sei();
return retval;
}
# endif
#endif
// Helix serial.c history

62
drivers/avr/serial.h Normal file
View File

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

View File

@@ -1,166 +0,0 @@
/* Copyright 2021 Jasper Chan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "aw20216.h"
#include "spi_master.h"
/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite
* a few things are different, such as the command byte format and page ordering.
* The LED addresses start from 0x00 instead of 0x01.
*/
#define AWINIC_ID 0b1010 << 4
#define AW_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers
#define AW_PAGE_PWM 0x01 << 1 // PG1, LED PWM control
#define AW_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control
#define AW_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice?
#define AW_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control?
#define AW_WRITE 0
#define AW_READ 1
#define AW_REG_CONFIGURATION 0x00 // PG0
#define AW_REG_GLOBALCURRENT 0x01 // PG0
// Default value of AW_REG_CONFIGURATION
// D7:D4 = 1011, SWSEL (SW1~SW12 active)
// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter)
// D2:D1 = 00, OSDE (open/short detection enable)
// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
#define AW_CONFIG_DEFAULT 0b10110000
#define AW_CHIPEN 1
#ifndef AW_SCALING_MAX
# define AW_SCALING_MAX 150
#endif
#ifndef AW_GLOBAL_CURRENT_MAX
# define AW_GLOBAL_CURRENT_MAX 150
#endif
#ifndef DRIVER_1_CS
# define DRIVER_1_CS B13
#endif
#ifndef DRIVER_1_EN
# define DRIVER_1_EN C13
#endif
uint8_t g_spi_transfer_buffer[20] = {0};
aw_led g_pwm_buffer[DRIVER_LED_TOTAL];
bool g_pwm_buffer_update_required[DRIVER_LED_TOTAL];
bool AW20216_write_register(pin_t slave_pin, uint8_t page, uint8_t reg, uint8_t data) {
// Do we need to call spi_stop() if this fails?
if (!spi_start(slave_pin, false, 0, 16)) {
return false;
}
g_spi_transfer_buffer[0] = (AWINIC_ID | page | AW_WRITE);
g_spi_transfer_buffer[1] = reg;
g_spi_transfer_buffer[2] = data;
if (spi_transmit(g_spi_transfer_buffer, 3) != SPI_STATUS_SUCCESS) {
spi_stop();
return false;
}
spi_stop();
return true;
}
bool AW20216_init_scaling(void) {
// Set constant current to the max, control brightness with PWM
aw_led led;
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
led = g_aw_leds[i];
if (led.driver == 0) {
AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.r, AW_SCALING_MAX);
AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.g, AW_SCALING_MAX);
AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.b, AW_SCALING_MAX);
}
#ifdef DRIVER_2_CS
else if (led.driver == 1) {
AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.r, AW_SCALING_MAX);
AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.g, AW_SCALING_MAX);
AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.b, AW_SCALING_MAX);
}
#endif
}
return true;
}
bool AW20216_soft_enable(void) {
AW20216_write_register(DRIVER_1_CS, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
#ifdef DRIVER_2_CS
AW20216_write_register(DRIVER_2_CS, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
#endif
return true;
}
void AW20216_update_pwm(int index, uint8_t red, uint8_t green, uint8_t blue) {
aw_led led = g_aw_leds[index];
if (led.driver == 0) {
AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.r, red);
AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.g, green);
AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.b, blue);
}
#ifdef DRIVER_2_CS
else if (led.driver == 1) {
AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.r, red);
AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.g, green);
AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.b, blue);
}
#endif
return;
}
void AW20216_init(void) {
// All LEDs should start with all scaling and PWM registers as off
setPinOutput(DRIVER_1_EN);
writePinHigh(DRIVER_1_EN);
AW20216_write_register(DRIVER_1_CS, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
#ifdef DRIVER_2_EN
setPinOutput(DRIVER_2_EN);
writePinHigh(DRIVER_2_EN);
AW20216_write_register(DRIVER_2_CS, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
#endif
AW20216_init_scaling();
AW20216_soft_enable();
return;
}
void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
g_pwm_buffer[index].r = red;
g_pwm_buffer[index].g = green;
g_pwm_buffer[index].b = blue;
g_pwm_buffer_update_required[index] = true;
return;
}
void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
AW20216_set_color(i, red, green, blue);
}
return;
}
void AW20216_update_pwm_buffers(void) {
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
if (g_pwm_buffer_update_required[i]) {
AW20216_update_pwm(i, g_pwm_buffer[i].r, g_pwm_buffer[i].g, g_pwm_buffer[i].b);
g_pwm_buffer_update_required[i] = false;
}
}
return;
}

View File

@@ -1,251 +0,0 @@
/* Copyright 2021 Jasper Chan (Gigahawk)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
typedef struct aw_led {
uint8_t driver : 2;
uint8_t r;
uint8_t g;
uint8_t b;
} aw_led;
extern const aw_led g_aw_leds[DRIVER_LED_TOTAL];
void AW20216_init(void);
void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
void AW20216_update_pwm_buffers(void);
#define CS1_SW1 0x00
#define CS2_SW1 0x01
#define CS3_SW1 0x02
#define CS4_SW1 0x03
#define CS5_SW1 0x04
#define CS6_SW1 0x05
#define CS7_SW1 0x06
#define CS8_SW1 0x07
#define CS9_SW1 0x08
#define CS10_SW1 0x09
#define CS11_SW1 0x0A
#define CS12_SW1 0x0B
#define CS13_SW1 0x0C
#define CS14_SW1 0x0D
#define CS15_SW1 0x0E
#define CS16_SW1 0x0F
#define CS17_SW1 0x10
#define CS18_SW1 0x11
#define CS1_SW2 0x12
#define CS2_SW2 0x13
#define CS3_SW2 0x14
#define CS4_SW2 0x15
#define CS5_SW2 0x16
#define CS6_SW2 0x17
#define CS7_SW2 0x18
#define CS8_SW2 0x19
#define CS9_SW2 0x1A
#define CS10_SW2 0x1B
#define CS11_SW2 0x1C
#define CS12_SW2 0x1D
#define CS13_SW2 0x1E
#define CS14_SW2 0x1F
#define CS15_SW2 0x20
#define CS16_SW2 0x21
#define CS17_SW2 0x22
#define CS18_SW2 0x23
#define CS1_SW3 0x24
#define CS2_SW3 0x25
#define CS3_SW3 0x26
#define CS4_SW3 0x27
#define CS5_SW3 0x28
#define CS6_SW3 0x29
#define CS7_SW3 0x2A
#define CS8_SW3 0x2B
#define CS9_SW3 0x2C
#define CS10_SW3 0x2D
#define CS11_SW3 0x2E
#define CS12_SW3 0x2F
#define CS13_SW3 0x30
#define CS14_SW3 0x31
#define CS15_SW3 0x32
#define CS16_SW3 0x33
#define CS17_SW3 0x34
#define CS18_SW3 0x35
#define CS1_SW4 0x36
#define CS2_SW4 0x37
#define CS3_SW4 0x38
#define CS4_SW4 0x39
#define CS5_SW4 0x3A
#define CS6_SW4 0x3B
#define CS7_SW4 0x3C
#define CS8_SW4 0x3D
#define CS9_SW4 0x3E
#define CS10_SW4 0x3F
#define CS11_SW4 0x40
#define CS12_SW4 0x41
#define CS13_SW4 0x42
#define CS14_SW4 0x43
#define CS15_SW4 0x44
#define CS16_SW4 0x45
#define CS17_SW4 0x46
#define CS18_SW4 0x47
#define CS1_SW5 0x48
#define CS2_SW5 0x49
#define CS3_SW5 0x4A
#define CS4_SW5 0x4B
#define CS5_SW5 0x4C
#define CS6_SW5 0x4D
#define CS7_SW5 0x4E
#define CS8_SW5 0x4F
#define CS9_SW5 0x50
#define CS10_SW5 0x51
#define CS11_SW5 0x52
#define CS12_SW5 0x53
#define CS13_SW5 0x54
#define CS14_SW5 0x55
#define CS15_SW5 0x56
#define CS16_SW5 0x57
#define CS17_SW5 0x58
#define CS18_SW5 0x59
#define CS1_SW6 0x5A
#define CS2_SW6 0x5B
#define CS3_SW6 0x5C
#define CS4_SW6 0x5D
#define CS5_SW6 0x5E
#define CS6_SW6 0x5F
#define CS7_SW6 0x60
#define CS8_SW6 0x61
#define CS9_SW6 0x62
#define CS10_SW6 0x63
#define CS11_SW6 0x64
#define CS12_SW6 0x65
#define CS13_SW6 0x66
#define CS14_SW6 0x67
#define CS15_SW6 0x68
#define CS16_SW6 0x69
#define CS17_SW6 0x6A
#define CS18_SW6 0x6B
#define CS1_SW7 0x6C
#define CS2_SW7 0x6D
#define CS3_SW7 0x6E
#define CS4_SW7 0x6F
#define CS5_SW7 0x70
#define CS6_SW7 0x71
#define CS7_SW7 0x72
#define CS8_SW7 0x73
#define CS9_SW7 0x74
#define CS10_SW7 0x75
#define CS11_SW7 0x76
#define CS12_SW7 0x77
#define CS13_SW7 0x78
#define CS14_SW7 0x79
#define CS15_SW7 0x7A
#define CS16_SW7 0x7B
#define CS17_SW7 0x7C
#define CS18_SW7 0x7D
#define CS1_SW8 0x7E
#define CS2_SW8 0x7F
#define CS3_SW8 0x80
#define CS4_SW8 0x81
#define CS5_SW8 0x82
#define CS6_SW8 0x83
#define CS7_SW8 0x84
#define CS8_SW8 0x85
#define CS9_SW8 0x86
#define CS10_SW8 0x87
#define CS11_SW8 0x88
#define CS12_SW8 0x89
#define CS13_SW8 0x8A
#define CS14_SW8 0x8B
#define CS15_SW8 0x8C
#define CS16_SW8 0x8D
#define CS17_SW8 0x8E
#define CS18_SW8 0x8F
#define CS1_SW9 0x90
#define CS2_SW9 0x91
#define CS3_SW9 0x92
#define CS4_SW9 0x93
#define CS5_SW9 0x94
#define CS6_SW9 0x95
#define CS7_SW9 0x96
#define CS8_SW9 0x97
#define CS9_SW9 0x98
#define CS10_SW9 0x99
#define CS11_SW9 0x9A
#define CS12_SW9 0x9B
#define CS13_SW9 0x9C
#define CS14_SW9 0x9D
#define CS15_SW9 0x9E
#define CS16_SW9 0x9F
#define CS17_SW9 0xA0
#define CS18_SW9 0xA1
#define CS1_SW10 0xA2
#define CS2_SW10 0xA3
#define CS3_SW10 0xA4
#define CS4_SW10 0xA5
#define CS5_SW10 0xA6
#define CS6_SW10 0xA7
#define CS7_SW10 0xA8
#define CS8_SW10 0xA9
#define CS9_SW10 0xAA
#define CS10_SW10 0xAB
#define CS11_SW10 0xAC
#define CS12_SW10 0xAD
#define CS13_SW10 0xAE
#define CS14_SW10 0xAF
#define CS15_SW10 0xB0
#define CS16_SW10 0xB1
#define CS17_SW10 0xB2
#define CS18_SW10 0xB3
#define CS1_SW11 0xB4
#define CS2_SW11 0xB5
#define CS3_SW11 0xB6
#define CS4_SW11 0xB7
#define CS5_SW11 0xB8
#define CS6_SW11 0xB9
#define CS7_SW11 0xBA
#define CS8_SW11 0xBB
#define CS9_SW11 0xBC
#define CS10_SW11 0xBD
#define CS11_SW11 0xBE
#define CS12_SW11 0xBF
#define CS13_SW11 0xC0
#define CS14_SW11 0xC1
#define CS15_SW11 0xC2
#define CS16_SW11 0xC3
#define CS17_SW11 0xC4
#define CS18_SW11 0xC5
#define CS1_SW12 0xC6
#define CS2_SW12 0xC7
#define CS3_SW12 0xC8
#define CS4_SW12 0xC9
#define CS5_SW12 0xCA
#define CS6_SW12 0xCB
#define CS7_SW12 0xCC
#define CS8_SW12 0xCD
#define CS9_SW12 0xCE
#define CS10_SW12 0xCF
#define CS11_SW12 0xD0
#define CS12_SW12 0xD1
#define CS13_SW12 0xD2
#define CS14_SW12 0xD3
#define CS15_SW12 0xD4
#define CS16_SW12 0xD5
#define CS17_SW12 0xD6
#define CS18_SW12 0xD7

View File

@@ -74,12 +74,21 @@ static THD_FUNCTION(Thread1, arg) {
}
}
void soft_serial_initiator_init(void) {
static SSTD_t *Transaction_table = NULL;
static uint8_t Transaction_table_size = 0;
void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
serial_output();
serial_high();
}
void soft_serial_target_init(void) {
void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
serial_input();
palEnablePadEvent(PAL_PORT(SOFT_SERIAL_PIN), PAL_PAD(SOFT_SERIAL_PIN), PAL_EVENT_MODE_FALLING_EDGE);
@@ -145,14 +154,16 @@ void interrupt_handler(void *arg) {
uint8_t checksum_computed = 0;
int sstd_index = 0;
#ifdef SERIAL_USE_MULTI_TRANSACTION
sstd_index = serial_read_byte();
sync_send();
#endif
split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
SSTD_t *trans = &Transaction_table[sstd_index];
for (int i = 0; i < trans->initiator2target_buffer_size; ++i) {
split_trans_initiator2target_buffer(trans)[i] = serial_read_byte();
trans->initiator2target_buffer[i] = serial_read_byte();
sync_send();
checksum_computed += split_trans_initiator2target_buffer(trans)[i];
checksum_computed += trans->initiator2target_buffer[i];
}
checksum_computed ^= 7;
uint8_t checksum_received = serial_read_byte();
@@ -161,17 +172,12 @@ void interrupt_handler(void *arg) {
// wait for the sync to finish sending
serial_delay();
// Allow any slave processing to occur
if (trans->slave_callback) {
trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
}
uint8_t checksum = 0;
for (int i = 0; i < trans->target2initiator_buffer_size; ++i) {
serial_write_byte(split_trans_target2initiator_buffer(trans)[i]);
serial_write_byte(trans->target2initiator_buffer[i]);
sync_send();
serial_delay_half();
checksum += split_trans_target2initiator_buffer(trans)[i];
checksum += trans->target2initiator_buffer[i];
}
serial_write_byte(checksum ^ 7);
sync_send();
@@ -200,10 +206,15 @@ void interrupt_handler(void *arg) {
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
// this code is very time dependent, so we need to disable interrupts
#ifndef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_transaction(void) {
int sstd_index = 0;
#else
int soft_serial_transaction(int sstd_index) {
if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
#endif
if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
SSTD_t *trans = &Transaction_table[sstd_index];
// TODO: remove extra delay between transactions
serial_delay();
@@ -233,13 +244,14 @@ int soft_serial_transaction(int sstd_index) {
uint8_t checksum = 0;
// send data to the slave
#ifdef SERIAL_USE_MULTI_TRANSACTION
serial_write_byte(sstd_index); // first chunk is transaction id
sync_recv();
#endif
for (int i = 0; i < trans->initiator2target_buffer_size; ++i) {
serial_write_byte(split_trans_initiator2target_buffer(trans)[i]);
serial_write_byte(trans->initiator2target_buffer[i]);
sync_recv();
checksum += split_trans_initiator2target_buffer(trans)[i];
checksum += trans->initiator2target_buffer[i];
}
serial_write_byte(checksum ^ 7);
sync_recv();
@@ -250,9 +262,9 @@ int soft_serial_transaction(int sstd_index) {
// receive data from the slave
uint8_t checksum_computed = 0;
for (int i = 0; i < trans->target2initiator_buffer_size; ++i) {
split_trans_target2initiator_buffer(trans)[i] = serial_read_byte();
trans->target2initiator_buffer[i] = serial_read_byte();
sync_recv();
checksum_computed += split_trans_target2initiator_buffer(trans)[i];
checksum_computed += trans->target2initiator_buffer[i];
}
checksum_computed ^= 7;
uint8_t checksum_received = serial_read_byte();

62
drivers/chibios/serial.h Normal file
View File

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

View File

@@ -113,29 +113,37 @@ void usart_slave_init(void) {
chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL);
}
void soft_serial_initiator_init(void) { usart_master_init(); }
static SSTD_t* Transaction_table = NULL;
static uint8_t Transaction_table_size = 0;
void soft_serial_target_init(void) { usart_slave_init(); }
void soft_serial_initiator_init(SSTD_t* sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
usart_master_init();
}
void soft_serial_target_init(SSTD_t* sstd_table, int sstd_table_size) {
Transaction_table = sstd_table;
Transaction_table_size = (uint8_t)sstd_table_size;
usart_slave_init();
}
void handle_soft_serial_slave(void) {
uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id
split_transaction_desc_t* trans = &split_transaction_table[sstd_index];
uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id
SSTD_t* trans = &Transaction_table[sstd_index];
// Always write back the sstd_index as part of a basic handshake
sstd_index ^= HANDSHAKE_MAGIC;
sdWrite(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index));
if (trans->initiator2target_buffer_size) {
sdRead(&SERIAL_USART_DRIVER, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size);
}
// Allow any slave processing to occur
if (trans->slave_callback) {
trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
sdRead(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size);
}
if (trans->target2initiator_buffer_size) {
sdWrite(&SERIAL_USART_DRIVER, split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size);
sdWrite(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size);
}
if (trans->status) {
@@ -152,14 +160,17 @@ void handle_soft_serial_slave(void) {
// TRANSACTION_END
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
#ifndef SERIAL_USE_MULTI_TRANSACTION
int soft_serial_transaction(void) {
uint8_t sstd_index = 0;
#else
int soft_serial_transaction(int index) {
uint8_t sstd_index = index;
#endif
if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
split_transaction_desc_t* trans = &split_transaction_table[sstd_index];
msg_t res = 0;
if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
SSTD_t* trans = &Transaction_table[sstd_index];
msg_t res = 0;
sdClear(&SERIAL_USART_DRIVER);
@@ -178,7 +189,7 @@ int soft_serial_transaction(int index) {
}
if (trans->initiator2target_buffer_size) {
res = sdWriteTimeout(&SERIAL_USART_DRIVER, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0) {
dprintf("serial::usart_transmit NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
@@ -186,7 +197,7 @@ int soft_serial_transaction(int index) {
}
if (trans->target2initiator_buffer_size) {
res = sdReadTimeout(&SERIAL_USART_DRIVER, split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0) {
dprintf("serial::usart_receive NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;

View File

@@ -18,13 +18,8 @@
#include "timer.h"
static pin_t currentSlavePin = NO_PIN;
#if defined(K20x) || defined(KL2x)
static SPIConfig spiConfig = {NULL, 0, 0, 0};
#else
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
#endif
static pin_t currentSlavePin = NO_PIN;
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
__attribute__((weak)) void spi_init(void) {
static bool is_initialised = false;
@@ -32,15 +27,15 @@ __attribute__((weak)) void spi_init(void) {
is_initialised = true;
// Try releasing special pins for a short time
setPinInput(SPI_SCK_PIN);
setPinInput(SPI_MOSI_PIN);
setPinInput(SPI_MISO_PIN);
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
chThdSleepMilliseconds(10);
#if defined(USE_GPIOV1)
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), SPI_SCK_PAL_MODE);
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE);
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE);
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
#else
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
@@ -63,54 +58,6 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
return false;
}
#if defined(K20x) || defined(KL2x)
spiConfig.tar0 = SPIx_CTARn_FMSZ(7) | SPIx_CTARn_ASC(1);
if (lsbFirst) {
spiConfig.tar0 |= SPIx_CTARn_LSBFE;
}
switch (mode) {
case 0:
break;
case 1:
spiConfig.tar0 |= SPIx_CTARn_CPHA;
break;
case 2:
spiConfig.tar0 |= SPIx_CTARn_CPOL;
break;
case 3:
spiConfig.tar0 |= SPIx_CTARn_CPHA | SPIx_CTARn_CPOL;
break;
}
switch (roundedDivisor) {
case 2:
spiConfig.tar0 |= SPIx_CTARn_BR(0);
break;
case 4:
spiConfig.tar0 |= SPIx_CTARn_BR(1);
break;
case 8:
spiConfig.tar0 |= SPIx_CTARn_BR(3);
break;
case 16:
spiConfig.tar0 |= SPIx_CTARn_BR(4);
break;
case 32:
spiConfig.tar0 |= SPIx_CTARn_BR(5);
break;
case 64:
spiConfig.tar0 |= SPIx_CTARn_BR(6);
break;
case 128:
spiConfig.tar0 |= SPIx_CTARn_BR(7);
break;
case 256:
spiConfig.tar0 |= SPIx_CTARn_BR(8);
break;
}
#else
spiConfig.cr1 = 0;
if (lsbFirst) {
@@ -156,7 +103,6 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0;
break;
}
#endif
currentSlavePin = slavePin;
spiConfig.ssport = PAL_PORT(slavePin);

View File

@@ -21,7 +21,6 @@
#include <stdbool.h>
#include "gpio.h"
#include "chibios_config.h"
#ifndef SPI_DRIVER
# define SPI_DRIVER SPID2
@@ -32,11 +31,7 @@
#endif
#ifndef SPI_SCK_PAL_MODE
# if defined(USE_GPIOV1)
# define SPI_SCK_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define SPI_SCK_PAL_MODE 5
# endif
# define SPI_SCK_PAL_MODE 5
#endif
#ifndef SPI_MOSI_PIN
@@ -44,11 +39,7 @@
#endif
#ifndef SPI_MOSI_PAL_MODE
# if defined(USE_GPIOV1)
# define SPI_MOSI_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define SPI_MOSI_PAL_MODE 5
# endif
# define SPI_MOSI_PAL_MODE 5
#endif
#ifndef SPI_MISO_PIN
@@ -56,11 +47,7 @@
#endif
#ifndef SPI_MISO_PAL_MODE
# if defined(USE_GPIOV1)
# define SPI_MISO_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define SPI_MISO_PAL_MODE 5
# endif
# define SPI_MISO_PAL_MODE 5
#endif
typedef int16_t spi_status_t;

View File

@@ -291,73 +291,6 @@ void haptic_play(void) {
#endif
}
__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
# ifdef NO_HAPTIC_MOD
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
if (record->tap.count == 0) return false;
break;
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
if (record->tap.count != TAPPING_TOGGLE) return false;
break;
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
if (record->tap.count == 0) return false;
break;
case KC_LCTRL ... KC_RGUI:
case QK_MOMENTARY ... QK_MOMENTARY_MAX:
# endif
# ifdef NO_HAPTIC_FN
case KC_FN0 ... KC_FN31:
# endif
# ifdef NO_HAPTIC_ALPHA
case KC_A ... KC_Z:
# endif
# ifdef NO_HAPTIC_PUNCTUATION
case KC_ENTER:
case KC_ESCAPE:
case KC_BSPACE:
case KC_SPACE:
case KC_MINUS:
case KC_EQUAL:
case KC_LBRACKET:
case KC_RBRACKET:
case KC_BSLASH:
case KC_NONUS_HASH:
case KC_SCOLON:
case KC_QUOTE:
case KC_GRAVE:
case KC_COMMA:
case KC_SLASH:
case KC_DOT:
case KC_NONUS_BSLASH:
# endif
# ifdef NO_HAPTIC_LOCKKEYS
case KC_CAPSLOCK:
case KC_SCROLLLOCK:
case KC_NUMLOCK:
# endif
# ifdef NO_HAPTIC_NAV
case KC_PSCREEN:
case KC_PAUSE:
case KC_INSERT:
case KC_DELETE:
case KC_PGDOWN:
case KC_PGUP:
case KC_LEFT:
case KC_UP:
case KC_RIGHT:
case KC_DOWN:
case KC_END:
case KC_HOME:
# endif
# ifdef NO_HAPTIC_NUMERIC
case KC_1 ... KC_0:
# endif
return false;
}
return true;
}
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
if (keycode == HPT_ON && record->event.pressed) {
haptic_enable();
@@ -402,12 +335,12 @@ bool process_haptic(uint16_t keycode, keyrecord_t *record) {
if (haptic_config.enable) {
if (record->event.pressed) {
// keypress
if (haptic_config.feedback < 2 && get_haptic_enabled_key(keycode, record)) {
if (haptic_config.feedback < 2) {
haptic_play();
}
} else {
// keyrelease
if (haptic_config.feedback > 0 && get_haptic_enabled_key(keycode, record)) {
if (haptic_config.feedback > 0) {
haptic_play();
}
}

View File

@@ -1,496 +0,0 @@
/*
Copyright 2021
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "st7565.h"
#include <string.h>
#include "keyboard.h"
#include "progmem.h"
#include "timer.h"
#include "wait.h"
#include ST7565_FONT_H
// Fundamental Commands
#define CONTRAST 0x81
#define DISPLAY_ALL_ON 0xA5
#define DISPLAY_ALL_ON_RESUME 0xA4
#define NORMAL_DISPLAY 0xA6
#define INVERT_DISPLAY 0xA7
#define DISPLAY_ON 0xAF
#define DISPLAY_OFF 0xAE
#define NOP 0xE3
// Addressing Setting Commands
#define PAM_SETCOLUMN_LSB 0x00
#define PAM_SETCOLUMN_MSB 0x10
#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7
// Hardware Configuration Commands
#define DISPLAY_START_LINE 0x40
#define SEGMENT_REMAP 0xA0
#define SEGMENT_REMAP_INV 0xA1
#define COM_SCAN_INC 0xC0
#define COM_SCAN_DEC 0xC8
#define LCD_BIAS_7 0xA3
#define LCD_BIAS_9 0xA2
#define RESISTOR_RATIO 0x20
#define POWER_CONTROL 0x28
// Misc defines
#ifndef ST7565_BLOCK_COUNT
# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8)
#endif
#ifndef ST7565_BLOCK_SIZE
# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)
#endif
#define ST7565_ALL_BLOCKS_MASK (((((ST7565_BLOCK_TYPE)1 << (ST7565_BLOCK_COUNT - 1)) - 1) << 1) | 1)
#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
// Display buffer's is the same as the display memory layout
// this is so we don't end up with rounding errors with
// parts of the display unusable or don't get cleared correctly
// and also allows for drawing & inverting
uint8_t st7565_buffer[ST7565_MATRIX_SIZE];
uint8_t * st7565_cursor;
ST7565_BLOCK_TYPE st7565_dirty = 0;
bool st7565_initialized = false;
bool st7565_active = false;
bool st7565_inverted = false;
display_rotation_t st7565_rotation = DISPLAY_ROTATION_0;
#if ST7565_TIMEOUT > 0
uint32_t st7565_timeout;
#endif
#if ST7565_UPDATE_INTERVAL > 0
uint16_t st7565_update_timeout;
#endif
// Flips the rendering bits for a character at the current cursor position
static void InvertCharacter(uint8_t *cursor) {
const uint8_t *end = cursor + ST7565_FONT_WIDTH;
while (cursor < end) {
*cursor = ~(*cursor);
cursor++;
}
}
bool st7565_init(display_rotation_t rotation) {
setPinOutput(ST7565_A0_PIN);
writePinHigh(ST7565_A0_PIN);
setPinOutput(ST7565_RST_PIN);
writePinHigh(ST7565_RST_PIN);
st7565_rotation = st7565_init_user(rotation);
spi_init();
spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
st7565_reset();
st7565_send_cmd(LCD_BIAS_7);
if (!HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) {
st7565_send_cmd(SEGMENT_REMAP);
st7565_send_cmd(COM_SCAN_DEC);
} else {
st7565_send_cmd(SEGMENT_REMAP_INV);
st7565_send_cmd(COM_SCAN_INC);
}
st7565_send_cmd(DISPLAY_START_LINE | 0x00);
st7565_send_cmd(CONTRAST);
st7565_send_cmd(ST7565_CONTRAST);
st7565_send_cmd(RESISTOR_RATIO | 0x01);
st7565_send_cmd(POWER_CONTROL | 0x04);
wait_ms(50);
st7565_send_cmd(POWER_CONTROL | 0x06);
wait_ms(50);
st7565_send_cmd(POWER_CONTROL | 0x07);
wait_ms(10);
st7565_send_cmd(DISPLAY_ON);
st7565_send_cmd(DISPLAY_ALL_ON_RESUME);
st7565_send_cmd(NORMAL_DISPLAY);
spi_stop();
#if ST7565_TIMEOUT > 0
st7565_timeout = timer_read32() + ST7565_TIMEOUT;
#endif
st7565_clear();
st7565_initialized = true;
st7565_active = true;
return true;
}
__attribute__((weak)) display_rotation_t st7565_init_user(display_rotation_t rotation) { return rotation; }
void st7565_clear(void) {
memset(st7565_buffer, 0, sizeof(st7565_buffer));
st7565_cursor = &st7565_buffer[0];
st7565_dirty = ST7565_ALL_BLOCKS_MASK;
}
uint8_t crot(uint8_t a, int8_t n) {
const uint8_t mask = 0x7;
n &= mask;
return a << n | a >> (-n & mask);
}
void st7565_render(void) {
if (!st7565_initialized) {
return;
}
// Do we have work to do?
st7565_dirty &= ST7565_ALL_BLOCKS_MASK;
if (!st7565_dirty) {
return;
}
// Find first dirty block
uint8_t update_start = 0;
while (!(st7565_dirty & ((ST7565_BLOCK_TYPE)1 << update_start))) {
++update_start;
}
// Calculate commands to set memory addressing bounds.
uint8_t start_page = ST7565_BLOCK_SIZE * update_start / ST7565_DISPLAY_WIDTH;
uint8_t start_column = ST7565_BLOCK_SIZE * update_start % ST7565_DISPLAY_WIDTH;
// IC has 132 segment drivers, for panels with less width we need to offset the starting column
if (HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) {
start_column += (132 - ST7565_DISPLAY_WIDTH);
}
spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
st7565_send_cmd(PAM_PAGE_ADDR | start_page);
st7565_send_cmd(PAM_SETCOLUMN_LSB | ((ST7565_COLUMN_OFFSET + start_column) & 0x0f));
st7565_send_cmd(PAM_SETCOLUMN_MSB | ((ST7565_COLUMN_OFFSET + start_column) >> 4 & 0x0f));
st7565_send_data(&st7565_buffer[ST7565_BLOCK_SIZE * update_start], ST7565_BLOCK_SIZE);
// Turn on display if it is off
st7565_on();
// Clear dirty flag
st7565_dirty &= ~((ST7565_BLOCK_TYPE)1 << update_start);
}
void st7565_set_cursor(uint8_t col, uint8_t line) {
uint16_t index = line * ST7565_DISPLAY_WIDTH + col * ST7565_FONT_WIDTH;
// Out of bounds?
if (index >= ST7565_MATRIX_SIZE) {
index = 0;
}
st7565_cursor = &st7565_buffer[index];
}
void st7565_advance_page(bool clearPageRemainder) {
uint16_t index = st7565_cursor - &st7565_buffer[0];
uint8_t remaining = ST7565_DISPLAY_WIDTH - (index % ST7565_DISPLAY_WIDTH);
if (clearPageRemainder) {
// Remaining Char count
remaining = remaining / ST7565_FONT_WIDTH;
// Write empty character until next line
while (remaining--) st7565_write_char(' ', false);
} else {
// Next page index out of bounds?
if (index + remaining >= ST7565_MATRIX_SIZE) {
index = 0;
remaining = 0;
}
st7565_cursor = &st7565_buffer[index + remaining];
}
}
void st7565_advance_char(void) {
uint16_t nextIndex = st7565_cursor - &st7565_buffer[0] + ST7565_FONT_WIDTH;
uint8_t remainingSpace = ST7565_DISPLAY_WIDTH - (nextIndex % ST7565_DISPLAY_WIDTH);
// Do we have enough space on the current line for the next character
if (remainingSpace < ST7565_FONT_WIDTH) {
nextIndex += remainingSpace;
}
// Did we go out of bounds
if (nextIndex >= ST7565_MATRIX_SIZE) {
nextIndex = 0;
}
// Update cursor position
st7565_cursor = &st7565_buffer[nextIndex];
}
// Main handler that writes character data to the display buffer
void st7565_write_char(const char data, bool invert) {
// Advance to the next line if newline
if (data == '\n') {
// Old source wrote ' ' until end of line...
st7565_advance_page(true);
return;
}
if (data == '\r') {
st7565_advance_page(false);
return;
}
// copy the current render buffer to check for dirty after
static uint8_t st7565_temp_buffer[ST7565_FONT_WIDTH];
memcpy(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH);
_Static_assert(sizeof(font) >= ((ST7565_FONT_END + 1 - ST7565_FONT_START) * ST7565_FONT_WIDTH), "ST7565_FONT_END references outside array");
// set the reder buffer data
uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index
if (cast_data < ST7565_FONT_START || cast_data > ST7565_FONT_END) {
memset(st7565_cursor, 0x00, ST7565_FONT_WIDTH);
} else {
const uint8_t *glyph = &font[(cast_data - ST7565_FONT_START) * ST7565_FONT_WIDTH];
memcpy_P(st7565_cursor, glyph, ST7565_FONT_WIDTH);
}
// Invert if needed
if (invert) {
InvertCharacter(st7565_cursor);
}
// Dirty check
if (memcmp(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH)) {
uint16_t index = st7565_cursor - &st7565_buffer[0];
st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
// Edgecase check if the written data spans the 2 chunks
st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << ((index + ST7565_FONT_WIDTH - 1) / ST7565_BLOCK_SIZE));
}
// Finally move to the next char
st7565_advance_char();
}
void st7565_write(const char *data, bool invert) {
const char *end = data + strlen(data);
while (data < end) {
st7565_write_char(*data, invert);
data++;
}
}
void st7565_write_ln(const char *data, bool invert) {
st7565_write(data, invert);
st7565_advance_page(true);
}
void st7565_pan(bool left) {
uint16_t i = 0;
for (uint16_t y = 0; y < ST7565_DISPLAY_HEIGHT / 8; y++) {
if (left) {
for (uint16_t x = 0; x < ST7565_DISPLAY_WIDTH - 1; x++) {
i = y * ST7565_DISPLAY_WIDTH + x;
st7565_buffer[i] = st7565_buffer[i + 1];
}
} else {
for (uint16_t x = ST7565_DISPLAY_WIDTH - 1; x > 0; x--) {
i = y * ST7565_DISPLAY_WIDTH + x;
st7565_buffer[i] = st7565_buffer[i - 1];
}
}
}
st7565_dirty = ST7565_ALL_BLOCKS_MASK;
}
display_buffer_reader_t st7565_read_raw(uint16_t start_index) {
if (start_index > ST7565_MATRIX_SIZE) start_index = ST7565_MATRIX_SIZE;
display_buffer_reader_t ret_reader;
ret_reader.current_element = &st7565_buffer[start_index];
ret_reader.remaining_element_count = ST7565_MATRIX_SIZE - start_index;
return ret_reader;
}
void st7565_write_raw_byte(const char data, uint16_t index) {
if (index > ST7565_MATRIX_SIZE) index = ST7565_MATRIX_SIZE;
if (st7565_buffer[index] == data) return;
st7565_buffer[index] = data;
st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
}
void st7565_write_raw(const char *data, uint16_t size) {
uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0];
if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_MATRIX_SIZE - cursor_start_index;
for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
uint8_t c = *data++;
if (st7565_buffer[i] == c) continue;
st7565_buffer[i] = c;
st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE));
}
}
void st7565_write_pixel(uint8_t x, uint8_t y, bool on) {
if (x >= ST7565_DISPLAY_WIDTH) {
return;
}
uint16_t index = x + (y / 8) * ST7565_DISPLAY_WIDTH;
if (index >= ST7565_MATRIX_SIZE) {
return;
}
uint8_t data = st7565_buffer[index];
if (on) {
data |= (1 << (y % 8));
} else {
data &= ~(1 << (y % 8));
}
if (st7565_buffer[index] != data) {
st7565_buffer[index] = data;
st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
}
}
#if defined(__AVR__)
void st7565_write_P(const char *data, bool invert) {
uint8_t c = pgm_read_byte(data);
while (c != 0) {
st7565_write_char(c, invert);
c = pgm_read_byte(++data);
}
}
void st7565_write_ln_P(const char *data, bool invert) {
st7565_write_P(data, invert);
st7565_advance_page(true);
}
void st7565_write_raw_P(const char *data, uint16_t size) {
uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0];
if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_MATRIX_SIZE - cursor_start_index;
for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
uint8_t c = pgm_read_byte(data++);
if (st7565_buffer[i] == c) continue;
st7565_buffer[i] = c;
st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE));
}
}
#endif // defined(__AVR__)
bool st7565_on(void) {
if (!st7565_initialized) {
return st7565_active;
}
#if ST7565_TIMEOUT > 0
st7565_timeout = timer_read32() + ST7565_TIMEOUT;
#endif
if (!st7565_active) {
spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
st7565_send_cmd(DISPLAY_ON);
spi_stop();
st7565_active = true;
st7565_on_user();
}
return st7565_active;
}
__attribute__((weak)) void st7565_on_user(void) {}
bool st7565_off(void) {
if (!st7565_initialized) {
return !st7565_active;
}
if (st7565_active) {
spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
st7565_send_cmd(DISPLAY_OFF);
spi_stop();
st7565_active = false;
st7565_off_user();
}
return !st7565_active;
}
__attribute__((weak)) void st7565_off_user(void) {}
bool st7565_is_on(void) { return st7565_active; }
bool st7565_invert(bool invert) {
if (!st7565_initialized) {
return st7565_inverted;
}
if (invert != st7565_inverted) {
spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
st7565_send_cmd(invert ? INVERT_DISPLAY : NORMAL_DISPLAY);
spi_stop();
st7565_inverted = invert;
}
return st7565_inverted;
}
uint8_t st7565_max_chars(void) { return ST7565_DISPLAY_WIDTH / ST7565_FONT_WIDTH; }
uint8_t st7565_max_lines(void) { return ST7565_DISPLAY_HEIGHT / ST7565_FONT_HEIGHT; }
void st7565_task(void) {
if (!st7565_initialized) {
return;
}
#if ST7565_UPDATE_INTERVAL > 0
if (timer_elapsed(st7565_update_timeout) >= ST7565_UPDATE_INTERVAL) {
st7565_update_timeout = timer_read();
st7565_set_cursor(0, 0);
st7565_task_user();
}
#else
st7565_set_cursor(0, 0);
st7565_task_user();
#endif
// Smart render system, no need to check for dirty
st7565_render();
// Display timeout check
#if ST7565_TIMEOUT > 0
if (st7565_active && timer_expired32(timer_read32(), st7565_timeout)) {
st7565_off();
}
#endif
}
__attribute__((weak)) void st7565_task_user(void) {}
void st7565_reset(void) {
writePinLow(ST7565_RST_PIN);
wait_ms(20);
writePinHigh(ST7565_RST_PIN);
wait_ms(20);
}
spi_status_t st7565_send_cmd(uint8_t cmd) {
writePinLow(ST7565_A0_PIN);
return spi_write(cmd);
}
spi_status_t st7565_send_data(uint8_t *data, uint16_t length) {
writePinHigh(ST7565_A0_PIN);
return spi_transmit(data, length);
}

View File

@@ -1,219 +0,0 @@
/*
Copyright 2021
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "spi_master.h"
#ifndef ST7565_DISPLAY_WIDTH
# define ST7565_DISPLAY_WIDTH 128
#endif
#ifndef ST7565_DISPLAY_HEIGHT
# define ST7565_DISPLAY_HEIGHT 32
#endif
#ifndef ST7565_MATRIX_SIZE
# define ST7565_MATRIX_SIZE (ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH) // 1024 (compile time mathed)
#endif
#ifndef ST7565_BLOCK_TYPE
# define ST7565_BLOCK_TYPE uint16_t
#endif
#ifndef ST7565_BLOCK_COUNT
# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8) // 32 (compile time mathed)
#endif
#ifndef ST7565_BLOCK_SIZE
# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT) // 32 (compile time mathed)
#endif
// the column address corresponding to the first column in the display hardware
#if !defined(ST7565_COLUMN_OFFSET)
# define ST7565_COLUMN_OFFSET 0
#endif
// spi clock divisor
#if !defined(ST7565_SPI_CLK_DIVISOR)
# define ST7565_SPI_CLK_DIVISOR 4
#endif
// Custom font file to use
#if !defined(ST7565_FONT_H)
# define ST7565_FONT_H "glcdfont.c"
#endif
// unsigned char value of the first character in the font file
#if !defined(ST7565_FONT_START)
# define ST7565_FONT_START 0
#endif
// unsigned char value of the last character in the font file
#if !defined(ST7565_FONT_END)
# define ST7565_FONT_END 223
#endif
// Font render width
#if !defined(ST7565_FONT_WIDTH)
# define ST7565_FONT_WIDTH 6
#endif
// Font render height
#if !defined(ST7565_FONT_HEIGHT)
# define ST7565_FONT_HEIGHT 8
#endif
// Default contrast level
#if !defined(ST7565_CONTRAST)
# define ST7565_CONTRAST 32
#endif
#if !defined(ST7565_TIMEOUT)
# if defined(ST7565_DISABLE_TIMEOUT)
# define ST7565_TIMEOUT 0
# else
# define ST7565_TIMEOUT 60000
# endif
#endif
#if !defined(ST7565_UPDATE_INTERVAL) && defined(SPLIT_KEYBOARD)
# define ST7565_UPDATE_INTERVAL 50
#endif
typedef struct __attribute__((__packed__)) {
uint8_t *current_element;
uint16_t remaining_element_count;
} display_buffer_reader_t;
// Rotation enum values are flags
typedef enum { DISPLAY_ROTATION_0, DISPLAY_ROTATION_180 } display_rotation_t;
// Initialize the display, rotating the rendered output based on the define passed in.
// Returns true if the display was initialized successfully
bool st7565_init(display_rotation_t rotation);
// Called at the start of st7565_init, weak function overridable by the user
// rotation - the value passed into st7565_init
// Return new display_rotation_t if you want to override default rotation
display_rotation_t st7565_init_user(display_rotation_t rotation);
// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
void st7565_clear(void);
// Renders the dirty chunks of the buffer to display
void st7565_render(void);
// Moves cursor to character position indicated by column and line, wraps if out of bounds
// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
void st7565_set_cursor(uint8_t col, uint8_t line);
// Advances the cursor to the next page, writing ' ' if true
// Wraps to the begining when out of bounds
void st7565_advance_page(bool clearPageRemainder);
// Moves the cursor forward 1 character length
// Advance page if there is not enough room for the next character
// Wraps to the begining when out of bounds
void st7565_advance_char(void);
// Writes a single character to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Main handler that writes character data to the display buffer
void st7565_write_char(const char data, bool invert);
// Writes a string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
void st7565_write(const char *data, bool invert);
// Writes a string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
void st7565_write_ln(const char *data, bool invert);
// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
// Useful for moving the screen in preparation for new drawing
void st7565_pan(bool left);
// Returns a pointer to the requested start index in the buffer plus remaining
// buffer length as struct
display_buffer_reader_t st7565_read_raw(uint16_t start_index);
// Writes a string to the buffer at current cursor position
void st7565_write_raw(const char *data, uint16_t size);
// Writes a single byte into the buffer at the specified index
void st7565_write_raw_byte(const char data, uint16_t index);
// Sets a specific pixel on or off
// Coordinates start at top-left and go right and down for positive x and y
void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
#if defined(__AVR__)
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
void st7565_write_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
// Advances the cursor while writing, inverts the pixels if true
// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
void st7565_write_ln_P(const char *data, bool invert);
// Writes a PROGMEM string to the buffer at current cursor position
void st7565_write_raw_P(const char *data, uint16_t size);
#else
# define st7565_write_P(data, invert) st7565_write(data, invert)
# define st7565_write_ln_P(data, invert) st7565_write_ln(data, invert)
# define st7565_write_raw_P(data, size) st7565_write_raw(data, size)
#endif // defined(__AVR__)
// Can be used to manually turn on the screen if it is off
// Returns true if the screen was on or turns on
bool st7565_on(void);
// Called when st7565_on() turns on the screen, weak function overridable by the user
// Not called if the screen is already on
void st7565_on_user(void);
// Can be used to manually turn off the screen if it is on
// Returns true if the screen was off or turns off
bool st7565_off(void);
// Called when st7565_off() turns off the screen, weak function overridable by the user
// Not called if the screen is already off
void st7565_off_user(void);
// Returns true if the screen is currently on, false if it is
// not
bool st7565_is_on(void);
// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
void st7565_task(void);
// Called at the start of st7565_task, weak function overridable by the user
void st7565_task_user(void);
// Inverts the display
// Returns true if the screen was or is inverted
bool st7565_invert(bool invert);
// Returns the maximum number of characters that will fit on a line
uint8_t st7565_max_chars(void);
// Returns the maximum number of lines that will fit on the display
uint8_t st7565_max_lines(void);
void st7565_reset(void);
spi_status_t st7565_send_cmd(uint8_t cmd);
spi_status_t st7565_send_data(uint8_t *data, uint16_t length);

View File

@@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DISPLAY_ALL_ON 0xA5
#define DISPLAY_ALL_ON_RESUME 0xA4
#define NORMAL_DISPLAY 0xA6
#define INVERT_DISPLAY 0xA7
#define DISPLAY_ON 0xAF
#define DISPLAY_OFF 0xAE
#define NOP 0xE3
@@ -115,7 +114,6 @@ OLED_BLOCK_TYPE oled_dirty = 0;
bool oled_initialized = false;
bool oled_active = false;
bool oled_scrolling = false;
bool oled_inverted = false;
uint8_t oled_brightness = OLED_BRIGHTNESS;
oled_rotation_t oled_rotation = 0;
uint8_t oled_rotation_width = 0;
@@ -692,30 +690,6 @@ bool oled_scroll_off(void) {
return !oled_scrolling;
}
bool oled_invert(bool invert) {
if (!oled_initialized) {
return oled_inverted;
}
if (invert && !oled_inverted) {
static const uint8_t PROGMEM display_inverted[] = {I2C_CMD, INVERT_DISPLAY};
if (I2C_TRANSMIT_P(display_inverted) != I2C_STATUS_SUCCESS) {
print("oled_invert cmd failed\n");
return oled_inverted;
}
oled_inverted = true;
} else if (!invert && oled_inverted) {
static const uint8_t PROGMEM display_normal[] = {I2C_CMD, NORMAL_DISPLAY};
if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) {
print("oled_invert cmd failed\n");
return oled_inverted;
}
oled_inverted = false;
}
return oled_inverted;
}
uint8_t oled_max_chars(void) {
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH;

View File

@@ -313,10 +313,6 @@ bool oled_scroll_left(void);
// Returns true if the screen was not scrolling or stops scrolling
bool oled_scroll_off(void);
// Inverts the display
// Returns true if the screen was or is inverted
bool oled_invert(bool invert);
// Returns the maximum number of characters that will fit on a line
uint8_t oled_max_chars(void);

View File

@@ -70,25 +70,28 @@ static uint8_t micro_oled_screen_current[LCDWIDTH * LCDHEIGHT / 8] = {0};
D6 D6.............D6 /
D7 D7.............D7 ----
*/
#if LCDWIDTH == 64
# if LCDHEIGHT == 48
#ifdef NO_LCD_SPLASH
// do not initialize with a splash screen
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0};
#else
# if LCDWIDTH == 64
# if LCDHEIGHT == 48
static uint8_t micro_oled_screen_buffer[] = {
// QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php
// 64x48 image
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF, 0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7, 0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
# endif
#elif LCDWIDTH == 128
# if LCDHEIGHT == 32
# endif
# elif LCDWIDTH == 128
# if LCDHEIGHT == 32
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {
// 128x32 qmk image
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
# elif LCDHEIGHT == 64
# elif LCDHEIGHT == 64
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -99,10 +102,11 @@ static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
// TODO: generate bitmap of QMK logo here
# endif
#else
# endif
# else
// catchall for custom screen sizes
static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0};
# endif
#endif
void micro_oled_init(void) {
@@ -145,7 +149,7 @@ void micro_oled_init(void) {
#endif
send_command(MEMORYMODE);
send_command(0x10);
send_command(0x02); // 0x02 = 10b, Page addressing mode
send_command(SETCOMPINS); // 0xDA
if (LCDHEIGHT > 32) {
@@ -250,13 +254,14 @@ void send_buffer(void) {
if (micro_oled_screen_buffer[i * LCDWIDTH + j] != micro_oled_screen_current[i * LCDWIDTH + j]) {
if (page_addr != i) {
set_page_address(i);
page_addr = i;
}
if (col_addr != j) {
set_column_address(j);
col_addr = j + 1;
}
send_data(micro_oled_screen_buffer[i * LCDWIDTH + j]);
micro_oled_screen_current[i * LCDWIDTH + j] = micro_oled_screen_buffer[i * LCDWIDTH + j];
col_addr = j + 1;
}
}
}

View File

@@ -1,46 +0,0 @@
/* Copyright 2021 QMK
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <transactions.h>
// initiator is transaction start side
void soft_serial_initiator_init(void);
// target is interrupt accept side
void soft_serial_target_init(void);
// initiator result
#define TRANSACTION_END 0
#define TRANSACTION_NO_RESPONSE 0x1
#define TRANSACTION_DATA_ERROR 0x2
#define TRANSACTION_TYPE_ERROR 0x4
int soft_serial_transaction(int sstd_index);
// target status
// *SSTD_t.status has
// initiator:
// TRANSACTION_END
// or TRANSACTION_NO_RESPONSE
// or TRANSACTION_DATA_ERROR
// target:
// TRANSACTION_DATA_ERROR
// or TRANSACTION_ACCEPTED
#define TRANSACTION_ACCEPTED 0x8
int soft_serial_get_and_clean_status(int sstd_index);

View File

@@ -20,13 +20,6 @@ void eeconfig_init_kb(void) {
#ifdef BACKLIGHT_ENABLE
backlight_enable();
backlight_level(5);
#endif
#ifdef RGBLIGHT_ENABLE
rgblight_enable();
rgblight_sethsv(0, 255, 255);
#ifdef RGBLIGHT_ANIMATIONS
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2);
#endif
#endif
eeconfig_update_kb(0);

View File

@@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
// clang-format off
#define LAYOUT( \
KA1, KA2, KA3, \
KB1, KB2, KB3, \
@@ -36,3 +37,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ KB1, KB2, KB3 }, \
{ KC1, KC2, KC3 } \
}
// clang-format on

View File

@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include "config_common.h"
// clang-format off
/* USB Device descriptor parameter */
#define VENDOR_ID 0xCB00
@@ -47,19 +48,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D3
#ifdef RGB_DI_PIN
#define RGBLED_NUM 5
#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 */
// #define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_ANIMATIONS /* comment this and uncomment the lines below to save space */
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_SNAKE
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
/* default setup after eeprom reset */
#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_EFFECT_BREATHING + 2
#define RGBLIGHT_DEFAULT_HUE 152
#define RGBLIGHT_DEFAULT_SAT 232
#define RGBLIGHT_DEFAULT_VAR 255
#define RGBLIGHT_DEFAULT_SPD 2
#endif
// clang-format on
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

View File

@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "progmem.h"
// clang-format off
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
@@ -274,3 +274,4 @@ static const unsigned char font[] PROGMEM = {
0x07, 0x07, 0x0F, 0x0F, 0x1E, 0x3E,
0x3C, 0x7C, 0x70, 0xC0, 0x80, 0x00,
};
// clang-format on

View File

@@ -0,0 +1,185 @@
/*
Copyright 2021 0xCB - Conor Burns
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
// clang-format off
enum layer_names {
_HOME,
_MISC,
_RGB,
_BLED
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_HOME] = LAYOUT(
KC_MPRV, KC_MNXT, KC_MPLY,
KC_PGUP, KC_PGDN, TO(3),
KC_HOME, KC_END, TO(1)
),
[_MISC] = LAYOUT(
_______, _______, _______,
_______, _______, TO(0),
_______, _______, TO(2)
),
[_RGB] = LAYOUT(
RGB_HUI, RGB_HUD, RGB_MOD,
RGB_SAI, RGB_SAD, TO(1),
RGB_SPI, RGB_SPD, TO(3)
),
[_BLED] = LAYOUT(
BL_STEP, BL_BRTG, BL_TOGG,
BL_ON, BL_OFF, TO(2),
BL_INC, BL_DEC, TO(0)
)
};
// clang-format on
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE
if (clockwise) {
rgblight_increase_val();
} else {
rgblight_decrease_val();
}
#endif
} else if (IS_LAYER_ON(_BLED)) {
if (clockwise) {
backlight_increase();
} else {
backlight_decrease();
}
} else {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
return true;
}
#endif
/* oled stuff :) */
#ifdef OLED_DRIVER_ENABLE
uint16_t startup_timer;
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
startup_timer = timer_read();
return rotation;
}
static void render_logo(void) {
static const char PROGMEM raw_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 1, 2, 4, 2, 1, 1, 1, 1, 1, 1,255, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 0, 0, 0, 0, 0, 0,128, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5,248, 5, 2, 0, 0, 0, 0, 0, 0,128,192,192,224,224,112,120, 56, 63, 28, 14, 14, 14,254, 14, 14, 30, 28, 63, 56,120,112,224,224,192,128, 0, 0, 0, 0, 0, 0, 0, 2, 5,248, 5, 2, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,160, 19,162, 66, 66, 66, 66, 66, 66, 66,255,255,255, 0, 0, 0,252,254,254,192,192,192,192,255, 0, 0, 0, 62, 62, 60, 60, 0, 0, 1,255,255,255, 66, 66, 66, 66, 66, 66, 66,162, 19,160, 64, 0,
0, 0, 0,128, 64, 64, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 64, 64,192,128, 0, 0,192, 64, 64,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 64,192, 0, 0, 0, 0, 0,128,192, 64, 64,192,128, 0, 0,128,192, 64, 64,192,128, 0, 0, 64, 64, 64, 64, 64,192, 0, 0, 0, 0, 0,249, 8, 8, 8, 8, 8, 8, 8, 8,127,255,255,192,128,128, 15, 31, 31, 1, 1, 1, 1,255, 0, 0, 0, 30, 30, 14, 14,128,192,192,255,255,127, 8, 8, 8, 8, 8, 8, 8, 8,249, 0, 0, 0,
0, 0, 31, 49, 64, 78, 64, 49, 31, 0, 0, 97, 22, 8, 22, 97, 0, 0, 31, 49, 96, 64, 64, 96, 32, 0, 0,127, 68, 68,100, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64,127, 64, 64, 0, 0, 0, 32,100, 68, 68,110, 59, 0, 0, 32,100, 68, 68,110, 59, 0, 0, 0, 0, 0,126, 3, 1, 0, 0, 0, 8, 20, 35, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 7, 15,254, 30, 28, 28, 28,255, 28, 28, 28, 30,254, 15, 7, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 17, 10, 4, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 40, 68, 40, 16, 16, 16, 16, 16, 16, 31, 0, 0, 16, 40, 71, 40, 16, 0, 0, 31, 16, 16, 16, 16, 16, 16, 40, 68, 40, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
oled_write_raw_P(raw_logo, sizeof(raw_logo));
}
static void render_logo_font(void) {
static const char PROGMEM qmk_logo[] = {
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xCB, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xCB, 0x9C, 0x9D, 0xCB, 0xCB,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xCB, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xBB, 0xBC, 0xBD, 0xBE, 0xCB,
0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xCB, 0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xDB, 0xDC, 0xDD, 0xDE, 0xCB,
0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xCB, 0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x00
};
oled_write_P(qmk_logo, false);
}
/* Shows the name of the current layer and locks for the host (CAPS etc.) */
static void render_info(void) {
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _HOME:
oled_write_ln_P(PSTR("HOME"), false);
break;
case _MISC:
oled_write_ln_P(PSTR("MISC"), false);
break;
case _RGB:
oled_write_ln_P(PSTR("RGB"), false);
break;
case _BLED:
oled_write_ln_P(PSTR("Backlight"), false);
break;
default:
oled_write_ln_P(PSTR("Undefined"), false);
}
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_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
static void render_rgbled_status(bool) {
char string[4];
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled() && get_highest_layer(layer_state) == _RGB) {
uint16_t m = rgblight_get_mode();
string[3] = '\0';
string[2] = '0' + m % 10;
string[1] = ( m /= 10) % 10 ? '0' + (m) % 10 : (m / 10) % 10 ? '0' : ' ';
string[0] = m / 10 ? '0' + m / 10 : ' ';
oled_write_P(PSTR("Conf:"), false);
oled_write(string, false);
uint16_t h = rgblight_get_hue()/RGBLIGHT_HUE_STEP;
string[3] = '\0';
string[2] = '0' + h % 10;
string[1] = ( h /= 10) % 10 ? '0' + (h) % 10 : (h / 10) % 10 ? '0' : ' ';
string[0] = h / 10 ? '0' + h / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
uint16_t s = rgblight_get_sat()/RGBLIGHT_SAT_STEP;
string[3] = '\0';
string[2] = '0' + s % 10;
string[1] = ( s /= 10) % 10 ? '0' + (s) % 10 : (s / 10) % 10 ? '0' : ' ';
string[0] = s / 10 ? '0' + s / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
uint16_t v = rgblight_get_val()/RGBLIGHT_VAL_STEP;
string[3] = '\0';
string[2] = '0' + v % 10;
string[1] = ( v /= 10) % 10 ? '0' + (v) % 10 : (v / 10) % 10 ? '0' : ' ';
string[0] = v / 10 ? '0' + v / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
oled_write_ln_P(PSTR("\n MOD HUE SAT VAR"), false);
} else {
oled_write_ln_P(PSTR("\n"), false);
}
}
void oled_task_user(void) {
static bool finished_timer = false;
if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) {
render_logo();
} else {
if (!finished_timer) {
oled_clear();
finished_timer = true;
}
render_info();
render_rgbled_status(true);
render_logo_font();
}
}
#endif

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/>.
*/
#include QMK_KEYBOARD_H
#include <stdio.h>
// clang-format off
enum layer_names {
_HOME,
_MISC,
@@ -46,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
BL_INC, BL_DEC, TO(0)
)
};
// clang-format on
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE
@@ -100,10 +99,10 @@ static void render_logo(void) {
}
static void render_logo_font(void) {
static const char PROGMEM qmk_logo[] = {
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xCB, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xCB, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9,
0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xCB, 0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5,
0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xCB, 0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xCB, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0x00
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4,
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4,
0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0,
0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0x00
};
oled_write_P(qmk_logo, false);
@@ -133,24 +132,41 @@ static void render_info(void) {
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
static void render_rgbled_status(bool full) {
#ifdef RGBLIGHT_ENABLE
char buf[30];
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled() && get_highest_layer(layer_state) == _RGB) {
if (full) {
snprintf(buf, sizeof(buf), "RGB mode %2d: %d,%d,%d \n",
rgblight_get_mode(),
rgblight_get_hue()/RGBLIGHT_HUE_STEP,
rgblight_get_sat()/RGBLIGHT_SAT_STEP,
rgblight_get_val()/RGBLIGHT_VAL_STEP);
} else {
snprintf(buf, sizeof(buf), "[%2d] ", rgblight_get_mode());
}
oled_write(buf, false);
} else {
oled_write_ln_P(PSTR("\n"), false);
}
#endif
static void render_rgbled_status(bool) {
char string[4];
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled() && get_highest_layer(layer_state) == _RGB) {
uint16_t m = rgblight_get_mode();
string[3] = '\0';
string[2] = '0' + m % 10;
string[1] = ( m /= 10) % 10 ? '0' + (m) % 10 : (m / 10) % 10 ? '0' : ' ';
string[0] = m / 10 ? '0' + m / 10 : ' ';
oled_write_P(PSTR("Conf:"), false);
oled_write(string, false);
uint16_t h = rgblight_get_hue()/RGBLIGHT_HUE_STEP;
string[3] = '\0';
string[2] = '0' + h % 10;
string[1] = ( h /= 10) % 10 ? '0' + (h) % 10 : (h / 10) % 10 ? '0' : ' ';
string[0] = h / 10 ? '0' + h / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
uint16_t s = rgblight_get_sat()/RGBLIGHT_SAT_STEP;
string[3] = '\0';
string[2] = '0' + s % 10;
string[1] = ( s /= 10) % 10 ? '0' + (s) % 10 : (s / 10) % 10 ? '0' : ' ';
string[0] = s / 10 ? '0' + s / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
uint16_t v = rgblight_get_val()/RGBLIGHT_VAL_STEP;
string[3] = '\0';
string[2] = '0' + v % 10;
string[1] = ( v /= 10) % 10 ? '0' + (v) % 10 : (v / 10) % 10 ? '0' : ' ';
string[0] = v / 10 ? '0' + v / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
oled_write_ln_P(PSTR("\n MOD HUE SAT VAR"), false);
} else {
oled_write_ln_P(PSTR("\n"), false);
}
}
void oled_task_user(void) {
static bool finished_timer = false;

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/>.
*/
#include QMK_KEYBOARD_H
#include <stdio.h>
// clang-format off
enum layer_names {
_HOME,
_MISC,
@@ -46,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
BL_INC, BL_DEC, TO(0)
)
};
// clang-format on
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE
@@ -100,10 +99,10 @@ static void render_logo(void) {
}
static void render_logo_font(void) {
static const char PROGMEM qmk_logo[] = {
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xCB, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xCB, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9,
0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xCB, 0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5,
0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xCB, 0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xCB, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0x00
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4,
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4,
0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0,
0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0x00
};
oled_write_P(qmk_logo, false);
@@ -133,24 +132,41 @@ static void render_info(void) {
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
static void render_rgbled_status(bool full) {
#ifdef RGBLIGHT_ENABLE
char buf[30];
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled() && get_highest_layer(layer_state) == _RGB) {
if (full) {
snprintf(buf, sizeof(buf), "RGB mode %2d: %d,%d,%d \n",
rgblight_get_mode(),
rgblight_get_hue()/RGBLIGHT_HUE_STEP,
rgblight_get_sat()/RGBLIGHT_SAT_STEP,
rgblight_get_val()/RGBLIGHT_VAL_STEP);
} else {
snprintf(buf, sizeof(buf), "[%2d] ", rgblight_get_mode());
}
oled_write(buf, false);
} else {
oled_write_ln_P(PSTR("\n"), false);
}
#endif
static void render_rgbled_status(bool) {
char string[4];
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled() && get_highest_layer(layer_state) == _RGB) {
uint16_t m = rgblight_get_mode();
string[3] = '\0';
string[2] = '0' + m % 10;
string[1] = ( m /= 10) % 10 ? '0' + (m) % 10 : (m / 10) % 10 ? '0' : ' ';
string[0] = m / 10 ? '0' + m / 10 : ' ';
oled_write_P(PSTR("Conf:"), false);
oled_write(string, false);
uint16_t h = rgblight_get_hue()/RGBLIGHT_HUE_STEP;
string[3] = '\0';
string[2] = '0' + h % 10;
string[1] = ( h /= 10) % 10 ? '0' + (h) % 10 : (h / 10) % 10 ? '0' : ' ';
string[0] = h / 10 ? '0' + h / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
uint16_t s = rgblight_get_sat()/RGBLIGHT_SAT_STEP;
string[3] = '\0';
string[2] = '0' + s % 10;
string[1] = ( s /= 10) % 10 ? '0' + (s) % 10 : (s / 10) % 10 ? '0' : ' ';
string[0] = s / 10 ? '0' + s / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
uint16_t v = rgblight_get_val()/RGBLIGHT_VAL_STEP;
string[3] = '\0';
string[2] = '0' + v % 10;
string[1] = ( v /= 10) % 10 ? '0' + (v) % 10 : (v / 10) % 10 ? '0' : ' ';
string[0] = v / 10 ? '0' + v / 10 : ' ';
oled_write_P(PSTR(","), false);
oled_write(string, false);
oled_write_ln_P(PSTR("\n MOD HUE SAT VAR"), false);
} else {
oled_write_ln_P(PSTR("\n"), false);
}
}
void oled_task_user(void) {
static bool finished_timer = false;

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