10#ifndef TUYA_ERROR_CODE_H
11#define TUYA_ERROR_CODE_H
22#define OPRT_OK (-0x0000)
23#define OPRT_COM_ERROR (-0x0001)
24#define OPRT_INVALID_PARM (-0x0002)
25#define OPRT_MALLOC_FAILED (-0x0003)
26#define OPRT_NOT_SUPPORTED (-0x0004)
27#define OPRT_NETWORK_ERROR (-0x0005)
28#define OPRT_NOT_FOUND (-0x0006)
29#define OPRT_CR_CJSON_ERR (-0x0007)
30#define OPRT_CJSON_PARSE_ERR (-0x0008)
31#define OPRT_CJSON_GET_ERR (-0x0009)
32#define OPRT_CR_MUTEX_ERR (-0x000a)
33#define OPRT_SOCK_ERR (-0x000b)
34#define OPRT_SET_SOCK_ERR (-0x000c)
35#define OPRT_SOCK_CONN_ERR (-0x000d)
36#define OPRT_SEND_ERR (-0x000e)
37#define OPRT_RECV_ERR (-0x000f)
38#define OPRT_RECV_DA_NOT_ENOUGH (-0x0010)
39#define OPRT_KVS_WR_FAIL (-0x0011)
40#define OPRT_KVS_RD_FAIL (-0x0012)
41#define OPRT_CRC32_FAILED (-0x0013)
42#define OPRT_TIMEOUT (-0x0014)
43#define OPRT_INIT_MORE_THAN_ONCE (-0x0015)
44#define OPRT_INDEX_OUT_OF_BOUND (-0x0016)
45#define OPRT_RESOURCE_NOT_READY (-0x0017)
46#define OPRT_EXCEED_UPPER_LIMIT (-0x0018)
47#define OPRT_FILE_NOT_FIND (-0x0019)
48#define OPRT_FILE_IS_FULL (-0x001a)
49#define OPRT_FILE_OPEN_FAILED (-0x001b)
50#define OPRT_FILE_READ_FAILED (-0x001c)
51#define OPRT_FILE_WRITE_FAILED (-0x001d)
52#define OPRT_NOT_EXIST (-0x001e)
53#define OPRT_BUFFER_NOT_ENOUGH (-0x001f)
54#define OPRT_ROUTER_NOT_FOUND (-0x0020)
55#define OPRT_AUTHENTICATION_NOT_FOUND (-0x0021)
56#define OPRT_AUTHENTICATION_FAIL (-0x0022)
57#define OPRT_MSG_OUT_OF_LIMIT (-0x0023)
58#define OPRT_VERSION_FMT_ERR (-0x0024)
59#define OPRT_GLOBAL_ERRCODE_MAX_CNT 37
65#define OPRT_BASE_OS_ADAPTER_REG_NULL_ERROR (-0x0100)
66#define OPRT_BASE_OS_ADAPTER_ERRCODE_MAX_CNT 1
72#define OPRT_BASE_UTILITIES_PARTITION_EMPTY (-0x0200)
73#define OPRT_BASE_UTILITIES_PARTITION_FULL (-0x0201)
74#define OPRT_BASE_UTILITIES_PARTITION_NOT_FOUND (-0x0202)
75#define OPRT_BASE_UTILITIES_ERRCODE_MAX_CNT 3
81#define OPRT_BASE_SECURITY_CRC32_FAILED (-0x0300)
82#define OPRT_BASE_SECURITY_ERRCODE_MAX_CNT 1
88#define OPRT_BASE_LOG_MNG_DONOT_FOUND_MODULE (-0x0400)
89#define OPRT_BASE_LOG_MNG_PRINT_LOG_LEVEL_HIGHER (-0x0401)
90#define OPRT_BASE_LOG_MNG_FORMAT_STRING_FAILED (-0x0402)
91#define OPRT_BASE_LOG_MNG_LOG_SEQ_OPEN_FILE_FAIL (-0x0403)
92#define OPRT_BASE_LOG_MNG_LOG_SEQ_WRITE_FILE_FAIL (-0x0404)
93#define OPRT_BASE_LOG_MNG_LOG_SEQ_FILE_FULL (-0x0405)
94#define OPRT_BASE_LOG_MNG_LOG_SEQ_FILE_NOT_EXIST (-0x0406)
95#define OPRT_BASE_LOG_MNG_LOG_SEQ_NAME_INVALIDE (-0x0407)
96#define OPRT_BASE_LOG_MNG_LOG_SEQ_CREATE_FAIL (-0x0408)
97#define OPRT_BASE_LOG_MNG_ERRCODE_MAX_CNT 9
103#define OPRT_BASE_TIMEQ_TIMERID_EXIST (-0x0600)
104#define OPRT_BASE_TIMEQ_TIMERID_NOT_FOUND (-0x0601)
105#define OPRT_BASE_TIMEQ_TIMERID_UNVALID (-0x0602)
106#define OPRT_BASE_TIMEQ_GET_IDLE_TIMERID_ERROR (-0x0603)
107#define OPRT_BASE_TIMEQ_ERRCODE_MAX_CNT 4
113#define OPRT_BASE_MSGQ_NOT_FOUND (-0x0700)
114#define OPRT_BASE_MSGQ_LIST_EMPTY (-0x0701)
115#define OPRT_BASE_MSGQ_ERRCODE_MAX_CNT 2
121#define OPRT_MID_HTTP_BUF_NOT_ENOUGH (-0x0800)
122#define OPRT_MID_HTTP_URL_PARAM_OUT_LIMIT (-0x0801)
123#define OPRT_MID_HTTP_OS_ERROR (-0x0802)
124#define OPRT_MID_HTTP_PR_REQ_ERROR (-0x0803)
125#define OPRT_MID_HTTP_SD_REQ_ERROR (-0x0804)
126#define OPRT_MID_HTTP_RD_ERROR (-0x0805)
127#define OPRT_MID_HTTP_AD_HD_ERROR (-0x0806)
128#define OPRT_MID_HTTP_GET_RESP_ERROR (-0x0807)
129#define OPRT_MID_HTTP_AES_INIT_ERR (-0x0808)
130#define OPRT_MID_HTTP_AES_OPEN_ERR (-0x0809)
131#define OPRT_MID_HTTP_AES_SET_KEY_ERR (-0x080a)
132#define OPRT_MID_HTTP_AES_ENCRYPT_ERR (-0x080b)
133#define OPRT_MID_HTTP_CR_HTTP_URL_H_ERR (-0x080c)
134#define OPRT_MID_HTTP_HTTPS_HANDLE_FAIL (-0x080d)
135#define OPRT_MID_HTTP_HTTPS_RESP_UNVALID (-0x080e)
136#define OPRT_MID_HTTP_NO_SUPPORT_RANGE (-0x080f)
137#define OPRT_MID_HTTP_ERRCODE_MAX_CNT 16
143#define OPRT_MID_MQTT_DEF_ERR (-0x0900)
144#define OPRT_MID_MQTT_INVALID_PARM (-0x0901)
145#define OPRT_MID_MQTT_MALLOC_FAILED (-0x0902)
146#define OPRT_MID_MQTT_DNS_PARSED_FAILED (-0x0903)
147#define OPRT_MID_MQTT_SOCK_CREAT_FAILED (-0x0904)
148#define OPRT_MID_MQTT_SOCK_SET_FAILED (-0x0905)
149#define OPRT_MID_MQTT_TCP_CONNECD_FAILED (-0x0906)
150#define OPRT_MID_MQTT_TCP_TLS_CONNECD_FAILED (-0x0907)
151#define OPRT_MID_MQTT_PACK_SEND_FAILED (-0x0908)
152#define OPRT_MID_MQTT_RECV_DATA_FORMAT_WRONG (-0x0909)
153#define OPRT_MID_MQTT_MSGID_NOT_MATCH (-0x090a)
154#define OPRT_MID_MQTT_START_TM_MSG_ERR (-0x090b)
155#define OPRT_MID_MQTT_OVER_MAX_MESSAGE_LEN (-0x090c)
156#define OPRT_MID_MQTT_PING_SEND_ERR (-0x090d)
157#define OPRT_MID_MQTT_PUBLISH_TIMEOUT (-0x090e)
158#define OPRT_MID_MQTT_ERRCODE_MAX_CNT 15
164#define OPRT_MID_TLS_NET_SOCKET_ERROR (-0x0a00)
165#define OPRT_MID_TLS_NET_CONNECT_ERROR (-0x0a01)
166#define OPRT_MID_TLS_UNKNOWN_HOST_ERROR (-0x0a02)
167#define OPRT_MID_TLS_CONNECTION_ERROR (-0x0a03)
168#define OPRT_MID_TLS_DRBG_ENTROPY_ERROR (-0x0a04)
169#define OPRT_MID_TLS_X509_ROOT_CRT_PARSE_ERROR (-0x0a05)
170#define OPRT_MID_TLS_X509_DEVICE_CRT_PARSE_ERROR (-0x0a06)
171#define OPRT_MID_TLS_CTR_DRBG_ENTROPY_SOURCE_ERROR (-0x0a07)
172#define OPRT_MID_TLS_PK_PRIVATE_KEY_PARSE_ERROR (-0x0a08)
173#define OPRT_MID_TLS_ERRCODE_MAX_CNT 9
179#define OPRT_SVC_WIFI_RECV_CONTINUE (-0x0b00)
180#define OPRT_SVC_WIFI_DONOT_FOUND_MODULE (-0x0b01)
181#define OPRT_SVC_WIFI_PEGASUS_DECODE_FAILED (-0x0b02)
182#define OPRT_SVC_WIFI_NEED_FACTORY_RESET (-0x0b03)
183#define OPRT_SVC_WIFI_ERRCODE_MAX_CNT 4
189#define OPRT_SVC_MF_TEST_UPDATE_DATA_LEN_EXECED (-0x0d00)
190#define OPRT_SVC_MF_TEST_UPDATE_CRC_ERROR (-0x0d01)
191#define OPRT_SVC_MF_TEST_ERRCODE_MAX_CNT 2
197#define OPRT_SVC_DP_ALREADY_PROCESS (-0x0e00)
198#define OPRT_SVC_DP_ID_NOT_FOUND (-0x0e01)
199#define OPRT_SVC_DP_TP_NOT_MATCH (-0x0e02)
200#define OPRT_SVC_DP_DEVICE_NOT_BINDED (-0x0e03)
201#define OPRT_SVC_DP_TYPE_PROP_ILLEGAL (-0x0e04)
202#define OPRT_SVC_DP_NW_INVALID (-0x0e05)
203#define OPRT_SVC_DP_SECURITY_VERIFY_ERR (-0x0e06)
204#define OPRT_SVC_DP_REPORT_FINISH (-0x0e07)
205#define OPRT_SVC_DP_ERRCODE_MAX_CNT 8
211#define OPRT_BASE_EVENT_INVALID_EVENT_NAME (-0x0f00)
212#define OPRT_BASE_EVENT_INVALID_EVENT_DESC (-0x0f01)
213#define OPRT_BASE_EVENT_ERRCODE_MAX_CNT 2
219#define OPRT_SVC_TIMER_TASK_LOAD_INVALID_CJSON (-0x1000)
220#define OPRT_SVC_TIMER_TASK_LOAD_INVALID_DATA (-0x1001)
221#define OPRT_SVC_TIMER_TASK_UPDATE_LAST_FETCH_INVALID (-0x1002)
222#define OPRT_SVC_TIMER_TASK_UPDATE_TIMER_CNT_INVALID (-0x1003)
223#define OPRT_SVC_TIMER_TASK_UPDATE_TIMER_CNT_EXCEED (-0x1004)
224#define OPRT_SVC_TIMER_TASK_ERRCODE_MAX_CNT 5
230#define OPRT_SVC_HTTP_NOT_ENCRYPT_RET (-0x1100)
231#define OPRT_SVC_HTTP_FILL_URL_H_ERR (-0x1101)
232#define OPRT_SVC_HTTP_FILL_URL_FULL_ERR (-0x1102)
233#define OPRT_SVC_HTTP_FILL_DATA_ERR (-0x1103)
234#define OPRT_SVC_HTTP_URL_CFG_AI_SPEAKER_ERR (-0x1104)
235#define OPRT_SVC_HTTP_URL_CFG_URL_ERR (-0x1105)
236#define OPRT_SVC_HTTP_URL_CFG_URL2IP_ERR (-0x1106)
237#define OPRT_SVC_HTTP_URL_CFG_URL2IP_SELF_ERR (-0x1107)
238#define OPRT_SVC_HTTP_URL_CFG_URL2IP_VERIFY_ERR (-0x1108)
239#define OPRT_SVC_HTTP_URL_CFG_URL2IP_PSK_ERR (-0x1109)
240#define OPRT_SVC_HTTP_RECV_ERR (-0x110a)
241#define OPRT_SVC_HTTP_RECV_DA_NOT_ENOUGH (-0x110b)
242#define OPRT_SVC_HTTP_API_VERIFY_FAILED (-0x110c)
243#define OPRT_SVC_HTTP_GW_NOT_EXIST (-0x110d)
244#define OPRT_SVC_HTTP_API_TOKEN_EXPIRE (-0x110e)
245#define OPRT_SVC_HTTP_DEV_RESET_FACTORY (-0x110f)
246#define OPRT_SVC_HTTP_DEV_NEED_REGISTER (-0x1110)
247#define OPRT_SVC_HTTP_ORDER_EXPIRE (-0x1111)
248#define OPRT_SVC_HTTP_NOT_EXISTS (-0x1112)
249#define OPRT_SVC_HTTP_SIGNATURE_ERROR (-0x1113)
250#define OPRT_SVC_HTTP_API_VERSION_WRONG (-0x1114)
251#define OPRT_SVC_HTTP_DEVICE_REMOVED (-0x1115)
252#define OPRT_SVC_HTTP_DEV_ALREADY_BIND (-0x1116)
253#define OPRT_SVC_HTTP_REMOTE_API_RUN_UNKNOW_FAILED (-0x1117)
254#define OPRT_SVC_HTTP_FORMAT_STRING_FAILED (-0x1118)
255#define OPRT_SVC_HTTP_API_DECODE_FAILED (-0x1119)
256#define OPRT_SVC_HTTP_SERV_VRFY_FAIL (-0x111a)
257#define OPRT_SVC_HTTP_DEVICE_IS_SUB_NODE_OR_IN_ELECTION (-0x111b)
258#define OPRT_SVC_HTTP_EXT_MOD_NOT_SUPPORT_AUTO_ACT (-0x111c)
259#define OPRT_SVC_HTTP_ERRCODE_MAX_CNT 29
265#define OPRT_SVC_LAN_SOCKET_FAULT (-0x1500)
266#define OPRT_SVC_LAN_SEND_ERR (-0x1501)
267#define OPRT_SVC_LAN_NO_CLIENT_CONNECTED (-0x1502)
268#define OPRT_SVC_LAN_EXT_ALREADY_RPT (-0x1503)
269#define OPRT_SVC_LAN_ERRCODE_MAX_CNT 4
275#define OPRT_SVC_LAN_LINKAGE_SOCK_CREAT_ERR (-0x1600)
276#define OPRT_SVC_LAN_LINKAGE_SET_SOCK_ERR (-0x1601)
277#define OPRT_SVC_LAN_LINKAGE_SOCK_CONN_ERR (-0x1602)
278#define OPRT_SVC_LAN_LINKAGE_SEND_ERR (-0x1603)
279#define OPRT_SVC_LAN_LINKAGE_RECV_ERR (-0x1604)
280#define OPRT_SVC_LAN_LINKAGE_ERRCODE_MAX_CNT 5
286#define OPRT_SVC_MQTT_CMD_NOT_EXEC (-0x1700)
287#define OPRT_SVC_MQTT_CMD_OUT_OF_TIME (-0x1701)
288#define OPRT_SVC_MQTT_GW_MQ_OFFLILNE (-0x1702)
289#define OPRT_SVC_MQTT_ERRCODE_MAX_CNT 3
295#define OPRT_SVC_PEGASUS_DECODE_FAILED (-0x1800)
296#define OPRT_SVC_PEGASUS_DONOT_FOUND_MODULE (-0x1801)
297#define OPRT_SVC_PEGASUS_ERRCODE_MAX_CNT 2
303#define OPRT_SVC_UPGRADE_APP_NOT_READY (-0x1900)
304#define OPRT_SVC_UPGRADE_NO_VALID_FIRMWARE (-0x1901)
305#define OPRT_SVC_UPGRADE_LAN_OTA_FINISH (-0x1902)
306#define OPRT_SVC_UPGRADE_HMAC_NOT_MATCH (-0x1903)
307#define OPRT_SVC_UPGRADE_FILE_IS_FULL (-0x1904)
308#define OPRT_SVC_UPGRADE_ERRCODE_MAX_CNT 5
314#define OPRT_SVC_API_IOT_DISCONNECTED_WITH_ROUTER (-0x1a00)
315#define OPRT_SVC_API_IOT_DEV_NOT_BIND (-0x1a01)
316#define OPRT_SVC_API_IOT_ERRCODE_MAX_CNT 2
322#define OPRT_SVC_CELLULAR_CALL_FAILED (-0x1b00)
323#define OPRT_SVC_CELLULAR_CALL_VOICE_START_ERR (-0x1b01)
324#define OPRT_SVC_CELLULAR_CALL_ANSWER_ERR (-0x1b02)
325#define OPRT_SVC_CELLULAR_CALL_GET_INFO_ERR (-0x1b03)
326#define OPRT_SVC_CELLULAR_CALL_HUNGUP_ERR (-0x1b04)
327#define OPRT_SVC_CELLULAR_SMS_SEND_ERR (-0x1b05)
328#define OPRT_SVC_CELLULAR_SMS_SEND_TIMEOUT (-0x1b06)
329#define OPRT_SVC_CELLULAR_SMS_ENCODE_ERR (-0x1b07)
330#define OPRT_SVC_CELLULAR_SMS_SIZE_ERR (-0x1b08)
331#define OPRT_SVC_CELLULAR_ERRCODE_MAX_CNT 9
337#define OPRT_SVC_DEVOS_NOT_EXISTS (-0x1c00)
338#define OPRT_SVC_DEVOS_SCMA_INVALID (-0x1c01)
339#define OPRT_SVC_DEVOS_DEV_DP_CNT_INVALID (-0x1c02)
340#define OPRT_SVC_DEVOS_NO_AUTHENTICATION (-0x1c03)
341#define OPRT_SVC_DEVOS_ROUTER_NOT_FIND (-0x1c04)
342#define OPRT_SVC_DEVOS_ERRCODE_MAX_CNT 5
348#define OPRT_BASE_DB_FLASH_NOT_ENOUGH_PAGE (-0x1d00)
349#define OPRT_BASE_DB_ERRCODE_MAX_CNT 1
355#define OPRT_LINK_CORE_NET_SOCKET_ERROR (-0x1e00)
356#define OPRT_LINK_CORE_NET_CONNECT_ERROR (-0x1e01)
357#define OPRT_LINK_CORE_UNKNOWN_HOST_ERROR (-0x1e02)
358#define OPRT_LINK_CORE_TLS_CONNECTION_ERROR (-0x1e03)
359#define OPRT_LINK_CORE_DRBG_ENTROPY_ERROR (-0x1e04)
360#define OPRT_LINK_CORE_X509_ROOT_CRT_PARSE_ERROR (-0x1e05)
361#define OPRT_LINK_CORE_X509_DEVICE_CRT_PARSE_ERROR (-0x1e06)
362#define OPRT_LINK_CORE_PK_PRIVATE_KEY_PARSE_ERROR (-0x1e07)
363#define OPRT_LINK_CORE_HTTP_CLIENT_HEADER_ERROR (-0x1e08)
364#define OPRT_LINK_CORE_HTTP_CLIENT_SEND_ERROR (-0x1e09)
365#define OPRT_LINK_CORE_HTTP_RESPONSE_BUFFER_EMPTY (-0x1e0a)
366#define OPRT_LINK_CORE_HTTP_GW_NOT_EXIST (-0x1e0b)
367#define OPRT_LINK_CORE_ERRCODE_MAX_CNT 12
373#define OPRT_SVC_BT_API_TRSMITR_CONTINUE (-0x1f00)
374#define OPRT_SVC_BT_API_TRSMITR_ERROR (-0x1f01)
375#define OPRT_SVC_BT_NETCFG_ERROR_ACK (-0x1f02)
376#define OPRT_SVC_BT_ERRCODE_MAX_CNT 3
382#define OPRT_SVC_NETMGR_NEED_FACTORY_RESET (-0x2000)
383#define OPRT_SVC_NETMGR_ERRCODE_MAX_CNT 1
389#define OPRT_GW_BT_DEV_BLE_CONNECT_SUCCESS (-0x3100)
390#define OPRT_GW_BT_DEV_BLE_CONNECT_CNT_EXCEED (-0x3101)
391#define OPRT_GW_BT_DEV_BLE_CONNECT_HAL_FAILED (-0x3102)
392#define OPRT_GW_BT_DEV_BLE_CONNECT_HANDS_FAILED (-0x3103)
393#define OPRT_GW_BT_DEV_BLE_CONNECT_HANDS_TIMEOUT (-0x3104)
394#define OPRT_GW_BT_DEV_BLE_CONNECT_GET_INFO_FAILED (-0x3105)
395#define OPRT_GW_BT_DEV_BLE_CONNECT_GET_LOGIN_KEY_FAILED (-0x3106)
396#define OPRT_GW_BT_DEV_BLE_CONNECT_PAIR_DATA_LEN_ERR (-0x3107)
397#define OPRT_GW_BT_DEV_BLE_CONNECT_SESSION_OPEN_TIMEOUT (-0x3108)
398#define OPRT_GW_BT_DEV_BLE_CONNECT_SEND_FAILED (-0x3109)
399#define OPRT_GW_BT_DEV_BLE_LOCAL_RESET (-0x310a)
400#define OPRT_GW_BT_DEV_BLE_SCAN_TIMEOUT (-0x310b)
401#define OPRT_GW_BT_DEV_BLE_DISCONNECT_SUCCESS (-0x310c)
402#define OPRT_GW_BT_DEV_BEACON_DEV_NOT_FOUND (-0x310d)
403#define OPRT_GW_BT_DEV_BEACON_DEV_KEY1_NOT_FOUND (-0x310e)
404#define OPRT_GW_BT_DEV_BEACON_DEV_NOT_BIND (-0x310f)
405#define OPRT_GW_BT_DEV_BEACON_DECODE_PAIR_MSG_FAILED (-0x3110)
406#define OPRT_GW_BT_DEV_BEACON_KEY_RESP_TIMEOUT (-0x3111)
407#define OPRT_GW_BT_DEV_BEACON_JOIN_NOTIFY_RESP_TIMEOUT (-0x3112)
408#define OPRT_GW_BT_DEV_ERRCODE_MAX_CNT 19
414#define OPRT_GW_ZG_DEV_ZB_HOST_TABLE_NULL (-0x3200)
415#define OPRT_GW_ZG_DEV_ZB_SEQ_INVALID (-0x3201)
416#define OPRT_GW_ZG_DEV_ZB_HOST_TO_GATEWAY_ERR (-0x3202)
417#define OPRT_GW_ZG_DEV_ZB_DATA_TOO_BIG (-0x3203)
418#define OPRT_GW_ZG_DEV_ZB_GW_TABLE_NULL (-0x3204)
419#define OPRT_GW_ZG_DEV_ZB_GW_RELIABLE_ERR (-0x3205)
420#define OPRT_GW_ZG_DEV_ZB_GW_TRD_DEV_ERR (-0x3206)
421#define OPRT_GW_ZG_DEV_ZB_GATEWAY_DEV_ID_ERR (-0x3207)
422#define OPRT_GW_ZG_DEV_ZB_GATEWAY_UPDATE_SCE_LIST_ERR (-0x3208)
423#define OPRT_GW_ZG_DEV_ZB_GATEWAY_MALLOC_ERR (-0x3209)
424#define OPRT_GW_ZG_DEV_ZB_GATEWAY_DATA_TYPE_ERR (-0x320a)
425#define OPRT_GW_ZG_DEV_ZB_GATEWAY_TRD_DEV_DW_ERR (-0x320b)
426#define OPRT_GW_ZG_DEV_ZB_GATEWAY_COM_DATALEN_ERR (-0x320c)
427#define OPRT_GW_ZG_DEV_ZB_GATEWAY_SEND_DATA_FAILED (-0x320d)
428#define OPRT_GW_ZG_DEV_ZB_GATEWAY_NCRYPT_DATA_FAILED (-0x320e)
429#define OPRT_GW_ZG_DEV_ZB_GATWAY_STDRELIABLE_DW_FAILED (-0x320f)
430#define OPRT_GW_ZG_DEV_ZB_GATWAY_CMD_TYPE_NOT_SUPPORT (-0x3210)
431#define OPRT_GW_ZG_DEV_ZB_HOST_RCV_SLABSCMD_MSG_LEN_ERR (-0x3211)
432#define OPRT_GW_ZG_DEV_ZB_HSOT_DEV_REJOIN (-0x3212)
433#define OPRT_GW_ZG_DEV_ZB_HOST_CMD_TYPE_NOT_SUPPORT (-0x3213)
434#define OPRT_GW_ZG_DEV_ZB_HOST_SEND_DATA_FAILED (-0x3214)
435#define OPRT_GW_ZG_DEV_ZB_GATEWAY_DEV_BIND_ERR (-0x3215)
436#define OPRT_GW_ZG_DEV_ZB_GATEWAY_SET_HB_STAT_FAILED (-0x3216)
437#define OPRT_GW_ZG_DEV_ZB_GATEWAY_JOIN_STAT_FALSE (-0x3217)
438#define OPRT_GW_ZG_DEV_ZB_GATEWAY_STAND_JOIN_ERR (-0x3218)
439#define OPRT_GW_ZG_DEV_ZB_GATEWAY_DEV_NOT_SUPPORT (-0x3219)
440#define OPRT_GW_ZG_DEV_ZB_HOST_RCV_JOIN_MSG_ERR (-0x321a)
441#define OPRT_GW_ZG_DEV_ZB_GATEWAY_TRD_DEVID_ERR (-0x321b)
442#define OPRT_GW_ZG_DEV_ZB_GATEWAY_THR_DEV_TPE_ERR (-0x321c)
443#define OPRT_GW_ZG_DEV_ZB_GATEWAY_RS_PROFILE_NOT_SUPPORT (-0x321d)
444#define OPRT_GW_ZG_DEV_ZB_SUBDEV_LEAVE_SELF (-0x321e)
445#define OPRT_GW_ZG_DEV_ERRCODE_MAX_CNT 31
451#define OPRT_GW_BASE_LINKAGE_INIT_FAIL (-0x3300)
452#define OPRT_GW_BASE_LINKAGE_COND_CHECK_FAIL (-0x3301)
453#define OPRT_GW_BASE_LINKAGE_RULE_ID_NOT_FIND (-0x3302)
454#define OPRT_GW_BASE_LINKAGE_RULE_ID_DISABLE (-0x3303)
455#define OPRT_GW_BASE_LINKAGE_RULE_IS_UPDATED (-0x3304)
456#define OPRT_GW_BASE_LINKAGE_FLOW_CNTL (-0x3305)
457#define OPRT_GW_BASE_LINKAGE_THREAD_CREATE_FAIL (-0x3306)
458#define OPRT_GW_BASE_LINKAGE_COND_CHECK_NO_ID_MATCH (-0x3307)
459#define OPRT_GW_BASE_LINKAGE_COND_CHECK_NO_DP_MATCH (-0x3308)
460#define OPRT_GW_BASE_LINKAGE_ERRCODE_MAX_CNT 9
466#define OPRT_GW_ZG_SUB_ERR0 (-0x3400)
467#define OPRT_GW_ZG_SUB_ERR1 (-0x3401)
468#define OPRT_GW_ZG_SUB_ERR2 (-0x3402)
469#define OPRT_GW_ZG_SUB_ERR3 (-0x3403)
470#define OPRT_GW_ZG_SUB_ERR4 (-0x3404)
471#define OPRT_GW_ZG_SUB_ERR5 (-0x3405)
472#define OPRT_GW_ZG_SUB_ERR6 (-0x3406)
473#define OPRT_GW_ZG_SUB_ERR7 (-0x3407)
474#define OPRT_GW_ZG_SUB_ERR8 (-0x3408)
475#define OPRT_GW_ZG_SUB_ERR9 (-0x3409)
476#define OPRT_GW_ZG_SUB_ERR10 (-0x340a)
477#define OPRT_GW_ZG_SUB_ERR11 (-0x340b)
478#define OPRT_GW_ZG_SUB_ERR12 (-0x340c)
479#define OPRT_GW_ZG_SUB_ERR13 (-0x340d)
480#define OPRT_GW_ZG_SUB_ERR14 (-0x340e)
481#define OPRT_GW_ZG_SUB_ERR15 (-0x340f)
482#define OPRT_GW_ZG_SUB_ERR16 (-0x3410)
483#define OPRT_GW_ZG_SUB_ERR17 (-0x3411)
484#define OPRT_GW_ZG_SUB_ERR18 (-0x3412)
485#define OPRT_GW_ZG_SUB_ERR19 (-0x3413)
486#define OPRT_GW_ZG_SUB_ERR20 (-0x3414)
487#define OPRT_GW_ZG_SUB_ERR21 (-0x3415)
488#define OPRT_GW_ZG_SUB_ERR22 (-0x3416)
489#define OPRT_GW_ZG_SUB_ERR23 (-0x3417)
490#define OPRT_GW_ZG_SUB_ERR24 (-0x3418)
491#define OPRT_GW_ZG_SUB_ERR25 (-0x3419)
492#define OPRT_GW_ZG_SUB_ERR26 (-0x341a)
493#define OPRT_GW_ZG_SUB_ERRCODE_MAX_CNT 27
499#define OPRT_OS_ADAPTER_MUTEX_CREAT_FAILED (-0x6500)
500#define OPRT_OS_ADAPTER_MUTEX_LOCK_FAILED (-0x6501)
501#define OPRT_OS_ADAPTER_MUTEX_UNLOCK_FAILED (-0x6502)
502#define OPRT_OS_ADAPTER_MUTEX_RELEASE_FAILED (-0x6503)
503#define OPRT_OS_ADAPTER_MUTEX_ERRCODE_MAX_CNT 4
509#define OPRT_OS_ADAPTER_SEM_CREAT_FAILED (-0x6600)
510#define OPRT_OS_ADAPTER_SEM_WAIT_FAILED (-0x6601)
511#define OPRT_OS_ADAPTER_SEM_POST_FAILED (-0x6602)
512#define OPRT_OS_ADAPTER_SEM_RELEASE_FAILED (-0x6603)
513#define OPRT_OS_ADAPTER_SEM_WAIT_TIMEOUT (-0x6604)
514#define OPRT_OS_ADAPTER_SEM_ERRCODE_MAX_CNT 5
520#define OPRT_OS_ADAPTER_QUEUE_CREAT_FAILED (-0x6700)
521#define OPRT_OS_ADAPTER_QUEUE_SEND_FAIL (-0x6701)
522#define OPRT_OS_ADAPTER_QUEUE_RECV_FAIL (-0x6702)
523#define OPRT_OS_ADAPTER_QUEUE_ERRCODE_MAX_CNT 3
529#define OPRT_OS_ADAPTER_THRD_CREAT_FAILED (-0x6800)
530#define OPRT_OS_ADAPTER_THRD_RELEASE_FAILED (-0x6801)
531#define OPRT_OS_ADAPTER_THRD_JUDGE_SELF_FAILED (-0x6802)
532#define OPRT_OS_ADAPTER_THRD_ERRCODE_MAX_CNT 3
538#define OPRT_OS_ADAPTER_COM_ERROR (-0x6900)
539#define OPRT_OS_ADAPTER_INVALID_PARM (-0x6901)
540#define OPRT_OS_ADAPTER_MALLOC_FAILED (-0x6902)
541#define OPRT_OS_ADAPTER_NOT_SUPPORTED (-0x6903)
542#define OPRT_OS_ADAPTER_NETWORK_ERROR (-0x6904)
543#define OPRT_OS_ADAPTER_AP_NOT_FOUND (-0x6905)
544#define OPRT_OS_ADAPTER_AP_SCAN_FAILED (-0x6906)
545#define OPRT_OS_ADAPTER_AP_RELEASE_FAILED (-0x6907)
546#define OPRT_OS_ADAPTER_CHAN_SET_FAILED (-0x6908)
547#define OPRT_OS_ADAPTER_CHAN_GET_FAILED (-0x6909)
548#define OPRT_OS_ADAPTER_IP_GET_FAILED (-0x690a)
549#define OPRT_OS_ADAPTER_MAC_SET_FAILED (-0x690b)
550#define OPRT_OS_ADAPTER_MAC_GET_FAILED (-0x690c)
551#define OPRT_OS_ADAPTER_WORKMODE_SET_FAILED (-0x690d)
552#define OPRT_OS_ADAPTER_WORKMODE_GET_FAILED (-0x690e)
553#define OPRT_OS_ADAPTER_SNIFFER_SET_FAILED (-0x690f)
554#define OPRT_OS_ADAPTER_AP_START_FAILED (-0x6910)
555#define OPRT_OS_ADAPTER_AP_STOP_FAILED (-0x6911)
556#define OPRT_OS_ADAPTER_APINFO_GET_FAILED (-0x6912)
557#define OPRT_OS_ADAPTER_FAST_CONN_FAILED (-0x6913)
558#define OPRT_OS_ADAPTER_CONN_FAILED (-0x6914)
559#define OPRT_OS_ADAPTER_DISCONN_FAILED (-0x6915)
560#define OPRT_OS_ADAPTER_RSSI_GET_FAILED (-0x6916)
561#define OPRT_OS_ADAPTER_BSSID_GET_FAILED (-0x6917)
562#define OPRT_OS_ADAPTER_STAT_GET_FAILED (-0x6918)
563#define OPRT_OS_ADAPTER_CCODE_SET_FAILE (-0x6919)
564#define OPRT_OS_ADAPTER_MGNT_SEND_FAILED (-0x691a)
565#define OPRT_OS_ADAPTER_MGNT_REG_FAILED (-0x691b)
566#define OPRT_OS_ADAPTER_WF_LPMODE_SET_FAILED (-0x691c)
567#define OPRT_OS_ADAPTER_CPU_LPMODE_SET_FAILED (-0x691d)
568#define OPRT_OS_ADAPTER_ERRCODE_MAX_CNT 30
574#define OPRT_OS_ADAPTER_FLASH_READ_FAILED (-0x6a00)
575#define OPRT_OS_ADAPTER_FLASH_WRITE_FAILED (-0x6a01)
576#define OPRT_OS_ADAPTER_FLASH_ERASE_FAILED (-0x6a02)
577#define OPRT_OS_ADAPTER_FLASH_ERRCODE_MAX_CNT 3
583#define OPRT_OS_ADAPTER_OTA_START_INFORM_FAILED (-0x6b00)
584#define OPRT_OS_ADAPTER_OTA_PKT_SIZE_FAILED (-0x6b01)
585#define OPRT_OS_ADAPTER_OTA_PROCESS_FAILED (-0x6b02)
586#define OPRT_OS_ADAPTER_OTA_VERIFY_FAILED (-0x6b03)
587#define OPRT_OS_ADAPTER_OTA_END_INFORM_FAILED (-0x6b04)
588#define OPRT_OS_ADAPTER_OTA_ERRCODE_MAX_CNT 5
594#define OPRT_OS_ADAPTER_WD_WD_INIT_FAILED (-0x6c00)
595#define OPRT_OS_ADAPTER_WD_ERRCODE_MAX_CNT 1
601#define OPRT_OS_ADAPTER_GPIO_INOUT_SET_FAILED (-0x6d00)
602#define OPRT_OS_ADAPTER_GPIO_MODE_SET_FAILED (-0x6d01)
603#define OPRT_OS_ADAPTER_GPIO_WRITE_FAILED (-0x6d02)
604#define OPRT_OS_ADAPTER_GPIO_IRQ_INIT_FAILED (-0x6d03)
605#define OPRT_OS_ADAPTER_GPIO_ERRCODE_MAX_CNT 4
611#define OPRT_OS_ADAPTER_UART_INIT_FAILED (-0x6e00)
612#define OPRT_OS_ADAPTER_UART_DEINIT_FAILED (-0x6e01)
613#define OPRT_OS_ADAPTER_UART_SEND_FAILED (-0x6e02)
614#define OPRT_OS_ADAPTER_UART_READ_FAILED (-0x6e03)
615#define OPRT_OS_ADAPTER_UART_ERRCODE_MAX_CNT 4
621#define OPRT_OS_ADAPTER_I2C_OPEN_FAILED (-0x6f00)
622#define OPRT_OS_ADAPTER_I2C_CLOSE_FAILED (-0x6f01)
623#define OPRT_OS_ADAPTER_I2C_READ_FAILED (-0x6f02)
624#define OPRT_OS_ADAPTER_I2C_WRITE_FAILED (-0x6f03)
625#define OPRT_OS_ADAPTER_I2C_INVALID_PARM (-0x6f04)
626#define OPRT_OS_ADAPTER_I2C_INIT_FAILED (-0x6f05)
627#define OPRT_OS_ADAPTER_I2C_DEINIT_FAILED (-0x6f06)
628#define OPRT_OS_ADAPTER_I2C_MODE_ERR (-0x6f07)
629#define OPRT_OS_ADAPTER_I2C_BUSY (-0x6f08)
630#define OPRT_OS_ADAPTER_I2C_TIMEOUT (-0x6f09)
631#define OPRT_OS_ADAPTER_I2C_MASTER_LOST_ARB (-0x6f0a)
632#define OPRT_OS_ADAPTER_I2C_BUS_ERR (-0x6f0b)
633#define OPRT_OS_ADAPTER_I2C_TRANS_ERR (-0x6f0c)
634#define OPRT_OS_ADAPTER_I2C_ADDR_NO_ACK (-0x6f0d)
635#define OPRT_OS_ADAPTER_I2C_IRQ_INIT_FAILED (-0x6f0e)
636#define OPRT_OS_ADAPTER_I2C_RESERVE1_ERR (-0x6f0f)
637#define OPRT_OS_ADAPTER_I2C_RESERVE2_ERR (-0x6f10)
638#define OPRT_OS_ADAPTER_I2C_RESERVE3_ERR (-0x6f11)
639#define OPRT_OS_ADAPTER_I2C_ERRCODE_MAX_CNT 18
645#define OPRT_OS_ADAPTER_BLE_HANDLE_ERROR (-0x7000)
646#define OPRT_OS_ADAPTER_BLE_BUSY (-0x7001)
647#define OPRT_OS_ADAPTER_BLE_TIMEOUT (-0x7002)
648#define OPRT_OS_ADAPTER_BLE_RESERVED1 (-0x7003)
649#define OPRT_OS_ADAPTER_BLE_RESERVED2 (-0x7004)
650#define OPRT_OS_ADAPTER_BLE_RESERVED3 (-0x7005)
651#define OPRT_OS_ADAPTER_BLE_INIT_FAILED (-0x7006)
652#define OPRT_OS_ADAPTER_BLE_DEINIT_FAILED (-0x7007)
653#define OPRT_OS_ADAPTER_BLE_GATT_CONN_FAILED (-0x7008)
654#define OPRT_OS_ADAPTER_BLE_GATT_DISCONN_FAILED (-0x7009)
655#define OPRT_OS_ADAPTER_BLE_ADV_START_FAILED (-0x700a)
656#define OPRT_OS_ADAPTER_BLE_ADV_STOP_FAILED (-0x700b)
657#define OPRT_OS_ADAPTER_BLE_SCAN_START_FAILED (-0x700c)
658#define OPRT_OS_ADAPTER_BLE_SCAN_STAOP_FAILED (-0x700d)
659#define OPRT_OS_ADAPTER_BLE_SVC_DISC_FAILED (-0x700e)
660#define OPRT_OS_ADAPTER_BLE_CHAR_DISC_FAILED (-0x700f)
661#define OPRT_OS_ADAPTER_BLE_DESC_DISC_FAILED (-0x7010)
662#define OPRT_OS_ADAPTER_BLE_NOTIFY_FAILED (-0x7011)
663#define OPRT_OS_ADAPTER_BLE_INDICATE_FAILED (-0x7012)
664#define OPRT_OS_ADAPTER_BLE_WRITE_FAILED (-0x7013)
665#define OPRT_OS_ADAPTER_BLE_READ_FAILED (-0x7014)
666#define OPRT_OS_ADAPTER_BLE_MTU_REQ_FAILED (-0x7015)
667#define OPRT_OS_ADAPTER_BLE_MTU_REPLY_FAILED (-0x7016)
668#define OPRT_OS_ADAPTER_BLE_CONN_PARAM_UPDATE_FAILED (-0x7017)
669#define OPRT_OS_ADAPTER_BLE_CONN_RSSI_GET_FAILED (-0x7018)
670#define OPRT_OS_ADAPTER_BLE_MESH_INVALID_OPCODE (-0x7019)
671#define OPRT_OS_ADAPTER_BLE_MESH_INVALID_ELEMENT (-0x701a)
672#define OPRT_OS_ADAPTER_BLE_MESH_INVALID_MODEL (-0x701b)
673#define OPRT_OS_ADAPTER_BLE_MESH_INVALID_ADDR (-0x701c)
674#define OPRT_OS_ADAPTER_BLE_MESH_INVALID_INDEX (-0x701d)
675#define OPRT_OS_ADAPTER_BLE_MESH_NO_MEMORY (-0x701e)
676#define OPRT_OS_ADAPTER_BLE_MESH_APPKEY_NOT_BOUND_MODEL (-0x701f)
677#define OPRT_OS_ADAPTER_BLE_MESH_RESERVED1 (-0x7020)
678#define OPRT_OS_ADAPTER_BLE_MESH_RESERVED2 (-0x7021)
679#define OPRT_OS_ADAPTER_BLE_MESH_RESERVED3 (-0x7022)
680#define OPRT_OS_ADAPTER_BLE_MESH_RESERVED4 (-0x7023)
681#define OPRT_OS_ADAPTER_BLE_MESH_RESERVED5 (-0x7024)
682#define OPRT_OS_ADAPTER_BLE_MESH_PROVISION_FAIL (-0x7025)
683#define OPRT_OS_ADAPTER_BLE_MESH_COMPO_GET_FAIL (-0x7026)
684#define OPRT_OS_ADAPTER_BLE_MESH_MODEL_BIND_FAIL (-0x7027)
685#define OPRT_OS_ADAPTER_BLE_MESH_APPKEY_ADD_FAIL (-0x7028)
686#define OPRT_OS_ADAPTER_BLE_MESH_NETKEY_ADD_FAIL (-0x7029)
687#define OPRT_OS_ADAPTER_BLE_MESH_APPKEY_BIND_FAIL (-0x702a)
688#define OPRT_OS_ADAPTER_BLE_ERRCODE_MAX_CNT 43
694#define OPRT_MID_TRANSPORT_INVALID_PARM (-0x7100)
695#define OPRT_MID_TRANSPORT_MALLOC_FAILED (-0x7101)
696#define OPRT_MID_TRANSPORT_DNS_PARSED_FAILED (-0x7102)
697#define OPRT_MID_TRANSPORT_SOCK_CREAT_FAILED (-0x7103)
698#define OPRT_MID_TRANSPORT_SOCK_SET_REUSE_FAILED (-0x7104)
699#define OPRT_MID_TRANSPORT_SOCK_SET_DISABLE_NAGLE_FAILED (-0x7105)
700#define OPRT_MID_TRANSPORT_SOCK_SET_KEEP_ALIVE_FAILED (-0x7106)
701#define OPRT_MID_TRANSPORT_SOCK_SET_BLOCK_FAILED (-0x7107)
702#define OPRT_MID_TRANSPORT_SOCK_NET_BIND_FAILED (-0x7108)
703#define OPRT_MID_TRANSPORT_SOCK_SET_TIMEOUT_FAILED (-0x7109)
704#define OPRT_MID_TRANSPORT_TCP_CONNECD_FAILED (-0x710a)
705#define OPRT_MID_TRANSPORT_TCP_TLS_CONNECD_FAILED (-0x710b)
706#define OPRT_MID_TRANSPORT_PACK_SEND_FAILED (-0x710c)
707#define OPRT_MID_TRANSPORT_ERRCODE_MAX_CNT 13
713#define OPRT_OS_ADAPTER_SPI_INVALID_PARM (-0x7200)
714#define OPRT_OS_ADAPTER_SPI_INIT_FAILED (-0x7201)
715#define OPRT_OS_ADAPTER_SPI_DEINIT_FAILED (-0x7202)
716#define OPRT_OS_ADAPTER_SPI_MODE_ERR (-0x7203)
717#define OPRT_OS_ADAPTER_SPI_BUSY (-0x7204)
718#define OPRT_OS_ADAPTER_SPI_DATA_LOST (-0x7205)
719#define OPRT_OS_ADAPTER_SPI_TIMEOUT (-0x7206)
720#define OPRT_OS_ADAPTER_SPI_BUS_ERR (-0x7207)
721#define OPRT_OS_ADAPTER_SPI_TRANS_ERR (-0x7208)
722#define OPRT_OS_ADAPTER_SPI_IRQ_ERR (-0x7209)
723#define OPRT_OS_ADAPTER_SPI_RESERVE1_ERR (-0x720a)
724#define OPRT_OS_ADAPTER_SPI_RESERVE2_ERR (-0x720b)
725#define OPRT_OS_ADAPTER_SPI_RESERVE3_ERR (-0x720c)
726#define OPRT_OS_ADAPTER_SPI_ERRCODE_MAX_CNT 13
732#define OPRT_OS_ADAPTER_PWM_INVALID_PARM (-0x7300)
733#define OPRT_OS_ADAPTER_PWM_INIT_FAILED (-0x7301)
734#define OPRT_OS_ADAPTER_PWM_DEINIT_FAILED (-0x7302)
735#define OPRT_OS_ADAPTER_PWM_MODE_ERR (-0x7303)
736#define OPRT_OS_ADAPTER_PWM_BUSY (-0x7304)
737#define OPRT_OS_ADAPTER_PWM_IRQ_INIT_FAILED (-0x7305)
738#define OPRT_OS_ADAPTER_PWM_RESERVE1_ERR (-0x7306)
739#define OPRT_OS_ADAPTER_PWM_RESERVE2_ERR (-0x7307)
740#define OPRT_OS_ADAPTER_PWM_RESERVE3_ERR (-0x7308)
741#define OPRT_OS_ADAPTER_PWM_ERRCODE_MAX_CNT 9
747#define OPRT_OS_ADAPTER_ADC_INVALID_PARM (-0x7400)
748#define OPRT_OS_ADAPTER_ADC_INIT_FAILED (-0x7401)
749#define OPRT_OS_ADAPTER_ADC_DEINIT_FAILED (-0x7402)
750#define OPRT_OS_ADAPTER_ADC_READ_FAILED (-0x7403)
751#define OPRT_OS_ADAPTER_ADC_MODE_ERR (-0x7404)
752#define OPRT_OS_ADAPTER_ADC_BUSY (-0x7405)
753#define OPRT_OS_ADAPTER_ADC_TIMEOUT (-0x7406)
754#define OPRT_OS_ADAPTER_ADC_IRQ_INIT_FAILED (-0x7407)
755#define OPRT_OS_ADAPTER_ADC_RESERVE1_ERR (-0x7408)
756#define OPRT_OS_ADAPTER_ADC_RESERVE2_ERR (-0x7409)
757#define OPRT_OS_ADAPTER_ADC_RESERVE3_ERR (-0x740a)
758#define OPRT_OS_ADAPTER_ADC_ERRCODE_MAX_CNT 11
764#define OPRT_OS_ADAPTER_DAC_INVALID_PARM (-0x7500)
765#define OPRT_OS_ADAPTER_DAC_INIT_FAILED (-0x7501)
766#define OPRT_OS_ADAPTER_DAC_DEINIT_FAILED (-0x7502)
767#define OPRT_OS_ADAPTER_DAC_WRITE_FAILED (-0x7503)
768#define OPRT_OS_ADAPTER_DAC_MODE_ERR (-0x7504)
769#define OPRT_OS_ADAPTER_DAC_BUSY (-0x7505)
770#define OPRT_OS_ADAPTER_DAC_TIMEOUT (-0x7506)
771#define OPRT_OS_ADAPTER_DAC_IRQ_INIT_FAILED (-0x7507)
772#define OPRT_OS_ADAPTER_DAC_RESERVE1_ERR (-0x7508)
773#define OPRT_OS_ADAPTER_DAC_RESERVE2_ERR (-0x7509)
774#define OPRT_OS_ADAPTER_DAC_RESERVE3_ERR (-0x750a)
775#define OPRT_OS_ADAPTER_DAC_ERRCODE_MAX_CNT 11
781#define OPRT_OS_ADAPTER_I2S_INVALID_PARM (-0x7600)
782#define OPRT_OS_ADAPTER_I2S_INIT_FAILED (-0x7601)
783#define OPRT_OS_ADAPTER_I2S_DEINIT_FAILED (-0x7602)
784#define OPRT_OS_ADAPTER_I2S_WRITE_FAILED (-0x7603)
785#define OPRT_OS_ADAPTER_I2S_READ_FAILED (-0x7604)
786#define OPRT_OS_ADAPTER_I2S_MODE_ERR (-0x7605)
787#define OPRT_OS_ADAPTER_I2S_BUSY (-0x7606)
788#define OPRT_OS_ADAPTER_I2S_TIMEOUT (-0x7607)
789#define OPRT_OS_ADAPTER_I2S_DATA_LOST (-0x7608)
790#define OPRT_OS_ADAPTER_I2S_TRANS_ERR (-0x7609)
791#define OPRT_OS_ADAPTER_I2S_IRQ_INIT_FAILED (-0x760a)
792#define OPRT_OS_ADAPTER_I2S_RESERVE1_ERR (-0x760b)
793#define OPRT_OS_ADAPTER_I2S_RESERVE2_ERR (-0x760c)
794#define OPRT_OS_ADAPTER_I2S_RESERVE3_ERR (-0x760d)
795#define OPRT_OS_ADAPTER_I2S_ERRCODE_MAX_CNT 14
801#define OPRT_GW_SUB_MGR_INIT_FAIL (-0x7700)
802#define OPRT_GW_SUB_MGR_BIND_THREAD_CREATE_FAIL (-0x7701)
803#define OPRT_GW_SUB_MGR_EXCEED_MAX_CNT (-0x7702)
804#define OPRT_GW_SUB_MGR_NODE_CREATE_FAIL (-0x7703)
805#define OPRT_GW_SUB_MGR_CLOUD_HTTP_BIND_FAIL (-0x7704)
806#define OPRT_GW_SUB_MGR_ERRCODE_MAX_CNT 5
812#define OPRT_APP_TMP_xxx (-0x7800)
813#define OPRT_APP_TMP_ERRCODE_MAX_CNT 1
819#define OPRT_IMM_COM_MEM_PARTITION_FULL (-0x7900)
820#define OPRT_IMM_COM_ERRCODE_MAX_CNT 1
826#define OPRT_IMM_CLOUD_STORAGE_ENCRYPT_KEY_UPDATED (-0x7a00)
827#define OPRT_IMM_CLOUD_STORAGE_STATUS_OFF (-0x7a01)
828#define OPRT_IMM_CLOUD_STORAGE_UPLOAD_INTERRUPT_ERROR (-0x7a02)
829#define OPRT_IMM_CLOUD_STORAGE_EVENT_STATUS_INVALID (-0x7a03)
830#define OPRT_IMM_CLOUD_STORAGE_ERRCODE_MAX_CNT 4
833#define ERRCODE2STRING(errcode) #errcode
834#define TUYA_ERROR_STRING(errcode) ("[ErrCode: " ERRCODE2STRING(errcode) "]")
836#define TUYA_CHECK_NULL_RETURN(x, y)\
839 TAL_PR_ERR("%s null", #x);\
845#define TUYA_CHECK_NULL_GOTO(x, label)\
848 TAL_PR_ERR("%s null", #x);\
854#define TUYA_CALL_ERR_LOG(func)\
857 if (OPRT_OK != (rt)){\
858 TAL_PR_ERR("ret:%d", rt);\
863#define TUYA_CALL_ERR_GOTO(func, label)\
866 if (OPRT_OK != (rt)){\
867 TAL_PR_ERR("ret:%d", rt);\
873#define TUYA_CALL_ERR_RETURN(func)\
876 if (OPRT_OK != (rt)){\
877 TAL_PR_ERR("ret:%d", rt);\
883#define TUYA_CALL_ERR_RETURN_VAL(func, y)\
886 if (OPRT_OK != (rt)){\
887 TAL_PR_ERR("ret:%d", rt);\
893#define TUYA_CALL_ERR_LOG_SEQ_RETURN_VAL(func, y, point)\
896 if (OPRT_OK != (rt)){\
897 TAL_PR_ERR("ret:%d", rt);\
898 INSERT_ERROR_LOG_SEQ_DEC((point), rt);\
904#define TUYA_CALL_ERR_LOG_SEQ_RETURN(func, point)\
907 if (OPRT_OK != (rt)){\
908 TAL_PR_ERR("ret:%d", rt);\
909 INSERT_ERROR_LOG_SEQ_DEC((point), rt);\
915#define TUYA_CALL_ERR_LOG_SEQ_GOTO(func, label)\
918 if (OPRT_OK != (rt)){\
919 TAL_PR_ERR("ret:%d", rt);\
920 INSERT_ERROR_LOG_SEQ_DEC((point), rt);\
926#define TUYA_CALL_ERR_LOG_SEQ(func)\
929 if (OPRT_OK != (rt)) {\
930 TAL_PR_ERR("ret:%d", rt);\
931 INSERT_ERROR_LOG_SEQ_DEC((point), rt);\
936#define TUYA_CHECK_NULL_LOG_SEQ_RETURN(x, y, point)\
939 TAL_PR_ERR("%s null", #x);\
940 INSERT_ERROR_LOG_SEQ_DEC((point), y);\
946#define TUYA_CHECK_NULL_LOG_SEQ_GOTO(x, point, label)\
949 TAL_PR_ERR("%s null", #x);\
950 INSERT_ERROR_LOG_SEQ_NULL((point));\