summaryrefslogtreecommitdiff
path: root/src/osal/osal_freertos.h
AgeCommit message (Collapse)Author
2026-07-02license: use SPDX identifiers for src/ headers (#3749)Ha Thach
* license: use SPDX identifiers for src/ headers Replace the full ~20-line MIT license boilerplate on every src/ file with a two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500 lines of duplicated boilerplate.
2026-06-22Merge remote-tracking branch 'tinyusb/master' into pr-osal-spin-deinitHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-06-21fix(host): release spinlock in tuh_deinit to fix multi-rebuild panicrenjie
tuh_rhport_init() calls osal_spin_init(&_usbh_spin), which under OPT_OS_PICO claims a hardware spinlock via critical_section_init(). There was no osal_spin_deinit(), so tuh_deinit() never released it: every host init/deinit cycle leaked one spinlock. RP2350 has a small spinlock pool, so a few usb_host rebuilds exhaust it and hw_claim_unused_from_range() panics (the long-standing "crashes on the 4th rebuild" bug). Add osal_spin_deinit() to all OSAL backends (critical_section_deinit for pico; no-op for none/freertos) and call it in tuh_deinit(). Verified 20/20 deinit+rebuild cycles on RP2350-Zero and Waveshare RP2350-USB-A (previously panicked on the 4th). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-05-29Implement asynchronous control transfer queuing for USB host stackhathach
- Added a pending FIFO queue for asynchronous control transfers when the active slot is busy. - Introduced `control_xfer_dispatch_pending` to handle queued transfers on slot availability. - Improved synchronization for blocking and non-blocking transfer modes, preventing deadlocks in RTOS. - Refactored and renamed related functions for clarity and consistency. - Enhanced error handling and callback invocation for failed or stale transfers.
2026-05-27osal add osal_task_get_current_handle()hathach
2026-03-13remove TUSB_MCU_VENDOR_ESPRESSIF, use ESP_PLATFORM for Espressifhathach
2026-03-05add IAR warning flags to cmake build and fix themhathach
2026-02-27add osal_time_millis() to osal requirementhathach
implement tusb_time_millis_api() with osal_time_millis() when OS is not NONE
2025-11-03fixing alert by scanning toolhathach
2025-05-21osal_spin skipping lock/unlock when executed in isrhathach
2025-05-20rename osal_critcal to osal_spinlockhathach
add spinlock implementation for most rtos
2025-05-19implement osal critical for none/freertos/pico-sdkhathach
2025-05-19add osal_critical API() for use with dwc2hathach
2024-06-27remove double semicolon since ISO C not allow itDavide Gerhard
ISO C does not allow extra ';' outside of a function [-Werror=pedantic]
2024-03-22update osal APIhathach
add osal_semaphore_delete(), osal_mutex_delete(), osal_queue_delete()
2023-08-03add osal queue name if neededhathach
also mass change configQUEUE_REGISTRY_SIZE = 4
2023-08-03Revert "Name queues for easier FreeRTOS debugging with task- and queue-aware ↵hathach
debuggers" This reverts commit 11fba59319d81fb9502fbf399abb4fe27cf3fa29.
2023-06-28Name queues for easier FreeRTOS debugging with task- and queue-aware debuggersDave Nadler
2023-06-01For FreeRTOS kernel-aware debugging, when queue registry is enabled, label ↵Dave Nadler
tinyUSB queue
2023-03-17fix trailing space and new linehathach
temporarily disable codespell
2022-12-19Update osal_freertos.hjbruneaux31
Fix FreeRTOS task switch even if not required (unitialized variable usage)
2022-12-05clean osal_freertos, update freertos examples to work with ↵hathach
configSUPPORT_DYNAMIC_ALLOCATION only note: for example to build with configSUPPORT_STATIC_ALLOCATION = 0, one of heap_n.c must be included in makefile/cmake
2022-12-02Some reverts and changes after discussion.pete-pjb
2022-11-30Fix white space issue.pete-pjb
2022-11-30Modify FreeRTOS integration to allow non-static allocation.pete-pjb
2022-04-20fix freertos issue when 1 tick > 1 mshathach
2022-04-20add msec timeout to osal_queue_receive(), tud_task() and tuh_task() both ↵hathach
pending for event queue with timeout of 1 ms
2022-02-25improve rphort management for usbdhathach
2022-02-18fix build with latest esp idfhathach
2021-09-25add CFG_TUSB_OS_INC_PATH for os include pathhathach
useful for freertos/ prefix with esp IDF
2021-04-16tinyusb: add support of esp32s3 targetAlex Lisitsyn
add support of new esp32s3 target and the board update the roles.mk wrapper to allow dfu flashing of espressif chip update examples to allow compilation for esp32s3_addax_1 board once the code is tested the PR to original tinyusb repo will be submitted
2020-07-21follow up to pr468hathach
2020-07-20FreeRTOS: Yield from ISR to notify the USB taskme-no-dev
If we do not yeld in ISR when we write to queue/give semaphore, the scheduler will not know of the change and will not check the queue untill the next OS tick. This change causes the task to be called immediately and makes communication many times faster.
2020-05-20fix freeRTOS logichathach
2020-05-20remove osal_queue_t const qhdl from osal APIhathach
since it doesn't make any differences.
2020-05-20added osal_queue_empty() APIhathach
ported for osal none/freertos/mynewt
2019-05-14update license year to 2019hathach
2019-04-02clean uphathach
2019-03-30usbd add connected, suspended, remote_wakeuphathach
- remove use of osal_queue_reset
2019-03-20clean uphathach
2019-03-20migrate license from BSD 3 clause to MIThathach
2018-12-13osal clean uphathach
remove OSAL_TASK_DEF, osal_task_create. Applicaton should create a task and call tinyusb_task(). This make API consistent with NO OS.
2018-12-06change osal_semaphore_wait to return boolhathach
2018-12-05fixing build error with host stackhathach
2018-12-05add role to OSAL_QUEUE_DEF() to disable correct dcd/hcd isrhathach
2018-11-14change osal_queue_receive() signaturehathach
- fix build issue with freertos
2018-11-07Add SAMD21 and SAMD51 support for CircuitPython.Scott Shawcroft
The ProtoThreads style subtasks were removed because it led to extremely unclear control flow. RTOSes can be used if threading is needed. Also added some additional functionality to MSC to support dynamic LUNs and read-only LUNs.
2018-11-02clean up osalhathach
2018-11-02add osal_mutexhathach
2018-10-23merge osal_queue_send_isr to osal_queue_send, osal_semaphore_post_isr to ↵hathach
osal_semaphore_post