This module has APIs for USB device driver porting layer. See this page, USB, for using USB using tinyUSB APIs
|
file | usb_init.h |
| This file contains USB initialization APIs.
|
|
◆ USB_INSTANCE_0
#define USB_INSTANCE_0 (0x00U) |
◆ USB_CLK_SEL_HFOSC0_CLKOUT
#define USB_CLK_SEL_HFOSC0_CLKOUT (0x00U) |
◆ USB_CLK_SEL_HFOSC1_CLKOUT
#define USB_CLK_SEL_HFOSC1_CLKOUT (0x01U) |
◆ USB_MAIN_PLL3_HSDIV4_CLKOUT
#define USB_MAIN_PLL3_HSDIV4_CLKOUT (0x02U) |
Use MAIN_PLL3_HSDIV4_CLKOUT.
◆ USB_MAIN_PLL2_HSDIV4_CLKOUT
#define USB_MAIN_PLL2_HSDIV4_CLKOUT (0x03U) |
Use MAIN_PLL2_HSDIV4_CLKOUT.
◆ USB_PLL_REF_CLK_9P6MHZ
#define USB_PLL_REF_CLK_9P6MHZ (0x00) |
◆ USB_PLL_REF_CLK_10MHZ
#define USB_PLL_REF_CLK_10MHZ (0x01) |
◆ USB_PLL_REF_CLK_12MHZ
#define USB_PLL_REF_CLK_12MHZ (0x02) |
◆ USB_PLL_REF_CLK_19P2MHZ
#define USB_PLL_REF_CLK_19P2MHZ (0x03) |
◆ USB_PLL_REF_CLK_20MHZ
#define USB_PLL_REF_CLK_20MHZ (0x04) |
◆ USB_PLL_REF_CLK_24MHZ
#define USB_PLL_REF_CLK_24MHZ (0x05) |
◆ USB_PLL_REF_CLK_25MHZ
#define USB_PLL_REF_CLK_25MHZ (0x06) |
◆ USB_PLL_REF_CLK_26MHZ
#define USB_PLL_REF_CLK_26MHZ (0x07) |
◆ USB_PLL_REF_CLK_38P4MHZ
#define USB_PLL_REF_CLK_38P4MHZ (0x08) |
◆ USB_PLL_REF_CLK_40MHZ
#define USB_PLL_REF_CLK_40MHZ (0x09) |
◆ USB_PLL_REF_CLK_48MHZ
#define USB_PLL_REF_CLK_48MHZ (0x0A) |
◆ USB_PLL_REF_CLK_50MHZ
#define USB_PLL_REF_CLK_50MHZ (0x0B) |
◆ USB_PLL_REF_CLK_52MHZ
#define USB_PLL_REF_CLK_52MHZ (0x0C) |
◆ USB_MODE_3P0
#define USB_MODE_3P0 (0x0) |
◆ USB_MODE_2P0
#define USB_MODE_2P0 (0x1) |
◆ USB_PIPE_RX_INVERT_POLARITY_DISABLED
#define USB_PIPE_RX_INVERT_POLARITY_DISABLED (0x0) |
USB Pipe Receive Invert Polarity Disabled.
◆ USB_PIPE_RX_INVERT_POLARITY_ENABLED
#define USB_PIPE_RX_INVERT_POLARITY_ENABLED (0x1) |
USB 2.0 only enable (USB 3.0 disabled)
◆ USB_VBUS_EXT_DIV3_INACTIVE
#define USB_VBUS_EXT_DIV3_INACTIVE (0x0) |
VBUS External Divider Inactive.
◆ USB_VBUS_EXT_DIV3_ACTIVE
#define USB_VBUS_EXT_DIV3_ACTIVE (0x1) |
VBUS External Divider active.
◆ USB_HOST_MODE_DISABLED
#define USB_HOST_MODE_DISABLED (0x0) |
◆ USB_HOST_MODE_ENABLED
#define USB_HOST_MODE_ENABLED (0x1) |
◆ DEFAULT_CDN_DBG_MODULE
#define DEFAULT_CDN_DBG_MODULE (0) |
◆ DEFAULT_CDN_LOG_LVL
#define DEFAULT_CDN_LOG_LVL (0) |
◆ usb_init()
USB Initialization function.
Set up the USB instance using the USB intialization parameter block:
- USB clock source selection,
- PHY ref clock frequency selection,
- USB 2.0 enable (disable USB 3.0),
- Invert polarity,
- VBUS_SEL for external divider and
- USB host/device mode.
◆ cusbd_dsr()
◆ DbgPrint()
void DbgPrint |
( |
uint32_t |
module_id, |
|
|
uint32_t |
log_lvl, |
|
|
const char * |
str, |
|
|
|
... |
|
) |
| |
|
inline |
Printf function hook for cadence usb device driver.
◆ CUSBD_DbgMsgInit()
void CUSBD_DbgMsgInit |
( |
void |
| ) |
|
Initialize CUSBD Debug module with default parameters.
◆ DbgMsgSetLvl()
void DbgMsgSetLvl |
( |
uint32_t |
log_lvl | ) |
|
Sets debug verbosity level.
valid arguments
- DBG_CRIT - critical
- DBG_WARN - warning
- DBG_FYI - fyi
- DBG_HIVERB - highly verbose
◆ DbgMsgEnableModule()
void DbgMsgEnableModule |
( |
uint32_t |
module_id | ) |
|
enable logs for given module
- Parameters
-
module_id | module id of CUSBD module who's logs will be enabled |
◆ DbgMsgDisableModule()
void DbgMsgDisableModule |
( |
uint32_t |
module_id | ) |
|
disable logs for given module
- Parameters
-
module_id | module id of CUSBD module who's logs will be disbaled |