From 4d59afcc64c35d6a1c07290d77dedb5e0046c7df Mon Sep 17 00:00:00 2001 From: Thibault RICHARD Date: Wed, 9 May 2012 12:45:14 +0200 Subject: [PATCH] [SAM] CDC working. (workaround implemented for Windows previous issue) --- .../arduino/sam/cores/sam/USB/USBCore.cpp | 9 +++++---- .../sam/cores/sam/libsam_sam3x8e_gcc_dbg.a | Bin 244890 -> 244890 bytes .../arduino_due_x/libsam_sam3x8e_gcc_rel.a | Bin 75306 -> 75306 bytes 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hardware/arduino/sam/cores/sam/USB/USBCore.cpp b/hardware/arduino/sam/cores/sam/USB/USBCore.cpp index 711ff8a5d..4ba52631b 100644 --- a/hardware/arduino/sam/cores/sam/USB/USBCore.cpp +++ b/hardware/arduino/sam/cores/sam/USB/USBCore.cpp @@ -425,17 +425,15 @@ static void USB_ISR(void) uint8_t requestType = setup.bmRequestType; if (requestType & REQUEST_DEVICETOHOST) { - TRACE_CORE(printf(">>> EP0 Int: IN Request\r\n");) + TRACE_CORE(puts(">>> EP0 Int: IN Request\r\n");) UDD_WaitIN(); } else { - TRACE_CORE(printf(">>> EP0 Int: OUT Request\r\n");) + TRACE_CORE(puts(">>> EP0 Int: OUT Request\r\n");) UDD_ClearIN(); } - - bool ok = true ; if (REQUEST_STANDARD == (requestType & REQUEST_TYPE)) { @@ -507,6 +505,9 @@ static void USB_ISR(void) else { 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 ok = USBD_ClassInterfaceRequest(setup); } diff --git a/hardware/arduino/sam/cores/sam/libsam_sam3x8e_gcc_dbg.a b/hardware/arduino/sam/cores/sam/libsam_sam3x8e_gcc_dbg.a index e59285c720c07ecebf1cfe0ba5ddbbb3418347c8..88d9d7bea60a19fd91f10dae0a7014245eb1e177 100644 GIT binary patch delta 341 zcmbRBlW*2fz6mmHre+2P2F4qeN+cjm!|4aMGKy{9B;inuBEZ+f!GR)RH02JmfcR$Z zxxxA#ttU6Dk@w(r}>^no2BVhnM>shvz;P(^MXWIB5cJJ1?4GZbl|H;f*VFzEzVrZ7ba#}I7X_DgC^ zJ7l3E+b6g%rKuxHi*FasVd{595)s?JZzIzOb`+6QJDI+)vx2=meg9TQ@$I(`GM&gq p2uN-}pv$aej1Umt{x5-9K@?fQs*E{A4l2;^!X&wU%@pQ$>Hr_0Yl;8> diff --git a/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a b/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a index ab3148aeb222eaed691bfad2d246b1634731d45c..4a27d212bcf978c4e257dbe977743be7393afbea 100644 GIT binary patch delta 322 zcmZ2=hGo?mmI*R!rlyvbmL?mO3Zx-S!|4TVjN+TuOFw3X2pCO1pe?p}ogxnxl)w3a z_8Sc-8>0ARh_pPC;!Pzo{1C1&Sg%F%2XOLqweGXKit7f5{Z%{S*vMp56fP0UsS>g#Z8m delta 316 zcmZ2=hGo?mmI*R!CI)8aW)>Tj3Zz-V%*h{5iEmyf{e%^ntH{FzQE0mPfc6^=D0_MV z8>9HitjPS87wn<>LGogoS#E6ML-NX%XS1MwHU~LhVtWrW g<2@#*1>1olKVTe??(Hp{j4F}{?c0wiF{UvC0G+{Q`~Uy|