arduino / arduino/ArduinoCore-avr

Hardcoded timeout in USB_Send

Open
#478 1 comment 0 reactions 0 assignees Claimed by @Ryzee119 View on GitHub
enhancement
Dominant language
C
Stars
1.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Here:
[u8 timeout = 250](https://github.com/arduino/ArduinoCore-avr/blob/bc792a9a716289249fa5f2f67be3ee8ba6507d6c/cores/arduino/USBCore.cpp#L280)

250ms is quite large for my application. Could this be moved to a compile time define?

Perhaps something like this?
```
#ifndef USB_SEND_TIMEOUT
#define USB_SEND_TIMEOUT 250
#endif
```

```diff
- u8 timeout = 250; // 250ms timeout on send? TODO
+ u8 timeout = USB_SEND_TIMEOUT; // timeout on send? TODO
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at cores/arduino/USBCore.cpp around line 280, where USB_Send contains the hardcoded timeout. Review the linked pull request and the proposed compile-time configuration in the issue. Done means the timeout can be configured at compile time while retaining the existing default.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.