|
AN144 Datasheet, PDF (21/30 Pages) Silicon Laboratories – DEVICE CUSTOMIZATION GUIDE | |||
|
◁ |
AN144
5.21. CP210x_GetDeviceInterfaceString
Description:
Gets the specified interface string from a CP210x device. If the ConvertToASCII parameter is set,
the string will be converted to ASCII format before being returned to the caller. The character size
limit (in characters, not bytes), NOT including a NULL terminator, is
CP210x_MAX_SERIAL_STRLEN.
Supported Devices: CP2105
Location:
CP210x Manufacturing DLL
Prototype:
CP210x_STATUS CP210x_GetDeviceInterfaceString( HANDLE Handle, ï
BYTE InterfaceNumber, LPVOID Interface, BYTE Length, BOOL ConvertTo-
ASCII)
Parameters:
1. HandleâHandle to the device to close as returned by CP210x_Open().
2. InterfaceNumber âSet to 0 for Enhanced Interface. Set to 1 for Standard Interface.
3. InterfaceâPointer to buffer returning the selected Interface String value.
4. LengthâPointer to a BYTE value returning the length of the string in characters (not bytes),
NOT including a NULL terminator.
5. ConvertToASCIIâBoolean flag that tells the function whether the string needs to be converted
to ASCII before it is returned to the caller. The flag is set to TRUE by default (i.e., the caller is
expecting the string in ASCII format).
Return Value: CP210x_STATUS = CP210x_SUCCESS, ï
CP210x_INVALID_PARAMETER,ï
CP210x_INVALID_HANDLE, ï
CP210x_DEVICE_IO_FAILED
Rev. 2.0
21
|
▷ |