File tree Expand file tree Collapse file tree 5 files changed +10
-0
lines changed
atmel-samd/asf/common/services/usb Expand file tree Collapse file tree 5 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,14 @@ void udi_cdc_data_disable(void);
9090bool udi_cdc_data_setup (void );
9191uint8_t udi_cdc_getsetting (void );
9292void udi_cdc_data_sof_notify (void );
93+ COMPILER_WORD_ALIGNED
9394UDC_DESC_STORAGE udi_api_t udi_api_cdc_comm = {
9495 .enable = udi_cdc_comm_enable ,
9596 .disable = udi_cdc_comm_disable ,
9697 .setup = udi_cdc_comm_setup ,
9798 .getsetting = udi_cdc_getsetting ,
9899};
100+ COMPILER_WORD_ALIGNED
99101UDC_DESC_STORAGE udi_api_t udi_api_cdc_data = {
100102 .enable = udi_cdc_data_enable ,
101103 .disable = udi_cdc_data_disable ,
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1] = { {
154154}};
155155
156156//! Add all information about USB Device in global structure for UDC
157+ COMPILER_WORD_ALIGNED
157158UDC_DESC_STORAGE udc_config_t udc_config = {
158159 .confdev_lsfs = & udc_device_desc ,
159160 .conf_lsfs = udc_config_fshs ,
Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ bool udi_hid_kbd_setup(void);
6767uint8_t udi_hid_kbd_getsetting (void );
6868
6969//! Global structure which contains standard UDI interface for UDC
70+ // CircuitPython fix: UDC_DESC_STORAGE must be COMPILER_WORD_ALIGNED
71+ COMPILER_WORD_ALIGNED
7072UDC_DESC_STORAGE udi_api_t udi_api_hid_kbd = {
7173 .enable = (bool (* )(void ))udi_hid_kbd_enable ,
7274 .disable = (void (* )(void ))udi_hid_kbd_disable ,
@@ -117,6 +119,8 @@ COMPILER_WORD_ALIGNED
117119//@}
118120
119121//! HID report descriptor for standard HID keyboard
122+ // CircuitPython fix: UDC_DESC_STORAGE must be COMPILER_WORD_ALIGNED
123+ COMPILER_WORD_ALIGNED
120124UDC_DESC_STORAGE udi_hid_kbd_report_desc_t udi_hid_kbd_report_desc = {
121125 {
122126 0x05 , 0x01 , /* Usage Page (Generic Desktop) */
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ bool udi_hid_mouse_setup(void);
6666uint8_t udi_hid_mouse_getsetting (void );
6767
6868//! Global structure which contains standard UDI interface for UDC
69+ COMPILER_WORD_ALIGNED
6970UDC_DESC_STORAGE udi_api_t udi_api_hid_mouse = {
7071 .enable = (bool (* )(void ))udi_hid_mouse_enable ,
7172 .disable = (void (* )(void ))udi_hid_mouse_disable ,
Original file line number Diff line number Diff line change @@ -134,13 +134,15 @@ struct udc_string_desc_t {
134134 le16_t string [Max (Max (USB_DEVICE_MANUFACTURE_NAME_SIZE , \
135135 USB_DEVICE_PRODUCT_NAME_SIZE ), USB_DEVICE_SERIAL_NAME_SIZE )];
136136};
137+ COMPILER_WORD_ALIGNED
137138static UDC_DESC_STORAGE struct udc_string_desc_t udc_string_desc = {
138139 .header .bDescriptorType = USB_DT_STRING
139140};
140141
141142/**
142143 * \brief Language ID of USB device (US ID by default)
143144 */
145+ COMPILER_WORD_ALIGNED
144146static UDC_DESC_STORAGE usb_str_lgid_desc_t udc_string_desc_languageid = {
145147 .desc .bLength = sizeof (usb_str_lgid_desc_t ),
146148 .desc .bDescriptorType = USB_DT_STRING ,
You can’t perform that action at this time.
0 commit comments