Commit Graph

4743 Commits

Author SHA1 Message Date
Ryan
7812b1df57 Add brightness level API to OLED driver (#10772)
* Add brightness level API to OLED driver

* Set default brightness to 255
2021-01-12 22:43:33 -08:00
Erovia
5af121f815 [CLI] Add c2json (#8817)
* Basic keymap parsing finally works

* Add 'keymap.json' creation to the qmk.keymap module

* Add tests and fix formatting

* Fix/exclude flake8 errors

* Convert keymap.c to valid keymap.json

* Fix some errors

* Add tests

* Finalize keymap.json creation, add json template

* Add docs

* Move pygments to the standard requirements

* Add support for nameless layers, fix tests

* Fix things after rebase

* Add missing 'keymap' value.

* Fix missing layer numbers from advanced keycodes

Buckwich noticed that if the advanced keycode / layer toggling key
contains a number, it goes missing.
Now we properly handle them.
Thx for noticing!

* Apply suggestions from code review

* fixup tests

Co-authored-by: Zach White <skullydazed@drpepper.org>
Co-authored-by: skullY <skullydazed@gmail.com>
2021-01-12 22:43:31 -08:00
Drashna Jael're
ec2a7452fc [Keyboard] Disable Console on Planck EZ and Moonlander
Console on ARM boards can cause some weird issues, and because they're not needed, lets disable.
2021-01-12 22:43:02 -08:00
Florian Didron
bc8438f739 Fix/moonlander leds (#318)
* Additionall fixes

* fix spelling errors

* Remove bad matrix wake code

Co-authored-by: Drashna Jael're <drashna@live.com>
2020-10-17 14:48:49 +09:00
Florian Didron
a270d67f9f Merge branch 'firmware19' of github.com:zsa/qmk_firmware into firmware19 2020-10-14 10:48:06 +09:00
Florian Didron
a4b6fe0b23 fix issues with keyboard sleep (#316)
Co-authored-by: Drashna Jael're <drashna@live.com>
2020-10-14 10:46:53 +09:00
Florian Didron
ded395e45d Revert "Revert "Convert ErgoDox EZ to Matrix Lite (qmk#10189)""
This reverts commit edd58256f5.
2020-10-13 21:17:37 +09:00
Florian Didron
edd58256f5 Revert "Convert ErgoDox EZ to Matrix Lite (qmk#10189)"
This reverts commit 396b86b92d.
2020-10-13 21:08:29 +09:00
Drashna Jael're
454684a8bb [Keyboard] Update to ZSA Boards (qmk#10119) 2020-09-30 04:32:30 -07:00
Drashna Jael're
396b86b92d Convert ErgoDox EZ to Matrix Lite (qmk#10189) 2020-09-30 04:04:44 -07:00
Ryan
90f90bd9a9 Remove unused CORTEX_VTOR_INIT (#10053) 2020-09-30 03:28:45 -07:00
Ryan
356659b8a0 Fix joystick compile issues (#9949) 2020-09-30 03:20:14 -07:00
a-chol
f85b1ee83f Hid joystick interface (#4226)
* add support for hid gamepad interface
add documentation for HID joystick
Add joystick_task to read analog axes values even when no key is pressed or release. update doc
Update docs/feature_joystick.md
Manage pin setup and read to maintain matrix scan after analog read

* Incorporates patches and changes to HID reporting

There are some patches provided by @a-chol incorporated on this commit,
and also some changes I made to the HID Report structure.

The most interesting is the one dealing with number of buttons: Linux
doesn't seem to care, but Windows requires the HID structure to be byte
aligned (that's in the spec). So if one declares 8/16/32... buttons they
should not have any issues, but this is what happens when you have 9
buttons:

```
 bits |0|1|2|3|4|5|6|7|
      |*|*|*|*|*|*|*|*| axis 0 (report size 8)
      |*|*|*|*|*|*|*|*| ...
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*| axis 6
      |*|*|*|*|*|*|*|*| first 8 buttons (report size 1)
      |*| | | | | | | | last of 9 buttons, not aligned
```

So for that I added a conditonal that will add a number of reports with
size 1 to make sure it aligns to the next multiple of 8. Those reports
send dummy inputs that don't do anything aside from aligning the data.

Tested on Linux, Windows 10 and Street Fighter (where the joystick is
recognized as direct-input)

* Add save and restore of each pin used in reading joystick (AVR).
Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc
instead of an output pin from the MCU.

Fix joystick report id

Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes)

Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis.

Documentation fixes

* Fix port addressing for joystick analog read

* The other required set of changes
As per the PR, the changes still holding it up.
Add onekey for testing.
Fix ARM builds.
Fix device descriptor when either axes or buttons is zero.
Add compile-time check for at least one axis or button.
Move definition to try to fix conflict.
PR review comments.
qmk cformat

* avoid float functions to compute range mapping for axis adc reading

* Remove V-USB support for now. Updated docs accordingly.

* Update tmk_core/protocol/lufa/lufa.c

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

* Update tmk_core/protocol/usb_descriptor.c

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

* Update tmk_core/protocol/usb_descriptor.c

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

* Update tmk_core/protocol/usb_descriptor.c

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

* Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios

* Fix HID joystick report sending for ChibiOS.
Add one analog axis to the onekey:joystick keymap.
Fix pin state save and restore during joystick analog read for STM32
MCUs.

* Update tmk_core/protocol/chibios/usb_main.c

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

* Update tmk_core/protocol/lufa/lufa.c

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

* Add missing mcuconf.h and halconf.h to onekey:joystick keymap.
Add suggested fixes from PR.

* Switch saveState and restoreState signature to use pin_t type.
onekey:joystick : add a second axis, virtual and programmatically animated.

* Update docs/feature_joystick.md

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

* Update docs/feature_joystick.md

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

* Add PR corrections

* Remove halconf.h and mcuconf.h from onekey keymaps

* Change ADC_PIN to A0

Co-authored-by: achol <allecooll@hotmail.com>
Co-authored-by: José Júnior <jose.junior@gmail.com>
Co-authored-by: a-chol <achol@notamail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-09-30 03:13:02 -07:00
Florian Didron
849aa2fb9e fix: layer3 indicator leds (#305) 2020-08-27 09:28:43 +09:00
Florian Didron
4f9797f439 fix: remove mx lock on ergodox_ez (#306) 2020-08-27 09:28:30 +09:00
Drashna Jaelre
b0bd2e674b Set defaults for Mousekey Wheel movement (#303)
* fix: italian keymap it quot is redefined

* fix: missing deprecated swedish key code

* Adds Moonlander to the list of supported keyboards

* Sorts list and adds EZ suffix to Planck in Readme

* Update Mouse Wheel config

Co-authored-by: Florian Didron <0x6664@hey.com>
Co-authored-by: Erez Zukerman <1092548+ezuk@users.noreply.github.com>
2020-08-17 09:59:59 +09:00
Drashna Jael're
a2cbd53ac9 Fix Moonlander Initialization
Launching!
2020-07-28 08:18:16 -07:00
Drashna Jaelre
15553646b8 Remove Handwired folder 2020-07-28 07:39:38 -07:00
Florian Didron
fa51e2b5c3 fix: Houston 2020-06-12 17:00:27 +09:00
Nick Brassel
5621916ef7 Add SPI 25xx EEPROM support. (#8780) 2020-06-12 17:00:27 +09:00
Drashna Jaelre
d6cd4182b5 Convert clipping variables in rgblight.c to a structure (#7720) 2020-06-12 17:00:27 +09:00
Joel Challis
65de39bb6d Fix AVR ws2812 when ADDRESS_BASE is non zero (#8646)
* Fix AVR ws2812 when ADDRESS_BASE is non zero

* fix port

* remove unused function defs
2020-06-12 17:00:27 +09:00
Ryan
f6e32b4e8d 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-06-12 17:00:27 +09:00
Joel Challis
d9c38abbab ARM - ADC cleanup (#8385)
* Update switch to array to allow custom values

* Add adc keymap

* update docs to reflect alignment of default 10 bit

* start conversion to USE_ADCVn

* samplerate is hella wrong...stub out for now

* basic f1 and f4 functionality

* Tidy up current changes

* Restore old pinToMux function

* Add back sample rate for supported platforms

* F0 compile fixes

* wordsmithery

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

* Remove reference to avr only function

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-06-12 17:00:27 +09:00
Drashna Jael're
44108e524d Enable LED Blinking for Dynamic Macro Recording status for Moonlander 2020-06-02 16:22:32 +09:00
Drashna Jael're
4e98025d2e Enable LED Blinking for Dynamic Macro Recording status for Planck EZ 2020-06-02 16:22:32 +09:00
Drashna Jael're
f6949c1eac Enable LED Blinking for Dynamic Macro Recording status for Ergodox EZ 2020-06-02 16:22:32 +09:00
Drashna Jael're
31d15910e7 Set Dynamic Keymap max size for Moonlander 2020-03-26 00:42:12 -07:00
Florian
094244ca04 revert: change ergodox default debounce value 2020-02-26 10:15:12 +09:00
Drashna Jaelre
a8e1406574 Revert "[Keyboard] Remove i2c write command when reading columns on Ergodox EZ (#8092)"
This reverts commit 737d2793a6ecd6ca9355a92019c8e47cc3f0c4c5.
2020-02-26 10:15:12 +09:00
Florian
ca79f45ea8 fix: change ergodox default value 2020-02-26 10:15:12 +09:00
Drashna Jael're
8402fcc22d Fixes for Moonlander
Removed i2c_start, as it's no longer needed and causes deadlocks now.  Also fixed numbering of default keymap.
2020-02-26 10:15:12 +09:00
esinlayo
a714e1e0e3 [Keyboard] Remove i2c write command when reading columns on Ergodox EZ (#8092)
* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
2020-02-26 10:15:12 +09:00
Drashna Jael're
6198382cb1 Cleanup magic number and functions 2020-02-26 10:15:12 +09:00
Drashna Jael're
c72b69194c Forgot preprocessor for moonlander 2020-02-26 10:15:12 +09:00
Drashna Jael're
4c6c17e68b Tweak moonlander 2020-02-26 10:15:12 +09:00
Drashna Jael're
0c4e870063 Add Oryx Keymap with dynamic keymaps enabled 2020-02-26 10:15:12 +09:00
Drashna Jael're
bac3e50f88 Remove webusb code from moonlander 2020-02-26 10:15:12 +09:00
Drashna Jael're
2feb42ddb0 Limit number of layers due to eeprom size contstraints 2020-02-26 10:15:12 +09:00
Drashna Jael're
3b71e1e819 Implement core communication 2020-02-26 10:15:12 +09:00
Drashna Jael're
bd9df62713 Add Oryx keymap, etc 2020-02-26 10:15:12 +09:00
Drashna Jael're
5ed3ecdd73 Add toggle for live training 2020-02-26 10:15:12 +09:00
Florian Didron
d3f23ecfbc Apollo (#246)
* Add External EEPROM driver

* Add keyboard

* Fix i2c address

* Revert i2c address for eeprom

* Reduce page size for 24LC128

* Disable External EEPROM for now

* Fix up RGB Matrix and layout

* Cleanup moonlander.c file

* Fix led array center

* Disable External EEPROM for now

* Cleanup and optimization of files

* Add and clean up mappings

* Enable "ZSA" defaults for Moonlander

* Update matrix to use i2c_readReg

* Disable render limit for rgb matrix

* Update pin controls to GPIO Commands

* Add proper changed mechanism

* Additional cleanup

* Run clang-format on moonlander files

* Align keymap

* Limit brightness for rgb matrix to 200

To prevent power draw issues

* Add USB-IF VID/PID

* Add RGB Matrix Sleep code

* Enable External EEPROM on Moonlander

* Port over Ergodox Expander error handling and retry code

* Re-init RGB Matrix drivers when half is reconnected

* Add threaded LED display

* Correct layer state settings after moonlander_led_task

* Update Moonlander to include Oryx configuration

* Add webUSB Stuff

* Update default keymap

* fix: merge conflict

Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-02-26 10:15:12 +09:00
Drashna Jaelre
0c676d6e47 Move webusb.h includes to quantum.h (#244)
Co-authored-by: Florian Didron <fdidron@users.noreply.github.com>
2020-01-09 08:57:11 +09:00
Drashna Jaelre
172fbd48ab Re-init rgb matrix on left half reconnect 2020-01-09 08:57:11 +09:00
fauxpark
ea6680ab27 [Core] Cleanup rules.mk for F303 keyboards (#7306)
* Cleanup rules.mk for F303 keyboards

* Fix small typo
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
Florian Didron
925c43c4c0 feat: update examples + pairing process 2019-12-06 08:20:51 +09:00
Florian Didron
b3c0f3b0ef fix: adds webusb include on test keymaps 2019-12-06 08:20:51 +09:00
Florian Didron
40312b7575 feat: webusb keymap examples 2019-12-06 08:20:51 +09:00