diff options
| author | Camila <[email protected]> | 2024-03-11 13:11:07 +0100 |
|---|---|---|
| committer | Camila <[email protected]> | 2024-03-11 13:11:07 +0100 |
| commit | eed37476612b6c2074cc3cdabbdef88c59822114 (patch) | |
| tree | 25588fec6122262a2e8a422cab8daad848a7e86d /src | |
| parent | a0e5626bc50d484a23f33000c48082179f0cc2dd (diff) | |
Changes required for SDK 3.2.0:
- Define EP_ALLOCREQ
- Define EP_FREEREQ
- Define EP_ALLOCBUFFER
- Define EP_FREEBUFFER
Those were previously defined in spresense-exported-sdk, but now have been removed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/sony/cxd56/dcd_cxd56.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/portable/sony/cxd56/dcd_cxd56.c b/src/portable/sony/cxd56/dcd_cxd56.c index 6677891a5..9a939bc6c 100644 --- a/src/portable/sony/cxd56/dcd_cxd56.c +++ b/src/portable/sony/cxd56/dcd_cxd56.c @@ -39,6 +39,25 @@ #define CXD56_SETUP_QUEUE_DEPTH (4) #define CXD56_MAX_DATA_OUT_SIZE (64) +/* Allocate/free I/O requests. + * Should not be called from interrupt processing! + */ + +#define EP_ALLOCREQ(ep) (ep)->ops->allocreq(ep) +#define EP_FREEREQ(ep,req) (ep)->ops->freereq(ep,req) + +/* Allocate/free an I/O buffer. + * Should not be called from interrupt processing! + */ + +#ifdef CONFIG_USBDEV_DMA +# 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) +# define EP_FREEBUFFER(ep,buf) kmm_free(buf) +#endif + OSAL_QUEUE_DEF(usbd_int_set, _setup_queue_def, CXD56_SETUP_QUEUE_DEPTH, struct usb_ctrlreq_s); struct usbdcd_driver_s |
