Skip to content

Commit ebe7781

Browse files
author
rdon
committed
fix code format.
1 parent 9cb0145 commit ebe7781

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/machine/machine_rp2350_usb.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,24 +174,23 @@ func initEndpoint(ep, config uint32) {
174174
func handleUSBSetAddress(setup usb.Setup) bool {
175175
// Using 570μs timeout which is exactly the same as SAMD21.
176176

177-
const ackTimeout=570
177+
const ackTimeout = 570
178178
rp.USB.SIE_STATUS.Set(rp.USB_SIE_STATUS_ACK_REC)
179179
sendUSBPacket(0, []byte{}, 0)
180-
180+
181181
// Wait for transfer to complete with a timeout.
182182
t := timer.timeElapsed()
183183
for (rp.USB.SIE_STATUS.Get() & rp.USB_SIE_STATUS_ACK_REC) == 0 {
184184
if dt := timer.timeElapsed() - t; dt >= ackTimeout {
185185
return false
186186
}
187187
}
188-
188+
189189
// Set the device address to that requested by host.
190190
rp.USB.ADDR_ENDP.Set(uint32(setup.WValueL) & rp.USB_ADDR_ENDP_ADDRESS_Msk)
191191
return true
192192
}
193193

194-
195194
// SendUSBInPacket sends a packet for USB (interrupt in / bulk in).
196195
func SendUSBInPacket(ep uint32, data []byte) bool {
197196
sendUSBPacket(ep, data, 0)

0 commit comments

Comments
 (0)