1 #ifndef HOST_LIB_MANUFACTURING_INCLUDE_CP210XMANUFACTURINGDLL_H_INCLUDED_XF3N9QM3BK 2 #define HOST_LIB_MANUFACTURING_INCLUDE_CP210XMANUFACTURINGDLL_H_INCLUDED_XF3N9QM3BK 47 #include "silabs_defs.h" 48 #include "silabs_sal.h" 57 #ifdef CP210xDLL_EXPORTS 60 #if defined(SILABS_STATIC_LINK) 61 #define CP210xDLL_API extern 62 #pragma comment (lib, "CP210xManufacturing.static.lib") 63 #else // defined(SILABS_STATIC_LINK) 64 #define CP210xDLL_API __declspec(dllimport) 65 #pragma comment (lib, "CP210xManufacturing.lib") 66 #endif // defined(SILABS_STATIC_LINK) 75 typedef enum _CP210X_GETPRODUCTSTRING {
85 _Success_(
return == TRUE)
91 #define CP210x_CP2101_VERSION CP210x_PARTNUM_CP2101 92 #define CP210x_CP2102_VERSION CP210x_PARTNUM_CP2102 93 #define CP210x_CP2103_VERSION CP210x_PARTNUM_CP2103 94 #define CP210x_CP2104_VERSION CP210x_PARTNUM_CP2104 95 #define CP210x_CP2105_VERSION CP210x_PARTNUM_CP2105 96 #define CP210x_CP2108_VERSION CP210x_PARTNUM_CP2108 97 #define CP210x_CP2109_VERSION CP210x_PARTNUM_CP2109 98 #define CP210x_CP2102N_QFN28_VERSION CP210x_PARTNUM_CP2102N_QFN28 99 #define CP210x_CP2102N_QFN24_VERSION CP210x_PARTNUM_CP2102N_QFN24 100 #define CP210x_CP2102N_QFN20_VERSION CP210x_PARTNUM_CP2102N_QFN20 103 #if defined(NOT_YET) // TODO: Enstone: These defines are a cut'n'paste dup of the ones in CP210xRuntimeDLL.h. 105 typedef enum _CP210x_STATUS {
118 #else // defined(NOT_YET) 119 #define CP210x_SUCCESS SILABS_STATUS_SUCCESS 122 #define CP210x_INVALID_HANDLE 0x01 123 #define CP210x_INVALID_PARAMETER 0x02 124 #define CP210x_DEVICE_IO_FAILED 0x03 125 #define CP210x_FUNCTION_NOT_SUPPORTED 0x04 126 #define CP210x_GLOBAL_DATA_ERROR 0x05 127 #define CP210x_FILE_ERROR 0x06 128 #define CP210x_COMMAND_FAILED 0x08 129 #define CP210x_INVALID_ACCESS_TYPE 0x09 130 #define CP210x_DEVICE_NOT_FOUND 0xFF 131 typedef int CP210x_STATUS; 132 #endif // defined(NOT_YET) 140 #define CP210x_MAX_DEVICE_STRLEN 256 141 #define CP210x_MAX_SETUP_STRING_SIZE 246 143 #define CP210x_MAX_MANUFACTURER_STRLEN 45 144 #define CP210x_MAX_PRODUCT_STRLEN 126 145 #define CP210x_MAX_SERIAL_STRLEN 63 147 #define CP2105_MAX_MANUFACTURER_STRLEN 12 149 #define CP2105_MAX_PRODUCT_STRLEN 47 150 #define CP2105_MAX_SERIAL_STRLEN 16 151 #define CP2105_MAX_INTERFACE_STRLEN 32 153 #define CP2108_MAX_MANUFACTURER_STRLEN 126 155 #define CP2108_MAX_PRODUCT_STRLEN 126 156 #define CP2108_MAX_SERIAL_STRLEN 126 157 #define CP2108_MAX_INTERFACE_STRLEN 126 170 #define CP210x_MAX_MAXPOWER 250 176 #define NUM_BAUD_CONFIGS 32 183 uint16_t Timer0Reload;
192 #define BAUD_CONFIG_SIZE 10 204 #define FC_OPEN_TX 0x01 205 #define FC_OPEN_RX 0x02 206 #define FC_CLOSE_TX 0x04 207 #define FC_CLOSE_RX 0x08 209 #define FC_OPEN_TX_SCI FC_OPEN_TX 211 #define FC_OPEN_RX_SCI FC_OPEN_RX 212 #define FC_CLOSE_TX_SCI FC_CLOSE_TX 213 #define FC_CLOSE_RX_SCI FC_CLOSE_RX 215 #define FC_OPEN_TX_ECI 0x10 217 #define FC_OPEN_RX_ECI 0x20 218 #define FC_CLOSE_TX_ECI 0x40 219 #define FC_CLOSE_RX_ECI 0x80 221 #define FC_OPEN_TX_IFC0 0x0001 223 #define FC_OPEN_RX_IFC0 0x0002 224 #define FC_CLOSE_TX_IFC0 0x0004 225 #define FC_CLOSE_RX_IFC0 0x0008 226 #define FC_OPEN_TX_IFC1 0x0010 227 #define FC_OPEN_RX_IFC1 0x0020 228 #define FC_CLOSE_TX_IFC1 0x0040 229 #define FC_CLOSE_RX_IFC1 0x0080 230 #define FC_OPEN_TX_IFC2 0x0100 231 #define FC_OPEN_RX_IFC2 0x0200 232 #define FC_CLOSE_TX_IFC2 0x0400 233 #define FC_CLOSE_RX_IFC2 0x0800 234 #define FC_OPEN_TX_IFC3 0x1000 235 #define FC_OPEN_RX_IFC3 0x2000 236 #define FC_CLOSE_TX_IFC3 0x4000 237 #define FC_CLOSE_RX_IFC3 0x8000 257 #define PORT_RI_ON 0x0001 258 #define PORT_DCD_ON 0x0002 259 #define PORT_DTR_ON 0x0004 260 #define PORT_DSR_ON 0x0008 261 #define PORT_TXD_ON 0x0010 262 #define PORT_RXD_ON 0x0020 263 #define PORT_RTS_ON 0x0040 264 #define PORT_CTS_ON 0x0080 266 #define PORT_GPIO_0_ON 0x0100 267 #define PORT_GPIO_1_ON 0x0200 268 #define PORT_GPIO_2_ON 0x0400 269 #define PORT_GPIO_3_ON 0x0800 271 #define PORT_SUSPEND_ON 0x4000 272 #define PORT_SUSPEND_BAR_ON 0x8000 274 #define EF_GPIO_0_TXLED 0x01 276 #define EF_GPIO_1_RXLED 0x02 277 #define EF_GPIO_2_RS485 0x04 278 #define EF_RS485_INVERT 0x08 279 #define EF_WEAKPULLUP 0x10 280 #define EF_RESERVED_1 0x20 281 #define EF_SERIAL_DYNAMIC_SUSPEND 0x40 282 #define EF_GPIO_DYNAMIC_SUSPEND 0x80 305 #define PORT_RI_SCI_ON 0x0001 306 #define PORT_DCD_SCI_ON 0x0002 307 #define PORT_DTR_SCI_ON 0x0004 308 #define PORT_DSR_SCI_ON 0x0008 309 #define PORT_TXD_SCI_ON 0x0010 310 #define PORT_RXD_SCI_ON 0x0020 311 #define PORT_RTS_SCI_ON 0x0040 312 #define PORT_CTS_SCI_ON 0x0080 313 #define PORT_GPIO_0_SCI_ON 0x0002 314 #define PORT_GPIO_1_SCI_ON 0x0004 315 #define PORT_GPIO_2_SCI_ON 0x0008 316 #define PORT_SUSPEND_SCI_ON 0x0001 318 #define PORT_RI_ECI_ON 0x0100 319 #define PORT_DCD_ECI_ON 0x0200 320 #define PORT_DTR_ECI_ON 0x0400 321 #define PORT_DSR_ECI_ON 0x0800 322 #define PORT_TXD_ECI_ON 0x1000 323 #define PORT_RXD_ECI_ON 0x2000 324 #define PORT_RTS_ECI_ON 0x4000 325 #define PORT_CTS_ECI_ON 0x8000 326 #define PORT_GPIO_0_ECI_ON 0x0400 327 #define PORT_GPIO_1_ECI_ON 0x0800 328 #define PORT_SUSPEND_ECI_ON 0x0100 330 #define EF_GPIO_0_TXLED_ECI 0x01 332 #define EF_GPIO_1_RXLED_ECI 0x02 333 #define EF_GPIO_1_RS485_ECI 0x04 334 #define EF_RS485_INVERT 0x08 335 #define EF_INVERT_SUSPEND_ECI 0x10 336 #define EF_DYNAMIC_SUSPEND_ECI 0x40 338 #define EF_GPIO_0_TXLED_SCI 0x01 340 #define EF_GPIO_1_RXLED_SCI 0x02 341 #define EF_INVERT_SUSPEND_SCI 0x10 342 #define EF_DYNAMIC_SUSPEND_SCI 0x40 344 #define EF_WEAKPULLUP 0x10 362 uint16_t LowPower_PB0;
363 uint16_t LowPower_PB1;
364 uint16_t LowPower_PB2;
365 uint16_t LowPower_PB3;
366 uint16_t LowPower_PB4;
384 uint8_t IPDelay_IFC0;
385 uint8_t IPDelay_IFC1;
386 uint8_t IPDelay_IFC2;
387 uint8_t IPDelay_IFC3;
389 uint8_t EnhancedFxn_IFC1;
390 uint8_t EnhancedFxn_IFC2;
391 uint8_t EnhancedFxn_IFC3;
404 #define PORT_TX0 0x0001 405 #define PORT_RX0 0x0002 406 #define PORT_RTS0 0x0004 407 #define PORT_CTS0 0x0008 408 #define PORT_DTR0 0x0010 409 #define PORT_DSR0 0x0020 410 #define PORT_DCD0 0x0040 411 #define PORT_RI0 0x0080 412 #define PORT_TX1 0x0100 413 #define PORT_RX1 0x0200 414 #define PORT_RTS1 0x0400 415 #define PORT_CTS1 0x0800 416 #define PORT_DTR1 0x1000 417 #define PORT_DSR1 0x2000 418 #define PORT_DCD1 0x4000 419 #define PORT_RI1 0x8000 422 #define PORT_GPIO_0 0x0001 423 #define PORT_GPIO_1 0x0002 424 #define PORT_GPIO_2 0x0004 425 #define PORT_GPIO_3 0x0008 426 #define PORT_GPIO_4 0x0010 427 #define PORT_GPIO_5 0x0020 428 #define PORT_GPIO_6 0x0040 429 #define PORT_GPIO_7 0x0080 430 #define PORT_GPIO_8 0x0100 431 #define PORT_GPIO_9 0x0200 432 #define PORT_GPIO_10 0x0400 433 #define PORT_GPIO_11 0x0800 434 #define PORT_GPIO_12 0x1000 435 #define PORT_GPIO_13 0x2000 436 #define PORT_GPIO_14 0x4000 437 #define PORT_GPIO_15 0x8000 440 #define PORT_SUSPEND 0x0001 441 #define PORT_SUSPEND_BAR 0x0002 442 #define PORT_DTR2 0x0004 443 #define PORT_DSR2 0x0008 446 #define PORT_TX2 0x0001 447 #define PORT_RX2 0x0002 448 #define PORT_RTS2 0x0004 449 #define PORT_CTS2 0x0008 450 #define PORT_DCD2 0x0010 451 #define PORT_RI2 0x0020 452 #define PORT_DTR3 0x0040 453 #define PORT_DSR3 0x0080 454 #define PORT_DCD3 0x0100 455 #define PORT_RI3 0x0200 458 #define PORT_RTS3 0x0001 459 #define PORT_CTS3 0x0002 460 #define PORT_TX3 0x0004 461 #define PORT_RX3 0x0008 465 #define EF_IFC_GPIO_TXLED 0x01 466 #define EF_IFC_GPIO_RXLED 0x02 467 #define EF_IFC_GPIO_RS485 0x04 468 // If the next bit is clear, GPIO1 is low while sending UART data. 470 #define EF_IFC_GPIO_RS485_LOGIC 0x08 471 #define EF_IFC_GPIO_CLOCK 0x10 472 #define EF_IFC_DYNAMIC_SUSPEND 0x40 476 #define EF_DEVICE_WEAKPULLUP_RESET 0x10 477 #define EF_DEVICE_WEAKPULLUP_SUSPEND 0x20 478 #define EF_DEVICE_DYNAMIC_SUSPEND 0x40 512 _Out_writes_bytes_(
sizeof(uint32_t)) _Pre_defensive_ uint32_t *lpdwNumDevices
552 _In_ _Pre_defensive_
const uint32_t dwDeviceIndex,
554 _In_ _Pre_defensive_
const uint32_t dwFlags
592 _In_ _Pre_defensive_
const uint32_t dwDeviceIndex,
594 _Out_writes_z_(
sizeof(
wchar_t) * ProductStringLenInBytes) _Pre_defensive_
wchar_t *pProductString,
595 _In_ _Pre_defensive_
const size_t ProductStringLenInBytes);
619 _In_ _Pre_defensive_
const uint32_t DeviceIndex,
620 _Out_writes_bytes_(
sizeof(HANDLE)) _Pre_defensive_ PHANDLE pcyHandle
634 _In_ _Pre_defensive_
const HANDLE cyHandle
652 _In_ _Pre_defensive_
const HANDLE cyHandle,
653 _Out_writes_bytes_(
sizeof(uint8_t)) _Pre_defensive_ uint8_t *lpbPartNum
672 _In_ _Pre_defensive_
const HANDLE cyHandle,
673 _In_ _Pre_defensive_
const uint16_t Vid
692 _In_ _Pre_defensive_
const HANDLE cyHandle,
693 _In_ _Pre_defensive_
const uint16_t Pid
719 _In_ _Pre_defensive_
const HANDLE cyHandle,
720 _In_ _Pre_defensive_
void *lpvManufacturerString,
721 _In_ _Pre_defensive_
const uint8_t bManufacturerStringLength,
722 _In_ _Pre_defensive_
const BOOL bIsStringASCII = TRUE
748 _In_ _Pre_defensive_
const HANDLE cyHandle,
749 _In_ _Pre_defensive_
void * lpvProductString,
750 _In_ _Pre_defensive_
const uint8_t bProductStringLength,
751 _In_ _Pre_defensive_
const BOOL bIsStringASCII = TRUE
781 _In_ _Pre_defensive_
const HANDLE cyHandle,
782 _In_ _Pre_defensive_
const uint8_t bInterfaceNumber,
783 _In_ _Pre_defensive_
void * lpvInterfaceString,
784 _In_ _Pre_defensive_
const uint8_t bInterfaceStringLength,
785 _In_ _Pre_defensive_
const BOOL bIsStringASCII
812 _In_ _Pre_defensive_
const HANDLE cyHandle,
813 _In_ _Pre_defensive_
void *lpvSerialNumberString,
814 _In_ _Pre_defensive_
const uint8_t bSerialNumberStringLength,
815 _In_ _Pre_defensive_
const BOOL bIsStringASCII = TRUE
834 _In_ _Pre_defensive_
const HANDLE cyHandle,
835 _In_ _Pre_defensive_
const BOOL bSelfPower
854 _In_ _Pre_defensive_
const HANDLE cyHandle,
855 _In_ _Pre_defensive_
const uint8_t bMaxPower
877 _In_ _Pre_defensive_
const HANDLE cyHandle,
878 _In_ _Pre_defensive_
const uint16_t wFlushBufferConfig
899 _In_ _Pre_defensive_
const HANDLE cyHandle,
900 _In_ _Pre_defensive_
const uint8_t bDeviceModeECI,
901 _In_ _Pre_defensive_
const uint8_t bDeviceModeSCI
920 _In_ _Pre_defensive_
const HANDLE cyHandle,
921 _In_ _Pre_defensive_
const uint16_t wVersion
942 _In_ _Pre_defensive_
const HANDLE cyHandle,
943 _In_reads_bytes_(
sizeof(
BAUD_CONFIG)) _Pre_defensive_ PBAUD_CONFIG pBaudConfig
970 _In_ _Pre_defensive_
const HANDLE cyHandle,
994 _In_ _Pre_defensive_
const HANDLE cyHandle,
1016 _In_ _Pre_defensive_
const HANDLE cyHandle,
1039 _In_ _Pre_defensive_
const HANDLE cyHandle
1057 _In_ _Pre_defensive_
const HANDLE cyHandle,
1058 _Out_writes_bytes_(
sizeof(uint16_t)) _Pre_defensive_ uint16_t *lpwVid
1076 _In_ _Pre_defensive_
const HANDLE cyHandle,
1077 _Out_writes_bytes_(
sizeof(uint16_t)) _Pre_defensive_ uint16_t *lpwPid
1101 _In_ _Pre_defensive_
const HANDLE cyHandle,
1102 _Out_writes_bytes_(*lpbManufacturerStringLengthInBytes) _Pre_defensive_
void *pManufacturerString,
1103 _Out_writes_bytes_(1) _Pre_defensive_ uint8_t *lpbManufacturerStringLengthInBytes,
1104 _In_ _Pre_defensive_
const BOOL bConvertToASCII = FALSE
1128 _In_ _Pre_defensive_
const HANDLE cyHandle,
1129 _Out_writes_bytes_(*lpbProductStringLengthInBytes) _Pre_defensive_
void *pProductString,
1130 _Out_writes_bytes_(1) _Pre_defensive_ uint8_t *lpbProductStringLengthInBytes,
1131 _In_ _Pre_defensive_
const BOOL bConvertToASCII = FALSE
1157 _In_ _Pre_defensive_
const HANDLE cyHandle,
1158 _In_ _Pre_defensive_
const uint8_t bInterfaceNumber,
1159 _Out_writes_bytes_(*lpbInterfaceStringLengthInBytes) _Pre_defensive_
void *pInterfaceString,
1160 _Out_writes_bytes_(1) _Pre_defensive_ uint8_t *lpbInterfaceStringLengthInBytes,
1161 _In_ _Pre_defensive_
const BOOL bConvertToASCII = FALSE
1185 _In_ _Pre_defensive_
const HANDLE cyHandle,
1186 _Out_writes_bytes_(*lpbSerialNumberStringLengthInBytes) _Pre_defensive_
void *pSerialNumberString,
1187 _Out_writes_bytes_(1) _Pre_defensive_ uint8_t *lpbSerialNumberStringLengthInBytes,
1188 _In_ _Pre_defensive_
const BOOL bConvertToASCII = FALSE
1192 #if ! defined(_WIN32) 1208 _In_ _Pre_defensive_
const HANDLE cyHandle,
1209 uint8_t *lpbAddress);
1210 #endif // ! defined(_WIN32) 1227 _In_ _Pre_defensive_
const HANDLE cyHandle,
1228 _Out_writes_bytes_(
sizeof(BOOL)) _Pre_defensive_ LPBOOL lpbSelfPower
1246 _In_ _Pre_defensive_
const HANDLE cyHandle,
1247 _Out_writes_bytes_(
sizeof(uint8_t)) _Pre_defensive_ uint8_t *lpbPower
1270 _In_ _Pre_defensive_
const HANDLE cyHandle,
1271 _Out_writes_bytes_(
sizeof(uint16_t)) _Pre_defensive_ uint16_t *lpwFlushBufferConfig
1293 _In_ _Pre_defensive_
const HANDLE cyHandle,
1294 _Out_writes_bytes_(
sizeof(uint8_t)) _Pre_defensive_ uint8_t *lpbDeviceModeECI,
1295 _Out_writes_bytes_(
sizeof(uint8_t)) _Pre_defensive_ uint8_t *lpbDeviceModeSCI
1317 _In_ _Pre_defensive_
const HANDLE cyHandle,
1318 _Out_writes_bytes_(
sizeof(uint16_t)) _Pre_defensive_ uint16_t *lpwVersion
1339 _In_ _Pre_defensive_
const HANDLE cyHandle,
1340 _Out_writes_bytes_(
sizeof(
BAUD_CONFIG)) _Pre_defensive_ PBAUD_CONFIG pBaudConfig
1361 _In_ _Pre_defensive_
const HANDLE cyHandle,
1362 _Out_writes_bytes_(
sizeof(
PORT_CONFIG)) _Pre_defensive_ PPORT_CONFIG pPortConfig
1383 _In_ _Pre_defensive_
const HANDLE cyHandle,
1405 _In_ _Pre_defensive_
const HANDLE cyHandle,
1430 _In_ _Pre_defensive_
const HANDLE cyHandle,
1431 _Out_writes_bytes_(
sizeof(uint8_t)) _Pre_defensive_ uint8_t *lpbLockValue
1453 _In_ _Pre_defensive_
const HANDLE cyHandle
1474 _In_ _Pre_defensive_
const HANDLE cyHandle,
1475 _In_ LPCSTR lpvFileName
1496 _In_ _Pre_defensive_
const HANDLE cyHandle,
1497 _Out_writes_bytes_(
sizeof(
firmware_t)) _Pre_defensive_ pFirmware_t lpVersion
1519 _In_ _Pre_defensive_
const HANDLE cyHandle,
1520 _Out_writes_bytes_(bLength) _Pre_defensive_ uint8_t *lpbConfig,
1521 _In_ _Pre_defensive_
const uint16_t bLength
1543 _In_ _Pre_defensive_
const HANDLE cyHandle,
1544 _In_reads_bytes_(bLength) _Pre_defensive_ uint8_t *lpbConfig,
1545 _In_ _Pre_defensive_
const uint16_t bLength
1564 _In_ _Pre_defensive_
const HANDLE cyHandle);
1583 _In_ _Pre_defensive_
const HANDLE cyHandle,
1584 _Out_writes_bytes_(bLength) _Pre_defensive_ uint8_t *lpbGeneric,
1585 _In_ _Pre_defensive_
const uint16_t bLength
1605 _In_ _Pre_defensive_
const HANDLE cyHandle,
1606 _In_reads_bytes_(bLength) _Pre_defensive_ uint8_t *lpbGeneric,
1607 _In_ _Pre_defensive_
const uint16_t bLength
1616 #endif // !HOST_LIB_MANUFACTURING_INCLUDE_CP210XMANUFACTURINGDLL_H_INCLUDED_XF3N9QM3BK char CP210x_MANUFACTURER_STRING[45]
CP210x Manufacture string.
Definition: CP210xManufacturingDLL.h:164
#define CP210x_DEVICE_IO_FAILED
device I/O failed
Definition: CP210xManufacturingDLL.h:124
firmware version. Alias of this struct is firmware_t
CP210x_STATUS CP210x_Reset(const HANDLE cyHandle)
Initiates a reset of the USB device.
CP210x_STATUS CP210x_GetDualPortConfig(const HANDLE cyHandle, DUAL_PORT_CONFIG *pDualPortConfig)
Gets and returns the current Dual Port Configuration from the Dual Port device.
char CP2105_INTERFACE_STRING[32]
CP2105 Interface string.
Definition: CP210xManufacturingDLL.h:167
CP210x_STATUS CP210x_GetPortConfig(const HANDLE cyHandle, PPORT_CONFIG pPortConfig)
Gets and returns the Port Configuration from the device.
CP210x_STATUS CP210x_Close(const HANDLE cyHandle)
Closes an open handle to the device.
CP210x_STATUS CP210x_SetProductString(const HANDLE cyHandle, void *lpvProductString, const uint8_t bProductStringLength, const BOOL bIsStringASCII=TRUE)
Sets the Product Description String of the device's USB Device Descriptor's iProduct USB String Descr...
CP210x_STATUS CP210x_SetManufacturerString(const HANDLE cyHandle, void *lpvManufacturerString, const uint8_t bManufacturerStringLength, const BOOL bIsStringASCII=TRUE)
Sets the Manufacturer Description String of the device's USB Device Descriptor's iManufacturer USB St...
BAUD_CONFIG BAUD_CONFIG_DATA[32]
Array of all Baud Rate Configurations.
Definition: CP210xManufacturingDLL.h:195
#define CP210x_MAX_SERIAL_STRLEN
Single port device Max Serial Number string length.
Definition: CP210xManufacturingDLL.h:145
Definition: CP210xManufacturingDLL.h:245
uint8_t minor
minor version number
Definition: CP210xManufacturingDLL.h:489
CP210x_STATUS CP210x_SetFlushBufferConfig(const HANDLE cyHandle, const uint16_t wFlushBufferConfig)
Sets the Flush Buffer configuration of the device.
Description string a la "Friendly Name".
Definition: CP210xManufacturingDLL.h:77
#define CP210x_DEVICE_NOT_FOUND
the specified device was not found
Definition: CP210xManufacturingDLL.h:130
uint16_t Mode
Push-Pull = 1, Open-Drain = 0.
Definition: CP210xManufacturingDLL.h:293
CP210x_STATUS CP210x_SetGeneric(const HANDLE cyHandle, uint8_t *lpbGeneric, const uint16_t bLength)
Issue a generic host-to-device USB command to the device.
CP210x_STATUS CP210x_GetSelfPower(const HANDLE cyHandle, LPBOOL lpbSelfPower)
Reads and returns the Self-Powered bit of the Power Attributes field of the USB Configuration Descrip...
#define CP2105_MAX_INTERFACE_STRLEN
Dual port device Max Interface string length.
Definition: CP210xManufacturingDLL.h:151
no error
Definition: silabs_defs.h:262
char CP210x_PRODUCT_STRING[126]
CP210x Product string.
Definition: CP210xManufacturingDLL.h:165
CP210x_STATUS CP210x_SetBaudRateConfig(const HANDLE cyHandle, PBAUD_CONFIG pBaudConfig)
Sets the baud rate configuration data of the device.
Serial Number string.
Definition: CP210xManufacturingDLL.h:76
CP210x_STATUS CP210x_SetSelfPower(const HANDLE cyHandle, const BOOL bSelfPower)
Sets or clears the Self-Powered bit of the Power Attributes field of the USB Configuration Descriptor...
CP2103/4 Port Config Structure. Alias of this struct is PORT_CONFIG.
uint16_t Mode_PB0
tbd
Definition: CP210xManufacturingDLL.h:356
CP210x_STATUS CP210x_SetSerialNumber(const HANDLE cyHandle, void *lpvSerialNumberString, const uint8_t bSerialNumberStringLength, const BOOL bIsStringASCII=TRUE)
Sets the Serial Number Description String of the device's USB Device Descriptor's iSerialNumber USB S...
uint8_t EnhancedFxn_IFC0
Enhanced function of Interface 0.
Definition: CP210xManufacturingDLL.h:388
#define CP210x_INVALID_PARAMETER
a parameter was not valid
Definition: CP210xManufacturingDLL.h:123
#define NUM_BAUD_CONFIGS
Number of Baud Configurations.
Definition: CP210xManufacturingDLL.h:176
CP210x_STATUS CP210x_GetFlushBufferConfig(const HANDLE cyHandle, uint16_t *lpwFlushBufferConfig)
Reads and returns the Flush Buffer configuration from the device.
CP210x_STATUS CP210x_GetDeviceProductString(const HANDLE cyHandle, void *pProductString, uint8_t *lpbProductStringLengthInBytes, const BOOL bConvertToASCII=FALSE)
Read and return the USB Device Descriptor's iProduct USB String Descriptor string.
CP210x_STATUS CP210x_GetLockValue(const HANDLE cyHandle, uint8_t *lpbLockValue)
Reads and returns the Lock Value from the device.
CP210x_STATUS CP210x_GetDevicePid(const HANDLE cyHandle, uint16_t *lpwPid)
Reads and returns the 2-byte Product ID from the USB Device Descriptor from the device.
uint16_t Reset_Latch
Logic High = 1, Logic Low = =0.
Definition: CP210xManufacturingDLL.h:248
CP210x_STATUS CP210x_GetConfig(const HANDLE cyHandle, uint8_t *lpbConfig, const uint16_t bLength)
Retrieves the current configuration from the device as a byte array.
uint16_t Suspend_Latch
Logic High = 1, Logic Low = =0.
Definition: CP210xManufacturingDLL.h:249
CP210x_STATUS CP210x_GetMaxPower(const HANDLE cyHandle, uint8_t *lpbPower)
Reads and returns the Max Power field of the USB Configuration Descriptor from the device...
CP210x_STATUS CP210x_SetConfig(const HANDLE cyHandle, uint8_t *lpbConfig, const uint16_t bLength)
Program the device's configurable area with the given byte array.
Definition: CP210xManufacturingDLL.h:80
uint16_t Reset_Latch
Logic High = 1, Logic Low = =0.
Definition: CP210xManufacturingDLL.h:294
#define WINAPI
WINAPI.
Definition: CP210xManufacturingDLL.h:70
CP210x_STATUS CP210x_SetQuadPortConfig(const HANDLE cyHandle, QUAD_PORT_CONFIG *pQuadPortConfig)
Sets the current port pin configuration from the device.
CP210x_STATUS CP210x_SetInterfaceString(const HANDLE cyHandle, const uint8_t bInterfaceNumber, void *lpvInterfaceString, const uint8_t bInterfaceStringLength, const BOOL bIsStringASCII)
Sets the Interface Description String of the device's specified interface's iInterface USB String Des...
CP210X_GETPRODUCTSTRING
CP210x_GetProductString() function flags
Definition: CP210xManufacturingDLL.h:75
CP210x_STATUS CP210x_GetNumDevices(uint32_t *lpdwNumDevices)
Determines the number of CP210x devices connected to the system.
unsigned char EnhancedFxn_SCI
Enhanced function of SCI port.
Definition: CP210xManufacturingDLL.h:297
char CP210x_DEVICE_STRING[256]
CP210x Device string.
Definition: CP210xManufacturingDLL.h:163
CP210x_STATUS CP210x_GetProductStringSafe(const uint32_t dwDeviceIndex, const CP210X_GETPRODUCTSTRING WhichProductStringToReturn, wchar_t *pProductString, const size_t ProductStringLenInBytes)
Gets a "Product string".
CP210x_STATUS CP210x_GetQuadPortConfig(const HANDLE cyHandle, QUAD_PORT_CONFIG *pQuadPortConfig)
Gets and returns the current Quad Port Configuration from the Quad Port device.
CP210x_STATUS CP210x_SetLockValue(const HANDLE cyHandle)
Sets the Lock Value of a device – prevents all future customizing of the device. ...
CP210x_STATUS CP210x_GetDeviceVid(const HANDLE cyHandle, uint16_t *lpwVid)
Reads and returns the 2-byte Vendor ID from the USB Device Descriptor from the device.
CP210x_STATUS CP210x_GetBaudRateConfig(const HANDLE cyHandle, PBAUD_CONFIG pBaudConfig)
Reads and returns the Baud Rate Configuration from the device.
CP210x_STATUS CP210x_SetPid(const HANDLE cyHandle, const uint16_t Pid)
Sets the Product ID field of the device's USB Device Descriptor.
CP210x_STATUS CP210x_CreateHexFile(const HANDLE cyHandle, LPCSTR lpvFileName)
Create a hex file dump of TBD.
uint16_t Suspend_Latch
Logic High = 1, Logic Low = =0.
Definition: CP210xManufacturingDLL.h:295
#define CP210x_MAX_DEVICE_STRLEN
CP210x Maximum Device-side string length.
Definition: CP210xManufacturingDLL.h:140
#define CP210x_MAX_MANUFACTURER_STRLEN
Single port device Max Manufacturing string length.
Definition: CP210xManufacturingDLL.h:143
CP210x_STATUS CP210x_GetDeviceMode(const HANDLE cyHandle, uint8_t *lpbDeviceModeECI, uint8_t *lpbDeviceModeSCI)
Reads and returns the operating mode (GPIO or Modem) of each Interface from the device.
int CP210x_STATUS
CP210x_STATUS.
Definition: CP210xManufacturingDLL.h:131
CP210x_STATUS CP210x_SetDeviceVersion(const HANDLE cyHandle, const uint16_t wVersion)
Sets the Device Release Version field of the USB Device Descriptor of the device. ...
CP210x_STATUS CP210x_GetDeviceSerialNumber(const HANDLE cyHandle, void *pSerialNumberString, uint8_t *lpbSerialNumberStringLengthInBytes, const BOOL bConvertToASCII=FALSE)
Read and return the USB Device Descriptor's iSerialNumber USB String Descriptor string.
Definition: CP210xManufacturingDLL.h:180
uint16_t Mode
Push-Pull = 1, Open-Drain = 0.
Definition: CP210xManufacturingDLL.h:247
CP210x_STATUS CP210x_SetVid(const HANDLE cyHandle, const uint16_t Vid)
Sets the Vendor ID field of the device's USB Device Descriptor.
unsigned char BYTE
Byte definition.
Definition: silabs_defs.h:41
#define CP210x_COMMAND_FAILED
command failed
Definition: CP210xManufacturingDLL.h:128
void _ConfigLatchRS485(BYTE partNum, PORT_CONFIG *PortConfig, uint16_t &Temp_Reset_Latch, uint16_t &Temp_Suspend_Latch)
overwrite latch value if in RS485 mode
#define CP210x_FUNCTION_NOT_SUPPORTED
the specified function is not supported
Definition: CP210xManufacturingDLL.h:125
Baud Config Structure. Alias of this struct is BAUD_CONFIG.
CP210x_STATUS CP210x_GetDeviceVersion(const HANDLE cyHandle, uint16_t *lpwVersion)
Reads and returns the Device Release Number (bcdDevice) Version USB Standard Device Descriptor from t...
CP210x_STATUS CP210x_SetPortConfig(const HANDLE cyHandle, PORT_CONFIG *pPortConfig)
Sets the current port pin configuration from the device.
CP210x_STATUS CP210x_GetDeviceManufacturerString(const HANDLE cyHandle, void *pManufacturerString, uint8_t *lpbManufacturerStringLengthInBytes, const BOOL bConvertToASCII=FALSE)
Read and return the USB Device Descriptor's iManufacturer USB String Descriptor string.
CP2105 Dual Port Config Structure. Alias of this struct is DUAL_PORT_CONFIG.
unsigned char EnhancedFxn_ECI
Enhanced function of ECI port.
Definition: CP210xManufacturingDLL.h:296
CP210x_STATUS CP210x_GetGeneric(const HANDLE cyHandle, uint8_t *lpbGeneric, const uint16_t bLength)
Issue a generic device-to-host USB command to the device.
uint8_t build
build number
Definition: CP210xManufacturingDLL.h:490
CP210x_STATUS CP210x_GetProductString(const uint32_t dwDeviceIndex, void *lpvProductString, const uint32_t dwFlags)
Gets a "Product string".
Full Path string a la "Device Path" "A NULL-terminated string that contains the device interface path...
Definition: CP210xManufacturingDLL.h:78
char CP2108_INTERFACE_STRING[126]
CP2108 Interface string.
Definition: CP210xManufacturingDLL.h:168
unsigned char EnhancedFxn_Device
Enhanced function of Device.
Definition: CP210xManufacturingDLL.h:298
Definition: CP210xManufacturingDLL.h:81
#define CP210x_MAX_PRODUCT_STRLEN
Single port device Max Product string length.
Definition: CP210xManufacturingDLL.h:144
CP210x_STATUS CP210x_Open(const uint32_t DeviceIndex, PHANDLE pcyHandle)
Opens a handle to the device.
CP210x_STATUS CP210x_GetFirmwareVersion(const HANDLE cyHandle, pFirmware_t lpVersion)
Reads and returns the Firmware Version from the device.
#define CP210x_SUCCESS
Success.
Definition: CP210xManufacturingDLL.h:121
#define CP210x_FILE_ERROR
file error
Definition: CP210xManufacturingDLL.h:127
CP210x_STATUS CP210x_UpdateFirmware(const HANDLE cyHandle)
Requests device enter Bootloader mode.
CP210x_STATUS CP210x_SetDeviceMode(const HANDLE cyHandle, const uint8_t bDeviceModeECI, const uint8_t bDeviceModeSCI)
Sets the operating mode (GPIO or Modem) of each Interface of the device.
#define CP210x_GLOBAL_DATA_ERROR
global data error
Definition: CP210xManufacturingDLL.h:126
char CP210x_SERIAL_STRING[63]
CP210x Serial string.
Definition: CP210xManufacturingDLL.h:166
Definition: CP210xManufacturingDLL.h:82
uint8_t EnhancedFxn_Device
Enhanced function of Devie.
Definition: CP210xManufacturingDLL.h:392
Definition: CP210xManufacturingDLL.h:487
#define CP210x_INVALID_ACCESS_TYPE
invalid access type
Definition: CP210xManufacturingDLL.h:129
CP210x_STATUS CP210x_SetDualPortConfig(const HANDLE cyHandle, DUAL_PORT_CONFIG *pDualPortConfig)
Sets the current port pin configuration from the device.
Definition: CP210xManufacturingDLL.h:291
Definition: CP210xManufacturingDLL.h:380
unsigned char EnhancedFxn
tbd
Definition: CP210xManufacturingDLL.h:250
uint8_t major
major version number
Definition: CP210xManufacturingDLL.h:488
CP210x_STATUS CP210x_GetDeviceAddress(const HANDLE cyHandle, uint8_t *lpbAddress)
Returns the USB Address of the device.
#define CP210x_INVALID_HANDLE
an handle parameter was not valid
Definition: CP210xManufacturingDLL.h:122
#define CP210xDLL_API
CP210xDLL_API.
Definition: CP210xManufacturingDLL.h:69
CP210x_STATUS CP210x_GetPartNumber(const HANDLE cyHandle, uint8_t *lpbPartNum)
Reads and returns the Part Number from the device.
Definition: CP210xManufacturingDLL.h:354
enum _CP210X_GETPRODUCTSTRING * PCP210X_GETPRODUCTSTRING
define CP210X_GETPRODUCTSTRING function flags
#define CP2108_MAX_INTERFACE_STRLEN
Quad port device Max Interface string length.
Definition: CP210xManufacturingDLL.h:157
CP210x_STATUS CP210x_GetDeviceInterfaceString(const HANDLE cyHandle, const uint8_t bInterfaceNumber, void *pInterfaceString, uint8_t *lpbInterfaceStringLengthInBytes, const BOOL bConvertToASCII=FALSE)
Read and return the Interface Description USB String Descriptor string.
CP210x_STATUS CP210x_SetMaxPower(const HANDLE cyHandle, const uint8_t bMaxPower)
Sets the Max Power field of the USB Configuration Descriptor of the device.
CP2108 Quad Port Config structure. Alias of this struct is QUAD_PORT_CONFIG.
CP2108 Quad Port State structure (used in QUAD_PORT_CONFIG). Alias of this struct is QUAD_PORT_STATE...