]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/usb_cdc.c
Removed dependency on openssl, added AES implementation from polarssl instead
[proxmark3-svn] / common / usb_cdc.c
index e2787fb65a4feb4d1e8b18595f4abce238ad83ac..54f6a8e81bbacd2c8c6825f7a02c478c5935f096 100644 (file)
@@ -223,7 +223,6 @@ byte_t btReceiveBank   = AT91C_UDP_RX_DATA_BK0;
 void usb_disable() {\r
   // Disconnect the USB device\r
   AT91C_BASE_PIOA->PIO_ODR = GPIO_USB_PU;\r
-//  SpinDelay(100);\r
   \r
   // Clear all lingering interrupts\r
   if(pUdp->UDP_ISR & AT91C_UDP_ENDBUSRES) {\r
@@ -257,7 +256,6 @@ void usb_enable() {
   \r
   // Wait for a short while\r
   for (volatile size_t i=0; i<0x100000; i++);\r
-//  SpinDelay(100);\r
 \r
   // Reconnect USB reconnect\r
   AT91C_BASE_PIOA->PIO_SODR = GPIO_USB_PU;\r
@@ -304,8 +302,7 @@ uint32_t usb_read(byte_t* data, size_t len) {
        uint32_t packetSize, nbBytesRcv = 0;\r
   uint32_t time_out = 0;\r
   \r
-       while (len)\r
-  {\r
+       while (len)  {\r
                if (!usb_check()) break;\r
 \r
                if ( pUdp->UDP_CSR[AT91C_EP_OUT] & bank ) {\r
@@ -314,8 +311,7 @@ uint32_t usb_read(byte_t* data, size_t len) {
                        while(packetSize--)\r
                                data[nbBytesRcv++] = pUdp->UDP_FDR[AT91C_EP_OUT];\r
                        pUdp->UDP_CSR[AT91C_EP_OUT] &= ~(bank);\r
-                       if (bank == AT91C_UDP_RX_DATA_BK0)\r
-      {\r
+                       if (bank == AT91C_UDP_RX_DATA_BK0) {\r
                                bank = AT91C_UDP_RX_DATA_BK1;\r
       } else {\r
                                bank = AT91C_UDP_RX_DATA_BK0;\r
Impressum, Datenschutz