Parcourir la source

add halfword alignment to the string desctiptor
closes #41

Dmitry il y a 7 ans
Parent
commit
036d0073e5
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      inc/usb_std.h

+ 1 - 1
inc/usb_std.h

@@ -438,7 +438,7 @@ struct usb_string_descriptor {
     uint8_t  bDescriptorType;       /**<\brief String descriptor type.*/
     uint16_t wString[];             /**<\brief String data, as unicode characters or array of
                                      * \ref USB_STD_LANGID codes. */
-} __attribute__((packed));
+} __attribute__((packed, aligned(2)));
 
 /**\brief USB debug descriptor
  * \details This descriptor is used to describe certain characteristics of the device that the host