Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mctp_usb.h File Reference
#include <zephyr/sys/iterable_sections.h>
#include <libmctp.h>

Go to the source code of this file.

Data Structures

struct  mctp_binding_usb
 An MCTP binding for Zephyr's USB device stack. More...
struct  mctp_usb_class_inst

Macros

#define USBD_MCTP_SUBCLASS_MANAGEMENT_CONTROLLER   0
#define USBD_MCTP_SUBCLASS_MANAGED_DEVICE_ENDPOINT   0
#define USBD_MCTP_SUBCLASS_HOST_INTERFACE_ENDPOINT   1
#define USBD_MCTP_PROTOCOL_1_X   1
#define USBD_MCTP_PROTOCOL_2_X   2
#define MCTP_USB_HEADER_SIZE   4
#define MCTP_USB_MAX_PACKET_LENGTH   255
#define MCTP_USB_DEFINE(_name, _subclass, _protocol)
 INTERNAL_HIDDEN.

Macro Definition Documentation

◆ MCTP_USB_DEFINE

#define MCTP_USB_DEFINE ( _name,
_subclass,
_protocol )
Value:
struct mctp_binding_usb _name = { \
.binding = { \
.name = STRINGIFY(_name), \
.version = 1, \
.pkt_size = MCTP_PACKET_SIZE(MCTP_USB_MAX_PACKET_LENGTH), \
.pkt_header = 0, \
.pkt_trailer = 0, \
.start = mctp_usb_start, \
.tx = mctp_usb_tx \
}, \
.usb_class_data = NULL, \
.rx_pkt = NULL, \
.rx_data_idx = 0, \
.rx_state = STATE_WAIT_HDR_DMTF0 \
}; \
\
const STRUCT_SECTION_ITERABLE(mctp_usb_class_inst, mctp_usb_class_inst_##_name) = { \
.sublcass = _subclass, \
.mctp_protocol = _protocol, \
.mctp_binding = &_name, \
};
#define STRUCT_SECTION_ITERABLE(struct_type, varname)
Defines a new element for an iterable section.
Definition iterable_sections.h:216
#define NULL
Definition iar_missing_defs.h:20
#define STRINGIFY(s)
Definition common.h:165
#define MCTP_USB_MAX_PACKET_LENGTH
Definition mctp_usb.h:26
An MCTP binding for Zephyr's USB device stack.
Definition mctp_usb.h:31

INTERNAL_HIDDEN.

Define a MCTP bus binding for USB

Parameters
_nameSymbolic name of the bus binding variable
_subclassMCTP subclass used in the USB interfce descriptor
_protocolMCTP protocol used in the USB interface descriptor

◆ MCTP_USB_HEADER_SIZE

#define MCTP_USB_HEADER_SIZE   4

◆ MCTP_USB_MAX_PACKET_LENGTH

#define MCTP_USB_MAX_PACKET_LENGTH   255

◆ USBD_MCTP_PROTOCOL_1_X

#define USBD_MCTP_PROTOCOL_1_X   1

◆ USBD_MCTP_PROTOCOL_2_X

#define USBD_MCTP_PROTOCOL_2_X   2

◆ USBD_MCTP_SUBCLASS_HOST_INTERFACE_ENDPOINT

#define USBD_MCTP_SUBCLASS_HOST_INTERFACE_ENDPOINT   1

◆ USBD_MCTP_SUBCLASS_MANAGED_DEVICE_ENDPOINT

#define USBD_MCTP_SUBCLASS_MANAGED_DEVICE_ENDPOINT   0

◆ USBD_MCTP_SUBCLASS_MANAGEMENT_CONTROLLER

#define USBD_MCTP_SUBCLASS_MANAGEMENT_CONTROLLER   0