aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/chibios
Commit message (Collapse)AuthorAgeFilesLines
* [Core] chibios: usb_main: remove OTG sof workaround (#24259)Stefan Kerkmann2024-12-151-8/+0
| | | | | | | | chibios: usb_main: remove OTG sof workaround With the update of ChibiOS and ChibiOS-Contrib containing fixes for the OTGv1 LLD the workaround is not necessarry anymore. Signed-off-by: Stefan Kerkmann <[email protected]>
* [Core] `usb_device_state`: consolidate usb state handling across ↵Stefan Kerkmann2024-10-182-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementations (#24258) * usb_device_state: add idle_rate, led and protocol Previously all usb drivers and platform implementations (expect for our oddball atsam) tracked the same two global variables: - keyboard_protocol: to indicate if we are in report or boot protocol - keyboard_idle: for the idle_rate of the keyboard endpoint And a local variable that was exposed trough some indirection: - keyboard_led_state: for the currently set indicator leds (caps lock etc.) These have all been moved into the usb_device_state struct wich is accessible by getters and setters. This reduces code duplication and centralizes the state management across platforms and drivers. Signed-off-by: Stefan Kerkmann <[email protected]> * usb_device_state: reset protocol on reset The usb hid specification section 7.2.6 states: When initialized, all devices default to report protocol. However the host should not make any assumptions about the device’s state and should set the desired protocol whenever initializing a device. Thus on reset we should always do exactly that. Signed-off-by: Stefan Kerkmann <[email protected]> * keyboards: fix oversize warnings Signed-off-by: Stefan Kerkmann <[email protected]> --------- Signed-off-by: Stefan Kerkmann <[email protected]>
* Change suspend condition check order on ChibiOS (#24020)Drashna Jaelre2024-07-041-1/+1
|
* [FIX] ChibiOS: USB Digitizer and Joystick IN endpoint compilation (#23854)0.25.6Stefan Kerkmann2024-06-031-2/+2
| | | | Co-authored-by: Ryan <[email protected]>
* Fix WAIT_FOR_USB handling (#23598)Joel Challis2024-04-241-1/+6
|
* Remove midi_ep_task from ChibiOS (#23162)Robin Carlier2024-03-282-16/+0
| | | Co-authored-by: Joel Challis <[email protected]>
* Refactor vusb to protocol use pre/post task (#14944)Joel Challis2024-03-141-13/+0
|
* [Core] Refactor ChibiOS USB endpoints to be fully async (#21656)Stefan Kerkmann2024-02-2810-1124/+1295
|
* Remove console out endpoint (#22304)Joel Challis2024-01-092-54/+52
|
* [Maintenance] USB HID control packet as struct (#21688)Stefan Kerkmann2023-10-271-92/+59
| | | | | | | | | | | | * ChibiOS: USB HID control request as dedicated struct Instead of accessing the raw USB setup packet and documenting the values as the corresponding USB HID control request fields we introduce a struct that allows direct access to the fields. This is safer and self documenting. * Rename usb_request.h to usb_types.h In the future all shared USB data types can live in this file.
* Separate 6KRO and NKRO report structs (#22267)Ryan2023-10-232-14/+11
|
* Revert changes to ChibiOS Suspend Code (#21830)Drashna Jaelre2023-08-272-22/+56
| | | | | | | | | | | | | | | | | | | | | * Partially revert #19780 * Finish * Get teensy 3.5/3.6 board files too * fix lint issue * Revert "[Bug] Restore usb suspend wakeup delay (#21676)" This reverts commit e8e989fd7ad7c10e725e50ae8b0a4426e09f7f30. * Apply suggestions from code review Co-authored-by: Joel Challis <[email protected]> --------- Co-authored-by: Joel Challis <[email protected]>
* [Bug] Restore usb suspend wakeup delay (#21676)Stefan Kerkmann2023-08-022-44/+14
| | | | | | | | | * Respect USB_SUSPEND_WAKEUP_DELAY on wakeup This delay wasn't honored after removing `restart_usb_driver` from the suspend and wakeup handling. It is now re-introduced in the appropriate spot, namely after issuing a remote wakeup to a sleeping host. * Remove old, unused and commented testing code
* [Bug] Fix non-functional S3 wakeup / resume from suspense (#19780)Stefan Kerkmann2023-06-261-13/+9
| | | | | | | | | | | | | | | | | | | | * Update ChibiOS-Contrib for USB suspend fixes * Remove S3 wakup workaround ChibiOS OTGv1 driver has a remote wakeup bug that prevents the device to resume it's operation. 02516cbc24647f522eee975e69cc0c8a925470eb introduced a hotfix that forcefully restarted the usb driver as a workaround. This workaround broke multiple boards which do not use this driver / peripheral. With the update of ChibiOS this hotfix is now obsolete. * Remove restart_usb_driver overrides they are no longer necessary as the workaround is not needed anymore for stm32f4 * Remove unused RP_USB_USE_SOF_INTR defines The SOF interrupt is enabled dynamically by the RP2040 usb driver
* Chibios USB: Take into account if host wants remote wakeup or not (#21287)Purdea Andrei2023-06-261-1/+3
| | | | | | | | | | | | | | | According to the USB 2.0 spec, remote wakeup should be disabled by default, and should only be enabled if the host explicitly requests it. The chibios driver code already takes care of storing this information, and returning it on GET_STATUS requests. However our application code has been ignoring it so far. This is a USB compliance issue, but also a bug that causes trouble in some cases: On RP2040 targets this has been causing problems if a key is held down while the keyboard is plugged in. The keyboard would fail to enumerate until all keys are released. With this change that behavior is fixed. Note that for LUFA targets this is already done correctly.
* Move protocol makefiles into their respective folders (#21332)Ryan2023-06-221-0/+17
| | | | | * Move protocol makefiles into their respective folders * Fix USB-USB converter
* ChibiOS: Consolidate report sending code (#19607)Ryan2023-01-161-151/+40
|
* Fix joystick build for ChibiOS (#19602)Sergey Vlasov2023-01-151-1/+1
| | | | `joystick_report_t` was renamed to `report_joystick_t`, but apparently one place in the code was missed.
* usb_main.c: remove `CH_KERNEL_MAJOR` check (#19597)Ryan2023-01-151-8/+0
|
* [CI] Format code according to conventions (#19265)QMK Bot2022-12-091-9/+9
|
* Return USB HID GET_REPORT requests (#14814)Jack Humbert2022-12-091-12/+43
| | | | Co-authored-by: Sergey Vlasov <[email protected]> Co-authored-by: Nick Brassel <[email protected]>
* Detect host OS based on USB fingerprint (#18463)Ruslan Sayfutdinov2022-12-091-4/+6
| | | | Co-authored-by: Drashna Jaelre <[email protected]> Co-authored-by: Nick Brassel <[email protected]>
* Fixed NKRO issue caused by HID_SET_PROTOCOL on Chibios platform (#17588)lokher2022-12-091-2/+1
|
* Joystick feature improvements (#19052)Ryan2022-11-271-2/+2
|
* ChibiOS USB: Add a dummy IN callback to work around LLD bugs (#18811)Sergey Vlasov2022-10-221-5/+15
| | | | | | | | | | | | | | | | In #18631 some IN notification callbacks that were doing nothing were removed, which should be a valid thing to do (ChibiOS HAL checks the `in_cb` and `out_cb` pointers for being non-NULL before invoking those optional callbacks). However, it turned out that some less popular USB LLDs (KINETIS and MIMXRT1062) have their own checks for those pointers, and (incorrectly) skip the ChibiOS callback handling when those pointers are NULL, which breaks the code for the `USB_USE_WAIT` configuration option (the waiting thread never gets resumed if the corresponding callback pointer is NULL). Add those dummy callbacks again (but use a single function for all of them instead of individual ones for each endpoint); this restores the KINETIS and MIMXRT1062 boards to the working state while the LLDs are getting fixed.
* Widen the ARM Cortex-M family support. Allow USB peripheral change. (#18767)Nick Brassel2022-10-192-4/+7
|
* Fix joystick functionality for ChibiOS and OTG (Blackpill) (#18631)Ryan2022-10-132-120/+80
| | | Co-authored-by: Sergey Vlasov <[email protected]>
* Refactor `send_extra` (#18615)Ryan2022-10-062-6/+3
|
* Refactor more host code (programmable button & digitizer) (#18565)Ryan2022-10-052-10/+3
|
* [Core] ChibiOS: Fix USB bus disconnect handling (#18566)Stefan Kerkmann2022-10-022-1/+3
|
* Further refactoring of joystick feature (#18437)Ryan2022-09-271-51/+3
|
* Adjust `EXTRAKEY_ENABLE` ifdefs for `send_extra()` (#18249)Ryan2022-09-021-2/+2
|
* Simplify extrakeys sending at the host driver level (#18230)Ryan2022-09-022-16/+3
| | | | | | | | | * Simplify extrakeys sending at the host driver level * There are two arguments here * Wrong syntax * Adjust keyboards which use a custom host driver
* [Core] `STM32_USB_USE_OTG1` => `USB_ENDPOINTS_ARE_REORDERABLE` (#17647)Nick Brassel2022-08-041-16/+14
|
* [Core] Add Raspberry Pi RP2040 support (#14877)Stefan Kerkmann2022-06-301-52/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Disable RESET keycode because of naming conflicts * Add Pico SDK as submodule * Add RP2040 build support to QMK * Adjust USB endpoint structs for RP2040 * Add RP2040 bootloader and double-tap reset routine * Add generic and pro micro RP2040 boards * Add RP2040 onekey keyboard * Add WS2812 PIO DMA enabled driver and documentation Supports regular and open-drain output configuration. RP2040 GPIOs are sadly not 5V tolerant, so this is a bit use-less or needs extra hardware or you take the risk to fry your hardware. * Adjust SIO Driver for RP2040 * Adjust I2C Driver for RP2040 * Adjust SPI Driver for RP2040 * Add PIO serial driver and documentation * Add general RP2040 documentation * Apply suggestions from code review Co-authored-by: Nick Brassel <[email protected]> Co-authored-by: Nick Brassel <[email protected]>
* Check for ongoing transfers on the OUT endpoint (#16974)Stefan Kerkmann2022-05-141-1/+1
| | | | | | | | | | | | | | | | ...when attempting to start a receiving USB transfer. Previously, we would check on the IN endpoint which is the transmitting part of the USB endpoint. This is wrong and lead to two USB transfers being started immediately after each other in case of e.g. RAW HID endpoints: 1. When finishing an OUT transfer the low level USB driver calls the out_cb callback, which in turn initiates another OUT transfer by calling qmkusbDataReceived. 2. When the raw hid receive channel runs empty inside the raw_hid task, another OUT transfer is started to potentially fill the channel again. This happens by calling ibnotify. Both events occur directly after each other, thus triggering the bug.
* [CI] Format code according to conventions (#16914)QMK Bot2022-04-221-2/+2
|
* Chibios USB protocol: allow overriding RAW Capacity (#16339)dexter932022-04-221-2/+6
|
* Fixed usb read loops not reading until timeout (#16827)Sascha2022-04-101-3/+3
| | | * the size variable was redeclared (hiding the variable of the outside scope) and therefore the while check was always false, so the compiler just removed the do while loop, but it would be better to read all data and only exit the task, after this is done
* Format code according to conventions (#16322)QMK Bot2022-02-124-20/+52
|
* ChibiOS: add support for HID Programmable Buttons (#15787)Thomas Weißschuh2022-02-042-1/+31
| | | | | | | | | | * ChibiOS: add support for HID Programmable Buttons Fixes #15596 * Enable SHARED_ENDPOINT when PROGRAMMABLE_BUTTON is enabled The Programmable Button driver expects the shared EP to be enabled. So enforce this invariant.
* [Core] ChibiOS: shorten USB disconnect state on boot to 50ms (#15805)Stefan Kerkmann2022-01-101-1/+1
|
* Add missing virtser_init() to ChibiOS code (#15356)0.15.2Ryan2021-11-301-0/+2
|
* Update to ChibiOS 20.3.4, support builds against trunk (#14208)Nick Brassel2021-11-031-1/+11
| | | | | | | | | | | | | | | | | | | * Add support for building against ChibiOS svn/trunk. * Swap to 21.6.x * Update to latest branch revision as released version is broken. * Updated configs. * Conf updates. * Updated ChibiOS * Convert STM32L422 to actual L422 ChibiOS platform. * Downgrade to 20.3.4 as ChibiOS 21.6.x is being aborted. * Rollback L422-based boards.
* Fixup #15029 (#15031)Nick Brassel2021-11-021-2/+2
|
* Revert to old init order for host driver (#15029)Joel Challis2021-11-021-3/+3
| | | * Partially revert 14888
* Begin to carve out platform/protocol API - Migrate keyboard_* calls (#14888)Joel Challis2021-10-241-12/+3
|
* Merge remote-tracking branch 'origin/master' into developQMK Bot2021-10-231-0/+11
|\
| * Check usb transmit status in send_extra() (#14643)0.14.26Dasky2021-10-231-0/+11
| |
* | Remove SERIAL_LINK feature (#14727)Joel Challis2021-10-071-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove SERIAL_LINK * more stale paths in doxygen-todo * Fix * More refs * Update testing docs * Update doxygen-todo Co-authored-by: Ryan <[email protected]> Co-authored-by: Ryan <[email protected]>