MSP432E4 DriverLib API Guide
1.11.00.03
|
Functions | |
void | USBULPIConfig (uint32_t ui32Base, uint32_t ui32Config) |
void | USBULPIEnable (uint32_t ui32Base) |
void | USBULPIDisable (uint32_t ui32Base) |
uint8_t | USBULPIRegRead (uint32_t ui32Base, uint8_t ui8Reg) |
void | USBULPIRegWrite (uint32_t ui32Base, uint8_t ui8Reg, uint8_t ui8Data) |
void USBULPIConfig | ( | uint32_t | ui32Base, |
uint32_t | ui32Config | ||
) |
Configures the USB controller's ULPI function.
ui32Base | specifies the USB module base address. |
ui32Config | contains the configuration options. |
This function is used to configure the USB controller's ULPI function. The configuration options are set in the ui32Config parameter and are a logical OR of the following values:
Example: Enable ULPI PHY with full VBUS control.
//! // //! // Enable ULPI PHY with full VBUS control. //! // //! USBULPIConfig(USB0_BASE, USB_ULPI_EXTVBUS | USB_ULPI_EXTVBUS_IND); //!
\return None.
References HWREGB, and USB_O_ULPIVBUSCTL.
void USBULPIEnable | ( | uint32_t | ui32Base | ) |
Enables the USB controller's ULPI function.
ui32Base | specifies the USB module base address. |
This function enables the USB controller's ULPI function and must be called before attempting to access an external ULPI-connected USB PHY.
Example: Enable ULPI function.
//! // //! // Enable ULPI function. //! // //! USBULPIEnable(USB0_BASE); //!
\return None.
References HWREG, USB_O_PC, and USB_PC_ULPIEN.
void USBULPIDisable | ( | uint32_t | ui32Base | ) |
Disables the USB controller's ULPI function.
ui32Base | specifies the USB module base address. |
This function disables the USB controller's ULPI function. Accesses to the external ULPI-connected PHY cannot succeed after this function has been called.
Example: Disable ULPI function.
//! // //! // Disable ULPI function. //! // //! USBULPIDisable(USB0_BASE); //!
\return None.
References HWREG, USB_O_PC, and USB_PC_ULPIEN.
uint8_t USBULPIRegRead | ( | uint32_t | ui32Base, |
uint8_t | ui8Reg | ||
) |
Reads a register from an external ULPI-connected USB PHY.
ui32Base | specifies the USB module base address. |
ui8Reg | specifies the register address to read. |
This function reads the register address specified in the ui8Reg parameter using the ULPI function. This function is blocking and only returns when the read access completes. The function does not return if there is not a ULPI-connected USB PHY present.
Example: Read a register from the ULPI PHY.
//! uint8_t ui8Value; //! //! // //! // Read a register from the ULPI PHY register at 0x10. //! // //! ui8Value = USBULPIRegRead(USB0_BASE, 0x10); //!
\return The value of the requested ULPI register.
References ASSERT, HWREGB, USB_O_ULPIREGADDR, USB_O_ULPIREGCTL, USB_O_ULPIREGDATA, USB_ULPIREGCTL_RDWR, USB_ULPIREGCTL_REGACC, and USB_ULPIREGCTL_REGCMPLT.
void USBULPIRegWrite | ( | uint32_t | ui32Base, |
uint8_t | ui8Reg, | ||
uint8_t | ui8Data | ||
) |
Writes a value to a register on an external ULPI-connected USB PHY.
ui32Base | specifies the USB module base address. |
ui8Reg | specifies the register address to write. |
ui8Data | specifies the data to write. |
This function writes the register address specified in the ui8Reg parameter with the value specified in the ui8Data parameter using the ULPI function. This function is blocking and only returns when the write access completes. The function does not return if there is not a ULPI-connected USB PHY present.
Example: Write a register from the external ULPI PHY.
//! // //! // Write the ULPI PHY register at 0x10 with 0x20. //! // //! USBULPIRegWrite(USB0_BASE, 0x10, 0x20); //!
\return None.
References ASSERT, HWREGB, USB_O_ULPIREGADDR, USB_O_ULPIREGCTL, USB_O_ULPIREGDATA, USB_ULPIREGCTL_REGACC, and USB_ULPIREGCTL_REGCMPLT.