Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
|
Buffer macros and definitions used in USB device support . More...
Macros | |
#define | UDC_BUF_ALIGN Z_UDC_BUF_ALIGN |
Buffer alignment required by the UDC driver. | |
#define | UDC_BUF_GRANULARITY Z_UDC_BUF_GRANULARITY |
Buffer granularity required by the UDC driver. | |
#define | UDC_STATIC_BUF_DEFINE(name, size) |
Define a UDC driver-compliant static buffer. | |
#define | IS_UDC_ALIGNED(buf) |
Verify that the buffer is aligned as required by the UDC driver. | |
#define | UDC_BUF_POOL_VAR_DEFINE(pname, count, size, ud_size, fdestroy) |
Define a new pool for UDC buffers with variable-size payloads. | |
#define | UDC_BUF_POOL_DEFINE(pname, count, size, ud_size, fdestroy) |
Define a new pool for UDC buffers based on fixed-size data. | |
Buffer macros and definitions used in USB device support .
#define IS_UDC_ALIGNED | ( | buf | ) |
#include <zephyr/drivers/usb/udc_buf.h>
Verify that the buffer is aligned as required by the UDC driver.
buf | Buffer pointer |
#define UDC_BUF_ALIGN Z_UDC_BUF_ALIGN |
#include <zephyr/drivers/usb/udc_buf.h>
Buffer alignment required by the UDC driver.
#define UDC_BUF_GRANULARITY Z_UDC_BUF_GRANULARITY |
#include <zephyr/drivers/usb/udc_buf.h>
Buffer granularity required by the UDC driver.
#define UDC_BUF_POOL_DEFINE | ( | pname, | |
count, | |||
size, | |||
ud_size, | |||
fdestroy ) |
#include <zephyr/drivers/usb/udc_buf.h>
Define a new pool for UDC buffers based on fixed-size data.
This macro is similar to NET_BUF_POOL_DEFINE
, but provides buffers with alignment and granularity suitable for use by UDC driver.
pname | Name of the pool variable. |
count | Number of buffers in the pool. |
size | Maximum data payload per buffer. |
ud_size | User data space to reserve per buffer. |
fdestroy | Optional destroy callback when buffer is freed. |
#define UDC_BUF_POOL_VAR_DEFINE | ( | pname, | |
count, | |||
size, | |||
ud_size, | |||
fdestroy ) |
#include <zephyr/drivers/usb/udc_buf.h>
Define a new pool for UDC buffers with variable-size payloads.
This macro is similar to NET_BUF_POOL_VAR_DEFINE
, but provides buffers with alignment and granularity suitable for use by UDC driver.
pname | Name of the pool variable. |
count | Number of buffers in the pool. |
size | Maximum data payload per buffer. |
ud_size | User data space to reserve per buffer. |
fdestroy | Optional destroy callback when buffer is freed. |
#define UDC_STATIC_BUF_DEFINE | ( | name, | |
size ) |
#include <zephyr/drivers/usb/udc_buf.h>
Define a UDC driver-compliant static buffer.
This macro should be used if the application defines its own buffers to be used for USB transfers.
name | Buffer name |
size | Buffer size |