5 #ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_USBDEV_H_
6 #define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_USBDEV_H_
29 #define USBDEV_NUM_ENDPOINTS 12
30 #define USBDEV_MAX_PACKET_SIZE 64
33 #define USBDEV_NUM_BUFFERS 32
36 #define USBDEV_ENDPOINT_DIR_IN 1
37 #define USBDEV_ENDPOINT_DIR_OUT 0
64 uint8_t buffers[USBDEV_NUM_BUFFERS];
395 size_t dst_len,
size_t *bytes_written);
480 const uint8_t *src,
size_t src_len,
481 size_t *bytes_written);
650 uint16_t mask, uint16_t state);
664 uint16_t mask, uint16_t state);
686 uint16_t *frame_index);
707 kDifUsbdevLinkStateDisconnected,
708 kDifUsbdevLinkStatePowered,
709 kDifUsbdevLinkStatePoweredSuspended,
710 kDifUsbdevLinkStateActive,
711 kDifUsbdevLinkStateSuspended,
712 kDifUsbdevLinkStateActiveNoSof,
713 kDifUsbdevLinkStateResuming,
751 const dif_usbdev_t *usbdev, uint8_t *setup_depth, uint8_t *out_depth);
766 const dif_usbdev_t *usbdev,
bool *setup_is_full,
bool *out_is_full);
939 const uint8_t *src,
size_t src_len);
954 uint8_t *dst,
size_t dst_len);