Compare commits

..

76 Commits

Author SHA1 Message Date
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
1018 changed files with 13986 additions and 10633 deletions

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

@ -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

@ -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);

120
drivers/eeprom/eeprom_i2c.c Normal file
View File

@ -0,0 +1,120 @@
/* Copyright 2019 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <string.h>
/*
Note that the implementations of eeprom_XXXX_YYYY on AVR are normally
provided by avr-libc. The same functions are reimplemented below and are
rerouted to the external i2c equivalent.
Seemingly, as this is compiled from within QMK, the object file generated
during the build overrides the avr-libc implementation during the linking
stage.
On other platforms such as ARM, there are no provided implementations, so
there is nothing to override during linkage.
*/
#include "wait.h"
#include "i2c_master.h"
#include "eeprom.h"
#include "eeprom_i2c.h"
// #define DEBUG_EEPROM_OUTPUT
#ifdef DEBUG_EEPROM_OUTPUT
# include "print.h"
#endif // DEBUG_EEPROM_OUTPUT
static inline void init_i2c_if_required(void) {
static int done = 0;
if (!done) {
i2c_init();
done = 1;
}
}
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
intptr_t p = (intptr_t)addr;
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
buffer[EXTERNAL_EEPROM_ADDRESS_SIZE - 1 - i] = p & 0xFF;
p >>= 8;
}
}
void eeprom_driver_init(void) {}
void eeprom_driver_erase(void) {
uint8_t buf[EXTERNAL_EEPROM_PAGE_SIZE];
memset(buf, 0x00, EXTERNAL_EEPROM_PAGE_SIZE);
for (intptr_t addr = 0; addr < EXTERNAL_EEPROM_BYTE_COUNT; addr += EXTERNAL_EEPROM_PAGE_SIZE) {
eeprom_write_block(buf, (void *)addr, EXTERNAL_EEPROM_PAGE_SIZE);
}
}
void eeprom_read_block(void *buf, const void *addr, size_t len) {
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE];
fill_target_address(complete_packet, addr);
init_i2c_if_required();
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), buf, len, 100);
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM R] 0x%04X: ", ((int)addr));
for (size_t i = 0; i < len; ++i) {
dprintf(" %02X", (int)(((uint8_t *)buf)[i]));
}
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + EXTERNAL_EEPROM_PAGE_SIZE];
uint8_t *read_buf = (uint8_t *)buf;
intptr_t target_addr = (intptr_t)addr;
init_i2c_if_required();
while (len > 0) {
intptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
if (write_length > len) {
write_length = len;
}
fill_target_address(complete_packet, (const void *)target_addr);
for (uint8_t i = 0; i < write_length; i++) {
complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + i] = read_buf[i];
}
#ifdef DEBUG_EEPROM_OUTPUT
dprintf("[EEPROM W] 0x%04X: ", ((int)target_addr));
for (uint8_t i = 0; i < write_length; i++) {
dprintf(" %02X", (int)(read_buf[i]));
}
dprintf("\n");
#endif // DEBUG_EEPROM_OUTPUT
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((intptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE + write_length, 100);
wait_ms(EXTERNAL_EEPROM_WRITE_TIME);
read_buf += write_length;
target_addr += write_length;
len -= write_length;
}
}

115
drivers/eeprom/eeprom_i2c.h Normal file
View File

@ -0,0 +1,115 @@
/* Copyright 2019 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*
Default device configurations:
For the Sparkfun Qwiic I2C EEPROM module: https://www.sparkfun.com/products/14764
#define EEPROM_I2C_CAT24C512 // (part number 24512A)
#define EEPROM_I2C_RM24C512C // (part number 24512C)
For the Sparkfun I2C EEPROM chip: https://www.sparkfun.com/products/525
#define EEPROM_I2C_24LC256
For the Adafruit I2C FRAM chip: https://www.adafruit.com/product/1895
#define EEPROM_I2C_MB85RC256V
*/
#if defined(EEPROM_I2C_CAT24C512)
# define EXTERNAL_EEPROM_BYTE_COUNT 65536
# define EXTERNAL_EEPROM_PAGE_SIZE 128
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 5
#elif defined(EEPROM_I2C_RM24C512C)
# define EXTERNAL_EEPROM_BYTE_COUNT 65536
# define EXTERNAL_EEPROM_PAGE_SIZE 128
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 3
#elif defined(EEPROM_I2C_24LC256)
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
# define EXTERNAL_EEPROM_PAGE_SIZE 64
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 5
#elif defined(EEPROM_I2C_24LC128)
# define EXTERNAL_EEPROM_BYTE_COUNT 16384
# define EXTERNAL_EEPROM_PAGE_SIZE 64
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 5
#elif defined(EEPROM_I2C_MB85RC256V)
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
# define EXTERNAL_EEPROM_PAGE_SIZE 128
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
# define EXTERNAL_EEPROM_WRITE_TIME 0
#endif
/*
The base I2C address of the EEPROM.
This needs to be shifted up by 1, to match i2c_master requirements.
*/
#ifndef EXTERNAL_EEPROM_I2C_BASE_ADDRESS
# define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000
#endif
/*
The calculated I2C address based on the input memory location.
For EEPROM chips that embed part of the memory location in the I2C address
such as AT24M02 you can use something similar to the following (ensuring the
result is shifted by left by 1):
#define EXTERNAL_EEPROM_I2C_ADDRESS(loc) \
(EXTERNAL_EEPROM_I2C_BASE_ADDRESS | ((((loc) >> 16) & 0x07) << 1))
*/
#ifndef EXTERNAL_EEPROM_I2C_ADDRESS
# define EXTERNAL_EEPROM_I2C_ADDRESS(loc) (EXTERNAL_EEPROM_I2C_BASE_ADDRESS)
#endif
/*
The total size of the EEPROM, in bytes. The EEPROM datasheet will usually
specify this value in kbits, and will require conversion to bytes.
*/
#ifndef EXTERNAL_EEPROM_BYTE_COUNT
# define EXTERNAL_EEPROM_BYTE_COUNT 8192
#endif
/*
The page size in bytes of the EEPROM, as specified in the datasheet.
*/
#ifndef EXTERNAL_EEPROM_PAGE_SIZE
# define EXTERNAL_EEPROM_PAGE_SIZE 32
#endif
/*
The address size in bytes of the EEPROM. For EEPROMs with <=256 bytes, this
will likely be 1. For EEPROMs >256 and <=65536, this will be 2. For EEPROMs
>65536, this will likely need to be 2 with the modified variant of
EXTERNAL_EEPROM_I2C_ADDRESS above.
As expected, consult the datasheet for specifics of your EEPROM.
*/
#ifndef EXTERNAL_EEPROM_ADDRESS_SIZE
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
#endif
/*
The write cycle time of the EEPROM in milliseconds, as specified in the
datasheet.
*/
#ifndef EXTERNAL_EEPROM_WRITE_TIME
# define EXTERNAL_EEPROM_WRITE_TIME 5
#endif

View File

@ -0,0 +1,52 @@
/* Copyright 2019 Nick Brassel (tzarc)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <string.h>
#include "eeprom_driver.h"
#include "eeprom_transient.h"
__attribute__((aligned(4))) static uint8_t transientBuffer[TRANSIENT_EEPROM_SIZE] = {0};
size_t clamp_length(intptr_t offset, size_t len) {
if (offset + len > TRANSIENT_EEPROM_SIZE) {
len = TRANSIENT_EEPROM_SIZE - offset;
}
return len;
}
void eeprom_driver_init(void) { eeprom_driver_erase(); }
void eeprom_driver_erase(void) { memset(transientBuffer, 0x00, TRANSIENT_EEPROM_SIZE); }
void eeprom_read_block(void *buf, const void *addr, size_t len) {
intptr_t offset = (intptr_t)addr;
memset(buf, 0x00, len);
len = clamp_length(offset, len);
if (len > 0) {
memcpy(buf, &transientBuffer[offset], len);
}
}
void eeprom_write_block(const void *buf, void *addr, size_t len) {
intptr_t offset = (intptr_t)addr;
len = clamp_length(offset, len);
if (len > 0) {
memcpy(&transientBuffer[offset], buf, len);
}
}

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