Commit graph

249 commits

Author SHA1 Message Date
Drashna Jael're
da280739ef
Merge remote-tracking branch 'origin/master' into develop 2022-02-17 08:44:30 -08:00
Joakim Tufvegren
7f63bcf38b
[Bug] Re-add call to suspend_power_down_kb() (#16382) 2022-02-17 08:33:07 -08:00
QMK Bot
63646e8906
Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Joel Challis
135c935990
Initial migration of suspend callbacks (#16067)
* Initial migration of suspend logic

* Add header
2022-02-05 05:10:00 +11:00
QMK Bot
b79b8dcdd0
Format code according to conventions (#16110) 2022-01-29 12:25:49 +00:00
Ga68
1f59fe6d1b
Adjust tap_code16 to account for TAP_HOLD_CAPS_DELAY (#15635)
Co-authored-by: Ga68 <github.ga68.e@grxme.com>
2022-01-28 23:03:21 -08:00
Joel Challis
a8700404f7
Relocate matrix_init_quantum content (#15953)
* Relocate matrix_init_quantum content

* Update include order

* Fix cherry pick from 15722
2022-01-23 02:41:57 +00:00
Joel Challis
6e83b44940
Align location of some host led logic (#15954)
* Align location of host led logic

* Move more

* align ifdefs

* Fix up includes

* Move callback defs

* Convert comment to build message
2022-01-22 21:17:02 +00:00
Ryan
b45a037c7e
Rename some Quantum keycodes (#15968)
* Rename some Quantum keycodes

* Tweak EEPROM clear and debug keycode short aliases
2022-01-22 03:34:15 +00:00
Joel Challis
d840ef2b28
Relocate matrix_scan_quantum tasks (#15882)
* Move matrix_scan_quantum tasks

* Fix tests

* Fix up missing refs
2022-01-19 17:38:48 +00:00
Drashna Jaelre
672c6b4721
Make (un)register code functions weak (#15285) 2021-12-27 12:15:56 +11:00
Drashna Jaelre
942b3cf16c
Generalize Unicode defines (#15409) 2021-12-06 09:38:36 -08:00
precondition
4bac5f53d8
New feature: DYNAMIC_TAPPING_TERM_ENABLE (#11036)
* New feature: `DYNAMIC_TAPPING_TERM_ENABLE`

3 new quantum keys to configure the tapping term on the fly.

* Replace sprintf call in tapping_term_report by get_u16_str

* Replace tab with 4 spaces
2021-11-26 07:06:50 +11:00
Drashna Jaelre
32a87d3517
Add uint to char functions (#15244)
* Add uint to char functions

* appease the all mighty lint

* Further appease Lint

* Update functions

* Add doxygen comment

* Update quantum/quantum.c

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

* Apply suggestions from code review

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

* Add declaration for get_numeric_string

* fix formatting and bug

Co-authored-by: Nick Brassel <nick@tzarc.org>
2021-11-23 08:13:22 +11:00
Drashna Jaelre
56e3f06a26
Rework and expand Pointing Device support (#14343)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
2021-11-14 22:03:24 -08:00
Ryan
f529580860
Basic keycode overhaul (#14726) 2021-11-03 22:22:17 -07:00
Ryan
d8f0c8783a
Remove sysex API (#14723) 2021-10-06 19:34:46 +11:00
Thomas Weißschuh
83988597f4
Add Support for USB programmable buttons (#12950) 2021-09-15 08:40:22 -07:00
Drashna Jaelre
15710db4ad
Move feature suspend logic out of platform specific code (#14210) 2021-08-30 20:21:03 +01:00
Joel Challis
a84de5e22b
Revert 14083 && 14144 (#14150)
* Revert "Short term bodge for firmware size bloat (#14144)"

This reverts commit a8d6547346.

* Revert "Tidy up quantum.c now some of tmk_core has been merged (#14083)"

This reverts commit c4dbf4bf01.
2021-08-25 01:16:59 +01:00
Joel Challis
c4dbf4bf01
Tidy up quantum.c now some of tmk_core has been merged (#14083) 2021-08-24 14:28:37 +01:00
Drashna Jaelre
4e3726bfe1
Fixup Audio startup and add to documents (#13606)
* Fixup Audio startup and add to documents

* fix doc descriptions
2021-08-15 21:51:50 +01:00
Pete Sevander
7e983796e1
Process combos earlier & overlapping combos (#8591)
* Combo processing improvements.

Now it is possible to use ModTap and LayerTap keys as part of combos.
Overlapping combos also don't trigger all the combos, just exactly the
one that you press.

New settings:
- COMBO_MUST_HOLD_MODS
- COMBO_MOD_TERM
- COMBO_TERM_PER_COMBO
- COMBO_MUST_HOLD_PER_COMBO
- COMBO_STRICT_TIMER
- COMBO_NO_TIMER

* Remove the size flags from combo_t struct boolean members.

This in the end actually saves space as the members are accessed so many
times. The amount of operations needed to access the bits uses more
memory than setting the size saves.

* Fix `process_combo_key_release` not called correctly with tap-only combos

* Fix not passing a pointer when NO_ACTION_TAPPING is defined.

* Docs for `COMBO_ONLY_FROM_LAYER`

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update quantum/process_keycode/process_combo.c

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Add `EXTRA_SHORT_COMBOS` option.

Stuff combo's `disabled` and `active` flags into `state`. Possibly can
save some space.

* Add more examples and clarify things with dict management system.

- Simple examples now has a combo that has modifiers included.
- The slightly more advanced examples now are actually more advanced
  instead of just `tap_code16(<modded-keycode>)`.
- Added a note that `COMBO_ACTION`s are not needed anymore as you can
  just use custom keycodes.
- Added a note that the `g/keymap_combo.h` macros use the
  `process_combo_event` function and that it is not usable in one's
  keymap afterwards.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Change "the" combo action example to "email" example.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Fix sneaky infinite loop with `combo_disable()`

No need to call `dump_key_buffer` when disabling combos because the
buffer is either being dumped if a combo-key was pressed, or the buffer is empty
if a non-combo-key is pressed.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-08-06 09:44:57 +10:00
Joel Challis
3f419dc872
Unconditionally call led_init_ports (#12116)
* Unconditionally call led_init_ports

* Another call to led_init_ports
2021-08-03 18:34:32 +01:00
Joel Challis
4ef8ff458d
Minor tidy up of key overrides (#13747)
* Minor tidy up of key overrides

* Update quantum/quantum.c

* Update quantum/quantum.c
2021-07-28 12:01:49 +01:00
Joel Challis
03d258c222
matrix_scan_x -> x_task (#13748) 2021-07-28 12:01:23 +01:00
Joel Challis
f945c352e7
Haptic: driver-> feature (#13713) 2021-07-25 19:14:58 -07:00
Ryan
332a5aa7cb
Move SENDSTRING_BELL code to send_string.h (#13566) 2021-07-16 09:40:20 -07:00
Jonas Gessner
52cfc9259b
[Feature] Key Overrides (#11422) 2021-07-13 10:13:51 -07:00
Drashna Jaelre
8da8aabbe5
Improve layer mask handling (#13065) 2021-07-03 00:19:52 -07:00
QMK Bot
71f8f5048b Merge remote-tracking branch 'origin/master' into develop 2021-03-12 07:04:21 +00:00
Ryan
88dce24375
Remove hex_to_keycode and move tap_random_base64 to send_string.c (#12079) 2021-03-12 18:03:44 +11:00
Ryan
9155b59e1a
LED Matrix: decouple from Backlight (#12054) 2021-03-08 16:55:00 +11:00
Drashna Jaelre
0e984b6e7e
Add ability to toggle One Shot functionality (#4198)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-03-01 08:57:02 -08:00
QMK Bot
0efafdd408 Merge remote-tracking branch 'origin/master' into develop 2021-02-28 20:12:15 +00:00
Ryan
1a7f2c8f45
Extract sendstring into its own compilation unit (#12060)
* Extract sendstring into its own compilation unit

* License headers?

* Put this include in the header
2021-03-01 07:11:39 +11:00
Joel Challis
a3cbc8a004
Overhaul bootmagic logic to have single entrypoint (#8532)
* Relocate bootmagic logic to have single entrypoint

* Align init of layer state
2021-02-28 15:50:15 +00:00
Nick Brassel
abe189377c
[BUG] Massdrop develop rgb fix (#12022)
* Allow for disabling RGB_MATRIX on Massdrop boards.

* Fixup init sequence.

* Make some functions static as they've got very generic names.
2021-02-26 17:07:05 +11:00
XScorpion2
d1806a26e4
Split transport mirror (#11046)
* Split transport mirror support

* Updated RGB Matrix to respond to electrical events instead of key events

* split matrix slave fix
2021-02-16 11:30:33 +11:00
Drashna Jaelre
7161d65070
Remove FAUXCLICKY feature (deprecated) (#11829) 2021-02-09 09:49:05 -08:00
QMK Bot
b4e02f8ddf Merge remote-tracking branch 'origin/master' into develop 2021-02-05 13:28:01 +00:00
Joel Challis
b2d0e8a491
Manually run formatting job (#11797) 2021-02-05 13:27:24 +00:00
Joshua Diamond
ae4ee7553a
Stop sounds when suspended (#11553)
* fix stopping audio on suspend vs. startup sound

* trim firmware size

* fix stuck audio on startup (ARM)
2021-02-01 09:25:55 +11:00
QMK Bot
0fa2e7c790 Merge remote-tracking branch 'origin/master' into develop 2021-01-31 21:18:46 +00:00
Ryan
6bec7fb3fe
quantum.c send char cleanups (#11743) 2021-02-01 08:18:10 +11:00
Nick Brassel
31c57aab35 qmk cformat 2021-01-17 10:19:56 -08:00
Joshua Diamond
e190872b82
Improved Language Specific Keycodes for US International and Extended Layouts (#11307)
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-01-02 15:54:48 +11:00
James Young
c66df16644
2020 November 28 Breaking Changes Update (#11053)
* Branch point for 2020 November 28 Breaking Change                                                

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183)                                           

* Add support for soft serial to ATmega32U2 (#10204)                                               

* Change MIDI velocity implementation to allow direct control of velocity value (#9940)            

* Add ability to build a subset of all keyboards based on platform.                                

* Actually use eeprom_driver_init().                                                               

* Make bootloader_jump weak for ChibiOS. (#10417)                                                  

* Joystick 16-bit support (#10439)                                                                 

* Per-encoder resolutions (#10259)                                                                 

* Share button state from mousekey to pointing_device (#10179)                                     

* Add hotfix for chibios keyboards not wake (#10088)                                               

* Add advanced/efficient RGB Matrix Indicators (#8564)                                             

* Naming change.                                                                                   

* Support for STM32 GPIOF,G,H,I,J,K (#10206)                                                       

* Add milc as a dependency and remove the installed milc (#10563)                                  

* ChibiOS upgrade: early init conversions (#10214)                                                 

* ChibiOS upgrade: configuration file migrator (#9952)                                             

* Haptic and solenoid cleanup (#9700)                                                              

* XD75 cleanup (#10524)                                                                            

* OLED display update interval support (#10388)                                                    

* Add definition based on currently-selected serial driver. (#10716)                               

* New feature: Retro Tapping per key (#10622)                                                      

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638)             

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530)

* Rescale both ChibiOS and AVR backlighting.                                                       

* Reduce Helix keyboard build variation (#8669)                                                    

* Minor change to behavior allowing display updates to continue between task ticks (#10750)        

* Some GPIO manipulations in matrix.c change to atomic. (#10491)                                   

* qmk cformat (#10767)                                                                             

* [Keyboard] Update the Speedo firmware for v3.0 (#10657)                                          

* Maartenwut/Maarten namechange to evyd13/Evy (#10274)                                             

* [quantum] combine repeated lines of code (#10837)                                                

* Add step sequencer feature (#9703)                                                               

* aeboards/ext65 refactor (#10820)                                                                 

* Refactor xelus/dawn60 for Rev2 later (#10584)                                                    

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824)                                 

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549)                                    

* update chibios os usb for the otg driver (#8893)                                                 

* Remove HD44780 References, Part 4 (#10735)                                                       

* [Keyboard] Add Valor FRL TKL (+refactor) (#10512)                                                

* Fix cursor position bug in oled_write_raw functions (#10800)                                     

* Fixup version.h writing when using SKIP_VERSION=yes (#10972)                                     

* Allow for certain code in the codebase assuming length of string. (#10974)                       

* Add AT90USB support for serial.c (#10706)                                                        

* Auto shift: support repeats and early registration (#9826)                                       

* Rename ledmatrix.h to match .c file (#7949)                                                      

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231)                                        

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840)                                        

* Merge point for 2020 Nov 28 Breaking Change
2020-11-28 12:02:18 -08:00
Joel Challis
1ff5ee255f
Indicator LEDs as config (#10816)
* First pass

* Add config options to docs

* Update some wording

* Slight tidy up of backlight caps logic

* Init pin to correct state

* Move init location

* Reverse default state
2020-11-08 22:31:16 +00:00
a-chol
d4be07dad3 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-08-29 14:30:02 -07:00