summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-04-15 10:18:56 -0400
committerDan Halbert <halbert@halwitz.org>2017-04-15 10:18:56 -0400
commit2fe6b74e9001eb2ea0d09e5617dd7d91851ae072 (patch)
tree2f437126ed72b1a1056044e14a8dd3304894ce9d
parentb653c3c8fc2f97fa59f7d767338e2eab08739d57 (diff)
atmel-samd: HID report descriptor for mouse had to be COMPILER_WORD_ALIGNED.
-rw-r--r--atmel-samd/asf/common/services/usb/class/hid/device/mouse/udi_hid_mouse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/atmel-samd/asf/common/services/usb/class/hid/device/mouse/udi_hid_mouse.c b/atmel-samd/asf/common/services/usb/class/hid/device/mouse/udi_hid_mouse.c
index bd82022ff..07402f214 100644
--- a/atmel-samd/asf/common/services/usb/class/hid/device/mouse/udi_hid_mouse.c
+++ b/atmel-samd/asf/common/services/usb/class/hid/device/mouse/udi_hid_mouse.c
@@ -119,6 +119,12 @@ static bool udi_hid_mouse_setreport(void);
//@}
//! HID report descriptor for standard HID mouse
+//*** CircuitPython: added COMPILER_WORD_ALIGNED to ensure descriptor is word aligned.
+// Without this, descriptor sent to host was garbled.
+// It appears this is necessary but frequently omitted in UDC_DESC_STORAGE declarations
+// in ASF code.
+// See comments about buffer alignment in asf/common/services/usb/udc/udd.h
+COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_mouse_report_desc_t udi_hid_mouse_report_desc = {
{
0x05, 0x01, /* Usage Page (Generic Desktop), */