Skip to content

Commit 225fdb0

Browse files
authored
Merge pull request #118 from dhalbert/master
atmel-samd: HID report descriptor for mouse had to be COMPILER_WORD_ALIGNED
2 parents b653c3c + 2fe6b74 commit 225fdb0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ static bool udi_hid_mouse_setreport(void);
119119
//@}
120120

121121
//! HID report descriptor for standard HID mouse
122+
//*** CircuitPython: added COMPILER_WORD_ALIGNED to ensure descriptor is word aligned.
123+
// Without this, descriptor sent to host was garbled.
124+
// It appears this is necessary but frequently omitted in UDC_DESC_STORAGE declarations
125+
// in ASF code.
126+
// See comments about buffer alignment in asf/common/services/usb/udc/udd.h
127+
COMPILER_WORD_ALIGNED
122128
UDC_DESC_STORAGE udi_hid_mouse_report_desc_t udi_hid_mouse_report_desc = {
123129
{
124130
0x05, 0x01, /* Usage Page (Generic Desktop), */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy