You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/05/01 08:00:38 UTC

[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2279: [RFC] TinyUSB integration

apache-mynewt-bot commented on pull request #2279:
URL: https://github.com/apache/mynewt-core/pull/2279#issuecomment-622291082


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/usb/tinyusb/std_descriptors/src/std_descriptors.c
   <details>
   
   ```diff
   @@ -108,33 +108,33 @@
    #endif /* CFG_TUD_HID */
    
    const tusb_desc_device_t desc_device = {
   -    .bLength            = sizeof(tusb_desc_device_t),
   -    .bDescriptorType    = TUSB_DESC_DEVICE,
   -    .bcdUSB             = 0x0200,
   +    .bLength = sizeof(tusb_desc_device_t),
   +    .bDescriptorType = TUSB_DESC_DEVICE,
   +    .bcdUSB = 0x0200,
    
    #if CFG_TUD_CDC
        /*
         * Use Interface Association Descriptor (IAD) for CDC
         * As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
         */
   -    .bDeviceClass       = TUSB_CLASS_MISC,
   -    .bDeviceSubClass    = MISC_SUBCLASS_COMMON,
   -    .bDeviceProtocol    = MISC_PROTOCOL_IAD,
   +    .bDeviceClass = TUSB_CLASS_MISC,
   +    .bDeviceSubClass = MISC_SUBCLASS_COMMON,
   +    .bDeviceProtocol = MISC_PROTOCOL_IAD,
    #else
   -    .bDeviceClass       = 0x00,
   -    .bDeviceSubClass    = 0x00,
   -    .bDeviceProtocol    = 0x00,
   -#endif
   -
   -    .bMaxPacketSize0    = CFG_TUD_ENDPOINT0_SIZE,
   -
   -    .idVendor           = MYNEWT_VAL(USBD_VID),
   -    .idProduct          = MYNEWT_VAL(USBD_PID),
   -    .bcdDevice          = USBD_PRODUCT_RELEASE_NUMBER,
   -
   -    .iManufacturer      = 0x02,
   -    .iProduct           = 0x03,
   -    .iSerialNumber      = 0x01,
   +    .bDeviceClass = 0x00,
   +    .bDeviceSubClass = 0x00,
   +    .bDeviceProtocol = 0x00,
   +#endif
   +
   +    .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
   +
   +    .idVendor = MYNEWT_VAL(USBD_VID),
   +    .idProduct = MYNEWT_VAL(USBD_PID),
   +    .bcdDevice = USBD_PRODUCT_RELEASE_NUMBER,
   +
   +    .iManufacturer = 0x02,
   +    .iProduct = 0x03,
   +    .iSerialNumber = 0x01,
    
        .bNumConfigurations = 0x01
    };
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org