From 2b0575889f44954e5f015bb0ebfa86f25720d800 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 5 Apr 2019 13:20:54 +0800 Subject: [PATCH] usb-dev: remove commented-out printf statements Signed-off-by: Sean Cross --- sw/src/usb-dev.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/sw/src/usb-dev.c b/sw/src/usb-dev.c index 649e211..d91dee3 100644 --- a/sw/src/usb-dev.c +++ b/sw/src/usb-dev.c @@ -18,8 +18,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) uint32_t datalen = 0; const usb_descriptor_list_t *list; - // printf("%s:%d SETUP packet (%04x) value: %02x index: %02x\n", __FILE__, __LINE__, setup->wRequestAndType, setup->wIndex, setup->wValue); - switch (setup->wRequestAndType) { case 0x0500: // SET_ADDRESS @@ -46,7 +44,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) case 0x0082: // GET_STATUS (endpoint) if (setup->wIndex > 0) { - // printf("get_status (setup->wIndex: %d)\n", setup->wIndex); usb_err(dev, 0); return; } @@ -64,7 +61,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) if (setup->wIndex > 0 || setup->wValue != 0) { // TODO: do we need to handle IN vs OUT here? - // printf("%s:%d clear feature (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -77,7 +73,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) if (setup->wIndex > 0 || setup->wValue != 0) { // TODO: do we need to handle IN vs OUT here? - // printf("%s:%d clear feature (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -109,10 +104,9 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) goto send; } } - // printf("%s:%d couldn't find descriptor %04x (%d / %d)\n", __FILE__, __LINE__, setup->wValue, setup->wIndex, setup->wValue); usb_err(dev, 0); return; -#if 1 + case (MSFT_VENDOR_CODE << 8) | 0xC0: // Get Microsoft descriptor case (MSFT_VENDOR_CODE << 8) | 0xC1: if (setup->wIndex == 0x0004) @@ -122,7 +116,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) datalen = MSFT_WCID_LEN; break; } - // printf("%s:%d couldn't find microsoft descriptor (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; @@ -140,12 +133,10 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) // printf("%s:%d couldn't find webusb descriptor (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; -#endif case 0x0121: // DFU_DNLOAD if (setup->wIndex > 0) { - // printf("%s:%d dfu download descriptor index invalid (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -203,7 +194,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) case 0x03a1: // DFU_GETSTATUS if (setup->wIndex > 0) { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -215,7 +205,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) } else { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -224,7 +213,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) case 0x0421: // DFU_CLRSTATUS if (setup->wIndex > 0) { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -234,7 +222,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) } else { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -242,7 +229,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) case 0x05a1: // DFU_GETSTATE if (setup->wIndex > 0) { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -254,7 +240,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) case 0x0621: // DFU_ABORT if (setup->wIndex > 0) { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } @@ -264,13 +249,11 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup) } else { - // printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue); usb_err(dev, 0); return; } default: - // printf("%s:%d unrecognized request type (%04x) value: %02x index: %02x\n", __FILE__, __LINE__, setup->wRequestAndType, setup->wIndex, setup->wValue); usb_err(dev, 0); return; }