| Age | Commit message (Collapse) | Author |
|
A false return from tud_usbtmc_start_bus_read() here does not mean arming
failed: it means the endpoint is already armed, either because the
application re-armed it from its trigger callback or because a transfer is
still queued (usbd_edpt_xfer() reports failure when the endpoint is busy).
Both cases end in STATE_IDLE, so the state cannot disambiguate them either,
and stalling on the result would halt a healthy endpoint.
Co-Authored-By: Claude Opus 5 <[email protected]>
|
|
A single USB488 TRIGGER message left the bulk-OUT endpoint un-armed, so the
host's next bulk-OUT transfer timed out. The trigger itself succeeded
silently, so the failure surfaced on a later, unrelated command; only a
USBTMC device clear recovered it. The bundled examples/device/usbtmc
reproduced this as shipped.
Every other branch of the STATE_IDLE dispatch in usbtmcd_xfer_cb() leaves
the endpoint in a defined state: it either transitions out of STATE_IDLE so
a later tud_usbtmc_start_bus_read() can re-arm it, or it stalls and lets the
CLEAR_FEATURE(ENDPOINT_HALT) handler recover it. USBTMC_MSGID_USB488_TRIGGER
did neither, and because the state stayed STATE_IDLE, even an application
following the contract documented in usbtmc_device.h got a silent no-op from
tud_usbtmc_start_bus_read().
Transition to STATE_NAK so the re-arm can take effect, and stall the
endpoint when trigger is unsupported or the application callback rejects it,
matching the existing handling for messages the driver cannot process. The
callback result is deliberately not wrapped in TU_VERIFY(), which would
return before the stall/re-arm and reintroduce the same hang.
Since the driver now re-arms after a trigger, drop tud_usbtmc_msg_trigger_cb
from the list of callbacks after which the application must do so.
Fixes #3821
Co-Authored-By: Claude Opus 5 <[email protected]>
|
|
Queue the USB488 READ_STATUS_BYTE interrupt notification through tud_usbtmc_transmit_notification_data so it uses the class notification endpoint buffer for the asynchronous transfer.
Fixes #2928
Generated-by: OpenAI Codex
Signed-off-by: aineoae86-sys <[email protected]>
|
|
Use usbd_edpt_claim() before queuing USBTMC notification data so the interrupt endpoint is reserved through the normal endpoint ownership path. Release the claim if the notification payload cannot be copied before the transfer is queued.
Fixes #2735
Generated-by: OpenAI Codex
Signed-off-by: aineoae86-sys <[email protected]>
|
|
* 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.
|
|
copilot/fix-dcd-edpt-xfer-issue
Signed-off-by: HiFiPhile <[email protected]>
|
|
fix compiling with nuc family
|
|
Signed-off-by: Mengsk <[email protected]>
|
|
- Added bool is_isr parameter to usbd_edpt_xfer() and usbd_edpt_xfer_fifo() wrapper functions
- These are called by class drivers to queue USB transfers
- Updated all callers to pass false by default (non-ISR context)
- Updated audiod_rx_xfer_isr() and audiod_tx_xfer_isr() to pass true (ISR context)
- All 21 unit tests pass
Co-authored-by: HiFiPhile <[email protected]>
|
|
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
Co-authored-by: Copilot <[email protected]>
|
|
Co-authored-by: Copilot <[email protected]>
|
|
Co-authored-by: Copilot <[email protected]>
|
|
Signed-off-by: HiFiPhile <[email protected]>
|
|
|
|
* change TUD_EPBUF_TYPE_DEF order
* add and fix -Wmissing-prototypes warnings for cmake (skip make)
|
|
|
|
Add notification support for device class USBTMC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The ep_int_in is already used for responding to USB488
READ_STATUS_BYTE requests, but that EP is defined for all of USBTMC.
This extends the functionality to let callers send notifications and
receive ACKs.
|
|
CFG_TUD_MEM_SECTION is default to CFG_TUSB_MEM_SECTION
|
|
|
|
|
|
|
|
temporarily disable codespell
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code was only reading the first 64 bytes of a 512 bytes packet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exmaples
|
|
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
|
|
|
|
|