Commit Graph

645 Commits

Author SHA1 Message Date
Drashna Jaelre
052e4ee4d2 core: Fix build config in protocol.mk (#7620)
Backports commits from tmk_keyboard
2020-01-09 08:57:11 +09:00
Joel Challis
20f465bfb6 Remove mbed files (#7605)
* Remove mbed files

* Remove mbed files - fix comment

* Remove mbed logic blocks
2020-01-09 08:57:11 +09:00
fauxpark
1378e0de96 Use clock_prescale_set() from avr-libc (#7540)
* Use `clock_prescale_set()` from avr-libc

* Remove outdated FAQ info
2020-01-09 08:57:11 +09:00
Drashna Jaelre
493c675778 Big keycode cleanup (#230)
* clean up quantum.c (#7485)

* idea

* progress

* more stuff

* wip

* wip

* last couple of keycodes you can move safely

* Update quantum/quantum.c

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

* Put back RGB_MODE_BREATHE

* Compile out some keycode processing when features are disabled (#7506)

* Add shift-to-invert to remaining directional RGB_* keycode pairs (#7484)

* Add shift-to-invert to remaining directional RGB_* keycode pairs

RGB_MODE_FORWARD / RGB_MODE_REVERSE invert their functions when shift is held.
This change adds the same capabilities to the remaining directional RGB_*
keycode pairs.  This improves consistency and provides full RGB control in a
keymap containing only one keycode from each pair.

* remove redundant variable

* fix typo

* Fix more typos

Flyspell is on now I swear!

* Relocate magic keycode processing (#7512)

* Move magic keycode processing to own file

* Save some bytes

* Update comments

* Update define to one thats not already used...

* Fix audio

* Fix breathing toggle when rgb is disabled (#7550)

* Ifdef MAGIC_EE_HANDS until #178 drops

revert this commit once it does

* Add short aliases for Magic keycodes (#7541)

* Add short alias for `MAGIC_TOGGLE_NKRO`

* Add aliases for the other Bootmagic keycodes

* Replace long form in default keymaps

* Fix FORCE_NKRO handling (#7601)

* Add until #173 drops

* Relocate RGB keycode processing (#7508)

* Move rgb keycode logic to process_keycode

* Fixes for rgb matrix

* Fixes for mxss

* Fix inc/dec logic, add comments

* Fix return RAINBOW_SWIRL logic

* stop external use of rgb helper functions

* merge fix

* Fix 'defined but not used' when all animations are disabled

Co-authored-by: Yan-Fa Li <yanfali@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com>
Co-authored-by: fauxpark <fauxpark@gmail.com>
Co-authored-by: Florian Didron <fdidron@users.noreply.github.com>
2020-01-09 08:57:11 +09:00
fauxpark
4586615534 Add 4-character aliases for sendstring keycodes (#7409)
* Add 4-character aliases for sendstring keycodes

* Remove pointless mail keycode redefinition

* Forgot brightness keycodes
2020-01-09 08:57:11 +09:00
fauxpark
c17675f50a 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
2020-01-09 08:57:11 +09:00
Joel Challis
ab609a07a6 Fix chibios when mouse and nkro disabled (#7312) 2020-01-09 08:57:11 +09:00
Joel Challis
5aa1d81b15 Fix LAYER_STATE_8BIT compile issues (#7304) 2020-01-09 08:57:11 +09:00
Drashna Jaelre
df91396be9 WS2812 Overhaul (#210)
* 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

* Support RGBLIGHT_SLEEP when ChibiOS boards suspend (#7280)

Copypasta from the AVR suspend implementation with a Teensy-specific
hack removed

* Unify RGB and RGBW commands (#7297)

* Fix unicode in comments

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

* Remove separate RGBW implementation for a unified function

* Set White to 0 in RGBW LEDs

This is just to get this working, later, proper brightness can be handled elsewhere.

* Use us instead of nanoseconds(?) since it renders correctly on web

* Remove RGBW function from arm/ws2812.h

* Remove RGBW function from arm/ws2812.c

* Formatting changes

* Add doc info

* Remove force of debug on within rgblight - causes lockups waiting for hid_listen (#7330)

* Move Ergodox EZ RGB Light code to custom driver  (#7309)

* Move Ergodox EZ RGB code to custom driver

Also implements full addressing of Ergodox EZ's LED Strip, as written by seebs
Co-authored-by: Seebs <seebs@seebs.net>

* Make Clipping range accessible for custom drivers

* Remove RGBW_BB_TWI from driver and docs

* Revert changes to clipping range support

* Use just rgblight_set instead of full custom driver

* Convert to i2c_master commands

* Rename rgblight driver and clean up includes

* Use White channel on RGBW LEDs

* SPI DMA based RGB Underglow for STM32 (#7674)

* Initial stash of ws2812 spi driver

* Update comment, add sync backup plan

* Add testing notes to spi ws2812 driver

* Align RGBW error messages

Co-authored-by: Joel Challis <git@zvecr.com>
Co-authored-by: Jonathan Rascher <jon@bcat.name>
Co-authored-by: Florian Didron <fdidron@users.noreply.github.com>
2020-01-09 08:57:11 +09:00
fauxpark
81126b6673 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
2020-01-09 08:57:11 +09:00
Christopher
c70de1d595 Fixes #7256: USB descriptor to identify correctly as MIDI device. (#7258) 2020-01-09 08:57:11 +09:00
Drashna Jaelre
b4ff413d69 [Core] Add short form LTO_ENABLE (#7259)
For drashna's sanity's sake
2020-01-09 08:57:11 +09:00
Joel Challis
72f42d8e52 rgblight_task logic fixes (#7214) 2020-01-09 08:57:11 +09:00
Joel Challis
a15119dc6f 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
2020-01-09 08:57:11 +09:00
Joel Challis
1f66fd1a3c 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
2020-01-09 08:57:11 +09:00
a_p_u_r_o
bf09fa6148 Remove CR when computing BOOTLOADER_SIZE. (#7453) 2020-01-06 12:21:46 +09:00
Florian Didron
ac7de6603c feat: add get layer command 2019-12-06 08:20:51 +09:00
Florian Didron
f7408111c7 fix: chibios handle disconnections gracefully 2019-12-06 08:20:51 +09:00
Florian Didron
15d3efd5d1 fix: only change usb vesion spec if webusb is enabled 2019-12-06 08:20:51 +09:00
Florian Didron
0bd727cb19 chore: renaming of the get version cmds 2019-12-06 08:20:51 +09:00
Florian Didron
4a8aa15634 fix: lufa handle disconnections gracefully 2019-12-06 08:20:51 +09:00
Florian Didron
54d6f5d4c5 feat: add fw version webusb cmd 2019-12-06 08:20:51 +09:00
Florian Didron
3a14d8874f chore: refactor webusb lp url command 2019-12-06 08:20:51 +09:00
Florian Didron
354af71894 chore: unused var cleanup 2019-12-06 08:20:51 +09:00
Florian Didron
9a97a0eee9 feat: add landing page url command 2019-12-06 08:20:51 +09:00
Florian Didron
925c43c4c0 feat: update examples + pairing process 2019-12-06 08:20:51 +09:00
Florian Didron
f3edef8c69 feat: adds pairing key 2019-12-06 08:20:51 +09:00
Florian Didron
91f8f7f69e fix: run webusb task on chibios 2019-12-06 08:20:51 +09:00
Florian Didron
bea96d1d84 fix: MS OS 2.0 Property value 2019-12-06 08:20:51 +09:00
Florian Didron
ae96eed205 feat: adds webusb 2019-12-06 08:20:51 +09:00
Joel Challis
560d1c5385 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-11-04 17:24:31 +09:00
Joel Challis
d0ee924c9d 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-11-04 17:23:21 +09:00
fauxpark
9d1f6c699b Fix bug in do_code16() (#6935)
* Fix bug in `do_code16()`

* Remove qk_ mods functions
2019-11-04 17:22:54 +09:00
Joel Challis
5f57fa478d Add binary support to tinyprintf (#7024) 2019-11-04 16:58:54 +09:00
Joel Challis
ab799d5628 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-11-04 16:58:23 +09:00
fauxpark
58567e9003 Reorder Raw HID interface to match what the USB spec expects (#6801) 2019-11-04 16:57:29 +09:00
fauxpark
4175e3cbe8 Wrap util.h functions in extern "C" (#6762) 2019-11-04 16:54:55 +09:00
XScorpion2
9dbff9f9c8 Fixing wrapping math logic for timer_expired functions (#6746) 2019-11-04 16:49:55 +09:00
Drashna Jaelre
200c6bedd1 Actually use correct bootloader not found message (#6695) 2019-09-26 10:08:39 +09:00
Drashna Jaelre
0492378872 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-26 10:08:39 +09:00
fauxpark
89104e0d2d Adafruit BLE: Set SPI2X bit only when F_CPU is 8MHz (#6671) 2019-09-26 10:08:39 +09:00
fauxpark
9c70eceec1 Banish some more magic numbers (#6662) 2019-09-26 10:08:39 +09:00
fauxpark
47f2ecb633 Make USB polling rate configurable with a define (#6668) 2019-09-26 10:08:39 +09:00
bwhelm
b39dbc0342 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-26 10:08:39 +09:00
skullY
f8fe33acfa clang-format changes 2019-09-17 11:39:43 +09:00
Drashna Jaelre
07cfca1beb 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-09-17 11:39:43 +09:00
skullY
f6e500e199 Fix vusb compiling after clang-format 2019-09-17 11:39:43 +09:00
skullY
7ee98d5265 Have clang ignore the code in bootloader_size.c 2019-09-17 11:39:43 +09:00
fauxpark
0d1d10edfd 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-09-17 11:39:43 +09:00
XScorpion2
09c4e8ac5d 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-28 14:56:14 +09:00