M480 BSP V3.05.005
The Board Support Package for M480 Series
Macros

Macros

#define HSOTG_ENABLE()
 This macro is used to enable HSOTG function. More...
 
#define HSOTG_DISABLE()
 This macro is used to disable HSOTG function. More...
 
#define HSOTG_ENABLE_PHY()
 This macro is used to enable USB PHY. More...
 
#define HSOTG_DISABLE_PHY()
 This macro is used to disable USB PHY. More...
 
#define HSOTG_ENABLE_ID_DETECT()
 This macro is used to enable ID detection function. More...
 
#define HSOTG_DISABLE_ID_DETECT()
 This macro is used to disable ID detection function. More...
 
#define HSOTG_ENABLE_WAKEUP()
 This macro is used to enable HSOTG wake-up function. More...
 
#define HSOTG_DISABLE_WAKEUP()
 This macro is used to disable HSOTG wake-up function. More...
 
#define HSOTG_SET_VBUS_EN_POL(u32Pol)
 This macro is used to set the polarity of USB_VBUS_EN pin. More...
 
#define HSOTG_SET_VBUS_STS_POL(u32Pol)
 This macro is used to set the polarity of USB_VBUS_ST pin. More...
 
#define HSOTG_ENABLE_INT(u32Mask)
 This macro is used to enable HSOTG related interrupts. More...
 
#define HSOTG_DISABLE_INT(u32Mask)
 This macro is used to disable HSOTG related interrupts. More...
 
#define HSOTG_GET_INT_FLAG(u32Mask)
 This macro is used to get HSOTG related interrupt flags. More...
 
#define HSOTG_CLR_INT_FLAG(u32Mask)
 This macro is used to clear HSOTG related interrupt flags. More...
 
#define HSOTG_GET_STATUS(u32Mask)
 This macro is used to get HSOTG related status. More...
 

Detailed Description

Macro Definition Documentation

◆ HSOTG_CLR_INT_FLAG

#define HSOTG_CLR_INT_FLAG (   u32Mask)

This macro is used to clear HSOTG related interrupt flags.

Parameters
[in]u32MaskThe combination of interrupt source. Each bit corresponds to a interrupt source. Valid values are listed below.
Returns
None

This macro will clear HSOTG related interrupt flags specified by u32Mask parameter.

Definition at line 235 of file hsotg.h.

◆ HSOTG_DISABLE

#define HSOTG_DISABLE ( )

This macro is used to disable HSOTG function.

Parameters
None
Returns
None

This macro will clear OTGEN bit of HSOTG_CTL register to disable HSOTG function.

Definition at line 70 of file hsotg.h.

◆ HSOTG_DISABLE_ID_DETECT

#define HSOTG_DISABLE_ID_DETECT ( )

This macro is used to disable ID detection function.

Parameters
None
Returns
None

This macro will clear IDDETEN bit of HSOTG_PHYCTL register to disable ID detection function.

Definition at line 107 of file hsotg.h.

◆ HSOTG_DISABLE_INT

#define HSOTG_DISABLE_INT (   u32Mask)

This macro is used to disable HSOTG related interrupts.

Parameters
[in]u32MaskThe combination of interrupt source. Each bit corresponds to a interrupt source. Valid values are listed below.
Returns
None

This macro will disable HSOTG related interrupts specified by u32Mask parameter.

Definition at line 191 of file hsotg.h.

◆ HSOTG_DISABLE_PHY

#define HSOTG_DISABLE_PHY ( )

This macro is used to disable USB PHY.

Parameters
None
Returns
None

This macro will clear OTGPHYEN bit of HSOTG_PHYCTL register to disable USB PHY.

Definition at line 89 of file hsotg.h.

◆ HSOTG_DISABLE_WAKEUP

#define HSOTG_DISABLE_WAKEUP ( )

This macro is used to disable HSOTG wake-up function.

Parameters
None
Returns
None

This macro will clear WKEN bit of HSOTG_CTL register to disable HSOTG wake-up function.

Definition at line 125 of file hsotg.h.

◆ HSOTG_ENABLE

#define HSOTG_ENABLE ( )

This macro is used to enable HSOTG function.

Parameters
None
Returns
None

This macro will set OTGEN bit of HSOTG_CTL register to enable HSOTG function.

Definition at line 61 of file hsotg.h.

◆ HSOTG_ENABLE_ID_DETECT

#define HSOTG_ENABLE_ID_DETECT ( )

This macro is used to enable ID detection function.

Parameters
None
Returns
None

This macro will set IDDETEN bit of HSOTG_PHYCTL register to enable ID detection function.

Definition at line 98 of file hsotg.h.

◆ HSOTG_ENABLE_INT

#define HSOTG_ENABLE_INT (   u32Mask)

This macro is used to enable HSOTG related interrupts.

Parameters
[in]u32MaskThe combination of interrupt source. Each bit corresponds to a interrupt source. Valid values are listed below.
Returns
None

This macro will enable HSOTG related interrupts specified by u32Mask parameter.

Definition at line 169 of file hsotg.h.

◆ HSOTG_ENABLE_PHY

#define HSOTG_ENABLE_PHY ( )

This macro is used to enable USB PHY.

Parameters
None
Returns
None

When the USB role is selected as HSOTG device, use this macro to enable USB PHY. This macro will set OTGPHYEN bit of HSOTG_PHYCTL register to enable USB PHY.

Definition at line 80 of file hsotg.h.

◆ HSOTG_ENABLE_WAKEUP

#define HSOTG_ENABLE_WAKEUP ( )

This macro is used to enable HSOTG wake-up function.

Parameters
None
Returns
None

This macro will set WKEN bit of HSOTG_CTL register to enable HSOTG wake-up function.

Definition at line 116 of file hsotg.h.

◆ HSOTG_GET_INT_FLAG

#define HSOTG_GET_INT_FLAG (   u32Mask)

This macro is used to get HSOTG related interrupt flags.

Parameters
[in]u32MaskThe combination of interrupt source. Each bit corresponds to a interrupt source. Valid values are listed below.
Returns
Interrupt flags of selected sources.

This macro will return HSOTG related interrupt flags specified by u32Mask parameter.

Definition at line 213 of file hsotg.h.

◆ HSOTG_GET_STATUS

#define HSOTG_GET_STATUS (   u32Mask)

This macro is used to get HSOTG related status.

Parameters
[in]u32MaskThe combination of user specified source. Valid values are listed below.
Returns
The user specified status.

This macro will return HSOTG related status specified by u32Mask parameter.

Definition at line 250 of file hsotg.h.

◆ HSOTG_SET_VBUS_EN_POL

#define HSOTG_SET_VBUS_EN_POL (   u32Pol)

This macro is used to set the polarity of USB_VBUS_EN pin.

Parameters
[in]u32PolThe polarity selection. Valid values are listed below.
Returns
None

This macro is used to set the polarity of external USB VBUS power switch enable signal.

Definition at line 136 of file hsotg.h.

◆ HSOTG_SET_VBUS_STS_POL

#define HSOTG_SET_VBUS_STS_POL (   u32Pol)

This macro is used to set the polarity of USB_VBUS_ST pin.

Parameters
[in]u32PolThe polarity selection. Valid values are listed below.
Returns
None

This macro is used to set the polarity of external USB VBUS power switch status signal.

Definition at line 147 of file hsotg.h.