diff options
author | irieda <[email protected]> | 2023-01-08 06:30:40 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2023-01-07 22:30:40 +0100 |
commit | a7ff2731b91a83767a72da5f8ad196b45bc4c5de (patch) | |
tree | 158138c8c627c2e435d000edeb66a8c6be7a7ea3 /src/machine/machine_rp2040_usb.go | |
parent | 0566bbfeb4f09adecfa1658ad7c67ac652057dce (diff) | |
download | tinygo-a7ff2731b91a83767a72da5f8ad196b45bc4c5de.tar.gz tinygo-a7ff2731b91a83767a72da5f8ad196b45bc4c5de.zip |
Add USB HID joystick support (#3366)
machine/usb: add USB HID joystick support
Diffstat (limited to 'src/machine/machine_rp2040_usb.go')
-rw-r--r-- | src/machine/machine_rp2040_usb.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/machine/machine_rp2040_usb.go b/src/machine/machine_rp2040_usb.go index 372080eec..cb3bb789d 100644 --- a/src/machine/machine_rp2040_usb.go +++ b/src/machine/machine_rp2040_usb.go @@ -151,7 +151,10 @@ func initEndpoint(ep, config uint32) { usbDPSRAM.EPxBufferControl[ep].Out.SetBits(usbBuf0CtrlAvail) case usb.ENDPOINT_TYPE_INTERRUPT | usb.EndpointOut: - // TODO: not really anything, seems like... + val |= usbEpControlEndpointTypeInterrupt + usbDPSRAM.EPxControl[ep].Out.Set(val) + usbDPSRAM.EPxBufferControl[ep].Out.Set(USBBufferLen & usbBuf0CtrlLenMask) + usbDPSRAM.EPxBufferControl[ep].Out.SetBits(usbBuf0CtrlAvail) case usb.ENDPOINT_TYPE_BULK | usb.EndpointIn: val |= usbEpControlEndpointTypeBulk |