mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
drivers/usbdev: support config usb req buffer alignment bytes
we need to alloc req buffer in cacheline size units, othersize the data may by incorrect. Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -47,7 +47,11 @@
|
||||
# define EP_ALLOCBUFFER(ep,nb) (ep)->ops->allocbuffer(ep,nb)
|
||||
# define EP_FREEBUFFER(ep,buf) (ep)->ops->freebuffer(ep,buf)
|
||||
#else
|
||||
# define EP_ALLOCBUFFER(ep,nb) kmm_malloc(nb)
|
||||
# if CONFIG_USBDEV_EPBUFFER_ALIGNMENT != 0
|
||||
# define EP_ALLOCBUFFER(ep,nb) kmm_memalign(CONFIG_USBDEV_EPBUFFER_ALIGNMENT, nb)
|
||||
# else
|
||||
# define EP_ALLOCBUFFER(ep,nb) kmm_malloc(nb)
|
||||
# endif
|
||||
# define EP_FREEBUFFER(ep,buf) kmm_free(buf)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user