Commit graph

825 commits

Author SHA1 Message Date
QMK Bot
866f853bff Merge remote-tracking branch 'origin/master' into develop 2020-11-22 21:13:12 +00:00
Joel Challis
b8443863c0
Remove references to ch-bootloader-jump.patch (#10998) 2020-11-22 21:12:30 +00:00
Zach White
ac3b7d79e0 Merge remote-tracking branch 'origin/master' into develop
Resolved Conflicts:
    keyboards/kc60/rules.mk
    keyboards/xd96/rules.mk
    lib/python/qmk/cli/__init__.py
2020-11-22 08:28:53 -08:00
Drashna Jaelre
e7497b3fba
Add references for is_keyboard_left() (#10850)
* Add references for is_keyboard_left()

* Remove proto from bootmagic_lite.c
2020-11-18 16:50:32 -08:00
yulei
55e2a42047
update chibios os usb for the otg driver (#8893)
* add support for otg

* update endpoint numbering for stm32f4

* removed testing file

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824)

Add a Make variable to easily enable DEBUG_MATRIX_SCAN_RATE on the command line.

eg.
```
make DEBUG_MATRIX_SCAN_RATE_ENABLE=yes  KEYBOARD:KEYMAP
```

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

* Added `add_oneshot_mods` & `del_oneshot_mods`

Deleted undefined and unused prototypes:
- void oneshot_enable(void)
- void oneshot_disable(void)
- void oneshot_toggle(void)

Reordered the oneshot functions to follow the same order as other mod
functions, that is to say : get, add, del, set, clear

* Stricter conditions on add_oneshot_mods & del_oneshot_mods

Prevent extending the one shot timer if the called add_oneshot_mods or del_oneshot_mods do not change anything to the current one shot mod state.

Co-authored-by: David Kosorin <david@kosorin.net>

Co-authored-by: David Kosorin <david@kosorin.net>

* add support for otg

* update endpoint numbering for stm32f4

* removed testing file

* added missing #endif

Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: David Kosorin <david@kosorin.net>
2020-11-11 03:17:42 +11:00
precondition
3dcb0463ad
[Core] Added add_oneshot_mods & del_oneshot_mods (#10549)
* Added `add_oneshot_mods` & `del_oneshot_mods`

Deleted undefined and unused prototypes:
- void oneshot_enable(void)
- void oneshot_disable(void)
- void oneshot_toggle(void)

Reordered the oneshot functions to follow the same order as other mod
functions, that is to say : get, add, del, set, clear

* Stricter conditions on add_oneshot_mods & del_oneshot_mods

Prevent extending the one shot timer if the called add_oneshot_mods or del_oneshot_mods do not change anything to the current one shot mod state.

Co-authored-by: David Kosorin <david@kosorin.net>

Co-authored-by: David Kosorin <david@kosorin.net>
2020-11-10 20:27:35 +11:00
Takeshi ISHII
28d6b9d7be
add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824)
Add a Make variable to easily enable DEBUG_MATRIX_SCAN_RATE on the command line.

eg.
```
make DEBUG_MATRIX_SCAN_RATE_ENABLE=yes  KEYBOARD:KEYMAP
```
2020-11-10 19:03:15 +11:00
Chris Merrill
16fe4b8b77
Update massdrop/alt and arm_atsam/led_matrix to fix #10813 (#10818)
* Update massdrop/alt keyboard to fix Caps Lock LED flickering.

* Fix Caps-lock LED during underglow-only for massdrop/ctrl

* Update keyboards/massdrop/ctrl/keymaps/default/keymap.c
2020-11-09 13:33:40 -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
Nick Brassel
991c75081c
qmk cformat (#10767) 2020-10-30 13:23:07 -07:00
Nick Brassel
c4ecae1d77
Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) 2020-10-30 13:23:03 -07:00
ridingqwerty
daea43debf
New feature: Retro Tapping per key (#10622) 2020-10-30 13:23:01 -07:00
Purdea Andrei
c904520f72
Haptic and solenoid cleanup (#9700)
* solenoid: remove two functions that do nothing.

These functions modify the argument, and so they do nothing.

Note: versions of these functions exist in mtdjr's user folder,
however to core solenoid support and mtdjr user-specific solenoid
support are exclusive (only one can be used at a time).

So removing these confusing functions does no harm.

* solenoid: bugfix: don't allow dwell time to go 1ms below minimum time.

The previous code allowed dwell time to go 1ms below the configured minimum.
This change corrects it.

* solenoid: bugfix: when incrementing above maximum dwell time, jump back to minimum, not to 1

The previous code used to jump back to 1, which might be way under the configured minimum setting.

* solenoid: bugfix: on startup actually use the eeprom-stored dwell-time

This is because the dwell time is stored in two variables.

* solenoid: bugfix: on haptic_reset, actually use the newly set default dwell time.

This is needed because dwell time is configured in two variables.

* solenoid: on HPT_RST set buzz to a default value

* solenoid: buzz: reworked to make more configurable. Previous behaviour maintained.

* solenoid: documentation: clarify meaning of dwell time

* solenoid: add feature SOLENOID_DWELL_STEP_SIZE

* solenoid: documentation: added note about the precision of the solenoid time settings

* haptic: Correctly call haptic_reset when eeprom is corrupt.

* haptic: improve what happens if haptic is enabled without erasing eeprom

* haptic: improve what happens if solenoid is enabled without erasing eeprom

* drivers/haptic: fix compilation issue, when haptic is enabled, but solenoid isn't
2020-10-30 13:15:50 -07:00
Nick Brassel
2e1232c6bd
ChibiOS upgrade: configuration file migrator (#9952)
* Initial commit for ChibiOS conf migration.

* Modify paths, normalise chconf.h and halconf.h to be common.

* Allow deletion of non-overridden files.
2020-10-30 13:15:49 -07:00
LSChyi
b1a6b161f3
Add hotfix for chibios keyboards not wake (#10088) 2020-10-30 13:15:43 -07:00
Manna Harbour
eecedf0db5
Share button state from mousekey to pointing_device (#10179)
* Branch point for 2020 November 28 Breaking Change

Update readme.md

* Share button state from mousekey to pointing_device

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

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
2020-10-30 13:15:42 -07:00
seb-pau
f728c249ce
Joystick 16-bit support (#10439)
* Joystick 16-bit support

* Add variable joystick axes resolution

* Moved #define statements to .h files

* Moved definitions to quantum/joystick.h

  Removed duplicate definitions from usb_descriptor.h and
  process_joysick.h

  Adjust process_joystick.c and usb_descriptor.c to use the pre-computed
  "JOYSTICK_RESOLUTION" value which contains the logical maximum value
  of a joystick axis

* Cleaning up unnecessary code

* Update docs/feature_joystick.md

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

* Workaround to joystick.h not being included to report.h

* Removed unnecessary newlines, updated report.h

Changed JOYSTICK_AXES_RESOLUTION conditional in report.h

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-10-30 13:15:41 -07:00
Nick Brassel
9664723595
Make bootloader_jump weak for ChibiOS. (#10417) 2020-10-30 13:15:40 -07:00
Nick Brassel
2f2432f0e5
Actually use eeprom_driver_init(). 2020-10-30 13:15:39 -07:00
Sergey Vlasov
53ad78b4b6
Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183)
The matrix_col_t type was added in commit 0284431ad9 (part of #3449),
but then the code which used that type was removed in #6140, and no
other users were added since that time.  The presence of that type,
however, limits MATRIX_ROWS to 32, which probably does not matter for a
real keyboard, but prevents doing things like making a firmware to test
all existing pins on a board like Teensy++ 2.0 (which has 46 GPIOs).
2020-10-30 13:15:35 -07:00
Sergey Vlasov
f149c07d68
Fix KEYBOARD_SHARED_EP incompatibility with VIA (#9930)
The `KEYBOARD_SHARED_EP=yes` option was breaking the VIA support,
because the raw HID interface number in this case was 0 instead of 1,
and the VIA app depends on the exact interface number for raw HID.
Change the interface ordering to put the shared interface before the raw
HID interface if `KEYBOARD_SHARED_EP` is enabled, so that the raw HID
interface can keep its number.
2020-10-27 10:40:59 +11:00
Adrian
120c42255b
Added EEPROM emulation for STM32F042x6 series processors (#10685)
* Added STM32F042x6 support for EEPROM emulation

* Default to lower stack size on STM32F042

* Moved stack setting

* Re-moved stack definition

* Removed unnecessary check
2020-10-22 21:05:01 +11:00
Peter Landoll
0fbb1e550a
Add description in Bluetooth docs for requiring NKRO to be disabled (#10359) 2020-09-22 22:31:37 +10:00
David Cuthbert
b846480d5a
Output an error message if LINK_TIME_OPTIMIZATION_ENABLE is set but LTO_ENABLE is not (#10217)
* Output an error message if LINK_TIME_OPTIMIZATION_ENABLE is set but LTO_ENABLE is not.

* Update common.mk

Specify that LINK_TIME_OPTIMZATION_ENABLE has been renamed, not deprecated.
2020-09-17 15:14:39 -07:00
Frans de Jonge
2b9f200a2a
[fix] dfu-programmer <0.7 doesn't support --force flag (#10292)
Fixes <https://github.com/qmk/qmk_firmware/issues/10286>.
2020-09-13 02:17:47 +01:00
Ryan
6e948feb6a
Use the force when flashing with dfu-programmer (#10070) 2020-09-10 00:00:27 +10:00
QMK Bot
a3db72df72 format code according to conventions [skip ci] 2020-08-29 22:57:48 +00:00
Ryan
0f596881b3 Remove support for Adafruit EZ-Key (#10103)
* Remove support for Adafruit EZ-Key

* Update docs/ja/feature_bluetooth.md

Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>

Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com>
2020-08-29 14:30:02 -07:00
Ryan
b89b2030af Kiibohd bootloader, take 2 (#10129) 2020-08-29 14:30:02 -07:00
Drashna Jaelre
92385b3fb6 Better handle LTO_ENABLE (#9832)
* Better handle LTO_ENABLE

Especially when calling from command line

* Replace LINK_TIME_OPTIMIZATION_ENABLE with LTO_ENABLE

* Remove long for LTO from show_options.mk
2020-08-29 14:30:02 -07:00
Ryan
3f392c09b6 More Bluetooth refactoring (#9905) 2020-08-29 14:30:02 -07:00
yiancar
47f8947bf5 Update vusb to match 3rd endpoint. (#9020)
* Update vusb to match 3rd endpoint.

- With the addition of https://github.com/qmk/v-usb/pull/1 a 3rd endpoint (endpoint4) becomes available.
- We can assign mouse/extrakeys to that endpoint as its a desirable feature and leave rawhid and console to compete for the 2nd endpoint.

NOTE: The version of vusb.c in future branch is older than master. Just remember that it will need a #error if both raw_hid and console are enabled at the same time.

* Final Fixes

* Update tmk_core/protocol/vusb/vusb.c

* Update tmk_core/protocol/vusb/vusb.c

* Update tmk_core/protocol/vusb/usbconfig.h

* Update tmk_core/protocol/vusb/usbconfig.h

* Update tmk_core/protocol/vusb/usbconfig.h

* Update tmk_core/protocol/vusb/usbconfig.h

* Updated vusb submodule to latest commit
2020-08-29 14:30:02 -07:00
Nick Brassel
167daa9cf8 Add ability to dump all makefile variables for the specified target. (#8256) 2020-08-29 14:30:02 -07:00
Sergey Vlasov
d00ac5dfb6 Add st-flash flash target (#9964)
* Add `st-flash` flash target

Add support for flashing the firmware via the `st-flash` utility from
the STLink Tools package (https://github.com/stlink-org/stlink).

* Add `st-flash` to the `qmk flash -b` output
2020-08-29 14:30:02 -07:00
Ryan
12333b7c5e Fix joystick compile issues (#9949) 2020-08-29 14:30:02 -07:00
Drashna Jaelre
e6266b19be Initialize Layer State on startup (#8318)
* Initialize Layer State on startup

Right now, on startup, the default layer state gets called and set, triggering the callback functions for the default layer state. However, the normal layer state never actually gets initialized.  It's set to 0 directly, by default, but the callback functions are never actually called.  This creates some inconsistency in the behavior for end users.  This adds a simple "clear" that triggers the callback on startup.  This should produce more consisten behavior between the two functions and layer masks.

* Stupid hack

* Fix type casting?

* Fix compile issues with magic is disabled
2020-08-29 14:30:02 -07: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
Drashna Jaelre
3c74edbc69 Disable NKRO on V-USB controllers (#9054)
* Disable NKRO on V-USB controllers

* not _currently_ supported text

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

Co-authored-by: Ryan <fauxpark@gmail.com>
2020-08-29 14:30:02 -07:00
Nick Brassel
686a9d35ff Re-fix the STM32 dual-bank bootloader stuff. (#9738)
* Re-fix the dual-bank bootloader stuff.

* Use wait_ms() instead of using nop's for a delay, as ChibiOS is actually running at the time of bootloader jump.
2020-08-29 14:30:02 -07:00
Nick Brassel
93e7a8f74c Add dual-bank STM32 bootloader support, given GPIO toggle on BOOT0 to charge RC circuit. (#8778) 2020-08-29 14:30:02 -07:00
dhong44
d0abad27ab Fix the mousekey scrolling (#9174)
Mousekey scrolling should have a separate repeat variable
to keep track of scrolling acceleration, instead of being
tied to mouse movement scolling in mousekeys. The send function
should record when the last movement was made since this is
when movement is actually sent. Doing this fixes the bug where
the initial press of a mousekey scroll button causes a double scroll.

Signed-off-by: Daniel Hong <daniel.hong@live.com>
2020-08-29 14:30:02 -07:00
Ryan
8a4a0c25fd Change analogRead calls to analogReadPin (#9023)
* Change analogRead calls to analogReadPin

* Add ChangeLog

* Update docs, remove mention of `analogRead()`

* Retarget changelog for next round
2020-08-29 14:30:02 -07:00
Nick Brassel
60e5733c48 qmk cformat on develop (#9501) 2020-08-29 14:30:02 -07:00
Ryan
3b34858b77 Don't compile outputselect.c if Bluetooth is disabled (#9356) 2020-08-29 14:30:02 -07:00
Ryan
69e0ad1b2c Additional cleanups for V-USB code (#9310) 2020-08-29 14:30:02 -07:00
Ryan
1193e45bf4 Convert CONSUMER2BLUEFRUIT() and CONSUMER2RN42() macros to static inline functions (#9055) 2020-08-29 14:30:02 -07:00
Ryan
f209f91c7c Various tidyups for USB descriptor code (#9005) 2020-08-29 14:30:02 -07:00
Nick Brassel
385d49cc39 Initial work for consolidation of ChibiOS platform files (#8327)
* Initial work for consolidation of board files and default ChibiOS configs.

* Migrate F401/F411 black pills for testing.

* Add early init bootloader jump flag.

* Add support for I2C in order to use i2c_scanner keymap.

* Add F401/F411 HSE bypass to get things booting.

* Exempt "hooked" ChibiOS conf files from updater script.

* Fix up ordering for bootloader_defs file check.

* Match previous $(KEYBOARD_PATHS) value for Proton-C, updated for all board configs.
2020-08-29 14:30:02 -07:00
Ryan
5cc3ab38c9 Remove iWRAP protocol (#9284) 2020-08-29 14:30:02 -07:00
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