1 /* 2 * SPDX-FileCopyrightText: 2015-2021 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 PHY target 23 */ 24 typedef enum { 25 USB_PHY_TARGET_INT, /**< USB target is internal PHY */ 26 USB_PHY_TARGET_EXT, /**< USB target is external PHY */ 27 USB_PHY_TARGET_MAX, 28 } usb_phy_target_t; 29 30 /** 31 * @brief USB PHY source 32 */ 33 typedef enum { 34 USB_PHY_CTRL_OTG, /**< PHY controller is USB OTG */ 35 #if SOC_USB_SERIAL_JTAG_SUPPORTED 36 USB_PHY_CTRL_SERIAL_JTAG, /**< PHY controller is USB Serial JTAG */ 37 #endif 38 USB_PHY_CTRL_MAX, 39 } usb_phy_controller_t; 40 41 /** 42 * @brief USB OTG mode 43 */ 44 typedef enum { 45 USB_PHY_MODE_DEFAULT, /**< USB OTG default mode */ 46 USB_OTG_MODE_HOST, /**< USB OTG host mode */ 47 USB_OTG_MODE_DEVICE, /**< USB OTG device mode */ 48 USB_OTG_MODE_MAX, 49 } usb_otg_mode_t; 50 51 /** 52 * @brief USB speed 53 */ 54 typedef enum { 55 USB_PHY_SPEED_UNDEFINED, 56 USB_PHY_SPEED_LOW, /**< USB Low Speed (1.5 Mbit/s) */ 57 USB_PHY_SPEED_FULL, /**< USB Full Speed (12 Mbit/s) */ 58 USB_PHY_SPEED_MAX, 59 } usb_phy_speed_t; 60 61 #ifdef __cplusplus 62 } 63 #endif 64