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

Macros

#define OTG_ENABLE()
 This macro is used to enable OTG function. More...
 
#define OTG_DISABLE()
 This macro is used to disable OTG function. More...
 
#define OTG_ENABLE_PHY()
 This macro is used to enable USB PHY. More...
 
#define OTG_DISABLE_PHY()
 This macro is used to disable USB PHY. More...
 
#define OTG_ENABLE_ID_DETECT()
 This macro is used to enable ID detection function. More...
 
#define OTG_DISABLE_ID_DETECT()
 This macro is used to disable ID detection function. More...
 
#define OTG_ENABLE_WAKEUP()
 This macro is used to enable OTG wake-up function. More...
 
#define OTG_DISABLE_WAKEUP()
 This macro is used to disable OTG wake-up function. More...
 
#define OTG_SET_VBUS_EN_POL(u32Pol)
 This macro is used to set the polarity of USB_VBUS_EN pin. More...
 
#define OTG_SET_VBUS_STS_POL(u32Pol)
 This macro is used to set the polarity of USB_VBUS_ST pin. More...
 
#define OTG_ENABLE_INT(u32Mask)
 This macro is used to enable OTG related interrupts. More...
 
#define OTG_DISABLE_INT(u32Mask)
 This macro is used to disable OTG related interrupts. More...
 
#define OTG_GET_INT_FLAG(u32Mask)
 This macro is used to get OTG related interrupt flags. More...
 
#define OTG_CLR_INT_FLAG(u32Mask)
 This macro is used to clear OTG related interrupt flags. More...
 
#define OTG_GET_STATUS(u32Mask)
 This macro is used to get OTG related status. More...
 

Detailed Description

Macro Definition Documentation

◆ OTG_CLR_INT_FLAG

#define OTG_CLR_INT_FLAG (   u32Mask)

This macro is used to clear OTG 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 OTG related interrupt flags specified by u32Mask parameter.

Definition at line 235 of file otg.h.

◆ OTG_DISABLE

#define OTG_DISABLE ( )

This macro is used to disable OTG function.

Parameters
None
Returns
None

This macro will clear OTGEN bit of OTG_CTL register to disable OTG function.

Definition at line 70 of file otg.h.

◆ OTG_DISABLE_ID_DETECT

#define OTG_DISABLE_ID_DETECT ( )

This macro is used to disable ID detection function.

Parameters
None
Returns
None

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

Definition at line 107 of file otg.h.

◆ OTG_DISABLE_INT

#define OTG_DISABLE_INT (   u32Mask)

This macro is used to disable OTG 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 OTG related interrupts specified by u32Mask parameter.

Definition at line 191 of file otg.h.

◆ OTG_DISABLE_PHY

#define OTG_DISABLE_PHY ( )

This macro is used to disable USB PHY.

Parameters
None
Returns
None

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

Definition at line 89 of file otg.h.

◆ OTG_DISABLE_WAKEUP

#define OTG_DISABLE_WAKEUP ( )

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

Parameters
None
Returns
None

This macro will clear WKEN bit of OTG_CTL register to disable OTG wake-up function.

Definition at line 125 of file otg.h.

◆ OTG_ENABLE

#define OTG_ENABLE ( )

This macro is used to enable OTG function.

Parameters
None
Returns
None

This macro will set OTGEN bit of OTG_CTL register to enable OTG function.

Definition at line 61 of file otg.h.

◆ OTG_ENABLE_ID_DETECT

#define OTG_ENABLE_ID_DETECT ( )

This macro is used to enable ID detection function.

Parameters
None
Returns
None

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

Definition at line 98 of file otg.h.

◆ OTG_ENABLE_INT

#define OTG_ENABLE_INT (   u32Mask)

This macro is used to enable OTG 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 OTG related interrupts specified by u32Mask parameter.

Definition at line 169 of file otg.h.

◆ OTG_ENABLE_PHY

#define OTG_ENABLE_PHY ( )

This macro is used to enable USB PHY.

Parameters
None
Returns
None

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

Definition at line 80 of file otg.h.

◆ OTG_ENABLE_WAKEUP

#define OTG_ENABLE_WAKEUP ( )

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

Parameters
None
Returns
None

This macro will set WKEN bit of OTG_CTL register to enable OTG wake-up function.

Definition at line 116 of file otg.h.

◆ OTG_GET_INT_FLAG

#define OTG_GET_INT_FLAG (   u32Mask)

This macro is used to get OTG 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 OTG related interrupt flags specified by u32Mask parameter.

Definition at line 213 of file otg.h.

◆ OTG_GET_STATUS

#define OTG_GET_STATUS (   u32Mask)

This macro is used to get OTG related status.

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

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

Definition at line 250 of file otg.h.

◆ OTG_SET_VBUS_EN_POL

#define OTG_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 otg.h.

◆ OTG_SET_VBUS_STS_POL

#define OTG_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 otg.h.