1 /* 2 * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* 8 Note: This header file contains USB2.0 related types and macros that can be used by code specific to the DWC_OTG 9 controller (i.e., the HW specific layers of the USB host stack). Thus, this header is only meant to be used below (and 10 including) the HAL layer. For types and macros that are HW implementation agnostic (i.e., HCD layer and above), add them 11 to the "usb/usb_types_ch9.h" header instead. 12 */ 13 14 #pragma once 15 16 #ifdef __cplusplus 17 extern "C" 18 { 19 #endif 20 21 /** 22 * @brief USB speeds supported by the DWC OTG controller 23 * 24 * @note usb_dwc_speed_t enum values must match the values of the DWC_OTG prtspd register field 25 */ 26 typedef enum { 27 USB_DWC_SPEED_HIGH = 0, 28 USB_DWC_SPEED_FULL = 1, 29 USB_DWC_SPEED_LOW = 2, 30 } usb_dwc_speed_t; 31 32 /** 33 * @brief USB transfer types supported by the DWC OTG controller 34 * 35 * @note usb_dwc_xfer_type_t enum values must match the values of the DWC_OTG hcchar register field 36 */ 37 typedef enum { 38 USB_DWC_XFER_TYPE_CTRL = 0, 39 USB_DWC_XFER_TYPE_ISOCHRONOUS = 1, 40 USB_DWC_XFER_TYPE_BULK = 2, 41 USB_DWC_XFER_TYPE_INTR = 3, 42 } usb_dwc_xfer_type_t; 43 44 /** 45 * @brief Enumeration of different possible lengths of the periodic frame list 46 */ 47 typedef enum { 48 USB_HAL_FRAME_LIST_LEN_8 = 8, 49 USB_HAL_FRAME_LIST_LEN_16 = 16, 50 USB_HAL_FRAME_LIST_LEN_32 = 32, 51 USB_HAL_FRAME_LIST_LEN_64 = 64, 52 } usb_hal_frame_list_len_t; 53 54 #ifdef __cplusplus 55 } 56 #endif 57