mirror of https://github.com/noisymime/Arduino.git
[SAM] CDC working. (workaround implemented for Windows previous issue)
This commit is contained in:
parent
d6d23c530a
commit
4d59afcc64
|
@ -425,17 +425,15 @@ static void USB_ISR(void)
|
||||||
uint8_t requestType = setup.bmRequestType;
|
uint8_t requestType = setup.bmRequestType;
|
||||||
if (requestType & REQUEST_DEVICETOHOST)
|
if (requestType & REQUEST_DEVICETOHOST)
|
||||||
{
|
{
|
||||||
TRACE_CORE(printf(">>> EP0 Int: IN Request\r\n");)
|
TRACE_CORE(puts(">>> EP0 Int: IN Request\r\n");)
|
||||||
UDD_WaitIN();
|
UDD_WaitIN();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE_CORE(printf(">>> EP0 Int: OUT Request\r\n");)
|
TRACE_CORE(puts(">>> EP0 Int: OUT Request\r\n");)
|
||||||
UDD_ClearIN();
|
UDD_ClearIN();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool ok = true ;
|
bool ok = true ;
|
||||||
if (REQUEST_STANDARD == (requestType & REQUEST_TYPE))
|
if (REQUEST_STANDARD == (requestType & REQUEST_TYPE))
|
||||||
{
|
{
|
||||||
|
@ -507,6 +505,9 @@ static void USB_ISR(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE_CORE(puts(">>> EP0 Int: ClassInterfaceRequest\r\n");)
|
TRACE_CORE(puts(">>> EP0 Int: ClassInterfaceRequest\r\n");)
|
||||||
|
|
||||||
|
UDD_WaitIN(); // Workaround: need tempo here, else CDC serial won't open correctly
|
||||||
|
|
||||||
USBD_InitControl(setup.wLength); // Max length of transfer
|
USBD_InitControl(setup.wLength); // Max length of transfer
|
||||||
ok = USBD_ClassInterfaceRequest(setup);
|
ok = USBD_ClassInterfaceRequest(setup);
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue