Commit Graph

976 Commits (de8fada3a3635f0fc6f1509ea2c0ac53ee880cf5)

Author SHA1 Message Date
Ryan d949932c08
Fix ChibiOS backlight not turning off on suspend (#10114)
* Fix ChibiOS backlight not turning off on suspend

* Add missing code for backlight as caps lock too
2020-08-26 11:15:43 -07:00
Nick Brassel 70ce4ba56f
Revert "Add Kiibohd bootloader type to bootloader.mk (#9908)" (#10126)
This reverts commit e2d4cd1a41.
2020-08-21 15:42:28 -07:00
Ryan e2d4cd1a41
Add Kiibohd bootloader type to bootloader.mk (#9908) 2020-08-12 12:28:20 +10:00
Drashna Jaelre c7b56bee96
[Bug] Fix Swap Hands bug introduced by OSH (#9968)
Fixes the handling for the oneshot cleanup, so it only cleans up if it is active.  It should not cleanup of SHO is off (eg using a normal oneshot key), nor if it's actively pressed or used.  

Previous behavior BROKE swap hand key.
2020-08-08 16:41:10 -07:00
QMK Bot 95c742ec27 format code according to conventions [skip ci] 2020-07-25 22:33:55 +00:00
Joel Challis d91987ab9a
Enable OLED support for Teensy 3.2/LC (#7591)
* I2C_TIMEOUT is not defined on arm teensy

* Work round teensy having different ChibiOS config options

* Stash OLED conf files

* update comment

* update comment

* Remove stm32 alias to allow teensy alt mode
2020-07-26 07:50:56 +10:00
QMK Bot 1778858e24 format code according to conventions [skip ci] 2020-07-21 00:09:52 +00:00
nathanvercaemert 19006c9753
Implemented New MK_COMBINED Functionality (#9557)
* implemented new mousekey_combined functionality

* minor formatting change to documentation

* Update tmk_core/common/mousekey.c

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

* Update tmk_core/common/mousekey.c

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

* Update tmk_core/common/mousekey.c

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

* Update tmk_core/common/mousekey.c

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

* Update docs/feature_mouse_keys.md

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

* Update docs/feature_mouse_keys.md

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

* Update docs/feature_mouse_keys.md

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

* Update docs/feature_mouse_keys.md

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

Co-authored-by: Nathan Vercaemert <nathan.vercaemert@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-07-21 09:28:38 +10:00
Ryan 72d3270547
Remove `DESCRIPTION` (#9732) 2020-07-16 15:49:18 +10:00
Sven Grunewaldt 03c790a0f2
Add TAP_CODE_DELAY to Mod-Tap (#9422) 2020-07-07 21:47:59 +01:00
Manna Harbour b7dc2eb9ab
Add movement hook to ps2_mouse (#8805)
Process mouse movement in the keymap before it is sent to the host. Example uses
include filtering noise, adding acceleration, and automatically activating a
layer. To use, define the following function in your keymap:

void ps2_mouse_moved_user(report_mouse_t *mouse_report);
2020-07-02 21:54:15 +01:00
Manna Harbour d1819f02df
Fix sharing of mouse button state from mousekeys to ps2_mouse (#9124)
With this change, when ps2_mouse is disabled, mousekeys works as usual. With
ps2_mouse enabled, mousekeys button state is shared with ps2_mouse for clicking,
dragging, and scrolling, mousekeys clicks are produced by ps2_mouse only, and
mouskeys button state is transferred to mousekeys without generating clicks to
enable mousekeys dragging.

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

Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-07-02 18:04:55 +01:00
AlexOConnorHub 82dc8faaf3
Fixing MIDI for ARM without NKRO enabled (#9466) 2020-06-22 08:43:08 +01:00
Joshua Diamond 9c1097e768
Fix for One Shot Layer not being cleaned up after some actions (#8832) 2020-06-18 08:07:48 +01:00
Tsan-Kuang Lee 437446ba8f
Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (#9296)
* init

* add RETRO_TAP; tap anyway after TAP_TERM, if no interruption

* RETRO_TAP works for other types of taps

* revert to upstream/master

* explain this fork in readme

* use one readme.md file instaed

* fix the error if NO_ACTION_ONESHOT is defined

* restore readme.md to upstream master

Co-authored-by: Tsan-Kuang Lee <tsan.kuang.lee@gmail.com>
2020-06-10 22:40:17 +01:00
itsnoteasy 7aa4cc9603
adds support for the atmega328 (#9043)
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-06-10 22:23:11 +01:00
Joel Challis d17572b125
Move encoder_read to common location (#9003) 2020-06-03 00:54:53 +01:00
Drashna Jaelre 1110fe6c6f
Move dip switch init to back of the init process (#9233) 2020-06-03 00:32:02 +01:00
Nick Brassel 8d3fca57a3
Fix build when using IGNORE_MOD_TAP_INTERRUPT_PER_KEY. (#9258) 2020-06-01 11:53:01 +10:00
James Young fced377ac0
2020 May 30 Breaking Changes Update (#9215)
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968)

* Convert V-USB usbdrv to a submodule (#8321)

* Unify Tap Hold functions and documentation (#8348)

* Changing board names to prevent confusion (#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (#8499)

* Move spaceman keyboards (#8830)

* Migrate miscellaneous `fn_actions` entries (#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (#8537)

* Refactor Lily58 to use split_common (#6260)

* Refactor zinc to use split_common (#7114)

* Add a message if bin/qmk doesn't work (#9000)

* Fix conflicting types for 'tfp_printf' (#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480)

* Refactor and updates to TKC1800 code (#8472)

* Switch to qmk forks for everything (#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484)

* Audio enable corrections (2/3) (#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582)

* Audio enable corrections (Part 4) (#8974)

* Fix typo from PR7114 (#9171)

* Augment future branch Changelogs (#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
2020-05-30 13:14:59 -07:00
Ryan e4823aadec
Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
yulei d8f76f9e6d
Added missing shutdown_user() hook (#9180)
* add missing shutdown_user()

* use reset_keyboard() from quantum
2020-05-25 22:16:33 +10:00
Nick Brassel d1df576ece
Allow for overriding RAW endpoint usage page and ID. (#8834)
* Allow for overriding RAW endpoint usage page and ID.

* Move usb_descriptor_common.h.

* Docs update.
2020-05-21 20:31:42 +10:00
Joel Challis b0c780ed32
Fix ChibiOS FPU build logic (#9132) 2020-05-20 16:28:39 +01:00
Drashna Jaelre ef5fad137b
Disable Mousekey Command interface when Constant speed is enabled (#7017) 2020-05-19 07:29:20 -04:00
Erovia 6b54f3ce1c CLI: Tune doctor's udev rule checking to match #8750 2020-05-15 12:59:46 -07:00
yiancar 632285c982
V-USB Interface reorder (#9090) 2020-05-14 10:24:18 +10:00
Zsolt Parragi 805f5cb72b
One shot support for swap hands (#8590)
This commits add the SH_OS keycode, which works similarly to one shot
layers:
* while pressed, the keyboard is swapped
* if no keys were pressed while it was pressed, the next key press is
swapped

SH_OS also supports chaining with one shot layers:
OSL(x) + SH_OS + key interprets the key press on the oneshot layer.

The ONESHOT_TIMEOUT setting used by one shot keys and layers is also
used by oneshot swap hands. In the above chaining scenario the timeout
of the oneshot layer is reset when swap hands is activated.

Resolves #2682
2020-05-14 07:36:55 +10:00
Alex Ong 361ac2f32a
Optimization for scanning less layers. (#8311)
* Optimization for scanning less layers.

* Rename NUM_LAYERS to MAX_LAYER.
2020-05-11 01:04:38 +01:00
Zach White 640d12d070
Improve security of avrdude by eliminating the use of well-known names. (#9026)
* Improve security by eliminating the use of well-known names.

* Add an additional $ so the shell expands $TMP1 and $TMP2

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

Co-authored-by: Joel Challis <git@zvecr.com>
2020-05-10 04:08:13 +01:00
Joel Challis adda5d7770
Revert "Use nano specs (#8270)" (#9044)
This reverts commit c775104b9f.
2020-05-08 14:51:00 +01:00
Ryan d646cba72a
Remove Bluefruit protocol (#9008)
* Remove Bluefruit protocol

* Remove dir from doxygen TODO pile
2020-05-04 23:05:45 +01:00
skullY 6f30b402a2 Revert "Fix conflicting types for 'tfp_printf' (#8269)"
This reverts commit e17b55e33a.
2020-05-04 09:25:44 -07:00
QMK Bot 1ff526dac0 format code according to conventions [skip ci] 2020-05-04 06:59:44 +00:00
Joel Challis e17b55e33a
Fix conflicting types for 'tfp_printf' (#8269)
* Refactor to use mpaland/printf

* trim firmware size

* remove keymap changes

* run clang format

* Fixup after rebase

* fix up git-submodule command for printf
2020-05-03 23:19:51 -07:00
Joel Challis 5f82b0782f
Initial vusb console support (#8559) 2020-05-03 01:25:39 +01:00
Joshua Moses Diamond 2e6959ed87
Add some usages needed for ChromeOS hosts (#8996) 2020-05-03 10:24:11 +10:00
Joel Challis c482a2944b
Provide a mechanism for split keyboards to process key press on both halves (#9001) 2020-05-03 00:39:37 +01:00
zvecr 406dc2fb2d Move encoder_read to common location 2020-05-02 22:44:36 +01:00
Joel Challis 374525c995
Allow some usbconfig.h overrides at the keyboard level (#8647) 2020-04-29 00:17:54 +01:00
Ryan 99f7fe6bd4
Clean up ATSAM ifdefs (#8808) 2020-04-20 15:38:34 -07:00
Chris Ko 9b70e53508
[Docs] Fixed minor typos (#8860) 2020-04-19 23:04:26 +01:00
Ryan bc13dcd349
Remove Atmel FLIP from install scripts and documentation (#8822) 2020-04-17 09:50:58 +02:00
Nick Brassel 46e4493761
Fix AVR SPI parameter configuration, remove timeouts due to sync protocol. (#8775) 2020-04-13 17:09:50 +10:00
Nick Brassel 05e9ff6554
Add support for hardware and board initialisation overrides. (#8330)
* Add support for hardware and board initialisation overrides.

* qmk cformat.

* Add some documentation.

* Docs clarity.

* Make early_hardware_init_pre a no-op for now, until migrations occur.

* Doco update

* Make distinction between keyboard and ChibiOS board in docs

* Doc anchors.

* Update tmk_core/protocol/chibios/main.c

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

* Rework bootloader entry to be off by default, allow opting-in.

Co-authored-by: Joel Challis <git@zvecr.com>
2020-04-13 09:39:38 +10:00
Konstantin Đorđević 370577e4ed
Add *OPT aliases for *ALT keycodes and macros (#8714) 2020-04-12 11:37:55 -07:00
Drashna Jaelre 23124b9fd1
Fix bug with layer caching in get_event_keycode (#8693)
* Fix bug with layer caching in get_event_keycode

* Improve naming
2020-04-12 17:27:17 +02:00
QMK Bot cc38627816 format code according to conventions [skip ci] 2020-04-11 00:48:16 +00:00
Purdea Andrei 6c2c3c13e9
Various fixes to how timer differences are calculated (#8585)
* tmk_core/common: Fixing TIMER_DIFF macro to calculate difference correctly after the timer wraps.

Let's go through an example, using the following macro:

If the first timer read is 0xe4 and the second one is 0x32, the timer wrapped.
If the timer would have had more bits, it's new value would have been 0x132,
and the correct difference in time is 0x132 - 0xe4 = 0x4e

old code TIMER_DIFF_8(0x32, 0xe4) = 0xff - 0xe4 + 0x32 = 0x4d, which is wrong.
new code TIMER_DIFF_8(0x32, 0xe4) = 0xff + 1 - 0xe4 + 0x32 = 0x4e, which is correct.

This also gives a chance for a smart compiler to optimize the code using normal
integer overflow.

For example on AVR, the following C code:
uint8_t __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
    return TIMER_DIFF_8(current_timer, start_timer);
}
With the original code, it gets translated to the following list of instructions:
00004c6e <test>:
    4c6e:       98 2f           mov     r25, r24
    4c70:       86 1b           sub     r24, r22
    4c72:       96 17           cp      r25, r22
    4c74:       08 f4           brcc    .+2             ; 0x4c78 <test+0xa>
    4c76:       81 50           subi    r24, 0x01       ; 1
    4c78:       08 95           ret
But with this commit, it gets translated to a single instruction:
00004c40 <test>:
    4c40:       86 1b           sub     r24, r22
    4c42:       08 95           ret

This unfortunately doesn't always work so nicely, for example the following C code:
int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
    return TIMER_DIFF_8(current_timer, start_timer);
}
(Note: return type changed to int)
With the original code it gets translated to:
00004c6e <test>:
    4c6e:       28 2f           mov     r18, r24
    4c70:       30 e0           ldi     r19, 0x00       ; 0
    4c72:       46 2f           mov     r20, r22
    4c74:       50 e0           ldi     r21, 0x00       ; 0
    4c76:       86 17           cp      r24, r22
    4c78:       20 f0           brcs    .+8             ; 0x4c82 <test+0x14>
    4c7a:       c9 01           movw    r24, r18
    4c7c:       84 1b           sub     r24, r20
    4c7e:       95 0b           sbc     r25, r21
    4c80:       08 95           ret
    4c82:       c9 01           movw    r24, r18
    4c84:       84 1b           sub     r24, r20
    4c86:       95 0b           sbc     r25, r21
    4c88:       81 50           subi    r24, 0x01       ; 1
    4c8a:       9f 4f           sbci    r25, 0xFF       ; 255
    4c8c:       08 95           ret
Wth this commit it gets translated to:
00004c40 <test>:
    4c40:       28 2f           mov     r18, r24
    4c42:       30 e0           ldi     r19, 0x00       ; 0
    4c44:       46 2f           mov     r20, r22
    4c46:       50 e0           ldi     r21, 0x00       ; 0
    4c48:       86 17           cp      r24, r22
    4c4a:       20 f0           brcs    .+8             ; 0x4c54 <test+0x14>
    4c4c:       c9 01           movw    r24, r18
    4c4e:       84 1b           sub     r24, r20
    4c50:       95 0b           sbc     r25, r21
    4c52:       08 95           ret
    4c54:       c9 01           movw    r24, r18
    4c56:       84 1b           sub     r24, r20
    4c58:       95 0b           sbc     r25, r21
    4c5a:       93 95           inc     r25
    4c5c:       08 95           ret
There is not much performance improvement in this case, however at least with this
commit it functions correctly.

Note: The following commit will improve compiler output for the latter example.

* tmk_core/common: Improve code generation for TIMER_DIFF* macros

Because of integer promotion the compiler is having a hard time generating
efficient code to calculate TIMER_DIFF* macros in some situations.
In the below example, the return value is "int", and this is causing the
trouble.

Example C code:

int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer)
{
    return TIMER_DIFF_8(current_timer, start_timer);
}

BEFORE: (with -Os)

00004c40 <test>:
    4c40:       28 2f           mov     r18, r24
    4c42:       30 e0           ldi     r19, 0x00       ; 0
    4c44:       46 2f           mov     r20, r22
    4c46:       50 e0           ldi     r21, 0x00       ; 0
    4c48:       86 17           cp      r24, r22
    4c4a:       20 f0           brcs    .+8             ; 0x4c54 <test+0x14>
    4c4c:       c9 01           movw    r24, r18
    4c4e:       84 1b           sub     r24, r20
    4c50:       95 0b           sbc     r25, r21
    4c52:       08 95           ret
    4c54:       c9 01           movw    r24, r18
    4c56:       84 1b           sub     r24, r20
    4c58:       95 0b           sbc     r25, r21
    4c5a:       93 95           inc     r25
    4c5c:       08 95           ret

AFTER: (with -Os)

00004c40 <test>:
    4c40:       86 1b           sub     r24, r22
    4c42:       90 e0           ldi     r25, 0x00       ; 0
    4c44:       08 95           ret

Note: the example is showing -Os but improvements can be seen at all optimization levels,
including -O0. We never use -O0, but I tested it to make sure that no extra code is
generated in that case.OA

* quantum/debounce: Fix custom wrapping timers in eager_pr and eager_pk debounce algorithms

Please see the below simulated sequence of events:
Column A is the 16-bit value returned by read_timer();
Column B is the value returned by custom_wrap_timer_read();
Column C is the original code: (timer_read() % MAX_DEBOUNCE)

    A,     B,     C
65530,    19,    30
65531,    20,    31
65532,    21,    32
65533,    22,    33
65534,    23,    34
65535,    24,    35
    0     25,     0
    1,    26,     1
    2,    27,     2
    3,    28,     3
    4,    29,     4
    5,    30,     5

read_timer() wraps about every 1.09 seconds, and so debouncing might
fail at these times without this commit.

* quantum/debounce/eager_pr and eager_pk: modifications for code readability according to code review.

* quantum/debounce/eager_pr and eager_pk: modifications for code readability according to code review. (2)
2020-04-11 10:14:28 +10:00
Manna Harbour 07c75feba3
Add PS2_MOUSE_ROTATE to compensate for device orientation (#8650)
* Add PS2_MOUSE_ROTATE to compensate for device orientation

* fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation

* Reformat with IndentPPDirectives: AfterHash as per #6316
2020-04-09 01:29:27 -07:00
Konstantin Đorđević be2f5816b6
Fix compile issues related to NO_ACTION_MACRO/FUNCTION and LTO_ENABLE (#8663)
* Define NO_ACTION_MACRO/FUNCTION in header instead of makefile when LTO is enabled

Currently, boards and keymaps that define NO_ACTION_MACRO/FUNCTION unconditionally
will not compile with LTO_ENABLE (#8604). This fixes the issue by moving the
definitions from common.mk to action.h, which enables us to check for previous
definitions of those macros (this cannot be done in a makefile).

* Remove LTO checks in templates

Since now NO_ACTION_MACRO/FUNCTION are defined as needed in action.h (which is
included by quantum.h), checking for LTO in keyboard and user code is no
longer required.

* Update LTO_ENABLE docs
2020-04-09 00:18:30 +01:00
Ryan 400ca2d035
spi_master for AVR (#8299)
* Change _delay_ms/us() to wait_ms/us()

* Switch to platform-agnostic GPIO macros

* Add AVR spi_master and migrate Adafruit BLE code

* Set verbose back to false

* Add clock divisor, bit order and SPI mode configuration for init

* Add start and stop functions

* Move configuration of mode, endianness and speed to `spi_start()`

* Some breaks here would be good

* Default Adafruit BLE clock divisor to 4 (2MHz on the Feather 32U4)

* Remove mode and divisor enums

* Add some docs

* No hr at EOF

* Add links in sidebar
2020-04-08 11:04:31 +10:00
QMK Bot 7642075fc3 format code according to conventions [skip ci] 2020-04-05 22:57:28 +00:00
Ryan ca91dc594b
V-USB: Remove some stuff from usbconfig.h that should not be configurable (#8656)
* V-USB: Remove some stuff from usbconfig.h that should not be configurable

* Clean up some ifdefs

* And some more

* Even more
2020-04-05 23:25:07 +01:00
Drashna Jaelre 845953cc67
V-USB remote wakeup (#7627)
* V-USB remote wakeup

Backport from tmk/tmk_keyboard@391c979be7

* Change vusb.c remote wake config

as per fauxpark's suggestion
2020-04-05 18:18:19 +10:00
QMK Bot 59188bf29d format code according to conventions [skip ci] 2020-04-02 21:59:37 +00:00
Joel Challis 9c4bf0ac4a
Initial support for ATtiny85 (#8632)
* Initial support for ATtiny85

* Update mcu selection
2020-04-02 22:23:57 +01:00
Ryan 2b427f774a
Fix `pgm_read_ptr()` define for ARM (#8658) 2020-04-02 16:52:16 +01:00
Joel Challis 58a9c84d6b
Strip out features to allow minimum firmware sizes (#8645) 2020-04-01 21:06:22 +01:00
yiancar c217186bea
Updated V-USB template to allow usbFunctionWriteOut (#8634) 2020-04-01 17:11:24 +01:00
Ryan 95c5c11d0b
Miscellaneous cleanups (#8639)
* Miscellaneous cleanups

* Cast NO_PIN
2020-04-01 15:49:45 +01:00
Joel Challis b6a09502c6
Migrate :program logic to :flash (#8631) 2020-04-01 13:27:16 +01:00
Ryan 51a81813b0
V-USB: Consolidate usbconfig.h's into a single file (#8584) 2020-03-31 13:17:04 +01:00
Takuya Urakawa 89a675d57c
add hid_raw feature to VUSB (#8380)
* rewrite usbhid feature on vusb

* Apply suggestions from code review

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

* fix typo

* fix typo again

* Update tmk_core/protocol/vusb/vusb.c

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

* clean up defines

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-03-30 21:15:05 +01:00
Casper Weiss Bang 13fff52f6b
fixed problem with implicit declaration in quantum/rgblight.c (#8406)
* Update tmk_core/common/progmem.h

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

* Update quantum/rgblight.c

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

* fixed problem with implicit declaration in quantum/rgblight.c (#8381)

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-03-28 23:35:11 +00:00
Ryan 14079ce698
V-USB: Use structs for USB descriptors (#8572)
* V-USB: Use structs for USB descriptors

* Update usbconfigs

* cformat pass
2020-03-28 13:02:25 +11:00
Joel Challis 23e942ae4e
Enable SLEEP_LED on ATmega32A (#8531)
* Port over some AVR backlight logic to SLEEP_LED

* Port over some AVR backlight logic to SLEEP_LED - add timer 3

* Port over some AVR backlight logic to SLEEP_LED - clang format

* Enable SLEEP_LED within vusb protocol
2020-03-26 18:21:33 +00:00
Ryan 4d76d85d7b
V-USB: Use manufacturer and product strings from config.h (#7797)
* V-USB: Use manufacturer and product strings from config.h

* Update board configs
2020-03-26 13:11:32 +00:00
QMK Bot 9fbf17b90e format code according to conventions [skip ci] 2020-03-26 03:10:16 +00:00
foxx1337 96bfce7000
Add RawHID support to ATSAM (Massdrop boards) (#8530)
* Add support for RAW endpoint for arm_atsam

This the excellent work from helluvamatt/qmk_firmware in bb6eeb93b.

* Reformat arm_atsam RAW endpoint code

Co-authored-by: Matt Schneeberger <helluvamatt@gmail.com>
2020-03-26 02:34:57 +00:00
Joel Challis 6ceaae30f5
Run clang-format manually to fix recently changed files (#8552) 2020-03-25 14:39:53 +11:00
Drashna Jaelre 5117dff6a2
Add Post Processing to process_record (#4892)
* Improve process_record system

Code based on @colinta's

* Rename and better handle functions

* Fix incorrect function call to process_record_user

* Add documentation for post_process_record

* Add both get_event_keycode and get_record_keycode functions

And add some comments about these functions

* Update code format

* Cleanup merge artifacts
2020-03-23 00:29:05 +11:00
Joel Challis d8f3c28a37
Align some ChibiOS build logic (#8461)
* Align some ChibiOS build logic

* infer more makefile logic

* Move bootloader logic to chibios file
2020-03-22 20:48:17 +11:00
QMK Bot d511e52c1f format code according to conventions [skip ci] 2020-03-21 23:44:27 +00:00
Joel Challis 789e199450
Add support for Bootmagic lite when using SPLIT_HAND_PIN (#8347)
* Add support for Bootmagic lite when using SPLIT_HAND_PIN

* Deduplicate bootmagic_lite logic from within via

* Revert location of defaults so that user overrides still work for now

* Tidy up code slightly
2020-03-21 23:10:39 +00:00
Ryan f4799481cd
Fix formatting for report.h (#8512) 2020-03-22 06:19:01 +11:00
QMK Bot f9c53ca71a format code according to conventions [skip ci] 2020-03-21 12:58:19 +00:00
Joel Challis d96380e654
Initial arm->chibios pass - simplify some platform logic (#8450) 2020-03-21 16:20:04 +11:00
Ryan 7e80686f1e
Tidy up report.h (#8486)
* Tidy up report.h

* Add link to Review Request 41 for brightness controls
2020-03-21 16:19:15 +11:00
Ryan e967471c4f
Remove ACT_COMMAND (#8487)
* Remove ACT_COMMAND

* And from action_t as well
2020-03-21 16:17:43 +11:00
Joel Challis e34764502f
Remove qmk archive generation (#8462) 2020-03-17 21:28:13 +00:00
QMK Bot c89012566c format code according to conventions [skip ci] 2020-03-16 10:01:22 +00:00
Takeshi ISHII 9dfebb9d67
Remove unnecessary import of rgblight.h in tmk_core/protocol/*/*.c (#8432)
* Remove unnecessary import of rgblight.h in tmk_core/protocol/*/*.c

 * tmk_core/protocol/chibios/main.c
 * tmk_core/protocol/lufa/lufa.c

see #8380 for tmk_core/protocol/vusb/main.c.

* Remove '#include "rgblight.h"' from tmk_core/protocol/vusb/main.c.
2020-03-16 10:26:32 +01:00
QMK Bot 5e98eaaaff format code according to conventions [skip ci] 2020-03-13 18:44:56 +00:00
fredizzimo 9e8767917d
Fix pressing two keys with the same keycode but different modifiers (#2710)
* Fix extra keyboard report during test_fixture teardown

* Add tests for pressing two keys with only different modifers

* Fix #1708

When two keys that use the same keycode, but different modifiers were
pressed at the same time, the second keypress wasn't registered. This is
fixed by forcing a key release when we detect a new press for the same
keycode.

* Fix the NKRO version of is_key_pressed

* Fix uninitalized loop variable

Co-authored-by: Jack Humbert <jack.humb@gmail.com>
2020-03-13 14:09:38 -04:00
QMK Bot f89439ae09 format code according to conventions [skip ci] 2020-03-13 17:24:38 +00:00
francislan 3cd2a27ac0
Decouple mouse cursor and mouse wheel in accelerated mode (#6685)
* Decouples mouse cursor and mouse wheel movements in accelerated mode.

* Fixed comment indentation.

* Updated docs

Co-authored-by: Francis LAN <francislan@google.com>
2020-03-13 12:49:44 -04:00
Drashna Jaelre 668121bbf8
Fix layer debug calls (#8370) 2020-03-10 20:23:26 +11:00
Takeshi ISHII dbbab40981
Refactor rgblight_reconfig.h (#7773)
* Moved contents of rgblight_reconfig.h to rgblight_post_config.h.

In #3582, rgblight_reconfig.h had to be newly created. Now, the build system of qmk_firmware has a post_cofig feature, so that what was done in rgblight_reconfig.h can now be realized in rgblight_post_config.h.

**This commit does not change the build result.**

Testing script
```shell
  # build on master
  git checkout master
  echo master > /tmp/master_md5.txt

  # RGBLIGHT_ENABLE = no
  make HELIX=verbose helix/rev2:default:clean
  make HELIX=verbose helix/rev2:default
  md5 helix_rev2_default.hex >> /tmp/master_md5.txt

  # RGBLIGHT_ENABLE = yes, with animations
  make HELIX=verbose helix/rev2/back:default:clean
  make HELIX=verbose helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt

  # RGBLIGHT_ENABLE = yes, without animations
  make HELIX=verbose,no_ani helix/rev2/back:default:clean
  make HELIX=verbose,no_ani helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt

  # build on refactor_rgblight_reconfig.h
  git checkout refactor_rgblight_reconfig.h
  echo refactor_rgblight_reconfig.h > /tmp/branch_md5.txt

  # RGBLIGHT_ENABLE = no
  make HELIX=verbose helix/rev2:default:clean
  make HELIX=verbose helix/rev2:default
  md5 helix_rev2_default.hex >> /tmp/branch_md5.txt

  # RGBLIGHT_ENABLE = yes, with animations
  make HELIX=verbose helix/rev2/back:default:clean
  make HELIX=verbose helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt

  # RGBLIGHT_ENABLE = yes, without animations
  make HELIX=verbose,no_ani helix/rev2/back:default:clean
  make HELIX=verbose,no_ani helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt

  diff -u /tmp/master_md5.txt /tmp/branch_md5.txt
```

Test result:
```
--- /tmp/master_md5.txt 2020-01-03 15:42:22.000000000 +0900
+++ /tmp/branch_md5.txt 2020-01-03 15:42:42.000000000 +0900
@@ -1,4 +1,4 @@
-master
+refactor_rgblight_reconfig.h
 MD5 (helix_rev2_default.hex) = f360032edd522448366d471d8f4f8181
 MD5 (helix_rev2_back_default.hex) = 0c663acc6cccc44476b3b969ad22a48f
 MD5 (helix_rev2_back_default.hex) = e66b1195ff6d38e6e22c975b8ae42fd3
```

* Expressions that are too long are difficult to read, so wrap them.

* Edit the expression again

* remove `defined(RGBLIGHT_ANIMATIONS)` in `tmk_core/common/*/suspend.c`, `tmk_core/protocol/*/main.c`

move contents of rgblight_reconfig.h to rgblight.h.

The following changes were made to rgblight.h.

```diff
+#ifdef RGBLIGHT_USE_TIMER
 void rgblight_task(void);

 void rgblight_timer_init(void);
 void rgblight_timer_enable(void);
 void rgblight_timer_disable(void);
 void rgblight_timer_toggle(void);
+#else
+#define rgblight_task()
+#define rgblight_timer_init()
+#define rgblight_timer_enable()
+#define rgblight_timer_disable()
+#define rgblight_timer_toggle()
+#endif
```

The following changes were made to tmk_core/common/avr/suspend.c, tmk_core/common/chibios/suspend.c, tmk_core/protocol/chibios/main.c, tmk_core/protocol/lufa/lufa.c, tmk_core/protocol/vusb/main.c.

```diff
-#    ifdef RGBLIGHT_ANIMATIONS
     rgblight_timer_enable();
-#    endif
```
```diff
-#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
+#if defined(RGBLIGHT_ENABLE)
         rgblight_task();
 #endif
```

* remove 'defined(RGBLIGHT_ANIMATIONS)' in tmk_core/common/keyboard.c

Co-authored-by: Joel Challis <git@zvecr.com>
2020-03-10 01:46:03 -07:00
Nick Brassel b438c6f8ea
Fix up Arm builds with nix-shell. (#8312) 2020-03-07 03:05:51 +11:00
QMK Bot bad9468ce1 format code according to conventions [skip ci] 2020-03-06 13:28:11 +00:00
Ryan 9810756ee0
Fix typo in uart.c backport and add 32A "support" (#8219) 2020-03-06 23:55:15 +11:00
QMK Bot 95124bf933 format code according to conventions [skip ci] 2020-03-01 19:20:09 +00:00
Joel Challis e7fb873ee2
Short term fix for conflicting types for 'tfp_printf' (#8157) 2020-03-02 05:46:40 +11:00
Ryan c9e3fa6f70
Clean up includes for glcdfont headers (#7745)
* Clean up includes for glcdfont headers

* Remove pragma once, most of these are not headers

* Missed these
2020-03-01 17:56:50 +11:00
Nick Brassel d0c3acbe3e
Allow for ChibiOS 20.x (master), as well as enabling ChibiOS-Contrib HAL. (#8272) 2020-03-01 11:50:49 +11:00
Joel Challis c775104b9f
Use nano specs (#8270) 2020-03-01 11:49:16 +11:00
Joel Challis 8d9c800da0
Unconditionally enable ChibiOS syscalls (#8268)
* Enable syscalls all the time

* fix whitespace
2020-03-01 09:45:21 +11:00
James Young 26eef35f07
2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
QMK Bot 61b71320f7 format code according to conventions [skip ci] 2020-02-25 18:57:18 +00:00
ridingqwerty b949343b78
New feature: PERMISSIVE_HOLD_PER_KEY (#7994)
* Implement 'PERMISSIVE_HOLD_PER_KEY'

* Document 'PERMISSIVE_HOLD_PER_KEY'

Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com>
2020-02-25 13:25:52 -05:00
Ryan 088b64ab3d
Improvements to extrakey HID descriptors (#8156) 2020-02-25 12:18:11 +11:00
yiancar eb9c2429c6
Update main.c (#8198) 2020-02-22 10:10:41 -05:00
QMK Bot a7d859dab8 format code according to conventions [skip ci] 2020-02-21 11:04:05 +00:00
Drashna Jaelre 1751c3cc25
uart.c fix from TMK (#7628)
* uart.c fix from TMK

Backport from tmk/tmk_keyboard@c41e48a0ab

* Avoid deadlock when uart.c is usind in ISR

Backport from tmk/tmk_keyboard@55443fabb7
2020-02-21 21:32:30 +11:00
Joel Challis 7707724dc4
Allow 30us matrix delay to be keyboard/user overridable (#8216)
* Allow 30us matrix delay to be configurable via define

* Move wait logic to matrix_common

* Move wait logic to matrix_common - fix wait includes
2020-02-21 14:49:33 +11:00
QMK Bot 7740470a94 format code according to conventions [skip ci] 2020-02-12 06:50:23 +00:00
fauxpark eaf32621aa
Align VUSB HID descriptors with LUFA/ChibiOS (#7675)
* Align VUSB HID descriptors with LUFA/ChibiOS

* Wrap send_system and send_consumer in ifdefs too

* Offset system usages to match LUFA/ChibiOS
2020-02-12 17:19:39 +11:00
Ted Lin c3200aa8fc Compile error if ONESHOT_TIMEOUT defined but oneshot disabled (#8100)
* Compile error if ONESHOT_TIMEOUT defined but oneshot disabled

When ONESHOT_TIMEOUT and NO_ACTION_ONESHOT are both defined, this code
fails to compile.

Wrap the one usage of ONESHOT_TIMEOUT that is inconsistent with the
rest so all usages are properly wrapped by a check of NO_ACTION_ONESHOT.

* Run file through clang-format

Co-authored-by: Ted M Lin <tedmlin@gmail.com>
2020-02-10 04:50:45 +00:00
fauxpark 174a15d07d Remove PJRC USB stack 2020-02-08 11:07:43 -08:00
Ted M Lin d84eb14b3a
Use function for KEYCODE2 routines instead of macro. (#8101)
* Option to use function for KEYCODE2 routines.

Convert the KEYCODE2SYSTEM and KEYCODE2CONSUMER macros to functions,
defaulting to using the macros.  The function form allows the compiler
to optimize the switch statement itself, over the macro nested
ternaries.

To enable this feature, #define USE_KEYCODE2_FUNCTION.

Testing against a random selection of avr-based keyboards, this
increased available flash by ~500 bytes. For arm-based keyboards,
the available flash increased by ~400 bytes.

* Replace macro with function entirely.

As zvecr states, go bold and just commit to using the function instead
of the macro.

* Reformat whitespace now that functional review is done

Verified against clang-format output.
2020-02-07 12:53:43 +11:00
Drashna Jaelre 0010d0c45e
Add Midi Endpoint task to ChibiOS main (#8071) 2020-02-04 18:28:47 -08:00
QMK Bot fa9c74c6a2 format code according to conventions [skip ci] 2020-02-02 20:47:40 +00:00
fauxpark b2ce2f8a34
Dedupe extrakey report struct, and send functions in V-USB & LUFA (#7993)
* Dedupe extrakey report struct, and send functions in V-USB & LUFA

* Doc comment for consistency

* Wrap it in ifdef to prevent unused function error

* Do the same for ATSAM
2020-02-02 12:17:05 -08:00
QMK Bot 4888a118c3 format code according to conventions [skip ci] 2020-02-02 02:40:30 +00:00
fauxpark e036b94a21
Align ATSAM HID descriptors with LUFA/ChibiOS (#7651)
* Align ATSAM HID descriptors with LUFA/ChibiOS

* Don't hardcode raw endpoint size
2020-02-02 13:10:57 +11:00
QMK Bot 1a79f14e43 format code according to conventions [skip ci] 2020-02-01 09:46:34 +00:00
Pavel Župa 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
Nick Brassel b28ee6b039 Fix misunderstanding of CPPFLAGS and CXXFLAGS. 2020-01-31 15:29:23 +11:00
xyzz eb309be6f0
Improve VIRTSER performance (#7528) 2020-01-31 11:30:41 +11:00
Joel Challis 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
QMK Bot 09370a95db format code according to conventions [skip ci] 2020-01-25 22:04:42 +00:00
George Harris e9ffc53476 Fix unaligned access with LTO (#7801)
Forces 4 byte alignment for USB input & output buffers to prevent unaligned accesses by chibios with LTO enabled
2020-01-25 13:35:39 -08:00
Joel Challis d4ccb2e0e6 Fix printf buffer overflow when cols>16 (#7998) 2020-01-24 21:57:30 -05:00
QMK Bot fe50883c15 format code according to conventions [skip ci] 2020-01-24 02:15:29 +00:00
Nick Brassel d13ada1162 Add customisable EEPROM driver selection (#7274)
- uprintf -> dprintf
- Fix atsam "vendor" eeprom.
- Bump Kinetis K20x to 64 bytes, too.
- Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value.
- Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage.
- Add 24LC128 by request.
2020-01-24 12:45:58 +11:00
QMK Bot dee1d68dde format code according to conventions [skip ci] 2020-01-21 14:48:06 +00:00
fauxpark 123ae73efc Fix lock LEDs for ChibiOS when using shared endpoints (#7877)
* Fix lock LEDs for ChibiOS when using shared endpoints

* Tweak comments

* Doesn't need to be uint16 anymore
2020-01-21 14:17:33 +00:00
fauxpark 2bddfb986d Remove tmk_core gitignore and gitmodules 2020-01-19 10:52:29 -08:00
Joel Challis 667045b492
Run clang-format manually to fix recently changed files (#7934)
* Run clang-format manually to fix recently changed files

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

* Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
2020-01-19 16:30:34 +00:00
Joel Challis ba628a28bc
Move rgblight and backlight task to common location (#7733) 2020-01-19 00:59:09 +00:00
ridingqwerty 95c24bbaf8
Implement and document TAPPING_FORCE_HOLD_PER_KEY (#7859)
* Implement and document TAPPING_FORCE_HOLD_PER_KEY

* Added "record" parameter to "get_tapping_force_hold"

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

Co-authored-by: GeorgeKoenig <35542036+GeorgeKoenig@users.noreply.github.com>
2020-01-17 15:49:23 -05:00
Drashna Jaelre 1b0854fdca Cleanup check for PERMISSIVE_HOLD (#7861)
* Fix bug in PERMISSIVE_HOLD check

caused by #5009 (aka, me)

* Remove check for per key
2020-01-17 15:33:08 -05:00
fauxpark 1e670f5e67
Remove `KEYMAP_SECTION_ENABLE` (#7882) 2020-01-17 00:32:09 +11:00
xyzz 83be1aed76 chibios/usb_main: re-check USB status in send_keyboard after sleeping the thread (#7784)
* chibios/usb_main: re-check USB status in send_keyboard after sleeping the thread

* change send_keyboard to only have 1 exit point
2020-01-13 15:08:14 -08:00
Joel Challis ff5742da9f Fix KEYBOARD_SHARED_EP on ChibiOS (#7860) 2020-01-13 09:21:42 +11:00
zk-phi 7f388b6553 Add per-key IGNORE_MOD_TAP_INTERRUPT feature (#7838)
* Implement IGNORE_MOD_TAP_INTERRUPT_PER_KEY

- Add configurable option IGNORE_MOD_TAP_INTERRUPT_PER_KEY
- Add function get_ignore_mod_tap_interrupt iff the option is enabled

Unless IGNORE_MOD_TAP_INTERRUPT_PER_KEY is defined, this patch does not affect the resulting binary.

* Add documentation for IGNORE_MOD_TAP_INTERRUPT_PER_KEY
2020-01-10 02:48:06 -05:00
Joel Challis dcb7ca3f79
Move some common matrix code to a common location (#7699)
* Move some common matrix code to a common location

* Refactor some 'custom_matrix_helper' logic to use custom matrix lite

* Fix build for kinesis/stapelberg - abuse of vpath was picking up matrix.c from core when custom matrix was enabled

* Add validation for CUSTOM_MATRIX
2020-01-04 20:29:44 +00:00
Wilba 320822d75b VIA Configurator Refactor (#7268)
* VIA Refactor

* Remove old code

* review changes

* review changes

* Fix cannonkeys/satisfaction75/prototype:via build

* Add via.h to quantum.h

* Move backlight init to after backlight config load

* Merge branch 'master' into via_refactor_pr

* Update user's rules.mk to new way of enabling VIA

* Added id_switch_matrix_state

* Review changes
2020-01-03 12:52:00 -08:00
xyzz 8ec0b378bc Fix typo in action.c (#7757) 2020-01-02 12:49:53 +00:00
Joel Challis 376419a4f7
Add central location for ChibiOS defines (#7542)
* Add central location for chibios defines

* Add central location for chibios defines - actually add files this time....

* Add Copyright header

* Update include order to resolve i2cv1 build errors
2019-12-21 18:22:49 +00:00
Drashna Jaelre 85f4c3ebb4 [Core] Optimize matrix processing (#7621)
Backport of tmk/tmk_keyboard@ad6059adc7
2019-12-16 16:31:59 +00:00
Drashna Jaelre 1f26101f0e
remove SERIAL_SOFT_DEBUG macro (#7625)
SERIAL_SOFT_DEBUG can be defined in the `config.h`

Backported from tmk/tmk_keyboard@c74eee6327
x
2019-12-13 18:06:18 -08:00
Joel Challis 80c2e26741
Fix ChibiOS USB config for chips which support OTGv1 (#7564)
* Align endpoint config as per rest of file (fixes #4783)

* Add comments about explicit order use

* Update tmk_core/protocol/chibios/usb_main.c

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-12-14 01:29:54 +00:00
Drashna Jaelre 2d1c985ff4 core: Fix build config in protocol.mk (#7620)
Backports commits from tmk_keyboard
2019-12-13 11:36:37 +00:00
Joel Challis efb21c00ce Fix FORCE_NKRO handling (#7601) 2019-12-11 11:39:30 -08:00
Joel Challis 071eb2478f Remove mbed files (#7605)
* Remove mbed files

* Remove mbed files - fix comment

* Remove mbed logic blocks
2019-12-11 11:36:00 -08:00
fauxpark 698d0dbda8 Use `clock_prescale_set()` from avr-libc (#7540)
* Use `clock_prescale_set()` from avr-libc

* Remove outdated FAQ info
2019-12-11 01:26:40 +00:00
fauxpark c74295de88 Set proper AVR part for USBasp avrdude flashing (#7552)
* Set proper AVR part for USBasp avrdude flashing

* Remove `PROGRAM_CMD` stuff from rules.mk as they should not be needed anymore

* Missed the Plaid readme

* Remove PROGRAM_CMD from Mysterium
2019-12-07 23:32:43 -08:00
fauxpark 730a736ef0
Set proper ASCII character for KC_NUHS in iWRAP code (#7434) 2019-12-08 12:59:47 +11:00
Joel Challis f0f161e572
Remove vusb 'reset to bootloader' hid message due to security implications (#7456) 2019-11-25 20:33:02 +00:00
a_p_u_r_o 7874f297b3 Remove CR when computing BOOTLOADER_SIZE. (#7453) 2019-11-24 03:01:03 +11:00
fauxpark 02412156d5
Add 4-character aliases for sendstring keycodes (#7409)
* Add 4-character aliases for sendstring keycodes

* Remove pointless mail keycode redefinition

* Forgot brightness keycodes
2019-11-22 14:11:28 +11:00
zvecr a91c0c4765 Run clang-format manually to fix recently changed files 2019-11-17 08:25:58 -08:00
fauxpark 3047335729
Add support for configurable polling interval and power usage o… (#7336)
* Add support for custom polling interval and power usage on V-USB boards

* Use 1ms as default for now
2019-11-15 10:21:22 +11:00
Joel Challis 1d4287cb95 Fix chibios when mouse and nkro disabled (#7312) 2019-11-10 09:02:46 -08:00
Joel Challis c1970e284d Fix LAYER_STATE_8BIT compile issues (#7304) 2019-11-08 18:23:26 -08:00
Jonathan Rascher 680d401faf Support RGBLIGHT_SLEEP when ChibiOS boards suspend (#7280)
Copypasta from the AVR suspend implementation with a Teensy-specific
hack removed
2019-11-08 21:43:02 +00:00
Joel Challis 1ea0cac998
ARM - ws2812 bitbang (#7173)
* Initial ARM bitbang ws2812 driver

* Unify chibios platform to run rgblight_task

* Remove 'avr only' comments from ws2812 docs

* Remove 'avr only' comments from ws2812 docs

* Unify chibios platform to run rgblight_task - review comments

* Remove debug flags from keymap

* Add comments from review

* Add defines for STM32L0XX

* Attempt to get arm ws2812 working on multiple gcc versions
2019-11-07 13:10:29 +00:00
fauxpark dfb78d2a08 New and improved lock LED callbacks (#7215)
* New and improved lock LED callbacks

* Include stdbool

* Update documentation

* Use full function signatures and add keyboard-level example
2019-11-06 00:42:16 +00:00
fauxpark 1244d0e266 Un-clang-format usb_descriptor.h (#7216)
Preserves readability of the file, making it easier to understand and modify.
2019-11-04 23:04:58 -08:00
Christopher 0a9a69394e Fixes #7256: USB descriptor to identify correctly as MIDI device. (#7258) 2019-11-05 00:02:42 +00:00
Drashna Jaelre 29630e6e49 [Core] Add short form LTO_ENABLE (#7259)
For drashna's sanity's sake
2019-11-04 15:35:47 -08:00
Joel Challis 22812aee5c rgblight_task logic fixes (#7214) 2019-10-30 22:30:21 -07:00
Joel Challis 64b7cfe735 Refactor ps2avrgb i2c ws2812 to core (#7183)
* Refactor ps2avrgb i2c ws2812 to core

* Refactor jj40 to use ws2812 i2c driver

* Refactor ps2avrgb template to use ws2812 i2c driver

* Add ws2812 stub files

* clang-format and driver config

* Add ws2812 driver docs

* Fix default config values

* Update tmk_core/protocol/vusb/main.c

Co-Authored-By: Drashna Jaelre <drashna@live.com>
2019-10-29 15:53:11 -07:00
Joel Challis abfd6ed961
Move tmk_core/common/backlight to quantum/backlight (#6710)
* Move tmk_core/common/backlight to quantum/backlight

* Add guards to backlight inclusion

* Add guards to backlight inclusion

* Update backlight guards on clueboard/60

* Use full paths to avoid vpath issues
2019-10-17 17:48:58 +01:00
fauxpark 63f4806d7a Fix bug in `do_code16()` (#6935)
* Fix bug in `do_code16()`

* Remove qk_ mods functions
2019-10-16 00:02:09 +01:00
Joel Challis 2ac4197b73
Add binary support to tinyprintf (#7024) 2019-10-15 13:33:06 +01:00
Joel Challis cc5edb9eeb
Port DEBUG_MATRIX_SCAN_RATE to core (#7029)
* Port DEBUG_MATRIX_SCAN_RATE to core

* Remove duplicate DEBUG_MATRIX_SCAN_RATE implementations

* Remove duplicate DEBUG_MATRIX_SCAN_RATE implementation from handwired/xealous

* Add console logic from ergodox_ez
2019-10-15 13:32:52 +01:00
fauxpark 4335b97a07 Reorder Raw HID interface to match what the USB spec expects (#6801) 2019-10-08 11:47:37 -07:00
Joel Challis 38aefaf78e
ARM - Initial backlight support (#6487)
* Move AVR backlight to own file, add borrowed ARM implementation

* Tiny fix for backlight custom logic

* Remove duplicate board from rebase

* Fix f303 onekey example

* clang-format

* clang-format

* Remove backlight keymap debug

* Initial pass of ARM backlight docs

* Initial pass of ARM backlight docs - resolve todos

* fix rules validation logic

* Add f072 warning

* Add f072 warning

* tidy up breathing in backlight keymap

* tidy up breathing in backlight keymap

* add missing break to backlight keymap
2019-10-05 16:57:00 +01:00
fauxpark 41b9be560d
Wrap util.h functions in `extern "C"` (#6762) 2019-10-04 09:24:47 +10:00
Joel Challis 17794e0b25
ARM split - Add support for dfu-util EE_HANDS flashing (#6543)
* Initial stab at some fake dfu-util-split-left behaviour

* Apply suggestions from code review

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

* Clang format fixes

* Fake eeprom init for both left and right hand
2019-09-27 21:33:55 +01:00
Joel Challis ad8dbd5ca5
ARM split - Add bootmagic/magic keycodes for setting handedness (#6545)
* Add docs on bootmagic/magic keycodes for setting handedness

* Clang format fixes

* Maintain backwards compatibility

* Maintain backwards compatibility
2019-09-24 15:24:12 +01:00
XScorpion2 2f49cae9bc Fixing wrapping math logic for timer_expired functions (#6746) 2019-09-23 00:52:33 +10:00
Drashna Jaelre 02f77e7215 Actually use correct bootloader not found message (#6695) 2019-09-08 09:55:18 +10:00
Drashna Jaelre 44fd317a87 Move Bootloader not found message to global variable (#6688)
* Move Bootloader not found message to global variable

* Apply suggestions from code review

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-09-08 02:06:39 +10:00
fauxpark 0d94730da0 Adafruit BLE: Set SPI2X bit only when F_CPU is 8MHz (#6671) 2019-09-07 08:18:05 -07:00
fauxpark 91bd2117df Banish some more magic numbers (#6662) 2019-09-07 08:12:46 -07:00
fauxpark 7ffed07310 Make USB polling rate configurable with a define (#6668) 2019-09-06 07:41:24 -07:00
bwhelm fa71c4c91e Fix battery level code in adafruit_ble.cpp (#6648)
* Fix battery level code in adafruit_ble.cpp

The code in tsk_core/protocol/lufa/adafluit_ble.cpp that polls the
battery level for the Adafruit feather BLE controller reads the
regulated voltage, not the raw voltage coming from the battery. To do
that, the Adafruit Feather docs say you should read from pin A9:
https://learn.adafruit.com/adafruit-feather-32u4-basic-proto/power-management#measuring-battery-4-9.
(See also
https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/pinouts#logic-pins-2-9.)

I'm not sure why, but analogRead(9); doesn't read the correct pin.
Checking all available analog pins experimentally, it turns out that
analogRead(7); returns the correct value. So the code above should read:

    state.vbat = analogRead(7);

* Update tmk_core/protocol/lufa/adafruit_ble.cpp

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

* Remove old comment

* Fix linking error

* Remove `#ifdef` around `#include analog.h`.

* Really fix linking error
2019-09-04 04:29:23 +10:00
skullY b624f32f94 clang-format changes 2019-08-30 15:01:52 -07:00
Drashna Jaelre cf4575b94a Fix the LUFA lib to use a submodule instead of just files (#6245)
* Remove LUFA files

* Update descriptions for newer version of LUFA

* Create PR6245.md

* Fix CDC(Serial) type errors

* Fix missed merge conflict for AUDIO_DTYPE_CSInterface
2019-08-30 15:01:52 -07:00
skullY 7ff57644e1 Fix vusb compiling after clang-format 2019-08-30 15:01:52 -07:00
skullY 691be16b23 Have clang ignore the code in bootloader_size.c 2019-08-30 15:01:52 -07:00
fauxpark ac16726895 LUFA USB descriptor cleanup (#4871)
* Fix indentation

* Fix braces

* Expand descriptor headers

* Align descriptor elements

* Nicer formatting

* Tidy up preprocessor statements

* Remove VERSION_BCD redefine - LUFA_VERSION_INTEGER is currently 0x170418

* Tidy up comments

* Tweak ordering of  HID report elements (no functional changes)

* We don't need all of these newlines

* Move default USB_MAX_POWER_CONSUMPTION closer to where it makes sense

* Ask nicely

* Add some more comments

* Change indentation back to 4 spaces

* Add changelog entry
2019-08-30 15:01:52 -07:00
Drashna Jaelre 931e9bdbe4 Decrement EECONFIG magic number
This will manually wipe the EEPROM. This is a hacky solution for when new ranges are added or moved around. 

A better (more complicated) solution would be to zero out everything, not just known ranges.  But for now, this is a hacky solution that will work.
2019-08-27 20:32:36 -07:00
Drashna Jaelre bc86eb2233
Fix Typo in :flash target for missing bootloader (#6615) 2019-08-26 10:16:46 -07:00
XScorpion2 957070a6b5 Added OLED Display autoscroll during periods of OLED data inactivity (#6546)
* Added OLED Display autoscroll during periods of OLED data inactivity.

* Fixing compile errors

* Feedback from review
2019-08-25 12:37:55 -07:00
Joel Challis 51bcadf38c Add 'bootloadHID' flash target (#5587)
* Add 'bootloadHID' flash target

* Prep for flash target

* Add :flash support

* Align bootloader wait messages

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

* Update template to suggest use of :flash
2019-08-24 08:35:11 -07:00
Joel Challis ae44ec9820 Align flashing behaviour of dfu-util (#6578)
* Align flashing retry logic of dfu-util

* Align bootloader wait messages

Co-Authored-By: Drashna Jaelre <drashna@live.com>
2019-08-22 16:08:45 -07:00
Drashna Jaelre b62e160a89
Additional changes for Layer State typedef compatibility (#5906)
* Additional changes for Layer State typedef compatibility

* Replace biton32 with get_highest_layer in docs

* Change additional layer structure code

* Fix uGFX reference issue

* Remove dynamic_keymap check

* Where did all these extra spaces come from

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-08-21 17:07:49 -07:00
Stephen Wanhella d534c72a54 Added keycodes for swapping and unswapping the Control and OS keys (#6110)
* Add MAGIC_SWAP_CONTROL_LGUI and MAGIC_UNSWAP_CONTROL_LGUI keycodes

Key codes to swap and unswap the control and windows/cmd keys

* Fix issues with pull request #6110

Renamed swap/unswap lctl and lgui key codes, added key codes to swap/unswap rctl and rgui, and moved new bool inside keycode_config.h struct to the end

* Move new keycodes to the end of the enum (#6110)

* add cases for swapped control and OS keys to mod_config (#6110)

* Add new keycodes to feature_bootmagic.md (#6110)

* Add R+L swap codes to keep in parity with AG_* codes

* Extend Magic range check to include new magic codes

* Update audio docs

* Combine 2 byte ranges into 1 word for EECONFG

Fix names for Keymap config EEPROM

* Update docs/feature_bootmagic.md

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

* Update docs/feature_bootmagic.md

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

* Update docs/feature_bootmagic.md

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

* Update docs/feature_bootmagic.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-08-21 17:07:08 -07:00
fauxpark f2c179de58 Remove superfluous JTAG disable code (#6445)
* Remove superfluous JTAG disable code

* 32A has differently named register

* Accidentally some operators

* 32A also has different JTAG pins

* Wrap disable_jtag() in an ifndef

* Document this new define

* Rename the define, it conflicts with a LUFA thing

Also, move the ifndef wrapping to the call in keyboard_setup()
2019-08-20 22:18:52 -07:00
Drashna Jaelre 4003d077ce Add a universal flash command for cli (#6224)
* Add universal flash command

* Add bootloader info to I:C boards

* Add support for ATSAM

* Add messages for flash target

* Message cleanup

* Add USB ASP Flashing target

* Make usbasp target more universal

* Add phoney target for usbasp

* Clarify error message when bootloader isn't matched
2019-08-20 15:39:24 -07:00
Joel Challis d8d2a09674 Fix LT() crashing some ARM keyboards (#6529) 2019-08-13 10:23:14 -07:00
fauxpark 2f6c068e0d Extend allowed range of tappable keycodes to include modifiers (#5809)
* Extend allowed range of tappable keycodes to include modifiers

* Get rid of the magic numbers altogether

* Remove some more magic numbers

* Extract LM() functionality from ACT_LAYER_TAP

* Use ACTION() macro everywhere
2019-08-08 13:58:05 -07:00
Jake Grossman 13493d3a78 Removed print call to resolve #6364 (#6413)
* Change print to dprintf to avoid buffer overflow

* Add stdio header for dprintf

* Fix included headers
2019-07-31 06:11:40 -07:00
Drashna Jaelre 3261c408e4 Add support for TAP_CODE_DELAY to Hold-Tap keys (#5400)
* Add support for TAP_CODE_DELAY to Hold-Tap keys

* Better handling for tap code delay and caps version
2019-07-22 20:23:57 -07:00
Konstantin Đorđević a2e91ebec9 Update IS_COMMAND definitions to use MOD_MASK_SHIFT (#6348)
* Update IS_COMMAND definition in templates to use MOD_MASK_SHIFT

* Update IS_COMMAND in docs

* Update IS_COMMAND default definition in tmk_core

* Update table in Command docs based on suggestion

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-07-20 13:21:40 -07:00
fauxpark 3895b4b868 Extend maximum number of backlight levels to 31 (#6351) 2019-07-16 21:58:29 -07:00
Drashna Jaelre f859375284 Expand bootloader target to support most AVR boards (#6255)
* Update the :bootloader target to pass along correct hardware info

* Update make scripts to properly grab the settings (a big thanks to @yanfali)

* Remove LUFA debug warnings
2019-07-16 01:28:23 -07:00
Drashna Jaelre f6651424a0 Make Caps Lock delay more reasonable (#6199)
* Make Caps Lock delay more reasonable

* Update documentation

* Update docs/config_options.md

Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>

* Update docs/config_options.md

Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>
2019-07-16 01:21:52 -07:00
fauxpark a32f7e1a25 Store backlight breathing state in EEPROM (#6105)
* Store backlight breathing state in EEPROM

* Reduce backlight_config.level from 6 bits to 4 (max 15 "on" levels)

* Error out if BACKLIGHT_LEVELS is > 15

* Remove mention of default backlight pin in rules.mk template

* Remove pointless comment
2019-07-16 00:56:36 -07:00
XScorpion2 e2dfb787da Adding rgb matrix speed into eeprom storage. (#5965)
Zeroing out spd in eeconfig_init_quantum

Switched to block read & update

Update tmk_core/common/eeconfig.h

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

Fixing init compile error

Update eeconfig.c

Dead / Missing API cleanup

alignment
2019-07-16 00:40:43 -07:00
Drashna Jaelre a71c461d03 Skip unsupported firmware check message in silent mode (#5765) 2019-07-15 23:21:00 -07:00
Takeshi ISHII 0f95c0865c add 'objs-size' target into tmk_core/avr.mk (#5490) 2019-07-15 22:45:31 -07:00
yiancar 3538955778 Usbasploader bootloader option addition (#6304)
* Added USBasp bootloader option for USBasploader

* author comment

* ifdef fix :)

* Add usbasp target

* Update docs/flashing.md

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

* Update docs/flashing.md

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

* Update docs/flashing.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-07-15 19:11:59 -07:00
fauxpark 8e348c427d Display firmware size percentage (#6307) 2019-07-11 12:05:13 -07:00
skullydazed 7579518613 Fix chibios so the dfu-suffix is only applied once. (#6270) 2019-07-07 09:08:49 -07:00
Chris Dosé 7ddf3c28f4 Fixes compile errors for massdrop keyboards 2019-06-03 12:11:03 -07:00
zvecr 2f7a57a6de Copy avr teensy flash logic to arm (#6016) 2019-05-30 16:53:49 -07:00
fauxpark d16056e60a Fix TO() and DF() calling layer_state_set_[kb,user] twice (#6003) 2019-05-29 07:45:28 -07:00
Ryan Caltabiano ba26736d7e Fix bit count calculation for iterating layers 2019-05-18 13:47:34 -07:00
Alex Ong 00d1d7828c Typedef'ed layer_state_t to uint32_t (#3637)
* Typedef'ed layer_state_t to uint32_t.

This enables future work with layer_state_t to uint8_t for optimization purposes.

* Removed accidental xeal60 commit

* Revert to egyptian brackets, added sizeof(layer_state_t) so when layer_state_t is redefined it will automagically work.

* Add additional typedefs

* Add checks for setting layer state

* Update tmk_core/common/action_layer.h

Co-Authored-By: alex-ong <the.onga@gmail.com>

* Revert commit.
2019-05-17 13:47:50 -07:00
Drashna Jaelre 48b01446ba Make delay for Capslock in Hold-Tap functions configurable (#5497)
* Increase delay for Hold-Tap register for CAPSLOCK

Because it seems that the 80ms delay wasn't too much

* Screw it, make the caps delay a define and make it configurable
2019-05-16 10:28:06 -07:00
XScorpion2 62ba66d618 Cleanup/rgb matrix (#5811)
* clean up rgb matrix extern usage

Moved rgb matrix boiler plate into macros

Rebased onto typing heatmap pr

* Fixing the reversed frame buffer access in digital rain

* Fixing digital rain & typing heatmap if keyreactive effects are not enabled

* Apply suggestions from code review

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

* Adding parenthesizes to DRIVER_LED_TOTAL where necessary

* Updated docs

* added notes about parentheses
2019-05-10 16:55:02 -07:00
XScorpion2 af89752bff rgb_led struct conversion (aka: Per led (key) type rgb matrix effects - part 2) (#5783)
* Initial conversion of the rgb_led struct

* Converting last keyboard & updating effects to take advantage of the new structure

* New struct should not be const

* Updated docs

* Changing define ___ for no led to NO_LED

* Missed converting some keymap usages of the old struct layout
2019-05-07 16:22:46 -07:00
XScorpion2 e01b2d518a [Keyboard] Sol keyboard conversion to split common (#5773)
* Split common conversion

* Updated serial and encoder pins

* Fixing default folder until r2

* Fixing oled driver on slave split common

* Fixing keymap compile errors

* Fixing oled inactivity timer on slave split common

* Hoisted oled driver task, init, & activity to keyboard.c

* Update keyboards/sol/config.h

Co-Authored-By: XScorpion2 <rcalt2vt@gmail.com>

* Remove TAPPING_FORCE_HOLD
2019-05-06 15:06:43 -07:00
Drashna Jaelre 8a9c90ad78 Re-fix Mousekey Movements (#5740)
* Re-fix Mousekey Movements

After the new movement model was instroduced, it broke diagonal momement, again.  Reapplying fix from #3147 to both old and new acceleration method.

* Make diagonal mouse report checks more readable

Co-Authored-By: drashna <drashna@live.com>
2019-05-06 08:35:01 -07:00
Drashna Jaelre 41beecfc18 Add DFU Suffix for ARM boards (#5763)
* Add DFU Suffix for ARM boards

* Blindly flash DFU SUFFIX ARGS for now

* Fix commented out check

* Fix DFU Suffix Argument check

Thank you jack!

* Update Travis CI Scripts to include dfu-util

So we can get dfu-suffix as well

* Manually add dfu-suffix package

* Use external repo for newer version of dfu-util

One that includes dfu-suffix

* Update .travis.yml

* Silence unnecessary output from dfu-suffix
2019-05-03 08:24:22 -07:00
Drashna Jaelre 7e655a207e Add option to enable LTO easily (#5674)
* Add option to enable LTO easily and disable features that cause compiling errors with LTO

* Add documentation about LTO option

* Add to show_options
2019-05-02 08:03:42 -07:00
XScorpion2 a7113c8ed0 Updated rgb_led struct field modifier to flags (#5619)
Updated effects to test led flags
Updated massdrop to use new flags field for led toggle
2019-04-29 15:18:50 -07:00
Drashna Jaelre 90cd383d46 Fix wakeup function on ChibiOS (#5707)
Somebody was a very, very bad boy, and did a poor job of copy-pasting
2019-04-26 11:03:51 -07:00
Takeshi ISHII 6d73fe1277 fix LIB_SRC and QUANTUM_LIB_SRC for ARM (#5623)
* fix LIB_SRC and QUANTUM_LIB_SRC for ARM(chibios)

* remove ARFLAGS

* tmk_core/arm_atsam.mk:AR: remove 'rcs'
2019-04-22 11:20:13 -07:00
Drashna Jaelre dd64a4e738 Init RGB Matrix EEPROM
I'm not sure how to check if it's the same as RGBLIGHT's EEPROM, but if you don't init it, it **will not** work properly until it is initialized.
2019-04-19 14:58:08 -07:00
Danny Nguyen 746058306b Make sure NOBITS is set on reset_key
Patch from https://github.com/qmk/qmk_firmware/issues/3657#issuecomment-415147411

Long story short, in avr-gcc pre-8.2, reset_key was assigned to a memory area that was in a normal range, but when 8.2 came out, that memory got moved to an out of range area, causing errors like 0x800293 out of range. Apparently, this was fixed up in avr-gcc, but we haven't seen a release with the fix yet (we expected it in 8.3, but that didn't happen for some reason).

What this commit does is move the reset_key back to the original memory location it was in before.
2019-04-19 14:44:16 -07:00
Markus Weimar e3a940026e Improve mouse keys docs and constant speed mode 2019-04-18 23:31:17 -07:00
patrickmt 3542f594d9 Fix wake from suspend LED functionality
When waking from suspend, only enable the LED drivers if they were not previously set to disabled by the user. This functionality was removed by the recent updates to adapt Massdrop keyboards to QMK RGB Matrix. Affects Massdrop CTRL and ALT keyboards compiled using Massdrop Configurator mode.
2019-04-18 11:55:45 -07:00
Drashna Jaelre a9a5fd754e Max out range for max compatibility 2019-04-12 13:55:59 -07:00
Drashna Jaelre c27d96b4c1 Fix ATSAM's USB HID descriptor to support higher heycodes
Assuming I understand this correctly, this should set the max scancode to E7 (RGUI), which is the last listed code in the main list (everything else use for internal QMK/TMK stuff).
2019-04-12 13:55:59 -07:00
fauxpark 8dd0ff6c7a Remove keyboard description from Adafruit BLE device name 2019-04-07 16:05:30 -07:00
Drashna Jaelre 5701b75e3c Custom Tapping Term per key (#5009)
* Add customizable tapping terms

* Add Documentation

* Fix function

* Fixes

* It's not a pointer

* Add debugging output

* Update documentation to be at least vaguely accurate

* Use `get_tapping_term(tapping_key.event)` instead

`e` doesn't include column and row information, properly. It registers as 255, regardless of the actual keypress.

However `tapping_key.event` actually gives the correct column and row information.  It appears be the correct structure to use. 

In fact, it looks like the issue is that `e` is actually the "TICK" structure, as defined in keyboard.h

* Use variable tapping term value rather than define

* Silly drashna - tapping_key.event, not event

* add get_event_keycode() function

* Fix typo

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

* Remove post_process_record_quantum since it's the wrong PR

* Update quantum/quantum.c

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

* Better handle ifdef statement for permissive hold

Since we can't be sure that tapping term is actually 500

* Update quantum.c comments based on feedback

* Clean up get_tapping_term function

Clean up function so that users don't need to call the event function, and instead only check the keycode

* Add ability to run functionality on and off

* Make ifdef's more compact
2019-04-05 15:47:25 -04:00
Daniel Prilik 763b26cdb9 RGB Matrix support for Massdrop CTRL/ALT (#5328)
* port Massdrop CTRL/ALT to use RGB Matrix

Co-authored-by: Matt Schneeberger <helluvamatt@gmail.com>

* Massdrop lighting support working

This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk.
Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired.

* Updating config based on testing results with patrickmt & compile errors

* Updates for PR5328

For CTRL and ALT:
Moved location of new RGB Matrix macros from config_led.h to config.h.
Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing.
Re-added missing breathing code for when Massdrop configurator mode is defined.

* remove prilik keymap form PR
2019-04-03 18:30:47 -07:00
Takeshi ISHII b9f6ff05d0 build size-check enhancement (#5485)
* build size-check enhancement

Changed to display a warning when the free size of compilation result is less than 512 bytes.

* update message.mk

* add SIZE_MARGIN variable, change default margin 512 to 1024

for Example.
```
$ make SIZE_MARGIN=2048 crkbd:all
$ make crkbd:all ## mergin is 1024
```

* Update message.mk

change message to ‘approaching the maximum’

Co-Authored-By: mtei <2170248+mtei@users.noreply.github.com>
2019-03-27 08:51:56 -07:00
Jon Arintok 346cbd8816 Add 3 speed mousekey movement option (#2246)
This allows for constant, non-accelerated mouse movement, while retaining the original functionality. Configurable by a define.
2019-03-26 19:34:33 -07:00
Rob Rogers afdc67184d correct typo in eeprom split target for dfu (#5445) 2019-03-18 23:25:34 -07:00
Danny 3c257c1c6e Add avrdude split EE_HANDS flash commands (#5414)
* Add EEPROM avrdude flashing commands for setting handedness

* Update docs with info on flashing EEPROM handedness files with commands
2019-03-15 14:05:50 -07:00
Michael F. Lamb f34244a871 Sleep until USB port becomes writable before running avrdude (#5393)
* sleep until usb port becomes writable before running avrdude

* only wait for a writable USB port when not on MSYS

using MINGW or MSYS: sleep for one second, as before.

otherwise: wait for the port to become writable.

* typo

* typo
2019-03-13 14:00:09 -07:00
Takuya Urakawa 2f3dbb1253 Add new keyboard Plaid and ATMEGA328p support (#5379)
* add plaid

* Change usb vid/pid to free id from vusb
Trivial fix for vusb core

* update readme

* update info.json default keymap

* fix typo

* Replace copyright
2019-03-12 11:48:17 -07:00
James Churchill 37932c293c Next set of split_common changes (#4974)
* Update split_common to use standard i2c drivers

* Eliminate RGB_DIRTY/BACKLIT_DIRTY

* Fix avr i2c_master error handling

* Fix i2c_slave addressing

* Remove unneeded timeout on i2c_stop()

* Fix RGB I2C transfers

* Remove incorrect comment
2019-03-12 10:23:28 -07:00
Chris Lewis c1c5922aae Velocikey: Match RGB animation speed to typing speed (#3754)
* Draft commit of typing speed RGB control

* More information in the readme

* Support all RGB animation modes (Fixes #1)

* Added support for all RGB light modes to use typing speed

Except christmas lights because that is seizure-inducing at high speeds!

* Introduced a value range specific to each RGB mode

Because some modes are a little too much when running at full speed!

* Update readme.md

* Update readme.md

* Re-arrange typing_speed definitions (Fixes #5) (#6)

* Re-arrange variable definitions to avoid including quantum.h from rgblight.c

* Fix a compilation error when trying to run make test:all

* Tweaks to the typing speed decay rate

* Renamed to momentum; moved implementation into dedicated files

* Groundwork for toggling momentum on/off (currently always on)

* Add EEPROM toggle for momentum-matching

* Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic

* Move momentum decay task out of rgblight_task()

* Fix missing momentum.h in lufa.c

* Experimental LED support (untested)

* Draft commit of typing speed RGB control

* More information in the readme

* Support all RGB animation modes (Fixes #1)

* Added support for all RGB light modes to use typing speed

Except christmas lights because that is seizure-inducing at high speeds!

* Introduced a value range specific to each RGB mode

Because some modes are a little too much when running at full speed!

* Update readme.md

* Update readme.md

* Re-arrange typing_speed definitions (Fixes #5) (#6)

* Re-arrange variable definitions to avoid including quantum.h from rgblight.c

* Fix a compilation error when trying to run make test:all

* Tweaks to the typing speed decay rate

* Renamed to momentum; moved implementation into dedicated files

* Groundwork for toggling momentum on/off (currently always on)

* Add EEPROM toggle for momentum-matching

* Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic

* Move momentum decay task out of rgblight_task()

* Fix missing momentum.h in lufa.c

* Added documentation

* Renamed feature to velocikey

* Reverted readme to original state

* Correct the readme title

* Updated feature name in the docs

* Update EECONFIG name

* Add compile-time toggles for velocikey

* Update feature documentation

* Revert "Merge branch 'led-support' into master"

This reverts commit e123ff5febf61639b9a9020748e1c2e2313460ff, reversing
changes made to df111a55b9d4929182e16108b1c0ead15b16df97.

* Move velocikey EECONFIG definition to depend on VELOCIKEY_ENABLE

* Rename decay_task function to decelerate

* Apply suggestions from code review

Co-Authored-By: chrislewisdev <chris@chrislewisdev.com>

* Re-order eeconfig definitions

* Apply coding conventions

* Apply #ifdef check in lufa.c

* Refactored interval time checks into one functionc

* Small rename

* Fix unused function error for layouts not using all rgb effects

* Only update EEPROM if Velocikey is enabled

* Incorporate code review feedback

* Small adjustment to top-end decay rate

* Add Velocikey documentation to table of contents

* Bring tetris:default keymap size down by disabling audio
2019-02-21 07:22:46 -08:00
Jumail Mundekkat 149015e799 Fixed grep issue in bootloader build target (#3848)
* Changed use of '\s' in grep to '[ \t]' for portability

* Pushed DFU Keyboard.h into a shell script

* Fixed execution permissions on make_dfu_header,sh
2019-02-18 10:00:33 -08:00
Konstantin Đorđević 5cb713148d Change Command keycode defaults to match corresponding Bootmagic codes (#5078)
* Change Command keycode defaults to match corresponding Bootmagic codes

* Make alternate magic key keycodes consistent

* Reflect changes from previous commit in tmk_core/common/command.c

* Remove unnecessary MAGIC_KEY_* definitions from keymaps compatible with these changes

* Swap E and BSPACE for MAGIC_KEY_EEPROM

* Add MAGIC_KEY_EEPROM_CLEAR instead of MAGIC_KEY_EEPROM_ALT

* Remove BOOTMAGIC_ENABLE checks around EECONFIG stuff

* Update Command descriptions
2019-02-17 22:23:32 -08:00
ishtob 2cee371bf1 Haptic feedback generalized - DRV2605 and solenoids (#4939)
* initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards

* Haptic feedback enhancements: on/off toggle working, feedback order working
todo:
-work on modes switching
-get modes switching to save to eeprom

* haptic enhancement - eeprom and modes added

* Added set and get functions for haptic feedback

* initial implementation of solenoids under haptic feedback

* changed eeprom to 32 bits to reserve blocks for future features

* start documentation of haptic feedback

* change keycode per comment from reviewers

* typo fixes

* added eeprom for solenoid configs

* added solenoid and docs

* Add/fix default parameters configs, improve docs

* more doc cleanup

* add in solenoid buzz toggle, clean up doc

* some fixes for error in compiling solenoid

* fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c

* fixes for avr side issues

* update keymap

* fix keymap compile error

* fix bugs found during solenoid testing

* set pin that is not powered during bootloader

* added warning about certain pins on the MCU may trip solenoid during DFU/bootloader
2019-02-16 18:39:30 -08:00
Shihpin Tseng 68fad7b777 Enable custom chibios sub-platform 2019-02-14 21:06:26 -08:00
Drashna Jaelre c22f3ba3a2
Debounce refactor / API (#3720)
* Added xeal60 via clone of lets split

* Delete removed other keymaps

* Basic keymap (no FN). Compiles.

* Removed NP_STAR and NP_SLSH.

* Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes.

* Changed order of rules in TMK. Documented feature.

* Fixed missing whitespace in debounce documentation

Table wasn't working due to missing newline.

* Added bold in a few areas.

* DO NOT USE - Removed debounce from TMK.

* Remove accidental xeal60 commit

* DO NOT USE - debounce successfully compiled.

* DO NOT USE Revert back to original API to support split_keyboards.

* Working eager_pk

* Whitespace cleanup.

* Restored debounce.h since there wasnt any real change.

* Moved debouncing_time variable  to inside #if debounce

* Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used.

* Removed #include "matrix.h" from debounce.h

* Bug fix - was using MATRIX_ROWS instead of num_rows

* Fixed compilation error with debounce_sym_g

* Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE

* Malloc array in debounce_eager_pk, since split keyboards only use MATRIX_ROWS/2.

* Fix compile error in debounce_eager_pk

* Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk
2019-02-14 20:36:20 -08:00
Drashna Jaelre cc5c6b449a Add kb and user level keyboard initialization functions (#3113)
* Add suspend functions

* Disable RGB code if it's disabled

* Add keyboard_init functions

* Change where references so it will compile

* Wrong command chained in wake up kb function

* Fix non-feature file changes

* Add documentation

* Re-add matrix init docs

* add rgblight code to example

* Remove suspend code

* Clean up docs

* Fix docs

* Fix suspend code

* more doc fixes

* change function to startup_* rather than keyboard_init_

* fix spelling error

* fix up docs to finish removing keyboard_init

* Use Pre and Post init functions

* Update Documenation

* Remove changes to my keymap and userspace code

* Cleanup

* Revert changes to extra files

* Forgot a semicolon

* Make sure all protocols call keyboard_setup

* Cleanup functions

* Unset startup_user

* Remove changes from division keyboard

* Readd startup_user function

* Remove all to startup_user

* Update docs/custom_quantum_functions.md

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

* Update docs/custom_quantum_functions.md

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

* Add suggestion line

* Rebase fixes

* Update documentation to be more useful/accurate

* Cleanup of documentation

* Fix spacing inconsistency

* Revert unexpected change to keymap
2019-02-14 20:18:54 -08:00
Andrew Kannan 6b4549da8c Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (#5094)
* Add stm32f072 base ck4x4 to handwired

* add prints

* Save these tries

* Save changes again

* Working hadron oled

* OLEd working but ws2812b still iffy:

* save another try

* Encoder feature + OLED

* RTC code

* Implement clock setting mode

* Whitespace

* Encoder hooked up to working LED PWM code

* Add missing files

* eeprom changes

* Save changes

* Move i2c master

* Move satisfaction75 under cannonkeys

* Set proper default folder

* Revert some core changes

* Undo paved iris changes

* Reorganize code for maintainability and prep for new features

* Add starting code for clock OLED mode

* Clock set mode finished

* Add custom encoder modes

* Actually add VIA keymap

* Gate to only 072

* fix gate for only 072

* Update header guards and includes

* Update i2c selection strategy

* Update board.c to handle software reset to DFU
2019-02-13 08:03:26 -08:00
Drashna Jaelre d3f7910e68
Remove AUTOGEN and fix Travis Compiled Push scripts (#5077)
* Grab HEX and BIN files from autogen

And push them to qmk.fm/compiled

* Make autogen copy extension agnostic

This way, when travis cl scrpit looks for hex files, it will actually grab bin files, and not hex files for ARM boards

* Handle the AUTOGEN in :bin target to properly handle edge cases

Both the TADA68 and ATSAM boards generate the hex file and then convert it to a bin file. The changes I made does not handle this well, at all.  This removes the hex and replaces it with a bin, if a bin is normally generated.

* Revert hex target to original copy command

* Check hex and bin separately in compile push script

Since I don't know how to script this, well

* Simplify push to compiled folder

* Further simplify compiled push script

* Move AUTOGEN parsing to a more sane location to prevent tech debt

Thanks to skully!

* Remove AUTOGEN completely, as it's not needed

This has the benefit of making everything super simple, since we can pull every hex and bin from the root of the qmk_firmware folder, and move that to th compiled folder.  This also removes old and unneeded code, and removes some tech debt that has been accrued, without adding more, in theory.
2019-02-12 16:46:04 -08:00