diff options
| author | hathach <[email protected]> | 2024-11-21 10:15:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-11-21 10:22:09 +0700 |
| commit | fa523a5682d8dc91cc1c7a63475623743e37ac83 (patch) | |
| tree | bf479ba344d21dff4b6bd761584bc500a188e651 /src/class/hid | |
| parent | 2571889061f70b9fd425ee4e4174018bf07c5309 (diff) | |
make sure usb buffer occupies whole cache line when DCACHE is enabled for msc,cdc,hid
HIL enable device DMA for p4
Diffstat (limited to 'src/class/hid')
| -rw-r--r-- | src/class/hid/hid_device.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index ef6c7f3af..257af86e0 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -53,9 +53,18 @@ typedef struct { // Note: HID descriptor may be not available from application after enumeration tusb_hid_descriptor_hid_t const *hid_descriptor; - uint8_t ctrl_buf[CFG_TUD_HID_EP_BUFSIZE]; - CFG_TUSB_MEM_ALIGN uint8_t epin_buf[CFG_TUD_HID_EP_BUFSIZE]; - CFG_TUSB_MEM_ALIGN uint8_t epout_buf[CFG_TUD_HID_EP_BUFSIZE]; + union { + CFG_TUD_MEM_ALIGN uint8_t ctrl_buf[CFG_TUD_HID_EP_BUFSIZE]; + TUD_DCACHE_PADDING; + }; + union { + CFG_TUD_MEM_ALIGN uint8_t epin_buf[CFG_TUD_HID_EP_BUFSIZE]; + TUD_DCACHE_PADDING; + }; + union { + CFG_TUD_MEM_ALIGN uint8_t epout_buf[CFG_TUD_HID_EP_BUFSIZE]; + TUD_DCACHE_PADDING; + }; } hidd_interface_t; CFG_TUD_MEM_SECTION tu_static hidd_interface_t _hidd_itf[CFG_TUD_HID]; |
