USBX_Init_t Struct Reference

USBXpress initialization function parameter typedef.

#include <em_usbxpress.h>

Data Fields

uint16_t vendorId
16-bit Vendor ID to be returned to the host's Operating System during USB enumeration.
uint16_t productId
16-bit Product ID to be returned to the host's Operating System during USB enumeration.
void const * manufacturerString
Pointer to a character string.
void const * productString
Pointer to a character string.
void const * serialString
Pointer to a character string.
uint8_t maxPower
Specifies how much bus current a device requires.
uint8_t powerAttribute
Set bit 6 to 1 if the device is self- powered and to 0 if it is bus-powered.
uint16_t releaseBcd
The device's release number in BCD (binary-coded decimal) format.
uint8_t useFifo
Whether to use the USB FIFO space to store VCP variables or else store them in user XRAM.

USBXpress initialization function parameter typedef.

User should instantiate and pass by reference to USBX_init() .

Field Documentation

vendorId

uint16_t USBX_Init_t::vendorId

16-bit Vendor ID to be returned to the host's Operating System during USB enumeration.

Set to 0x10C4 to use the default Silicon Laboratories Vendor ID.

productId

uint16_t USBX_Init_t::productId

16-bit Product ID to be returned to the host's Operating System during USB enumeration.

Set to 0xEA61 to associate with the default VCP driver.

manufacturerString

void const* USBX_Init_t::manufacturerString

Pointer to a character string.

See AN571 Appendix B for formatting. NULL pointer will be treated as a valid address.

productString

void const* USBX_Init_t::productString

Pointer to a character string.

See AN571 Appendix B for formatting. NULL pointer will be treated as a valid address.

serialString

void const* USBX_Init_t::serialString

Pointer to a character string.

See Appendix B for formatting. NULL pointer will be treated as a valid address.

maxPower

uint8_t USBX_Init_t::maxPower

Specifies how much bus current a device requires.

Set to one half the number of milliamperes required. The maximum allowed current is 500 milliamperes, and hence any value above 0xFA will be automatically set to 0xFA. Example: Set to 0x32 to request 100 mA.

powerAttribute

uint8_t USBX_Init_t::powerAttribute

Set bit 6 to 1 if the device is self- powered and to 0 if it is bus-powered.

Set bit 5 to 1 if the device supports the remote wakeup feature. Bits 0 through 4 must be 0 and bit 7 must be 1. Example: Set to 0x80 to specify a bus-powered device that does not support remote wakeup.

releaseBcd

uint16_t USBX_Init_t::releaseBcd

The device's release number in BCD (binary-coded decimal) format.

In BCD, the upper byte represents the integer, the next four bits are tenths, and the final four bits are hundredths. Example: 2.13 is denoted by 0x0213.

useFifo

uint8_t USBX_Init_t::useFifo

Whether to use the USB FIFO space to store VCP variables or else store them in user XRAM.

The addresses of the variables are the same either way. If the current device does not support the use of the USB FIFO space form variable storage, this option does nothing.