Compare commits

..

108 Commits

Author SHA1 Message Date
1a79f14e43 format code according to conventions [skip ci] 2020-02-01 09:46:34 +00:00
4e6d1ae0ea Fix timer_elapsed() overflow issue for STM32F103 and other ChibiOS boards (#7595)
* fixed strange space cadet timer owerflow on STM32F103

* Moved elapsed time fix to timer.c
2020-02-01 20:17:28 +11:00
1858c3ed11 Skog Lite: disable Console; update info.json (#8058)
* disable Console to save firmware space

* rules.mk templating

Add comments regarding the rules, to more closely match the ps2avrgb template.

* update info.json

This board has a quite interesting take on the standard TKL; why not show it off?
2020-02-01 00:42:42 -08:00
8e550fc11a Add thread safety around i2c_master for ChibiOS/ARM. 2020-02-01 17:44:39 +11:00
1aee492c0f [keymap(kyria), refactor] created kyria keymap. refactored ninjonas userspace (#8053)
* [keymap(kyria), refactor] created kyria keymap. refactored ninjonas userspace and keyboards

* [fix(#8053)] removed redundant code based off Duckle29's code review

* [fix(#8053)] fixing typos

* [refactor(#8053)] updating oled timeout

* [fix(8053) resolved code review issues identified by noroadsleft
2020-01-31 22:38:05 -08:00
fdabf524f2 [Keyboard] add Hannah910 V2 PCB and VIA support (#8024)
* add Hannah910 V2 and VIA support

add rev.2 pcb and via support

* Update config.h

* update

* Create config.h

* Update

* update

* update

* Move keymap folder

* add more layer and edit readme.md

* readme.md update

* update

* update

* Update hannah910.h
2020-01-31 19:02:29 -08:00
e565948ffd Noxary 280 Backwards LED Fix (#8057)
* fix logic and update to newest led_update_kb routine
2020-01-31 12:33:08 -08:00
5c5a05212e [Keyboard] VIA Support: 1upkeyboards 1up60hte (#8052)
* update the vendor id for 1upkeyboards 1up60hte

* add the via keymap and rules file

* fix typo

* move the LTO to the keyboard's rules.mk

* Update keyboards/1upkeyboards/1up60hte/config.h
2020-01-31 11:55:11 -08:00
b28ee6b039 Fix misunderstanding of CPPFLAGS and CXXFLAGS. 2020-01-31 15:29:23 +11:00
6544bd2e65 [Keymap] Customized layouts for the Keebio/Quefrency65 (#7947)
* Created the yoryer layout for the Quefrency 65%

* added rgb control layer

* Required changes to resolve PR #7947 issues

* - Updated the layer list as an enum
- Removed .gitignore file from keymap folder

* Removed the .gitignore from keymap folder
2020-01-30 20:22:25 -08:00
f31411af17 [Keymap] add new keymap (xd75 atomic style japanese layout) (#7944)i
* init jp

* update

* update

* update

* update

* Update keyboards/xd75/keymaps/atomic_style_jp/keymap.c

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

* remove config.h

* remove ____T___

Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-01-30 20:21:33 -08:00
479c6a68cf [Keyboard] Add support for Southpaw Full Size (#8029)
* Begin work on spfs, migrating ancient config

* QMK breaks if there's a dash in the board name

* Update info.json

* Make indicator LEDs work

* Build a readme

* Change title to match official GB thread name

* Add an ANSI WKL layout for simplicity

* Adjustments as per pullreq recommendations

* Remove unused functions from other keymap
2020-01-30 21:14:19 -05:00
eb309be6f0 Improve VIRTSER performance (#7528) 2020-01-31 11:30:41 +11:00
4139de3cc9 Fix AVR boards which were overriding backlight without setting… (#8044)
* Add backlight custom driver to all boards not declaring it but overriding backlight

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Remove old tmk references from show_options.mk

Co-authored-by: fauxpark <fauxpark@gmail.com>
2020-01-31 10:44:40 +11:00
7514f5124a [Keymap] Update keymap for user jasondunsmore (#8047) 2020-01-30 15:25:16 -08:00
31e4583f4a [Keyboard] Add support for Drink Me (#8039)
* Add initial configuration and keymaps for Yatara Drink Me.

* Apply suggestions from code review

* Apply suggestions from code review

* Add transparent layers in VIA layout so there are four layers in total. Amend closing bracket indentation in keymap.c files.
2020-01-30 14:37:23 -08:00
17a089d21b Trim firmware size changes from default rules.mk, part 4 (#8046)
* Trim firmware size changes from default-ish rules.mk files

* Trim sizes from westfoxtrot boards
2020-01-31 09:10:23 +11:00
db2f187493 Documentation: KBD75 (#8038)
* update kbd75 readme

* update bmini readme

* update wkl.kr readme

* Update keyboards/kbdfans/kbd75/readme.md

* Update keyboards/kbdfans/kbd75/readme.md
2020-01-30 11:37:00 -08:00
d2e1cc4d48 Trim firmware sizes from default rules.mk, part 3 (#8045) 2020-01-30 11:13:49 -08:00
0f7d294ac3 Remove filesize changes from default-ish rules.mk files, sans handwired (#8040) 2020-01-30 13:47:48 -05:00
c66a4a9831 [Keyboard] WhiteFox vanilla layout (#8043)
* Add the Whitefox vanilla layout

Initial commit for whitefox vanilla keymap

Fix the mapped layout to match vanilla

Cleanup vanilla default

Rework the info file

Remove vanilla keymap as we don't really need this
2020-01-30 02:52:35 -08:00
e57af8db0d Fix 'Makefile:560: keyboards/<keyboard>/rev1/rules.mk: No such file or directory' (#8042) 2020-01-30 02:48:30 -08:00
0968cf8b00 Updates cKeys/theDora README with explicit flashing instructions (#8016)
* adds to theDora readme for more explicit directions on flashing,
with links and how to enter bootloader mode.

* fmt

* Corrects language of steps for loading firmware

* Update keyboards/ckeys/thedora/readme.md
2020-01-30 01:45:27 -08:00
0f9982c53e [Keyboard] Adds ogre ergo single (#8012)
* Adds ogre ergo single (non-split) version

* use generic pids
2020-01-30 01:18:44 -08:00
6d5812a86c [Keyboard] Add Ergosaurus Support (#8013)
Initialize config

* Update matrix size

* Update Keymap

* Rename files to remove hyphen

* Rename board and folders

* Fix ergosaurus.h typo

* Fix ergosaurus.h layout matrix

* Update column pins

* Fixed ergosaurus

* Add Reggie layout

* Update Ergo keymap

* Update with fixes from PR #8013

* Fix KeyHive link

* Remove config.h and extra whitespace from README

* Update PID, README and rules spacing

* Update rules.mk
2020-01-30 01:16:11 -08:00
1249594cf0 Refactor minidox to use split_common (#7924)
* Initial refactor of minidox to split_common

* post rebase fixes
2020-01-29 17:33:15 -05:00
e04c5edaae Userspace and keymap updates (#8037)
* Add PGUP,PGDN to keymaps

* Enable VIA support on userspace for 1up60hse

* Enable DZ60 VIA in rules

* Enable Romac VIA in rules
2020-01-29 17:23:55 -05:00
66fe3001e4 Trim firmware sizes from default rules.mk, part 1 (#8027)
* Removed reference to firmware size in 0-9,a-f board-level and default keymap 'rules.mk' files

* Correct some 'rules.mk' in boards buried under vendor folders

* PR8027 patch

Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2020-01-29 12:51:25 -05:00
7149557bb4 Add German programming layout for Lets Split (#8014)
* Add German programming layout for Lets Split

* Update copyright in config.h

* Add Hash-Symbol to keymap

* Change to fit suggestions in PR

* Changes as requested, but broken.

* Fix layer switching issue
2020-01-29 10:17:45 -05:00
2abc0e17e7 [Keyboard] Add Quefrency Rev 2 (#8001)
* Add Quefrency Rev. 2

* Add encoder support

* Add RGB LED mapping info

* Add diode direction

* Revert removal of default folder for CI purposes

* Remove unneeded lines

* Rename ISO layout macros
2020-01-28 14:13:57 -08:00
197a401be6 Qmk doctor os check to support newer msys2/w10 installations (#8031)
* Fixed OS detection on newer MSYS installations

* made OS sting lower case
2020-01-28 22:21:00 +01:00
4a208b8951 [Keyboard] 1up60hse VIA Support (#7992)
* add VIA support for 1up60hse

* choose a vendor and product id that is not taken

* add mousekey_enable set to no as per Wilba's recommendation

* Update keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md

* Update keyboards/1upkeyboards/1up60hse/keymaps/via/readme.md

* add a fourth layer

* might as well remove the config file as we are not including the one thing that was in it
2020-01-28 13:04:50 -08:00
1e90f5c71c Mysterium firmware fix (#8032)
* Update config.h

* Update rules.mk

* Update usbconfig.h

* Update config.h

* Update rules.mk

* Update usbconfig.h
2020-01-29 07:38:27 +11:00
0d80c7bd59 [Keyboard] Fix Pulse4k info.json LAYOUT name (#7965)
* Fix Pulse4k info.json LAYOUT name

* Add missing functions to fix configurator

Add empty encoder functions to the keyboard code, as the configurator doesn't see the keymap defined functions at first.
To be able to override these functions, they are marked as 'weak'.

* Rework encoder functions another time

Default implementation is now provided as part of the keyboard, but they can still be overriden within the keymap (template is commented out by default)
2020-01-28 09:08:39 -08:00
4d06d2835c Move CORTEX_ENABLE_WFI_IDLE=TRUE to rules.mk files. 2020-01-28 23:45:42 +11:00
92c62352cf [Keymap] Finalize Keymap Planck/Samuel (#8005)
* indent and layout changes

* finalizations

* use layout macros here instead of the raw matrix arrays
2020-01-27 17:47:36 -08:00
1f0404e3c5 [Keymap] Added gaming layout and read me (#7996)
* Added gaming layout and read me

* Code format changes and spelling fixes for PR

* Moved keymap to different folder
2020-01-27 17:42:46 -08:00
ee88feb759 [Docs] Update Japanese translation (#8015) 2020-01-27 17:18:12 -08:00
eb5e513d26 [Keyboard] FLX Virgo, cleaned up layouts and added VIA keymap (#7997)
* Reworked for VIA support

Reworked for VIA support and tidying up of older code.

* Fixed naming issues, and prepared for VIA compat

Via compat added

* Improve layouts, tidy code, via keymap

Added support for VIA and cleaned up some code and layouts.

* Implimented suggestions by MechMerlin

* Fix capitalisation 

Mistake raised by Drashna now fixed.

* Tidy comments as requested by noroadsleft

* Tidy comments as requested by fauxpark
2020-01-27 17:05:29 -08:00
a539bd63fe Fix/remove missing package (#7897)
* [fix] yay instead pacman install bootloadhid

* [fix] add needed option

* [mod] output red color

* [fix] overwrite avr-gcc package

* [mod] disable install bootloadhid from aur and check already installed

* Apply suggestions from code review

Co-Authored-By: Joel Challis <git@zvecr.com>

* Update util/linux_install.sh

Co-Authored-By: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
2020-01-28 00:23:24 +00:00
1b7a003d84 [Keymap] update to Danielo515 keymaps (#8004)
* feat(build): added script for compiling with docker easily

* chore: bring my own build with docker to master

* feat: merge ergodox ez into latest maste

* chore: remove my build with docker file

* chore: remove my changes to process_leader

* feat: more modular user danielo515

* Apply suggestions from @ridingqwerty

Co-Authored-By: ridingqwerty <george.g.koenig@gmail.com>

* chore: more suggestions implemented

* chore: add my basic details

* Apply suggestions from @drashna

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

* fix: more @drashna fixes

* feat: @fauxpark optimization

* fix: some more @drashna improvements

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

* chore: small improvement on layout

* fix: some more @drashna improvements

* chore: remove some F dance

Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-01-27 14:42:38 -08:00
0804f0a5dd Merge pull request #7995 from zvecr/feature/split_arm_i2c_remove
Remove compilation of i2c for arm split
2020-01-27 22:40:32 +00:00
7342c335d2 Refactor stm32duino f103 keyboards to use new central board config files (#7706)
* Create central board for bluepill

* Remove duplicate board files

* Refactor to use new central board config files

* Fix cannonkeys f103 boards
2020-01-27 22:39:30 +00:00
50855593ff Migrate common ld scripts to common location (#7887)
* Migrate common ld scripts to common location

* Remove duplicate ld scripts

* Update build to look at common ld location
2020-01-27 22:38:55 +00:00
9a0245b778 Fix boards which were overriding backlight without setting custom (#7970) 2020-01-27 22:31:54 +00:00
43d2a0e167 [Keyboard] Adds ogre ergo split (#8011)
* Adds ogre ergo split

* remove uneeded line breaks
2020-01-27 10:14:50 -08:00
212aeee202 Revert "Clueboard Rev4 Updates aka Volcano 660 (#7942)"
This reverts commit e0a0430c31bd9fabab93e8933e9988e0d3f66434.
2020-01-27 17:38:47 +11:00
5fb95c5f94 create users/datagrok (#7653)
* users/datagrok: add shared functions

* users/datagrok: improve base-layer selection feature

* users/datagrok: add README.md
2020-01-26 23:26:40 -05:00
05d6e6ca78 Ensure setPinInput actually sets input high-Z (#6237)
* Ensure setPinInput actually sets input high-z

* Fixed _PIN_ADDRESS Macro arguments
as recommended by vomindoraan

* Fixed instances of setInput to use new behavour

* Changed kmac matrix to use input with pullups

* Update keyboards/gh60/revc/revc.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Fixed input state for unselect_rows

* fixed merge conflict

* Updated all instances of older uses of setPinInput()

* Fixed naming mistake

Co-authored-by: fauxpark <fauxpark@gmail.com>
2020-01-26 23:04:38 -05:00
992656e753 Fix cannonkeys f103 boards 2020-01-26 23:35:57 +00:00
ee86be9dca Refactor to use new central board config files 2020-01-26 23:35:57 +00:00
98e5555705 Remove duplicate board files 2020-01-26 23:33:03 +00:00
d3abebb601 Create central board for bluepill 2020-01-26 23:33:03 +00:00
645c5fabf2 Add VIA support to MxSS, plus minor tweaks (#7809)
* Add VIA support to mxss and general cleanup

* Add support for RGB test for FLEDs

* Add LAYOUT_all to allow for more configuration

* Remove blank layers

* Updated readme

* Improve use of EEPROM

* Credit where its due

* Use the latest iteration of rgblight code

* Keep the RGB timer running if the front LED is in RGB mode

* Fix RGB breathing animation

* Better supported RGB animation
Only thing not working is alternating, but that's not too important

* Abstract front LED handlers from main kb code

* Add support for indicator LED color changing

* Remove debug statement

* Persist indicator LED colors

* Mark custom sections in rgblight.c

* Light commenting

* Fix up keymaps

* Add/update comments

* Remove bloat from default hex

* Tidy a stray tab

* Out with the old, in with the new

* Out with the old, in with the new

* Add LAYER_STATE_8BIT for VIA keymap
2020-01-26 17:06:56 -05:00
7f7b6b08e8 [Keyboard] Initial commit for mc76k (#8000)
* Initial commit for mc76k

* Update config.h
2020-01-25 23:05:22 -08:00
72d7661b30 suggestions by skullydazed 2020-01-25 18:15:07 -08:00
d0d106cef7 change Instructions listing in Docs summary 2020-01-25 18:15:07 -08:00
d603e94f68 add Breaking Change PR Instructions doc 2020-01-25 18:15:07 -08:00
9ff61601e3 [Keymap] crkbd/kidbrazil adding layer dependent RGB & better idle timeout. (#7901)
* Added KidBrazil custom keymap for CRKBD
-Custom Font
-Custom OLED output

* Added missing readme

* Oled Timeout Update for KidBrazil Keymap (#1)

* Setup Oled timeout based on simple timer

* Cleaned up comments and added timeout for LEDs

* Fixed some small errors

* Updated oled timout with matrix scan

* Updated oled timout with matrix scan

* Update withou eeprom

* Update timer code

* Use process user instead of keymap

* Added ifdef to protect oledtimer

* Updated with half timeout state for logo

* Removed middle tier timer

* Final cleanup of unused files

* Updated code as per suggestions & requests

* Second round of revisions

* Updated keymap to better handle LED timeout
- Added boolean to hold LED state
- Added init function to set rgb to known state
- Modified RGB_TOG to work with noeeprom commands

* Finished adding the timeout for OLED and testing on CRKBD

* Updated documentation

* fixed the timeout logic so it works as intended

* Added initial limits to color settings

* Added layer reset as part of the iddle timeout process

* Split Keymap into more manageable files

* Finalizing RGB Layer status on CRKBD
- Refactored OLED timeout to deal only with oled
- If user remains iddle on game layer for too long it will switch to
default
- LED / OLED iddle working
- Minor changes to _SYM layer
- Removed some rgb controls from keyboard due to layer dependent RGB
colors

* Update keyboards/crkbd/keymaps/kidbrazil/keymap.c

Used suggestion from Drashna to replace EEPROM_RESET with shorter version.

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

* Update keyboards/crkbd/keymaps/kidbrazil/keymap.c

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

* Implemented drashna's comment

Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-01-25 14:43:57 -08:00
09370a95db format code according to conventions [skip ci] 2020-01-25 22:04:42 +00:00
e9ffc53476 Fix unaligned access with LTO (#7801)
Forces 4 byte alignment for USB input & output buffers to prevent unaligned accesses by chibios with LTO enabled
2020-01-25 13:35:39 -08:00
480a391929 [Keyboard] Daisy refactor (#7985) 2020-01-25 12:43:43 -08:00
154336ee27 [Keyboard] numatreus (#7929)
* Add files via upload

* Delete NumAtreus

* 20190405

* 20190405

* Delete keymap.c

* Delete config.h

* Delete keymap.c

* Delete rules.mk

* Delete rules_default.mk

* Delete readme.md

* Delete NumAtreus.c

* Delete NumAtreus.h

* Delete config.h

* Delete info.json

* 20190404

* Add files via upload

* Add files via upload

* 20190405

* Delete NumAtreus

* 20190406

* 20190407

* 20190408

* 20190408

* 20190410

* Update readme.md

* Update readme.md

* Add files via upload

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

* Update readme.md

* Update readme.md

* Update readme.md

* Delete NumAtreus.c

* Delete NumAtreus.h

* Add files via upload

* 20200118

* 20200118_default

* update

* readme

* Delete rules.mk

* Delete readme.md

* Delete numatreus.h

* Delete config.h

* Delete info.json

* Delete info.json_txt

* Delete numatreus.c

* Delete config.h

* Delete keymap.c

* Delete rules.mk

* Delete keymap.c

* Delete keymap.c

* del

* update

* update

* Update keyboards/numatreus/config.h

* Update keyboards/numatreus/config.h

* Update keyboards/numatreus/config.h

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

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

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

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

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

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* Update keyboards/numatreus/readme.md

* 20190119_Modified

* 20200119_Modified

* 20200119_uranuma

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

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

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

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Update keyboards/numatreus/rules.mk

* Delete info.json_txt

* 20200121_Modified

* 20200121_Modified

* 20200121_Modified

* 20200121_Modified

* 20200122

* Update keyboards/numatreus/config.h

* 20200122_Modified

* Update keyboards/uranuma/rules.mk

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

* Update keyboards/uranuma/rules.mk

* Update keyboards/uranuma/rules.mk

* Update keyboards/uranuma/rules.mk

* Update keyboards/uranuma/rules.mk

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

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

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

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

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

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

* Update keyboards/uranuma/config.h

* Update keyboards/uranuma/readme.md

* Update keyboards/uranuma/readme.md

* Update keyboards/uranuma/readme.md

* 20200122

* Delete config.h

* Delete uranuma.h

* Delete uranuma.c

* Delete rules.mk

* Delete readme.md

* Delete keymap.c

* Delete info.json

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

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

* Fix whitespace and imports

* yapf

* Add documentation for the new doctor functionality

* Replace type_unchanged() with str()

* remove unused modules

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

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

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
2020-01-24 20:31:16 +01:00
6efcfaa264 Remove compilation of i2c for arm split 2020-01-24 14:11:01 +00:00
e4a0f841e1 Update split serial code to use driver pattern (#7990)
* Move avr serial code to drivers

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

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

* Added VIA support to Noxary 280

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

* disable mousekey

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

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

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

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

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

* use pragma once

* this board has no backlight support

* enable COMMAND_ENABLE

* comment cleanups

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

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

Co-Authored-By: fauxpark <fauxpark@gmail.com>

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

Co-Authored-By: fauxpark <fauxpark@gmail.com>

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

Co-Authored-By: fauxpark <fauxpark@gmail.com>

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

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* convert the palset and palclear routines to setpinoutput and writepinlow

* remove scankb

* restore original guards instead of pragma once

Co-authored-by: fauxpark <fauxpark@gmail.com>
2020-01-22 04:14:14 +00:00
49c3a1cda5 Swap two columns to fix Skog Lite (#7940)
* Swap two cols to fix skog lite

* Fix readme

* Suggested formatting

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

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2020-01-21 19:58:17 -08:00
ba264c69c2 [Keyboard] Cospad refactor (#7957)
* Cospad refactor

* Add num lock indicator code

* Add led_init_ports()

* Revert change to matrix position blanks

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

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

* made bootmagic lite default

* Dividing keymaps

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

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

* update the led_update routine

* update readme

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

* fixed knight ridder offset to face me

* no oled for crkbd 'till fixed

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

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

* Capitalize hex

* Fix Via_layout_options size setting

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

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

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
2020-01-21 07:48:13 -08:00
dee1d68dde format code according to conventions [skip ci] 2020-01-21 14:48:06 +00:00
123ae73efc Fix lock LEDs for ChibiOS when using shared endpoints (#7877)
* Fix lock LEDs for ChibiOS when using shared endpoints

* Tweak comments

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

* first pass at custom preonic layout

* add auto shift and reset via leader key

* Update readme

* update copyright notice

* formatting changes

* fix: use MO instead of process_record_user

* added backslash and moved grave position

* remove extraneous 'j' characer in NUMPAD template

* update template formatting

* remove process_record_user

* swap "!" with "@"

* fix readme formatting

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

Add Getta25 keyboard.

A 25 keys Tenkey.
Salicylic-acid3

* Update keyboards/getta25/info.json

* Update keyboards/getta25/readme.md

* Update keyboards/getta25/readme.md

* Update keyboards/getta25/readme.md

* Update keyboards/getta25/info.json

* Update keyboards/getta25/info.json

* Update keyboards/getta25/info.json

* Update keyboards/getta25/info.json

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

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

* Keymap Update

Remove unnecessary code blocks

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

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

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

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

* Update eagleii.c

* Update eagleii.h

* Update keymap.c

* Update eagleii.h

* Update keymap.c

* Update keyboards/handwired/eagleii/config.h

* Update keyboards/handwired/eagleii/config.h

* Update keyboards/handwired/eagleii/rules.mk

* Update config.h

* Update rules.mk

* Update eagleii.h

* Update eagleii.h

* Update keymap.c

* Update info.json

* Update keyboards/handwired/eagleii/rules.mk

* Update keyboards/handwired/eagleii/rules.mk

* Create readme.md

* Update keyboards/handwired/eagleii/readme.md

* Update keyboards/handwired/eagleii/config.h

* Update keyboards/handwired/eagleii/readme.md

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

* Make necessary changes for merging

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

* Add info.json as well

* Update readme, info.json

* Change layout name, update led function

* Fix info.json

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

* proofread

* update decade

* layer enums

* revert enum layer changes

* line spacing and such

* product ID and punctuation

* terminating terminating slashes

* layer enums

* remove slashes

* rules change, rgb and spacing

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

* proofread

* update decade

* layer enums

* revert enum layer changes

* line spacing and such

* product ID and punctuation

* terminating terminating slashes

* layer enums

* remove slashes

* rules change, rgb and spacing

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

* update keymap and key layout

* Update for release

* Update keyboards/tartan/config.h

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

* Update keyboards/tartan/info.json

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

* Update keyboards/tartan/info.json

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

* Update keyboards/tartan/info.json

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

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

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

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

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

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

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

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

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

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

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

* Delete tartan/keymaps/test

* Update keyboards/tartan/readme.md

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

* Update keyboards/tartan/readme.md

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

* Delete tartan/keymaps/default/config.h

* Update keyboards/tartan/readme.md

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

* Update keyboards/tartan/rules.mk

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

* Update keyboards/tartan/rules.mk

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

* Delete unneccesary settings

* Fix tartan/rules.mk

* Delete unnecessary code from tartan.c

* Rearrange layout order in tartan.h

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update usb config

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Delete unused defines

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/tartan/usbconfig.h

Co-Authored-By: fauxpark <fauxpark@gmail.com>

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: fauxpark <fauxpark@gmail.com>
2020-01-19 10:54:04 -08:00
1205 changed files with 19895 additions and 11164 deletions

View File

@ -12,6 +12,18 @@ env:
- MAKEFLAGS="-j3 --output-sync"
services:
- docker
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
packages:
- pandoc
- diffutils
- dos2unix
- doxygen
- clang-format-7
- libstdc++-7-dev
install:
- npm install -g moxygen
script:
@ -20,13 +32,6 @@ script:
- bash util/travis_test.sh
- bash util/travis_build.sh
- bash util/travis_docs.sh
addons:
apt:
packages:
- pandoc
- diffutils
- dos2unix
- doxygen
after_script:
bash util/travis_compiled_push.sh
notifications:

View File

@ -102,6 +102,57 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
endif
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
$(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
else
OPT_DEFS += -DEEPROM_ENABLE
ifeq ($(strip $(EEPROM_DRIVER)), custom)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
COMMON_VPATH += $(DRIVER_PATH)/eeprom
QUANTUM_LIB_SRC += i2c_master.c
SRC += eeprom_driver.c eeprom_i2c.c
else ifeq ($(strip $(EEPROM_DRIVER)), transient)
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c eeprom_transient.c
else ifeq ($(strip $(EEPROM_DRIVER)), vendor)
OPT_DEFS += -DEEPROM_VENDOR
ifeq ($(PLATFORM),AVR)
# Automatically provided by avr-libc, nothing required
else ifeq ($(PLATFORM),CHIBIOS)
ifeq ($(MCU_SERIES), STM32F3xx)
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F303xC
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifeq ($(MCU_SERIES), STM32F1xx)
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F103xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB)
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else
# This will effectively work the same as "transient" if not supported by the chip
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
endif
else ifeq ($(PLATFORM),ARM_ATSAM)
SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
else ifeq ($(PLATFORM),TEST)
SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
endif
endif
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
@ -124,7 +175,9 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
else
OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER
BACKLIGHT_ENABLE = yes
BACKLIGHT_DRIVER = custom
OPT_DEFS += -DLED_MATRIX_ENABLE
SRC += $(QUANTUM_DIR)/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
endif
@ -249,10 +302,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
$(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
endif
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE := yes
endif
COMMON_VPATH += $(QUANTUM_DIR)/backlight
SRC += $(QUANTUM_DIR)/backlight/backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
@ -292,6 +341,10 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
endif
endif
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE := yes
endif
ifeq ($(strip $(CIE1931_CURVE)), yes)
OPT_DEFS += -DUSE_CIE1931_CURVE
LED_TABLES := yes
@ -418,9 +471,17 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \
i2c_master.c \
i2c_slave.c
ifeq ($(PLATFORM),AVR)
QUANTUM_LIB_SRC += i2c_master.c \
i2c_slave.c
endif
SERIAL_DRIVER ?= bitbang
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
QUANTUM_LIB_SRC += serial.c
else
QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
endif
endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif

View File

@ -18,6 +18,7 @@
* [Getting Help](getting_started_getting_help.md)
* [Breaking Changes](breaking_changes.md)
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
* [2019 Aug 30](ChangeLog/20190830.md)
* [FAQ](faq.md)
@ -104,6 +105,7 @@
* [ADC Driver](adc_driver.md)
* [I2C Driver](i2c_driver.md)
* [WS2812 Driver](ws2812_driver.md)
* [EEPROM Driver](eeprom_driver.md)
* [GPIO Controls](internals_gpio_control.md)
* [Custom Matrix](custom_matrix.md)
* [Proton C Conversion](proton_c_conversion.md)

View File

@ -0,0 +1,42 @@
# Breaking Changes: My Pull Request Was Flagged
A QMK member may have replied to your pull request stating that your submission is a breaking change. In their judgment, the changes you have proposed have greater implications for either QMK, or its users.
Some things that may cause a pull request to be flagged are:
- **Edits to User Keymaps**
A user may submit their keymap to QMK, then some time later open a pull request with further updates, only to find it can't be merged because it was edited in the `qmk/qmk_firmware` repository. As not all users are proficient at using Git or GitHub, the user may find themself unable to fix the issue on their own.
- **Changes to Expected Behavior**
Changes to QMK behavior may cause users to believe their hardware or QMK is broken if they flash new firmware that incorporates changes to existing QMK features, and find themselves without a means to restore the desired behavior.
- **Changes Requiring User Action**
Changes may also require action to be taken by users, such as updating a toolchain or taking some action in Git.
- **Changes Necessitating Increased Scrutiny**
On occasion, a submission may have implications for QMK as a project. This could be copyright/licensing issues, coding conventions, large feature overhauls, "high-risk" changes that need wider testing by our community, or something else entirely.
- **Changes Requiring Communication to End Users**
This includes warnings about future deprecations, outdated practices, and anything else that needs to be communicated but doesn't fit into one of the above categories.
## What Do I Do?
If it is determined that your submission is a breaking change, there are a few things you can do to smooth the process:
### Consider Splitting Up Your PR
If you are contributing core code, and the only reason it needs to go through breaking changes is that you are updating keymaps to match your change, consider whether you can submit your feature in a way that the old keymaps continue to work. Then submit a separate PR that goes through the breaking changes process to remove the old code.
### Contribute a ChangeLog Entry
We require submissions that go through the Breaking Change process to include a changelog entry. The entry should be a short summary of the changes your pull request makes &ndash; [each section here started as a changelog](ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft").
Your changelog should be located at `docs/ChangeLog/YYYYMMDD/PR####.md`, where `YYYYMMDD` is the date on which QMK's breaking change branch &ndash; usually named `future` &ndash; will be merged into the `master` branch, and `####` is the number of your pull request.
If your submission requires action on the part of users, your changelog should instruct users what action(s) must be taken, or link to a location that does so.
### Document Your Changes
Understanding the purpose for your submission, and possible implications or actions it will require can make the review process more straightforward. A changelog may suffice for this purpose, but more extensive changes may require a level of detail that is ill-suited for a changelog.
Commenting on your pull request and being responsive to questions, comments, and change requests is much appreciated.
### Ask for Help
Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/Uq7gcHh).

View File

@ -141,14 +141,28 @@ qmk docs [-p PORT]
## `qmk doctor`
This command examines your environment and alerts you to potential build or flash problems.
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
**Usage**:
```
qmk doctor
qmk doctor [-y] [-n]
```
**Examples**:
Check your environment for problems and prompt to fix them:
qmk doctor
Check your environment and automatically fix any problems found:
qmk doctor -y
Check your environment and report problems only:
qmk doctor -n
## `qmk json-keymap`
Creates a keymap.c from a QMK Configurator export.

50
docs/eeprom_driver.md Normal file
View File

@ -0,0 +1,50 @@
# EEPROM Driver Configuration
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
Driver | Description
--------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
`EEPROM_DRIVER = vendor` | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. Other chips will generally act as "transient" below.
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
## Vendor Driver Configuration
No configurable options are available.
## I2C Driver Configuration
Currently QMK supports 24xx-series chips over I2C. As such, requires a working i2c_master driver configuration. You can override the driver configuration via your config.h:
`config.h` override | Description | Default Value
------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------
`#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS` | Base I2C address for the EEPROM -- shifted left by 1 as per i2c_master requirements | 0b10100000
`#define EXTERNAL_EEPROM_I2C_ADDRESS(addr)` | Calculated I2C address for the EEPROM | `(EXTERNAL_EEPROM_I2C_BASE_ADDRESS)`
`#define EXTERNAL_EEPROM_BYTE_COUNT` | Total size of the EEPROM in bytes | 8192
`#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32
`#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2
`#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`.
Alternatively, there are pre-defined hardware configurations for available chips/modules:
Module | Equivalent `#define` | Source
-----------------|---------------------------------|------------------------------------------
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
?> If you find that the EEPROM is not cooperating, ensure you've correctly shifted up your EEPROM address by 1. For example, the datasheet might state the address as `0b01010000` -- the correct value of `EXTERNAL_EEPROM_I2C_BASE_ADDRESS` needs to be `0b10100000`.
## Transient Driver configuration
The only configurable item for the transient EEPROM driver is its size:
`config.h` override | Description | Default Value
------------------------------- | ----------------------------------------- | -------------
`#define TRANSIENT_EEPROM_SIZE` | Total size of the EEPROM storage in bytes | 64
Default values and extended descriptions can be found in `drivers/eeprom/eeprom_transient.h`.

View File

@ -1,139 +1,142 @@
# OLED Driver
## OLED Supported Hardware
## Supported Hardware
OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
Tested combinations:
| IC driver | Size | Keyboard Platform | Notes |
|-----------|--------|-------------------|--------------------------|
| SSD1306 | 128x32 | AVR | Primary support |
| SSD1306 | 128x64 | AVR | Verified working |
| SSD1306 | 128x32 | ARM | |
| SH1106 | 128x64 | AVR | No rotation or scrolling |
|IC |Size |Platform|Notes |
|---------|------|--------|------------------------|
|SSD1306 |128x32|AVR |Primary support |
|SSD1306 |128x64|AVR |Verified working |
|SSD1306 |128x32|Arm | |
|SH1106 |128x64|AVR |No rotation or scrolling|
Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
Hardware configurations using Arm-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards.
!> Warning: This OLED driver currently uses the new i2c_master driver from Split Common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest Split Common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses Split Common to detect keypresses, so you will need to implement custom timeout logic for non-Split Common keyboards.
## Usage
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.:
To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
```
```make
OLED_DRIVER_ENABLE = yes
```
This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g:
Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
```C++
```c
#ifdef OLED_DRIVER_ENABLE
void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case _FN:
oled_write_P(PSTR("FN\n"), false);
break;
case _ADJ:
oled_write_P(PSTR("ADJ\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
// Host Keyboard LED Status
uint8_t led_usb_state = host_keyboard_leds();
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case _FN:
oled_write_P(PSTR("FN\n"), false);
break;
case _ADJ:
oled_write_P(PSTR("ADJ\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
#endif
```
## Logo Example
In the default font, ranges in the font file are reserved for a QMK Logo. To Render this logo to the oled screen, use the following code example:
In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the OLED screen, use the following code example:
```C++
```c
static void render_logo(void) {
static 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,0};
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
};
oled_write_P(qmk_logo, false);
oled_write_P(qmk_logo, false);
}
```
## Other Examples
In split keyboards, it is very common to have two OLED displays that each render different content and oriented flipped differently. You can do this by switching which content to render by using the return from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
```C++
```c
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_keyboard_master())
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
return rotation;
if (!is_keyboard_master()) {
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}
return rotation;
}
void oled_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo(); // Renders a statuc logo
oled_scroll_left(); // Turns on scrolling
}
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo(); // Renders a static logo
oled_scroll_left(); // Turns on scrolling
}
}
#endif
```
## Basic Configuration
## Basic Configuration
| Define | Default | Description |
|----------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
| `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
| `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
| `OLED_FONT_WIDTH` | `6` | The font width |
| `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
| `OLED_TIMEOUT` | `60000` | Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_SCROLL_TIMEOUT` | `0` | Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
| `OLED_SCROLL_TIMEOUT_RIGHT`| *Not defined* | Scroll timeout direction is right when defined, left when undefined. |
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
|Define |Default |Description |
|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------|
|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
|`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
|`OLED_FONT_END` |`224` |The ending characer index for custom fonts |
|`OLED_FONT_WIDTH` |`6` |The font width |
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
|`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|`OLED_SCROLL_TIMEOUT` |`0` |Scrolls the OLED screen after 0ms of OLED inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. |
|`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC.|
## 128x64 & Custom sized OLED Displays
The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind. We have added a define, `OLED_DISPLAY_128X64`, to switch all the values to be used in a 128x64 display, as well as added a custom define, `OLED_DISPLAY_CUSTOM`, that allows you to provide the necessary values to the driver.
|Define |Default |Description |
|-----------------------|---------------|-----------------------------------------------------------------|
|`OLED_DISPLAY_128X64` |*Not defined* |Changes the display defines for use with 128x64 displays. |
|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. |
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. |
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br />Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. |
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|Define |Default |Description |
|---------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------|
|`OLED_DISPLAY_128X64`|*Not defined* |Changes the display defines for use with 128x64 displays. |
|`OLED_DISPLAY_CUSTOM`|*Not defined* |Changes the display defines for use with custom displays.<br>Requires user to implement the below defines. |
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|`OLED_DISPLAY_HEIGHT`|`32` |The height of the OLED display. |
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br>`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br>`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br>`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br>Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`.|
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
### 90 Degree Rotation - Technical Mumbo Jumbo
### 90 Degree Rotation - Technical Mumbo Jumbo
!> Rotation is unsupported on the SH1106.
```C
```c
// OLED Rotation enum values are flags
typedef enum {
OLED_ROTATION_0 = 0,
@ -143,9 +146,9 @@ typedef enum {
} oled_rotation_t;
```
OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
OLED displays driven by SSD1306 drivers only natively support in hardware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an ATmega32U4 board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
90 degree rotation is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the display height, width, and block size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
| | | | | | |
|---|---|---|---|---|---|
@ -167,8 +170,8 @@ So those precalculated arrays just index the memory offsets in the order in whic
## OLED API
```C++
// OLED Rotation enum values are flags
```c
// OLED rotation enum values are flags
typedef enum {
OLED_ROTATION_0 = 0,
OLED_ROTATION_90 = 1,
@ -272,26 +275,26 @@ uint8_t oled_max_lines(void);
!> Scrolling and rotation are unsupported on the SH1106.
## SSD1306.h driver conversion guide
## SSD1306.h Driver Conversion Guide
|Old API |Recommended New API |
|---------------------------|-----------------------------------|
|`struct CharacterMatrix` |*removed - delete all references* |
|`iota_gfx_init` |`oled_init` |
|`iota_gfx_on` |`oled_on` |
|`iota_gfx_off` |`oled_off` |
|`iota_gfx_flush` |`oled_render` |
|`iota_gfx_write_char` |`oled_write_char` |
|`iota_gfx_write` |`oled_write` |
|`iota_gfx_write_P` |`oled_write_P` |
|`iota_gfx_clear_screen` |`oled_clear` |
|`matrix_clear` |*removed - delete all references* |
|`matrix_write_char_inner` |`oled_write_char` |
|`matrix_write_char` |`oled_write_char` |
|`matrix_write` |`oled_write` |
|`matrix_write_ln` |`oled_write_ln` |
|`matrix_write_P` |`oled_write_P` |
|`matrix_write_ln_P` |`oled_write_ln_P` |
|`matrix_render` |`oled_render` |
|`iota_gfx_task` |`oled_task` |
|`iota_gfx_task_user` |`oled_task_user` |
|Old API |Recommended New API |
|-------------------------|---------------------------------|
|`struct CharacterMatrix` |*removed - delete all references*|
|`iota_gfx_init` |`oled_init` |
|`iota_gfx_on` |`oled_on` |
|`iota_gfx_off` |`oled_off` |
|`iota_gfx_flush` |`oled_render` |
|`iota_gfx_write_char` |`oled_write_char` |
|`iota_gfx_write` |`oled_write` |
|`iota_gfx_write_P` |`oled_write_P` |
|`iota_gfx_clear_screen` |`oled_clear` |
|`matrix_clear` |*removed - delete all references*|
|`matrix_write_char_inner`|`oled_write_char` |
|`matrix_write_char` |`oled_write_char` |
|`matrix_write` |`oled_write` |
|`matrix_write_ln` |`oled_write_ln` |
|`matrix_write_P` |`oled_write_P` |
|`matrix_write_ln_P` |`oled_write_ln_P` |
|`matrix_render` |`oled_render` |
|`iota_gfx_task` |`oled_task` |
|`iota_gfx_task_user` |`oled_task_user` |

View File

@ -33,3 +33,7 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in
## IS31FL3733
Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
## 24xx series external I2C EEPROM
Support for an external I2C-based EEPROM instead of using the on-chip EEPROM. For more information on how to setup the driver see the [EEPROM Driver](eeprom_driver.md) page.

View File

@ -10,32 +10,34 @@
* [学習リソース](ja/newbs_learn_more_resources.md)
* [QMKの基本](ja/README.md)
* [QMKの導入](ja/getting_started_introduction.md)
* [QMK の導入](ja/getting_started_introduction.md)
* [QMK CLI](ja/cli.md)
* [QMK CLI 設定](ja/cli_configuration.md)
* [QMKへの貢献](ja/contributing.md)
* [Githubの使い方](ja/getting_started_github.md)
* [QMK への貢献](ja/contributing.md)
* [Github の使い方](ja/getting_started_github.md)
* [ヘルプ](ja/getting_started_getting_help.md)
* [破壊的な変更](ja/breaking_changes.md)
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
* [2019年8月30日](ja/ChangeLog/20190830.md)
* [FAQ](ja/faq.md)
* [一般的なFAQ](ja/faq_general.md)
* [QMKのビルド/コンパイル](ja/faq_build.md)
* [QMKのデバッグ/トラブルシューティング](ja/faq_debug.md)
* [一般的な FAQ](ja/faq_general.md)
* [QMK のビルド/コンパイル](ja/faq_build.md)
* [QMK のデバッグ/トラブルシューティング](ja/faq_debug.md)
* [キーマップ](ja/faq_keymap.md)
* [Zadigを使ったドライバのインストール](ja/driver_installation_zadig.md)
* [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md)
* 詳細なガイド
* [ビルドツールのインストール](ja/getting_started_build_tools.md)
* [Vagrantのガイド](ja/getting_started_vagrant.md)
* [Vagrant のガイド](ja/getting_started_vagrant.md)
* [ビルド/コンパイルの説明](ja/getting_started_make_guide.md)
* [ファームウェアのフラッシュ](ja/flashing.md)
* [機能のカスタマイズ](ja/custom_quantum_functions.md)
* [キーマップの概要](ja/keymap.md)
* [ハードウェア](ja/hardware.md)
* [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md)
* [AVR プロセッサ](ja/hardware_avr.md)
* [ドライバ](ja/hardware_drivers.md)
@ -66,7 +68,7 @@
* [ブートマジック](ja/feature_bootmagic.md)
* [コンボ](ja/feature_combo.md)
* [コマンド](ja/feature_command.md)
* [Debounce API](ja/feature_debounce_type.md)
* [デバウンス API](ja/feature_debounce_type.md)
* [DIP スイッチ](ja/feature_dip_switch.md)
* [動的マクロ](ja/feature_dynamic_macros.md)
* [エンコーダ](ja/feature_encoders.md)
@ -90,27 +92,31 @@
* [Stenography](ja/feature_stenography.md)
* [Swap Hands](ja/feature_swap_hands.md)
* [タップ ダンス](ja/feature_tap_dance.md)
* [Terminal](ja/feature_terminal.md)
* [ターミナル](ja/feature_terminal.md)
* [感熱式プリンタ](ja/feature_thermal_printer.md)
* [ユニコード](ja/feature_unicode.md)
* [Userspace](ja/feature_userspace.md)
* [ユーザスペース](ja/feature_userspace.md)
* [Velocikey](ja/feature_velocikey.md)
* メーカーおよびモッダーのために
* [Hand Wiring Guide](ja/hand_wire.md)
* [ISP Flashing Guide](ja/isp_flashing_guide.md)
* [Hand Wiring ガイド](ja/hand_wire.md)
* [ISP 書き込みガイド](ja/isp_flashing_guide.md)
* [ARM デバッグ ガイド](ja/arm_debugging.md)
* [ADC ドライバ](ja/adc_driver.md)
* [I2C ドライバ](ja/i2c_driver.md)
* [WS2812 ドライバ](ja/ws2812_driver.md)
* [EEPROM ドライバ](ja/eeprom_driver.md)
* [GPIO コントロール](ja/internals_gpio_control.md)
* [カスタムマトリックス](ja/custom_matrix.md)
* [Proton C 規約](ja/proton_c_conversion.md)
* より深く知るために
* [キーボードがどのように動作するか](ja/how_keyboards_work.md)
* [QMKの理解](ja/understanding_qmk.md)
* [QMK の理解](ja/understanding_qmk.md)
* 他の話題
* [EclipseQMKを使用](ja/other_eclipse.md)
* [VSCodeQMKを使用](ja/other_vscode.md)
* [EclipseQMK を使用](ja/other_eclipse.md)
* [VSCodeQMK を使用](ja/other_vscode.md)
* [サポート](ja/support.md)
* [翻訳を追加する方法](ja/translating.md)

View File

@ -64,13 +64,13 @@ Eclipse に QMK をビルドしようとするデバイスを教える必要が
## ビルド
全て正しくセットアップできていれば、ハンマーボタンを押すとファームウェアがビルドされ、.binファイルが出力されるはずです。
全て正しくセットアップできていれば、ハンマーボタンを押すとファームウェアがビルドされ、.bin ファイルが出力されるはずです。
## デバッグ
### デバッガの接続
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCUを 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
ARM MCU は、クロック信号(SWCLK) とデータ信号(SWDIO) で構成される Single Wire Debug (SWD) プロトコルを使います。MCU を 完全に操作するには、この2本のワイヤとグラウンドを接続するだけで十分です。ここでは、キーボードは USB を介して電力が供給されると想定しています。手動でリセットボタンを使えるため、RESET 信号は必要ありません。より高度なセットアップのために printf と scanf をホストに非同期にパイプする SWO 信号を使用できますが、私たちのセットアップでは無視します。
注意: SWCLK と SWDIO ピンがキーボードのマトリックスで使われていないことを確認してください。もし使われている場合は、一時的に他のピンに切り替えることができます。

View File

@ -1,8 +1,8 @@
# QMK の設定
<!---
original document: 0f43c2652:docs/config_options.md
git diff 0f43c2652 HEAD -- docs/config_options.md | cat
original document: 9ff61601e:docs/config_options.md
git diff 9ff61601e HEAD -- docs/config_options.md | cat
-->
QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。
@ -154,6 +154,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* タップされた直後に、デュアルロールキーを修飾子として使用できるようにします
* [Hold after tap](ja/feature_advanced_keycodes.md#tapping-force-hold)を見てください
* タップトグル機能を無効にします (`TT` あるいは One Shot Tap Toggle)
* `#define TAPPING_FORCE_HOLD_PER_KEY`
* キーごとの `TAPPING_FORCE_HOLD` 設定処理を有効にします。
* `#define LEADER_TIMEOUT 300`
* リーダーキーがタイムアウトするまでの時間
* タイムアウトする前にシーケンスを終了できない場合は、タイムアウトの設定を増やす必要があるかもしれません。あるいは、`LEADER_PER_KEY_TIMING` オプションを有効にすると良いでしょう。これは各キーがタップされた後でタイムアウトを再設定します。
@ -187,7 +189,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* `#define RGBLIGHT_SPLIT`
* 分割キーボードの左半分の RGB LED の出力を右半分の RGB LED の入力につなげるかわりに、それぞれの側で個別にコントローラの出力ピンが直接 RGB LED の入力に繋がっているときは、この定義が必要です。
* `#define RGBLED_SPLIT { 6, 6 }`
* 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されているLEDの数
* 分割キーボードの各半分の `RGB_DI_PIN` に直接配線されている接続されている LED の数
* 最初の値は左半分の LED の数を示し、2番目の値は右半分です。
* RGBLED_SPLIT が定義されている場合、RGBLIGHT_SPLIT は暗黙的に定義されます。
* `#define RGBLIGHT_HUE_STEP 12`
@ -216,7 +218,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
### 左右の設定
つ覚えておかなければならないことは、USB ポートが接続されている側が常にマスター側であるということです。USB に接続されていない側はスレーブです。
1つ覚えておかなければならないことは、USB ポートが接続されている側が常にマスター側であるということです。USB に接続されていない側はスレーブです。
分割キーボードの左右を設定するには、幾つかの異なる方法があります (優先度の順にリストされています):
@ -260,7 +262,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
* `#define SELECT_SOFT_SERIAL_SPEED <speed>` (デフォルトの速度は1です)
* serial 通信を使う時のプロトコルの速度を設定します。
* 速度:
* 0: 約189kbps (実験目的のみ)
* 0: 約 189kbps (実験目的のみ)
* 1: 約 137kbps (デフォルト)
* 2: 約 75kbps
* 3: 約 39kbps

View File

@ -63,7 +63,7 @@ QMK Configurator は Chrome/Firefox で最適に動作します。
2分割の右シフト: 両方とも右シフトで埋めます。
左シフトとISOサポート用に1つずつ: 両方とも左シフトで埋めます。
左シフトと ISO サポート用に1つずつ: 両方とも左シフトで埋めます。
5分割だが4キーのみ: 以前やったことがある人を推測して確認するか尋ねてください。
@ -73,7 +73,7 @@ QMK Configurator は Chrome/Firefox で最適に動作します。
後日、`Import Keymap` ボタンを押すことで、この .json ファイルをロードできます。
!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .jsonファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。
!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .json ファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。
## ファームウェアファイルを生成する

View File

@ -13,7 +13,7 @@
キーボードに書き込む最も簡単な方法は [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) を使うことです。
ただし、QMK Toolbox は、現在は Windows と macOS でしか使えません。
Linuxを使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](ja/newbs_flashing.md#flash-your-keyboard-from-the-command-line)で行なう必要があります。
Linux を使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、下の方で概説する[方法](ja/newbs_flashing.md#flash-your-keyboard-from-the-command-line)で行なう必要があります。
### QMK Toolbox にファイルをロードする
@ -65,7 +65,7 @@ planck_rev5_default.hex
* 基板(PCB)に付けられている物理的な `RESET` ボタンを押す
* PCB 上の `BOOT0``RESET` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする
うまくいけば、QMK Toolboxに次のようなメッセージが表示されます。
うまくいけば、QMK Toolbox に次のようなメッセージが表示されます。
```
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
@ -121,7 +121,7 @@ QMK Toolbox の `Flash` ボタンをクリックします。
この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。
ブートローダは主に 5 種類のものが使われています。
Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKBの AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。
Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKB の AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。
より詳しいブートローダの情報は、[Flashing Instructions and Bootloader Information](ja/flashing.md) にあります。
@ -178,10 +178,10 @@ Checking file size of planck_rev5_xyverz.hex
ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。
* `:dfu` - これが通常のオプションで、DFUデバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFUデバイスが存在するかチェックしています。
* `:dfu` - これが通常のオプションで、DFU デバイスが使用可能になるまで待機したのちファームウェアを書き込みます。5秒ごとに、DFU デバイスが存在するかチェックしています。
* `:dfu-ee` - 通常の hex ファイルの代わりに `eep` ファイルを書き込みます。これを使用するのはまれです。
* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_
* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_
* `:dfu-split-left` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」 EEPROM ファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_
* `:dfu-split-right` - デフォルトオプション (`:dfu`) と同様に、通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROM ファイルも書き込まれます。_これは、Elite C ベースの分割キーボードに最適です。_
### Caterina
@ -259,8 +259,8 @@ avrdude.exe done. Thank you.
* `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。
* `:avrdude-loop` - これは `:avrdude` と同じです。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへの書き込みに便利です。_Control+C を押して、手動でこの繰り返しを終了させる必要があります。_
* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_
* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROMファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_
* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROM ファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_
* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROM ファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_
### HalfKay

View File

@ -12,7 +12,7 @@ QMK は、そのソフトウェアの役割を果たし、ボタンの押下を
カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。
QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。
パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけでOKです。
パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけで OK です。
# はじめに

View File

@ -7,7 +7,7 @@
-->
仮にあなたの `master` ブランチにあなたのコミットを行い、そしてあなたの QMK リポジトリの更新が必要になったとします。
(フォーク元の) QMKの `master` ブランチをあなたの `master` ブランチに `git pull` することもできますが、GitHub は、あなたのブランチが `qmk:master` より何コミットか先行していると通知します、この状態で QMK にプルリクエストを行う場合、問題が発生する可能性があります。
(フォーク元の) QMK `master` ブランチをあなたの `master` ブランチに `git pull` することもできますが、GitHub は、あなたのブランチが `qmk:master` より何コミットか先行していると通知します、この状態で QMK にプルリクエストを行う場合、問題が発生する可能性があります。
(訳注この通知は、GitHub のあなたのリポジトリの code ペインのブランチ選択メニューの下のあたりで `This branch is 3 commit ahead of qmk:master` という様な文面で表示されています。)
?> このドキュメントは [あなたのフォークの master ブランチ: 更新は頻繁に、コミットはしないこと](ja/newbs_git_using_your_master_branch.md) で詳述されている概念に基づいています。その概念に慣れていない場合は、まずそれを読んでから、ここに戻ってください。

View File

@ -41,7 +41,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push)
このコマンドは `upstream` というニックネームを持つ QMK リポジトリから、ブランチとタグ &mdash; "refs" と総称されます &mdash; を取得します。
これで、あなたのフォーク `origin` のデータを QMK が保持するデータと比較できます。
あなたのフォークの `master` を更新するには、次を実行します、各行の後にEnterキーを押してください:
あなたのフォークの `master` を更新するには、次を実行します、各行の後に Enter キーを押してください:
```
git checkout master
@ -98,4 +98,4 @@ git commit -m "My commit message."
最後のステップは、変更をフォークにプッシュすることです。
これを行うには、`git push`と入力します。
Gitは、 `dev_branch`の現在の状態をフォークに公開します。
Git は、 `dev_branch`の現在の状態をフォークに公開します。

View File

@ -6,7 +6,7 @@
git diff ed0575fc8 HEAD -- docs/newbs_learn_more_resources.md | cat
-->
これらのリソースは、QMKコミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。
これらのリソースは、QMK コミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。
## Git に関するリース:

View File

@ -12,7 +12,7 @@
通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。
メモ これらのプログラムはQMKによって提供・承認されたものではありません。
メモ: これらのプログラムは QMK によって提供・承認されたものではありません。
* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based)
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only)
@ -40,7 +40,7 @@ void keyboard_post_init_user(void) {
### hid_listenを使ったデバッグ
ターミナルベースの方法がお好みですかPJRCが提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルはWindows, Linux, MacOS用が用意されています。
ターミナルベースの方法がお好みですかPJRC が提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルは Windows, Linux, MacOS 用が用意されています。
<!-- FIXME: Describe the debugging messages here. -->
@ -50,7 +50,7 @@ void keyboard_post_init_user(void) {
#include <print.h>
そのあとは、いくつかの異なったprint関数を使用することが出来ます。
そのあとは、いくつかの異なった print 関数を使用することが出来ます。
* `print("string")`: シンプルな文字列を出力します
* `uprintf("%s string", var)`: フォーマットされた文字列を出力します

View File

@ -29,8 +29,6 @@
#include <string.h>
#include <hal.h>
static uint8_t i2c_address;
static const I2CConfig i2cconfig = {
#ifdef USE_I2CV1
I2C1_OPMODE,
@ -71,27 +69,49 @@ __attribute__((weak)) void i2c_init(void) {
}
i2c_status_t i2c_start(uint8_t address) {
i2c_address = address;
#if I2C_USE_MUTUAL_EXCLUSION
i2cAcquireBus(&I2C_DRIVER);
#endif
i2cStart(&I2C_DRIVER, &i2cconfig);
return I2C_STATUS_SUCCESS;
}
i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_address = address;
#if I2C_USE_MUTUAL_EXCLUSION
i2cAcquireBus(&I2C_DRIVER);
#endif
i2cStart(&I2C_DRIVER, &i2cconfig);
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (address >> 1), data, length, 0, 0, MS2ST(timeout));
#if I2C_USE_MUTUAL_EXCLUSION
i2cReleaseBus(&I2C_DRIVER);
#endif
return chibios_to_qmk(&status);
}
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_address = address;
#if I2C_USE_MUTUAL_EXCLUSION
i2cAcquireBus(&I2C_DRIVER);
#endif
i2cStart(&I2C_DRIVER, &i2cconfig);
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (address >> 1), data, length, MS2ST(timeout));
#if I2C_USE_MUTUAL_EXCLUSION
i2cReleaseBus(&I2C_DRIVER);
#endif
return chibios_to_qmk(&status);
}
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_address = devaddr;
#if I2C_USE_MUTUAL_EXCLUSION
i2cAcquireBus(&I2C_DRIVER);
#endif
i2cStart(&I2C_DRIVER, &i2cconfig);
uint8_t complete_packet[length + 1];
@ -100,15 +120,34 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data,
}
complete_packet[0] = regaddr;
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
#if I2C_USE_MUTUAL_EXCLUSION
i2cReleaseBus(&I2C_DRIVER);
#endif
return chibios_to_qmk(&status);
}
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_address = devaddr;
#if I2C_USE_MUTUAL_EXCLUSION
i2cAcquireBus(&I2C_DRIVER);
#endif
i2cStart(&I2C_DRIVER, &i2cconfig);
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), &regaddr, 1, data, length, MS2ST(timeout));
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (devaddr >> 1), &regaddr, 1, data, length, MS2ST(timeout));
#if I2C_USE_MUTUAL_EXCLUSION
i2cReleaseBus(&I2C_DRIVER);
#endif
return chibios_to_qmk(&status);
}
void i2c_stop(void) { i2cStop(&I2C_DRIVER); }
void i2c_stop(void) {
i2cStop(&I2C_DRIVER);
#if I2C_USE_MUTUAL_EXCLUSION
i2cReleaseBus(&I2C_DRIVER);
#endif
}

View File

@ -24,8 +24,8 @@
/*
* Board identifier.
*/
#define BOARD_GENERIC_STM32_F103
#define BOARD_NAME "Generic STM32F103x board"
#define BOARD_STM32_F103_STM32DUINO
#define BOARD_NAME "GENERIC STM32F103C8T6 board - stm32duino bootloader"
/*
* Board frequencies.

View File

@ -0,0 +1,5 @@
# List of all the board related files.
BOARDSRC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO/board.c
# Required include directories
BOARDINC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO

View File

@ -0,0 +1,46 @@
/* Copyright 2019 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <string.h>
#include "eeprom_driver.h"
void eeprom_driver_init(void) {
/* Any initialisation code */
}
void eeprom_driver_erase(void) {
/* Wipe out the EEPROM, setting values to zero */
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
/*
Read a block of data:
buf: target buffer
addr: 0-based offset within the EEPROM
len: length to read
*/
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
/*
Write a block of data:
buf: target buffer
addr: 0-based offset within the EEPROM
len: length to write
*/
}

View File

@ -0,0 +1,73 @@
/* Copyright 2019 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <string.h>
#include "eeprom_driver.h"
uint8_t eeprom_read_byte(const uint8_t *addr) {
uint8_t ret;
eeprom_read_block(&ret, addr, 1);
return ret;
}
uint16_t eeprom_read_word(const uint16_t *addr) {
uint16_t ret;
eeprom_read_block(&ret, addr, 2);
return ret;
}
uint32_t eeprom_read_dword(const uint32_t *addr) {
uint32_t ret;
eeprom_read_block(&ret, addr, 4);
return ret;
}
void eeprom_write_byte(uint8_t *addr, uint8_t value) { eeprom_write_block(&value, addr, 1); }
void eeprom_write_word(uint16_t *addr, uint16_t value) { eeprom_write_block(&value, addr, 2); }
void eeprom_write_dword(uint32_t *addr, uint32_t value) { eeprom_write_block(&value, addr, 4); }
void eeprom_update_block(const void *buf, void *addr, size_t len) {
uint8_t read_buf[len];
eeprom_read_block(read_buf, addr, len);
if (memcmp(buf, read_buf, len) != 0) {
eeprom_write_block(buf, addr, len);
}
}
void eeprom_update_byte(uint8_t *addr, uint8_t value) {
uint8_t orig = eeprom_read_byte(addr);
if (orig != value) {
eeprom_write_byte(addr, value);
}
}
void eeprom_update_word(uint16_t *addr, uint16_t value) {
uint16_t orig = eeprom_read_word(addr);
if (orig != value) {
eeprom_write_word(addr, value);
}
}
void eeprom_update_dword(uint32_t *addr, uint32_t value) {
uint32_t orig = eeprom_read_dword(addr);
if (orig != value) {
eeprom_write_dword(addr, value);
}
}

View File

@ -0,0 +1,22 @@
/* Copyright 2019 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "eeprom.h"
void eeprom_driver_init(void);
void eeprom_driver_erase(void);

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