File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -229,19 +229,23 @@ func initEndpoint(ep, config uint32) {
229229 switch config {
230230 case usb .ENDPOINT_TYPE_INTERRUPT | usb .EndpointIn :
231231 enableEPIn (ep )
232+ setEPDataPID (ep | usb .EndpointIn , false )
232233
233234 case usb .ENDPOINT_TYPE_BULK | usb .EndpointOut :
234235 nrf .USBD .INTENSET .Set (nrf .USBD_INTENSET_ENDEPOUT0 << ep )
235236 nrf .USBD .SIZE .EPOUT [ep ].Set (0 )
236237 enableEPOut (ep )
238+ setEPDataPID (ep , false )
237239
238240 case usb .ENDPOINT_TYPE_INTERRUPT | usb .EndpointOut :
239241 nrf .USBD .INTENSET .Set (nrf .USBD_INTENSET_ENDEPOUT0 << ep )
240242 nrf .USBD .SIZE .EPOUT [ep ].Set (0 )
241243 enableEPOut (ep )
244+ setEPDataPID (ep , false )
242245
243246 case usb .ENDPOINT_TYPE_BULK | usb .EndpointIn :
244247 enableEPIn (ep )
248+ setEPDataPID (ep | usb .EndpointIn , false )
245249
246250 case usb .ENDPOINT_TYPE_CONTROL :
247251 enableEPIn (0 )
@@ -259,7 +263,7 @@ func SendUSBInPacket(ep uint32, data []byte) bool {
259263 sendUSBPacket (ep , data , 0 )
260264
261265 // clear transfer complete flag
262- nrf .USBD .INTENCLR .Set (nrf .USBD_INTENCLR_ENDEPOUT0 << 4 )
266+ nrf .USBD .INTENCLR .Set (nrf .USBD_INTENCLR_ENDEPOUT0 << ep )
263267
264268 return true
265269}
You can’t perform that action at this time.
0 commit comments