41 Commits

Author SHA1 Message Date
Ulf Lilleengen
c7b9060a74 fix: prepare embassy-sync 0.7.1 release
* Add newtype for moved type to preserve API compat
2025-08-12 21:05:32 +02:00
Haobo Gu
f96f68077b chore: bump embassy-usb-synopsys-otg version
Signed-off-by: Haobo Gu <haobogu@outlook.com>
2025-07-22 10:36:29 +08:00
Ulf Lilleengen
6f2f469c56 chore: Release embassy-usb-driver version 0.2.0 2025-07-16 15:43:05 +02:00
Dario Nieuwenhuis
f525386fca
Merge pull request #4397 from korbin/allocate-numbered-endpoints
Make USB endpoint allocator methods accept an optional `EndpointAddress`
2025-07-15 22:08:08 +00:00
Dario Nieuwenhuis
7133cef35d
Merge pull request #4401 from mkj/pr/usb-synopsys-perf
otg: Improve IN write performance
2025-07-15 22:07:38 +00:00
Ulf Lilleengen
f32e8f6025 release: embassy-usb-driver 0.1.1 2025-07-15 21:41:41 +02:00
Matt Johnston
e2ceb2b1f7 otg: Improve IN write performance
chunks_exact() can be handled by the compiler more efficiently.
Previous code was making a memcpy call for each 4 byte chunk slice.
Hoisting the fifo out of the loop avoids recalculating the pointer each
time.

In my benchmark I see a jump from ~13 megabyte/sec to ~25MB/sec after
this change (opt-level=3). opt-level = "z" goes 9MB/s to 18MB/s.

The benchmark was on a stm32h7s3l8, 600mhz clock, 512 byte bulk writes,
data in DTCM. The benchmark isn't just USB writes, also has some
unrelated memcpys for packet construction.
2025-07-15 16:40:37 +08:00
korbin
b666a88ab1
make usb endpoint allocator methods accept an optional EndpointAddress 2025-07-13 20:40:54 -06:00
Matt Johnston
5e49985ed6 embassy-sync: bump to 0.7.0 2025-05-22 13:29:55 +08:00
Yuri Astrakhan
ef0f29f0ed Update defmt dependencies 2025-05-18 20:52:09 +02:00
Matt Johnston
5d6877cbc6 otg: Allow exact out buffer size
The existing check required N+1 buffer size.
2025-02-17 13:38:31 +08:00
Ulf Lilleengen
ed63f80637 chore: bump embassy-sync version
Prepare version 0.6.2 for release
2025-01-15 16:12:36 +01:00
Dániel Buga
89b97c2d7c
Fix search-and-replacability 2025-01-05 21:35:05 +01:00
Dániel Buga
306099f9d5
Prepare embassy-usb-synopsys-otg 0.2.0 2024-12-06 13:23:06 +01:00
Dario Nieuwenhuis
bc7372d701 otg: use const blocks for init. 2024-11-24 00:32:26 +01:00
Dario Nieuwenhuis
032af9d512 otg: fix corruption in CONTROL OUT transfers in stm32f4.
The RM says we have to process STUP (and therefore clear CNAK to start the data stage)
in the DOEPINT STUP interrupt. Seems doing it in RXFLVL when we receive the data is
too early. This makes it work consistently on all chips, so the quirk is no longer needed.

Fixes #3493
Fixes #3459
2024-11-24 00:32:26 +01:00
Dario Nieuwenhuis
4f459bb918 otg: improve trace logging, print bytes as hex. 2024-11-24 00:32:26 +01:00
Dario Nieuwenhuis
1ca53e286b otg: fix build with defmt enabled. 2024-11-24 00:32:26 +01:00
Dániel Buga
c9abff53d7
Bump sync version (#3562)
* Bump sync version

* Use old embassy-sync in rp bluetooth example

* Downgrade update to minor
2024-11-22 21:16:11 +01:00
Kevin
6d9af8304c Add USBPHYC clock configuration for H7RS series 2024-09-22 00:23:07 +02:00
Kevin
2f60d78ea3 Add OTG_HS support for STM32H7R/S 2024-09-22 00:23:07 +02:00
elagil
d37c482e21 feat(usb-otg): add support for ISO endpoints 2024-09-05 21:29:11 +02:00
Ulf Lilleengen
1cfd5370ac
Merge pull request #3281 from elagil/ulpi_add_fs_support
feat: Add support for a full-speed ULPI mode
2024-08-25 06:05:41 +00:00
elagil
557cff7085 feat: Add support for a full-speed ULPI mode 2024-08-24 20:23:10 +02:00
ferris
0b87795937 Add OTG core DMA address registers 2024-08-13 17:31:52 +02:00
Dario Nieuwenhuis
7d65c5c4fa usb-synopsys-otg: ensure ep alloc fails when endpoint_count < MAX_EP_COUNT.
Before, it would alloc the endpoint fine and then panic later due to out of range.
This ensures it falis at ep alloc time, and with a panic message that says
what's the actual problem: "no free endpoints available".
2024-08-03 00:15:45 +02:00
Tarun Singh
a716a3f006 Reduced define for 'unreachable!' to a single macro rule 2024-07-17 17:05:52 -04:00
Dario Nieuwenhuis
6a4ac5bd60 Add collapse_debuginfo to fmt.rs macros.
This makes location info in defmt logs point to the code calling the macro,
instead of always to fmt.rs as before. Fix works with nightlies
starting with today's, and stable 1.81+.
2024-06-17 01:38:57 +02:00
Ulf Lilleengen
cf0d227cca Prepare for embassy-sync 0.6.0 release 2024-05-29 12:09:55 +02:00
Matt Ickstadt
9d6746e650 usb: add transceiver delay option 2024-05-21 14:42:37 -05:00
Matt Ickstadt
5a8ac21f6b embassy-usb-synopsys-otg: impl Sync for EpState
This restores the Send/Sync impls for EpState, which were incidentally
removed in #2881. This allows the Endpoints to be send to tasks, e.g.
as part of a custom class implementation.
2024-05-20 12:21:55 -05:00
Dario Nieuwenhuis
09781db85d embassy-usb-synopsys-otg: default vbus_detect to false. 2024-05-13 01:11:49 +02:00
Dario Nieuwenhuis
ecc910b76d Release embassy-usb-synopsys-otg v0.1.0 2024-04-30 17:24:32 +02:00
Dániel Buga
887d7e1430 Configure MAX_EP_COUNT via const generics 2024-04-27 18:01:45 +02:00
Dániel Buga
61e3ca049c Only access the necessary parts of State 2024-04-27 17:57:11 +02:00
Dániel Buga
7b4d2ab1be Group endpoint states into a per-endpoint struct 2024-04-27 17:18:40 +02:00
Dario Nieuwenhuis
5732ee7ca9 Reduce use of the full futures crate. 2024-04-26 23:22:25 +02:00
Dario Nieuwenhuis
597315873d Remove leftover cargo new boilerplate. 2024-04-26 22:59:50 +02:00
Dániel Buga
3dc54c8c44 Add some metadata 2024-04-26 18:28:41 +02:00
Dániel Buga
50aefb4174 Hide the Dir trait 2024-04-26 18:13:15 +02:00
Dániel Buga
91c42e0b9e Extract synopsys otg driver 2024-04-26 17:58:23 +02:00