9#ifndef ZEPHYR_MCTP_USB_H_
10#define ZEPHYR_MCTP_USB_H_
16#define USBD_MCTP_SUBCLASS_MANAGEMENT_CONTROLLER 0
17#define USBD_MCTP_SUBCLASS_MANAGED_DEVICE_ENDPOINT 0
18#define USBD_MCTP_SUBCLASS_HOST_INTERFACE_ENDPOINT 1
21#define USBD_MCTP_PROTOCOL_1_X 1
22#define USBD_MCTP_PROTOCOL_2_X 2
25#define MCTP_USB_HEADER_SIZE 4
26#define MCTP_USB_MAX_PACKET_LENGTH 255
33 struct mctp_binding binding;
37 struct mctp_pktbuf *rx_pkt;
56int mctp_usb_start(
struct mctp_binding *binding);
57int mctp_usb_tx(
struct mctp_binding *binding,
struct mctp_pktbuf *pkt);
67#define MCTP_USB_DEFINE(_name, _subclass, _protocol) \
68 struct mctp_binding_usb _name = { \
70 .name = STRINGIFY(_name), \
72 .pkt_size = MCTP_PACKET_SIZE(MCTP_USB_MAX_PACKET_LENGTH), \
75 .start = mctp_usb_start, \
78 .usb_class_data = NULL, \
81 .rx_state = STATE_WAIT_HDR_DMTF0 \
84 const STRUCT_SECTION_ITERABLE(mctp_usb_class_inst, mctp_usb_class_inst_##_name) = { \
85 .sublcass = _subclass, \
86 .mctp_protocol = _protocol, \
87 .mctp_binding = &_name, \
#define MCTP_USB_MAX_PACKET_LENGTH
Definition mctp_usb.h:26
#define MCTP_USB_HEADER_SIZE
Definition mctp_usb.h:25
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Semaphore structure.
Definition kernel.h:3418
An MCTP binding for Zephyr's USB device stack.
Definition mctp_usb.h:31
uint8_t sublcass
Definition mctp_usb.h:50
uint8_t mctp_protocol
Definition mctp_usb.h:51
struct mctp_binding_usb * mctp_binding
Definition mctp_usb.h:52
USB device support class data.
Definition usbd.h:378