USBLibAPIGuide
1.00.00.01
|
#include <stdbool.h>
#include <stdint.h>
#include "ti/devices/msp432e4/driverlib/driverlib.h"
#include "usbulpi.h"
Functions | |
void | ULPIConfigSet (uint32_t ui32Base, uint32_t ui32Config) |
void | ULPIPowerTransceiver (uint32_t ui32Base, bool bEnable) |
#define ULPI_FCTL 0x04 |
Referenced by ULPIConfigSet().
#define ULPI_FCTL_SET 0x05 |
Referenced by ULPIPowerTransceiver().
#define ULPI_FCTL_CLEAR 0x06 |
Referenced by ULPIPowerTransceiver().
#define ULPI_ICTL 0x07 |
Referenced by ULPIConfigSet().
#define ULPI_ICTL_SET 0x08 |
#define ULPI_ICTL_CLEAR 0x09 |
#define ULPI_OTGCTL 0x0A |
Referenced by ULPIConfigSet().
#define ULPI_OTGCTL_SET 0x0B |
#define ULPI_OTGCTL_CLEAR 0x0C |
#define ULPI_FCTL_XCVR_M 0x03 |
Referenced by ULPIConfigSet().
#define ULPI_FCTL_XCVR_HS 0x00 |
#define ULPI_FCTL_XCVR_FS 0x01 |
#define ULPI_FCTL_XCVR_LS 0x02 |
#define ULPI_FCTL_XCVR_FSLS 0x03 |
#define ULPI_FCTL_TERMSEL 0x04 |
#define ULPI_FCTL_OPMODE_M 0x18 |
#define ULPI_FCTL_OPMODE_NORM 0x00 |
#define ULPI_FCTL_OPMODE_NODRV 0x08 |
#define ULPI_FCTL_OPMODE_NONRZI 0x10 |
#define ULPI_FCTL_OPMODE_DISAUTO 0x18 |
#define ULPI_FCTL_OPMODE_RESET 0x20 |
#define ULPI_FCTL_OPMODE_SUSPEND 0x40 |
Referenced by ULPIPowerTransceiver().
#define ULPI_ICTL_SER6PIN 0x01 |
#define ULPI_ICTL_SER3PIN 0x02 |
#define ULPI_ICTL_AUTORESUME 0x10 |
Referenced by ULPIConfigSet().
#define ULPI_ICTL_INDINV 0x20 |
Referenced by ULPIConfigSet().
#define ULPI_ICTL_INDPASSTHRU 0x40 |
Referenced by ULPIConfigSet().
#define ULPI_ICTL_PROTDIS 0x80 |
#define ULPI_OTGCTL_ID_EN 0x01 |
#define ULPI_OTGCTL_DPPD_EN 0x02 |
#define ULPI_OTGCTL_DMPD_EN 0x04 |
#define ULPI_OTGCTL_DISCHRG_VBUS 0x08 |
#define ULPI_OTGCTL_CHRG_VBUS 0x10 |
#define ULPI_OTGCTL_VBUSINT_EN 0x20 |
Referenced by ULPIConfigSet().
#define ULPI_OTGCTL_VBUSEXT_EN 0x40 |
Referenced by ULPIConfigSet().
#define ULPI_OTGCTL_VBUSEXT_IND 0x80 |
Referenced by ULPIConfigSet().
void ULPIConfigSet | ( | uint32_t | ui32Base, |
uint32_t | ui32Config | ||
) |
Sets the configuration of an external USB Phy.
ui32Base | specifies the USB module base address. |
ui32Config | specifies the configuration options for the external Phy. |
This function sets the configuration options for an externally connected USB Phy that is connected using the ULPI interface. The ui32Config parameter holds all of the configuration options defined by the UPLI_CFG_ values. The values are grouped as follows:
Connection speed, using one of the following:
Any of the following can be included:
References ULPI_FCTL, ULPI_FCTL_XCVR_M, ULPI_ICTL, ULPI_ICTL_AUTORESUME, ULPI_ICTL_INDINV, ULPI_ICTL_INDPASSTHRU, ULPI_OTGCTL, ULPI_OTGCTL_VBUSEXT_EN, ULPI_OTGCTL_VBUSEXT_IND, and ULPI_OTGCTL_VBUSINT_EN.
void ULPIPowerTransceiver | ( | uint32_t | ui32Base, |
bool | bEnable | ||
) |
Enables or disables power to the external USB Phy.
ui32Base | specifies the USB module base address. |
bEnable | specifies if the Phy is fully powered or in suspend mode. |
This function sets the current power configuration for the external ULPI connected Phy. When bEnable is true the Phy is fully powered and when false the USB Phy is in suspend mode.
References ULPI_FCTL_CLEAR, ULPI_FCTL_OPMODE_SUSPEND, and ULPI_FCTL_SET.