diff --git a/lib/usb_cdcacm.c b/lib/usb_cdcacm.c index b3751ee..65fa9e9 100644 --- a/lib/usb_cdcacm.c +++ b/lib/usb_cdcacm.c @@ -168,7 +168,7 @@ static const struct usb_config_descriptor config = { .bNumInterfaces = 2, // the number of interfaces in this configuration .bConfigurationValue = 1, // the index of this configuration .iConfiguration = 0, // a string index describing this configuration (zero means not provided) - .bmAttributes = 0x80, // self powered (0<<6), supports remote wakeup (5<<0) + .bmAttributes = 0x80, // self powered (0<<6), supports remote wakeup (0<<5) .bMaxPower = 0x32, // the maximum amount of current that this device will draw in 2mA units // end of header .interface = interfaces, // pointer to an array of interfaces @@ -264,12 +264,16 @@ static void cdcacm_data_tx_cb(usbd_device *usbd_dev, uint8_t ep) /* transmit data */ if (tx_used) { // copy received data - for (usb_length=0; usb_length