Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2cd62b4

Browse files
dhalberttannewt
authored andcommitted
Fix USB Busy error for kbd hid. Made kbd USB report descriptor be
COMPILER_WORD_ALIGNED as done inadafruit#118 for mouse. Added COMPILER_WORD_ALIGNEDto other UDC_DESC_STORAGE declarations that might have the same issue inthe future.
1 parentf878bc4 commit2cd62b4

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

‎atmel-samd/asf/common/services/usb/class/cdc/device/udi_cdc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@ void udi_cdc_data_disable(void);
9090
booludi_cdc_data_setup(void);
9191
uint8_tudi_cdc_getsetting(void);
9292
voidudi_cdc_data_sof_notify(void);
93+
COMPILER_WORD_ALIGNED
9394
UDC_DESC_STORAGEudi_api_tudi_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
99101
UDC_DESC_STORAGEudi_api_tudi_api_cdc_data= {
100102
.enable=udi_cdc_data_enable,
101103
.disable=udi_cdc_data_disable,

‎atmel-samd/asf/common/services/usb/class/hid/device/generic/udi_hid_generic_desc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
157158
UDC_DESC_STORAGEudc_config_tudc_config= {
158159
.confdev_lsfs=&udc_device_desc,
159160
.conf_lsfs=udc_config_fshs,

‎atmel-samd/asf/common/services/usb/class/hid/device/kbd/udi_hid_kbd.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ bool udi_hid_kbd_setup(void);
6767
uint8_tudi_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
7072
UDC_DESC_STORAGEudi_api_tudi_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
120124
UDC_DESC_STORAGEudi_hid_kbd_report_desc_tudi_hid_kbd_report_desc= {
121125
{
122126
0x05,0x01,/* Usage Page (Generic Desktop) */

‎atmel-samd/asf/common/services/usb/class/hid/device/mouse/udi_hid_mouse.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ bool udi_hid_mouse_setup(void);
6666
uint8_tudi_hid_mouse_getsetting(void);
6767

6868
//! Global structure which contains standard UDI interface for UDC
69+
COMPILER_WORD_ALIGNED
6970
UDC_DESC_STORAGEudi_api_tudi_api_hid_mouse= {
7071
.enable= (bool(*)(void))udi_hid_mouse_enable,
7172
.disable= (void (*)(void))udi_hid_mouse_disable,

‎atmel-samd/asf/common/services/usb/udc/udc_dfu_small.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,15 @@ struct udc_string_desc_t {
134134
le16_tstring[Max(Max(USB_DEVICE_MANUFACTURE_NAME_SIZE, \
135135
USB_DEVICE_PRODUCT_NAME_SIZE),USB_DEVICE_SERIAL_NAME_SIZE)];
136136
};
137+
COMPILER_WORD_ALIGNED
137138
staticUDC_DESC_STORAGEstructudc_string_desc_tudc_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
144146
staticUDC_DESC_STORAGEusb_str_lgid_desc_tudc_string_desc_languageid= {
145147
.desc.bLength=sizeof(usb_str_lgid_desc_t),
146148
.desc.bDescriptorType=USB_DT_STRING,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp