File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,17 @@ BOOL DebuggerPort_Initialize( COM_HANDLE ComPortNum )
1919 if (USB_CONFIG_ERR_OK != USB_Configure ( ConvertCOM_UsbController (ComPortNum), NULL ))
2020 return FALSE ;
2121
22- if (!USB_Initialize ( ConvertCOM_UsbController (ComPortNum) ))
23- return FALSE ;
24-
25- return USB_OpenStream ( ConvertCOM_UsbStream (ComPortNum), USB_DEBUG_EP_WRITE, USB_DEBUG_EP_READ );
22+ if (USB_Initialize (ConvertCOM_UsbController (ComPortNum)))
23+ {
24+ #if defined(USB_ALLOW_CONFIGURATION_OVERRIDE)
25+ // because it was called from debugger port USB_Initialize alreadt opened the USB stream
26+ return TRUE ;
27+ #else
28+ return USB_OpenStream ( ConvertCOM_UsbStream (HalSystemConfig.DebuggerPorts [0 ]), USB_DEBUG_EP_WRITE, USB_DEBUG_EP_READ );
29+ #endif
30+
31+ }
32+ break ;
2633#endif
2734
2835 #ifdef FEATURE_SOCKETS
You can’t perform that action at this time.
0 commit comments