mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
fix(usb): support bidirectional endpoints on RP2 and SAMD21/51.
Remap CDC and MSC endpoints to share physical endpoint numbers. This change separates IN/OUT directional states for RP2 endpoints to prevent cross-talk, ensures SAMD21 and SAMD51 endpoint configuration merging does not overwrite bidirectionally shared registers, implements missing SAMD endpoint stall and clear methods, and corrects SAMD interrupt loop bounds to iterate over physical endpoint numbers rather than dynamic configuration entries.
This commit is contained in:
committed by
Ron Evans
parent
c3f1832d9a
commit
eab43851ac
@@ -2,10 +2,14 @@
|
||||
|
||||
package cdc
|
||||
|
||||
import (
|
||||
"machine/usb"
|
||||
)
|
||||
|
||||
const (
|
||||
cdcEndpointACM = 1
|
||||
cdcEndpointOut = 2
|
||||
cdcEndpointIn = 3
|
||||
cdcEndpointACM = usb.CDC_ENDPOINT_ACM
|
||||
cdcEndpointOut = usb.CDC_ENDPOINT_OUT
|
||||
cdcEndpointIn = usb.CDC_ENDPOINT_IN
|
||||
)
|
||||
|
||||
// New returns USBCDC struct.
|
||||
|
||||
Reference in New Issue
Block a user