@@ -21,8 +21,8 @@ func initEndpoint(ep, config uint32) {
2121 offset := ep * 2 * usbBufferLen + 0x100
2222 val |= offset
2323
24- // Bulk and interrupt endpoints must have their Packet ID reset to DATA0 when un-stalled
25- epXPIDReset [ep ] = false // Default to false in case an endpoint is re-initialized
24+ // Bulk and interrupt endpoints must have their Packet ID reset to DATA0 when un-stalled.
25+ epXPIDReset [ep ] = false // Default to false in case an endpoint is re-initialized.
2626
2727 switch config {
2828 case usb .ENDPOINT_TYPE_INTERRUPT | usb .EndpointIn :
@@ -119,7 +119,7 @@ func handleEndpointRxComplete(ep uint32) {
119119 setEPDataPID (ep , ! epXdata0 [ep ])
120120}
121121
122- // Set the USB endpoint Packet ID to DATA0 or DATA1
122+ // Set the USB endpoint Packet ID to DATA0 or DATA1.
123123func setEPDataPID (ep uint32 , dataOne bool ) {
124124 epXdata0 [ep ] = dataOne
125125 if epXdata0 [ep ] || ep == 0 {
@@ -150,7 +150,7 @@ func sendViaEPIn(ep uint32, data []byte, count int) {
150150 _usbDPSRAM .EPxBufferControl [ep & 0x7F ].In .Set (val )
151151}
152152
153- // Set ENDPOINT_HALT/stall status on a USB IN endpoint
153+ // Set ENDPOINT_HALT/stall status on a USB IN endpoint.
154154func (dev * USBDevice ) SetStallEPIn (ep uint32 ) {
155155 // Prepare buffer control register value
156156 if ep == 0 {
@@ -162,7 +162,7 @@ func (dev *USBDevice) SetStallEPIn(ep uint32) {
162162 _usbDPSRAM .EPxBufferControl [ep & 0x7F ].In .Set (val )
163163}
164164
165- // Set ENDPOINT_HALT/stall status on a USB OUT endpoint
165+ // Set ENDPOINT_HALT/stall status on a USB OUT endpoint.
166166func (dev * USBDevice ) SetStallEPOut (ep uint32 ) {
167167 if ep == 0 {
168168 panic ("SetStallEPOut: EP0 OUT not valid" )
@@ -171,7 +171,7 @@ func (dev *USBDevice) SetStallEPOut(ep uint32) {
171171 _usbDPSRAM .EPxBufferControl [ep & 0x7F ].Out .Set (val )
172172}
173173
174- // Clear the ENDPOINT_HALT/stall on a USB IN endpoint
174+ // Clear the ENDPOINT_HALT/stall on a USB IN endpoint.
175175func (dev * USBDevice ) ClearStallEPIn (ep uint32 ) {
176176 ep = ep & 0x7F
177177 val := uint32 (usbBuf0CtrlStall )
@@ -182,7 +182,7 @@ func (dev *USBDevice) ClearStallEPIn(ep uint32) {
182182 }
183183}
184184
185- // Clear the ENDPOINT_HALT/stall on a USB OUT endpoint
185+ // Clear the ENDPOINT_HALT/stall on a USB OUT endpoint.
186186func (dev * USBDevice ) ClearStallEPOut (ep uint32 ) {
187187 ep = ep & 0x7F
188188 val := uint32 (usbBuf0CtrlStall )
0 commit comments