22 #ifndef _CP2114_DATA_COMMON_H_ 23 #define _CP2114_DATA_COMMON_H_ 28 #define PART_NUMBER 0x0E // 0x0E = 14, i.e. CP2114 42 #define FIRMWARE_VERSION 0x08 // CP2114-B01: 0x07, CP2114-B02: 0x08 43 #define DEV_API_VERSION 0x06 // CP2114-B01: 0x05, CP2114-B02: 0x06 44 #define CFG_FMT_VERSION 0x02 // CP2114-B01: 0x01, CP2114-B02: 0x02 53 #define DEFAULTDATA_ADDRESS 0x6600 54 #define USERDATA_ADDRESS 0x6800 56 #define CUSTOM_DATA_SIZE (6*1024) 62 #define kInvalidConfigNumber 0x20 // Requested config number >= MAX_CONFIGS 63 #define kBootIndicesDepleted 0x21 // All Dev boot indexes have been used 64 #define kRequestedConfigNotPresent 0x22 // Pointer to requested Dev config is 0xFFFF 65 #define kRequestedConfigInvalid 0x23 // Config is invalid or not supported 66 #define kConfigPointersDepleted 0x24 // All Config pointer slots have been used 67 #define kConfigSpaceDepleted 0x25 // Not enough space to save the new config 68 #define kBootIndexUnchanged 0x26 // The user-specified boot index is already the current boot index 69 #define kConfigUnchanged 0x27 // The Config is already as the user requested 70 #define kConfigInvalidConfigIdentifier 0x28 // Identifier was not INBAND_IDENTIFIER_INIT/SUSPEND/ACTIVE 71 #define kConfigSettingsInvalid 0x29 // Configuration contains invalid setting(s) 72 #define kUnsupportedConfigFormat 0x2A // The config format version is not supported by library/firmware 75 #define kInvalidNumberOfCachedParams 0x40 // Specified tSetParamsForNextGet.params > MAX_CACHED_PARAMS 76 #define kUnexpectedCacheData 0x41 // Something in tSetParamsForNextGet was not as expected 79 #define kI2cBusy 0x50 // Busy error code 80 #define kI2cTimeout 0x51 // Time out error code 81 #define kI2cInvalidToken 0x52 // Invalid token error code 82 #define kI2cInvalidWriteLength 0x53 // Invalid write length error code 83 #define kI2cInvalidConfigLength 0x54 // Invalid config length error code 84 #define kI2cSclStuckLow 0x55 // SCL stuck low error code 85 #define kI2cSdaStuckLow 0x56 // SDA stuck low error code 100 #define SIZE_DEVICE_CAPS (sizeof(tDeviceCaps)) // Size device Capabilities 103 #define CP2114_CONFIG_VERSION_B01 1 // CP2114 config version B01 104 #define CP2114_CONFIG_VERSION_B02 2// CP2114 config version B02 109 #define MAX_RAM_CONFIG_SIZE (2 + 61) 110 #define RAM_CONFIG_SIZE_B01 30 111 #define RAM_CONFIG_SIZE_B02 50 123 #define RESET_DEVICE 0x40 // Reset Device 124 #define GETSET_UART_ENABLE 0x41 // Get Set Receive Status 125 #define GET_UART_STATUS 0x42 // Get UART Status 126 #define PURGE_FIFOS 0x43 // Purge FIFOs 127 #define GET_GPIO_VALUES 0x44 // Get GPIO Values 128 #define SET_GPIO_VALUES 0x45 // Set GPIO Values 129 #define GET_VER_INFO 0x46 // Get Version Information 130 #define GETSET_LOCK_BYTE 0x47 // Get Set Lock Byte 132 #define GETSET_UART_CONFIG 0x50 // Get Set UART Config 133 #define TRANS_LINE_BREAK 0x51 // Transmit Line Break 134 #define STOP_LINE_BREAK 0x52 // Stop Line Break 136 #define GETSET_USB_CONFIG 0x60 // All customizable data that's not strings 137 #define GETSET_MANU1 0x61 // Get Set Manufacturing String 1 138 #define GETSET_MANU2 0x62 // Get Set Manufacturing String 2 139 #define GETSET_PROD1 0x63 // Get Set Product String 1 140 #define GETSET_PROD2 0x64 // Get Set Product String 2 141 #define GETSET_SERSTR 0x65 // Get Set Serial String 142 #define GETSET_PIN_CONFIG 0x66 // GPIO configuration 145 #define GET_DEVICE_STATUS 0x70 // none 1 byte sticky status, cleared in firmware on a read 146 #define GET_DEVICE_CAPS 0x71 // none Gets CP2114 capabilities 147 #define GET_RAM_CONFIG 0x72 // none Get current CP2114 Config from RAM 148 #define SET_RAM_CONFIG 0x73 // config till DAC pairs Set CP2114 Configuration to RAM 149 #define SET_DAC_REGISTERS 0x74 // register values Set DAC Config 150 #define GET_DAC_REGISTERS 0x75 // register addr/count Get DAC registers 151 #define GET_OTP_CONFIG 0x76 // index Return CP2114 OTP Config based on the current index 152 #define GET_DEVICE_VERSIONS 0x77 // none Return API version and firmware version 153 #define CREATE_OTP_CONFIG 0x78 // config block Create New Configuration Block for CP2114 154 #define SET_BOOT_CONFIG 0x79 // index Set CP2114 Boot Configuration 155 #define SET_PARAMS_FOR_NEXT_GET 0x7A // Parameters to be used for subsequent Get 156 #define GET_OTP_ALLCONFIG 0x7B // Get OTP all configuration 157 #define SET_OTP_ALLCONFIG 0x7C // Set OTP all configuration 158 #define I2C_WRITE_DATA 0x7D // SLA,nWrite,data I2C Write operation 159 #define I2C_READ_DATA 0x7E // (Sent in Params block) I2C Read operation 161 #define BUTTON_EVENT 0x80 // Report button status 165 INBAND_IDENTIFIER_INIT = 0xF9,
166 INBAND_IDENTIFIER_SUSPEND = 0xFA,
167 INBAND_IDENTIFIER_ACTIVE = 0xFB,
168 INBAND_COMMAND_START = 0xFC,
169 INBAND_COMMAND_REENUMERATE = INBAND_COMMAND_START,
170 INBAND_COMMAND_DELAY_US = 0xFD,
171 INBAND_COMMAND_SET_GPIO = 0xFE,
172 INBAND_COMMAND_DELAY_MS = 0xFF,
175 #endif // _CP2114_COMMON_H_ tbd
Definition: CP2114_Common.h:115
U16 Length
Length.
Definition: CP2114_Common.h:117
U8 availableOtpConfigSpace_LSB
Available otp config space LSB.
Definition: CP2114_Common.h:96
U8 availableBootIndices
Available boot indices.
Definition: CP2114_Common.h:93
U8 currentBootConfig
Current boot config.
Definition: CP2114_Common.h:95
U8 configData[(2+61)]
Config data.
Definition: CP2114_Common.h:118
unsigned char U8
unsigned uint 8
Definition: SLABHIDtoUART.h:348
U8 availableOtpConfigSpace_MSB
Available otp config space MSB.
Definition: CP2114_Common.h:97
unsigned short U16
unsigned uint 16
Definition: SLABHIDtoUART.h:351
U8 availableOtpConfigs
Available OTP config.
Definition: CP2114_Common.h:94
CP2114 Capabilities.
Definition: CP2114_Common.h:91