1/* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#ifndef __HI_ERRNO_H__ 17#define __HI_ERRNO_H__ 18 19/***************************************************************************** 20* 1、Common error code. Note: 0x8000 0000 is not recommended. If a truncation error occurs, it is considered successful. 21* CNcomment:通用错误码。注意0x8000 0000最好别用,产生截断误判为成功 22*****************************************************************************/ 23#define HI_ERR_SUCCESS 0 24#define HI_ERR_FAILURE (hi_u32)(-1) 25#define HI_ERR_S_FAILURE (-1) 26#define HI_ERR_MALLOC_FAILUE 0x80000001 27#define HI_ERR_TIMEOUT 0x80000002 28#define HI_ERR_RECVING 0x80000003 29#define HI_ERR_MEMCPY_S 0x80000004 30#define HI_ERR_MEMSET_S 0x80000005 31#define HI_ERR_SPRINTF_S 0x80000006 32#define HI_ERR_STRCPY_S 0x80000007 33 34/***************************************************************************** 35* 2、Error codes of the system adaptation layer.CNcomment:系统适配层错误码 36*****************************************************************************/ 37/* Task */ 38#define HI_ERR_TASK_INVALID_PARAM 0x80000080 39#define HI_ERR_TASK_CREATE_FAIL 0x80000081 40#define HI_ERR_TASK_DELETE_FAIL 0x80000082 41#define HI_ERR_TASK_SUPPEND_FAIL 0x80000083 42#define HI_ERR_TASK_RESUME_FAIL 0x80000084 43#define HI_ERR_TASK_GET_PRI_FAIL 0x80000085 44#define HI_ERR_TASK_SET_PRI_FAIL 0x80000086 45#define HI_ERR_TASK_LOCK_FAIL 0x80000087 46#define HI_ERR_TASK_UNLOCK_FAIL 0x80000088 47#define HI_ERR_TASK_DELAY_FAIL 0x80000089 48#define HI_ERR_TASK_GET_INFO_FAIL 0x8000008A 49#define HI_ERR_TASK_REGISTER_SCHEDULE_FAIL 0x8000008B 50#define HI_ERR_TASK_NOT_CREATED 0x8000008C 51 52/* ISR */ 53#define HI_ERR_ISR_INVALID_PARAM 0x800000C0 54#define HI_ERR_ISR_REQ_IRQ_FAIL 0x800000C1 55#define HI_ERR_ISR_ADD_JOB_MALLOC_FAIL 0x800000C2 56#define HI_ERR_ISR_ADD_JOB_SYS_FAIL 0x800000C3 57#define HI_ERR_ISR_DEL_IRQ_FAIL 0x800000C4 58#define HI_ERR_ISR_ALREADY_CREATED 0x800000C5 59#define HI_ERR_ISR_NOT_CREATED 0x800000C6 60#define HI_ERR_ISR_ENABLE_IRQ_FAIL 0x800000C7 61#define HI_ERR_ISR_IRQ_ADDR_NOK 0x800000C8 62 63/* Memory */ 64#define HI_ERR_MEM_INVALID_PARAM 0x80000100 65#define HI_ERR_MEM_CREAT_POOL_FAIL 0x80000101 66#define HI_ERR_MEM_CREATE_POOL_NOT_ENOUGH_HANDLE 0x80000102 67#define HI_ERR_MEM_FREE_FAIL 0x80000103 68#define HI_ERR_MEM_RE_INIT 0x80000104 69#define HI_ERR_MEM_NOT_INIT 0x80000105 70#define HI_ERR_MEM_CREAT_POOL_MALLOC_FAIL 0x80000106 71#define HI_ERR_MEM_GET_INFO_FAIL 0x80000107 72#define HI_ERR_MEM_GET_OS_INFO_NOK 0x80000108 73 74/* OSTIMER */ 75#define HI_ERR_TIMER_FAILURE 0x80000140 76#define HI_ERR_TIMER_INVALID_PARAM 0x80000141 77#define HI_ERR_TIMER_CREATE_HANDLE_FAIL 0x80000142 78#define HI_ERR_TIMER_START_FAIL 0x80000143 79#define HI_ERR_TIMER_HANDLE_NOT_CREATE 0x80000144 80#define HI_ERR_TIMER_HANDLE_INVALID 0x80000145 81#define HI_ERR_TIMER_STATUS_INVALID 0x80000146 82#define HI_ERR_TIMER_STATUS_START 0x80000147 83#define HI_ERR_TIMER_INVALID_MODE 0x80000148 84#define HI_ERR_TIMER_EXPIRE_INVALID 0x80000149 85#define HI_ERR_TIMER_FUNCTION_NULL 0x8000014A 86#define HI_ERR_TIMER_HANDLE_MAXSIZE 0x8000014B 87#define HI_ERR_TIMER_MALLOC_FAIL 0x8000014C 88#define HI_ERR_TIMER_NOT_INIT 0x8000014D 89 90/* semaphore */ 91#define HI_ERR_SEM_INVALID_PARAM 0x80000180 92#define HI_ERR_SEM_CREATE_FAIL 0x80000181 93#define HI_ERR_SEM_DELETE_FAIL 0x80000182 94#define HI_ERR_SEM_WAIT_FAIL 0x80000183 95#define HI_ERR_SEM_SIG_FAIL 0x80000184 96#define HI_ERR_SEM_WAIT_TIME_OUT 0x80000185 97 98/* Mutex */ 99#define HI_ERR_MUX_INVALID_PARAM 0x800001C0 100#define HI_ERR_MUX_CREATE_FAIL 0x800001C1 101#define HI_ERR_MUX_DELETE_FAIL 0x800001C2 102#define HI_ERR_MUX_PEND_FAIL 0x800001C3 103#define HI_ERR_MUX_POST_FAIL 0x800001C4 104 105/* message */ 106#define HI_ERR_MSG_INVALID_PARAM 0x80000200 107#define HI_ERR_MSG_CREATE_Q_FAIL 0x80000201 108#define HI_ERR_MSG_DELETE_Q_FAIL 0x80000202 109#define HI_ERR_MSG_WAIT_FAIL 0x80000203 110#define HI_ERR_MSG_SEND_FAIL 0x80000204 111#define HI_ERR_MSG_GET_Q_INFO_FAIL 0x80000205 112#define HI_ERR_MSG_Q_DELETE_FAIL 0x80000206 113#define HI_ERR_MSG_WAIT_TIME_OUT 0x80000207 114 115/* events */ 116#define HI_ERR_EVENT_INVALID_PARAM 0x80000240 117#define HI_ERR_EVENT_CREATE_NO_HADNLE 0x80000241 118#define HI_ERR_EVENT_CREATE_SYS_FAIL 0x80000242 119#define HI_ERR_EVENT_SEND_FAIL 0x80000243 120#define HI_ERR_EVENT_WAIT_FAIL 0x80000244 121#define HI_ERR_EVENT_CLEAR_FAIL 0x80000245 122#define HI_ERR_EVENT_RE_INIT 0x80000246 123#define HI_ERR_EVENT_NOT_ENOUGH_MEMORY 0x80000247 124#define HI_ERR_EVENT_NOT_INIT 0x80000248 125#define HI_ERR_EVENT_DELETE_FAIL 0x80000249 126#define HI_ERR_EVENT_WAIT_TIME_OUT 0x8000024A 127 128/* os Maintenance and test */ 129#define HI_ERR_OSSTAT_INVALID_PARAM 0x80000280 130#define HI_ERR_OSSTAT_SYSTEM_CALL_ERROR 0x80000281 131 132/* liteos fpb */ 133#define HI_ERR_FPB_COMP_REPEAT 0x800002C0 134#define HI_ERR_FPB_NO_COMP 0x800002C1 135#define HI_ERR_FPB_TYPE 0x800002C2 136#define HI_ERR_FPB_NO_FREE_COMP 0x800002C3 137#define HI_ERR_FPB_ADDR_NOT_ALIGN 0x800002C4 138#define HI_ERR_FPB_TARGET_ADDR 0x800002C5 139#define HI_ERR_FPB_BUSY 0x800002C6 /* ????????? */ 140#define HI_ERR_FPB_ERROR_INPUT 0x800002C7 141 142/* CPU */ 143#define HI_ERR_CPUP_NOT_INIT 0x80000300 144#define HI_ERR_CPUP_INVALID_PARAM 0x80000301 145#define HI_ERR_CPU_CLK_INVALID_PARAM 0x80000302 146 147/* file system */ 148#define HI_ERR_FS_INVALID_PARAM 0x80000400 149#define HI_ERR_FS_NO_DEVICE 0x80000401 150#define HI_ERR_FS_NO_SPACE 0x80000402 /* No space left on device */ 151#define HI_ERR_FS_BAD_DESCRIPTOR 0x80000403 152#define HI_ERR_FS_FILE_EXISTS 0x80000404 153#define HI_ERR_FS_NOT_FOUND 0x80000405 154#define HI_ERR_FS_NAME_TOO_LONG 0x80000406 155#define HI_ERR_FS_READ_ONLY_FS 0x80000407 /* Read-only file system */ 156#define HI_ERR_FS_IO_ERROR 0x80000408 157#define HI_ERR_FS_NO_MORE_FILES 0x80000409 158 159/***************************************************************************** 160* 3、Driver error code 161*****************************************************************************/ 162/* Serial port */ 163#define HI_ERR_UART_INVALID_PARAMETER 0x80001000 164#define HI_ERR_UART_INVALID_SUSPEND 0x80001001 165#define HI_ERR_UART_INVALID_PARITY 0x80001002 166#define HI_ERR_UART_INVALID_DATA_BITS 0x80001003 167#define HI_ERR_UART_INVALID_STOP_BITS 0x80001004 168#define HI_ERR_UART_INVALID_BAUD 0x80001005 169#define HI_ERR_UART_INVALID_COM_PORT 0x80001006 170#define HI_ERR_UART_NOT_SUPPORT_DMA 0x80001007 171#define HI_ERR_UART_NOT_BLOCK_MODE 0x80001008 172 173/* gpio */ 174#define HI_ERR_GPIO_INVALID_PARAMETER 0x80001040 175#define HI_ERR_GPIO_REPEAT_INIT 0x80001041 176#define HI_ERR_GPIO_NOT_INIT 0x80001042 177#define HI_ERR_GPIO_NOT_SUPPORT 0x80001043 178 179/* watchdog */ 180#define HI_ERR_WATCHDOG_PARA_ERROR 0x80001080 181 182/* Flash */ 183#define HI_ERR_FLASH_NOT_INIT 0x800010C0 184#define HI_ERR_FLASH_INVALID_PARAM 0x800010C1 185#define HI_ERR_FLASH_INVALID_PARAM_BEYOND_ADDR 0x800010C2 186#define HI_ERR_FLASH_INVALID_PARAM_SIZE_ZERO 0x800010C3 187#define HI_ERR_FLASH_INVALID_PARAM_ERASE_NOT_ALIGN 0x800010C4 188#define HI_ERR_FLASH_INVALID_PARAM_IOCTRL_DATA_NULL 0x800010C5 189#define HI_ERR_FLASH_INVALID_PARAM_DATA_NULL 0x800010C6 190#define HI_ERR_FLASH_INVALID_PARAM_PKI_MODIFY 0x800010C7 191#define HI_ERR_FLASH_INVALID_PARAM_PAD1 0x800010C8 192#define HI_ERR_FLASH_INVALID_PARAM_PAD2 0x800010C9 193#define HI_ERR_FLASH_INVALID_PARAM_PAD3 0x800010CA 194#define HI_ERR_FLASH_TIME_OUT_WAIT_READY 0x800010CB 195#define HI_ERR_FLASH_QUAD_MODE_READ_REG1 0x800010CC 196#define HI_ERR_FLASH_QUAD_MODE_READ_REG2 0x800010CD 197#define HI_ERR_FLASH_QUAD_MODE_COMPARE_REG 0x800010CE 198#define HI_ERR_FLASH_NO_MATCH_FLASH 0x800010CF 199#define HI_ERR_FLASH_WRITE_ENABLE 0x800010D0 200#define HI_ERR_FLASH_NO_MATCH_ERASE_SIZE 0x800010D1 201#define HI_ERR_FLASH_MAX_SPI_OP 0x800010D2 202#define HI_ERR_FLASH_NOT_SUPPORT_IOCTRL_ID 0x800010D3 203#define HI_ERR_FLASH_INVALID_CHIP_ID 0x800010D4 204#define HI_ERR_FLASH_RE_INIT 0x800010D5 205#define HI_ERR_FLASH_WRITE_NOT_SUPPORT_ERASE 0x800010D6 206#define HI_ERR_FLASH_WRITE_COMPARE_WRONG 0x800010D7 207#define HI_ERR_FLASH_WAIT_CFG_START_TIME_OUT 0x800010D8 208#define HI_ERR_FLASH_PATITION_INIT_FAIL 0x800010D9 209#define HI_ERR_FLASH_INITILIZATION 0x800010DA 210#define HI_ERR_FLASH_ERASE_NOT_4K_ALIGN 0x800010DB 211#define HI_ERR_FLASH_PROTECT_NOT_SUPPORT 0x800010DC 212#define HI_ERR_FLASH_PROTECT_NOT_INIT 0x800010DD 213#define HI_ERR_FLASH_PROTECT_RE_INIT 0x800010DE 214#define HI_ERR_FLASH_PROTECT_NOT_FIND_CHIP 0x800010DF 215#define HI_ERR_FLASH_PROTECT_ADDR_WRONG 0x800010E0 216#define HI_ERR_FLASH_CRYPTO_INVALID_PARAM 0x800010F0 217#define HI_ERR_FLASH_CRYPTO_BEYOND_ADDR_SIZE 0x800010F1 218#define HI_ERR_FLASH_CRYPTO_MALLOC_FAIL 0x800001F2 219#define HI_ERR_FLASH_CRYPTO_DATA_ENCRYPT_ERR 0x800001F3 220#define HI_ERR_FLASH_CRYPTO_DATA_DECRYPT_ERR 0x800001F4 221#define HI_ERR_FLASH_CRYPTO_KEY_EMPTY_ERR 0x800001F5 222#define HI_ERR_FLASH_CRYPTO_MEMCPY_FAIL 0x800001F6 223#define HI_ERR_FLASH_CRYPTO_NOT_SUPPORT 0x800001F7 224#define HI_ERR_FLASH_CRYPTO_PREPARE_ERR 0x800001F8 225#define HI_ERR_FLASH_CRYPTO_KEY_INVALID_ERR 0x800001F9 226#define HI_ERR_FLASH_CRYPTO_KEY_SAVE_ERR 0x800001FA 227#define HI_ERR_FLASH_CRYPTO_KERNEL_ADDR_ERR 0x800001FB 228#define HI_ERR_FLASH_CRYPTO_ROOT_SALT_EMPTY_ERR 0x800001FC 229 230/* HRTIMER */ 231#define HI_ERR_HRTIMER_ALREADY_INIT 0x80001100 232#define HI_ERR_HRTIMER_NOT_INIT 0x80001101 233#define HI_ERR_HRTIMER_HAVE_NO_AVAILABLE_HANDLE 0x80001102 234#define HI_ERR_HRTIMER_NOT_CREATE_HANDLE 0x80001103 235#define HI_ERR_HRTIMER_IN_START_STATUS 0x80001104 236#define HI_ERR_HRTIMER_NOT_START 0x80001105 237#define HI_ERR_HRTIMER_INVALID_ID 0x80001106 238#define HI_ERR_HRTIMER_INVALID_PARAMETER 0x80001107 239#define HI_ERR_HRTIMER_MALLOC_FAILUE 0x80001108 240 241/* hardware timer */ 242#define HI_ERR_HWTIMER_INVALID_PARAMETER 0x80001140 243#define HI_ERR_HWTIMER_INITILIZATION_ALREADY 0x80001141 244#define HI_ERR_HWTIMER_NO_INIT 0x80001142 245 246/* i2c */ 247#define HI_ERR_I2C_NOT_INIT 0x80001180 248#define HI_ERR_I2C_INVALID_PARAMETER 0x80001181 249#define HI_ERR_I2C_TIMEOUT_START 0x80001182 250#define HI_ERR_I2C_TIMEOUT_WAIT 0x80001183 251#define HI_ERR_I2C_TIMEOUT_STOP 0x80001184 252#define HI_ERR_I2C_TIMEOUT_RCV_BYTE 0x80001185 253#define HI_ERR_I2C_TIMEOUT_RCV_BYTE_PROC 0x80001186 254#define HI_ERR_I2C_WAIT_SEM_FAIL 0x80001187 255#define HI_ERR_I2C_START_ACK_ERR 0x80001188 256#define HI_ERR_I2C_WAIT_ACK_ERR 0x80001189 257 258/* spi */ 259#define HI_ERR_SPI_NOT_INIT 0x800011C0 260#define HI_ERR_SPI_REINIT 0x800011C1 261#define HI_ERR_SPI_PARAMETER_WRONG 0x800011C2 262#define HI_ERR_SPI_BUSY 0x800011C3 263#define HI_ERR_SPI_WRITE_TIMEOUT 0x800011C4 264#define HI_ERR_SPI_READ_TIMEOUT 0x800011C5 265#define HI_ERR_SPI_NOT_SUPPORT_DMA 0x800011C6 266 267/* efuse */ 268#define HI_ERR_EFUSE_INVALIDATE_ID 0x80001200 269#define HI_ERR_EFUSE_INVALIDATE_PARA 0x80001201 270#define HI_ERR_EFUSE_WRITE_ERR 0x80001202 271#define HI_ERR_EFUSE_INVALIDATE_AUTH 0x80001203 272#define HI_ERR_EFUSE_BUSY 0x80001204 273#define HI_ERR_EFUSE_TIMEOUT 0x80001205 274 275/* cipher */ 276#define HI_ERR_CIPHER_NOT_INIT 0x80001240 277#define HI_ERR_CIPHER_INVALID_POINT 0x80001241 278#define HI_ERR_CIPHER_INVALID_PARAMETER 0x80001242 279#define HI_ERR_CIPHER_NO_AVAILABLE_RNG 0x80001243 280#define HI_ERR_CIPHER_FAILED_MEM 0x80001244 281#define HI_ERR_CIPHER_OVERFLOW 0x80001245 282#define HI_ERR_CIPHER_TIMEOUT 0x80001246 283#define HI_ERR_CIPHER_UNSUPPORTED 0x80001247 284#define HI_ERR_CIPHER_REGISTER_IRQ 0x80001248 285#define HI_ERR_CIPHER_ILLEGAL_KEY 0x80001249 286#define HI_ERR_CIPHER_INVALID_ADDR 0x8000124A 287#define HI_ERR_CIPHER_INVALID_LENGTH 0x8000124B 288#define HI_ERR_CIPHER_ILLEGAL_DATA 0x8000124C 289#define HI_ERR_CIPHER_RSA_SIGN 0x8000124D 290#define HI_ERR_CIPHER_RSA_VERIFY 0x8000124E 291#define HI_ERR_CIPHER_RESULT_WARNING 0x8000124F 292#define HI_ERR_CIPHER_FLUSH_DCACHE_FAILED 0x80001250 293 294/* sdio */ 295#define HI_ERR_SDIO_INVALID_PARAMETER 0x80001280 296 297/* tsensor */ 298#define HI_ERR_TSENSOR_INVALID_PARAMETER 0x800012C0 299 300/* adc */ 301#define HI_ERR_ADC_PARAMETER_WRONG 0x80001300 302#define HI_ERR_ADC_INVALID_CHANNEL_ID 0x80001301 303#define HI_ERR_ADC_TIMEOUT 0x80001302 304#define HI_ERR_ADC_NOT_INIT 0x80001303 305 306/* pmw */ 307#define HI_ERR_PWM_NO_INIT 0x80001340 308#define HI_ERR_PWM_INITILIZATION_ALREADY 0x80001341 309#define HI_ERR_PWM_INVALID_PARAMETER 0x80001342 310 311 312/* dma */ 313#define HI_ERR_DMA_INVALID_PARA 0x80001380 314#define HI_ERR_DMA_NOT_INIT 0x80001381 315#define HI_ERR_DMA_BUSY 0x80001382 316#define HI_ERR_DMA_TRANSFER_FAIL 0x80001383 317#define HI_ERR_DMA_TRANSFER_TIMEOUT 0x80001384 318#define HI_ERR_DMA_GET_NOTE_FAIL 0x80001385 319#define HI_ERR_DMA_LLI_NOT_CREATE 0x80001386 320#define HI_ERR_DMA_CH_IRQ_ENABLE_FAIL 0x80001387 321/* audio */ 322#define HI_ERR_AUDIO_BUSY 0x800013C0 323#define HI_ERR_AUDIO_INVALID_PARAMETER 0x800013C1 324 325/* i2s */ 326#define HI_ERR_I2S_INVALID_PARAMETER 0x80001400 327#define HI_ERR_I2S_WRITE_TIMEOUT 0x80001401 328#define HI_ERR_I2S_MALLOC_FAIL 0x80001402 329#define HI_ERR_I2S_MEMCPY_FAIL 0x80001403 330 331/* shell */ 332#define HI_ERR_SHELL_NOT_INIT 0x80001440 333#define HI_ERR_SHELL_CMDREG_PARA_ERROR 0x80001441 334#define HI_ERR_SHELL_CMDREG_CMD_ERROR 0x80001442 335#define HI_ERR_SHELL_CMDREG_CMD_EXIST 0x80001443 336#define HI_ERR_SHELL_CMDREG_MEMALLOC_ERROR 0x80001444 337 338/***************************************************************************** 339* 4、Intermediate application error code 340*****************************************************************************/ 341/* NV */ 342#define HI_ERR_NV_FILE_ERR 0x80003000 343#define HI_ERR_NV_MEMCPY_FAIL 0x80003001 344#define HI_ERR_NV_WRITE_FILE_FAIL 0x80003002 345#define HI_ERR_NV_UPDATA_DATA_FAIL 0x80003003 346#define HI_ERR_NV_UPDATA_FILE_FAIL 0x80003004 347#define HI_ERR_NV_NOT_SUPPORT_WRITE 0x80003005 348#define HI_ERR_NV_FSEC_TOTAL_NUM_INVALID 0x80003006 /* 工厂NV项个数非法 */ 349#define HI_ERR_NV_FAIL_N_TIMES 0x80003007 350#define HI_ERR_NV_SEM_FAIL 0x80003008 351#define HI_ERR_NV_LEN_ERR 0x80003009 352#define HI_ERR_NV_NOT_FOUND 0x8000300A 353#define HI_ERR_NV_FULL 0x8000300B 354#define HI_ERR_NV_NOT_ENOUGH_MEMORY 0x8000300C 355#define HI_ERR_NV_NOT_SUPPORT 0x8000300D 356#define HI_ERR_NV_NOT_SUPPORT_ID 0x8000300E 357#define HI_ERR_NV_BAD_DATA 0x8000300F 358#define HI_ERR_NV_INVALID_TYPE 0x80003010 359/* NV读取失败 CNcomment:Read NVIM Failure */ 360#define HI_ERR_NV_ERROR_READ 0x80003011 361/* NV写失败,长度过长CNcomment:Write Error for Length Overflow */ 362#define HI_ERR_NV_NOT_SUPPORT_LENTH 0x80003012 363/* NV写失败,Flash坏块 CNcomment:Write Error for Flash Bad Block */ 364#define HI_ERR_NV_BAD_BLOCK 0x80003013 365/* NV写失败,其他错误 CNcomment:Write Error for Unknown Reason */ 366#define HI_ERR_NV_ERROR_WRITE 0x80003014 367#define HI_ERR_NV_INITILIZATION 0x80003015 368#define HI_ERR_NV_INVALID_PARAMETER 0x80003016 369 370/* Low power consumption */ 371#define HI_ERR_LOWPOWER_INVALID_PARAMETER 0x80003040 372#define HI_ERR_LOWPOWER_XTAL_UNSTABLE 0x80003041 373#define HI_ERR_LOWPOWER_XTAL_SAMPLING 0x80003042 374 375/* upgrade common error */ 376#define HI_ERR_UPG_COMMON 0x80003060 377#define HI_ERR_UPG_NULL_POINTER (HI_ERR_UPG_COMMON + 0x0) 378#define HI_ERR_UPG_PARAMETER (HI_ERR_UPG_COMMON + 0x1) 379#define HI_ERR_UPG_BACKUP_ADDR (HI_ERR_UPG_COMMON + 0x2) 380#define HI_ERR_UPG_BUSY (HI_ERR_UPG_COMMON + 0x3) 381#define HI_ERR_UPG_FLASH_BAD (HI_ERR_UPG_COMMON + 0x4) 382#define HI_ERR_UPG_START_ADDR (HI_ERR_UPG_COMMON + 0x5) 383#define HI_ERR_UPG_INITILIZATION_ALREADY (HI_ERR_UPG_COMMON + 0x6) 384#define HI_ERR_UPG_FILE_LEN (HI_ERR_UPG_COMMON + 0x7) 385#define HI_ERR_UPG_NOT_START (HI_ERR_UPG_COMMON + 0x8) 386#define HI_ERR_UPG_MALLOC_FAIL (HI_ERR_UPG_COMMON + 0x9) 387#define HI_ERR_UPG_GET_SECTION_HEAD (HI_ERR_UPG_COMMON + 0xA) 388#define HI_ERR_UPG_BUF_LEN (HI_ERR_UPG_COMMON + 0xB) 389#define HI_ERR_UPG_FLASH_SIZE (HI_ERR_UPG_COMMON + 0xC) 390#define HI_ERR_UPG_NV_SIZE (HI_ERR_UPG_COMMON + 0xD) 391#define HI_ERR_UPG_ALREADY_FINISH (HI_ERR_UPG_COMMON + 0xE) 392#define HI_ERR_UPG_RSA_KEY_ADDR (HI_ERR_UPG_COMMON + 0xF) 393#define HI_ERR_UPG_ECC_KEY_ADDR (HI_ERR_UPG_COMMON + 0x10) 394#define HI_ERR_UPG_FILE_LEN_OVER (HI_ERR_UPG_COMMON + 0x11) 395#define HI_ERR_UPG_STOP (HI_ERR_UPG_COMMON + 0x12) 396#define HI_ERR_UPG_LOW_KERNEL_VER (HI_ERR_UPG_COMMON + 0x13) 397#define HI_ERR_UPG_FULL_KERNEL_VER (HI_ERR_UPG_COMMON + 0x14) 398#define HI_ERR_UPG_LOW_BOOT_VER (HI_ERR_UPG_COMMON + 0x15) 399#define HI_ERR_UPG_FULL_BOOT_VER (HI_ERR_UPG_COMMON + 0x16) 400#define HI_ERR_UPG_FIRST_PACKET_OFFSET (HI_ERR_UPG_COMMON + 0x17) 401#define HI_ERR_UPG_UPDATE_VER_TIMEOUT (HI_ERR_UPG_COMMON + 0x18) 402#define HI_ERR_UPG_UPDATE_VER_FAIL (HI_ERR_UPG_COMMON + 0x19) 403#define HI_ERR_UPG_UPDATE_VER_INVALID_PARAM (HI_ERR_UPG_COMMON + 0x1A) 404#define HI_ERR_UPG_KERNEL_VER_OVER (HI_ERR_UPG_COMMON + 0x1B) 405#define HI_ERR_UPG_BOOT_VER_OVER (HI_ERR_UPG_COMMON + 0x1C) 406#define HI_ERR_UPG_KERNEL_LEN (HI_ERR_UPG_COMMON + 0x1D) 407#define HI_ERR_UPG_KEY_LEN (HI_ERR_UPG_COMMON + 0x1E) 408 409/* upgrade file check error */ 410#define HI_ERR_UPG_CHECK 0x80003080 411#define HI_ERR_UPG_IMAGE_ID (HI_ERR_UPG_CHECK + 0x0) 412#define HI_ERR_UPG_FILE_TYPE (HI_ERR_UPG_CHECK + 0x1) 413#define HI_ERR_UPG_HEAD_LEN (HI_ERR_UPG_CHECK + 0x2) 414#define HI_ERR_UPG_SIGN_ALG (HI_ERR_UPG_CHECK + 0x3) 415#define HI_ERR_UPG_RSA_KEY_LEN (HI_ERR_UPG_CHECK + 0x4) 416#define HI_ERR_UPG_RSA_HEAD_SIGN (HI_ERR_UPG_CHECK + 0x5) 417#define HI_ERR_UPG_ECC_KEY_LEN (HI_ERR_UPG_CHECK + 0x6) 418#define HI_ERR_UPG_ECC_HEAD_SIGN (HI_ERR_UPG_CHECK + 0x7) 419#define HI_ERR_UPG_COMMON_SHA256 (HI_ERR_UPG_CHECK + 0x8) 420#define HI_ERR_UPG_SECTION_SHA256 (HI_ERR_UPG_CHECK + 0x9) 421#define HI_ERR_UPG_KERNEL_VER (HI_ERR_UPG_CHECK + 0xA) 422#define HI_ERR_UPG_BOOT_VER (HI_ERR_UPG_CHECK + 0xB) 423#define HI_ERR_UPG_BOOT_HEAD (HI_ERR_UPG_CHECK + 0xC) 424#define HI_ERR_UPG_BOOT_LEN (HI_ERR_UPG_CHECK + 0xD) 425#define HI_ERR_UPG_BOOT_ROOT_KEY (HI_ERR_UPG_CHECK + 0xE) 426#define HI_ERR_UPG_BOOT_ROOT_KEY_LEN (HI_ERR_UPG_CHECK + 0xF) 427#define HI_ERR_UPG_BOOT_KEY_ID (HI_ERR_UPG_CHECK + 0x10) 428#define HI_ERR_UPG_BOOT_SIGN_ALG (HI_ERR_UPG_CHECK + 0x11) 429#define HI_ERR_UPG_BOOT_SUB_KEY (HI_ERR_UPG_CHECK + 0x12) 430#define HI_ERR_UPG_BOOT_SUB_KEY_CAT (HI_ERR_UPG_CHECK + 0x13) 431#define HI_ERR_UPG_BOOT_SUB_KEY_RSIM (HI_ERR_UPG_CHECK + 0x14) 432#define HI_ERR_UPG_BOOT_DIE_ID (HI_ERR_UPG_CHECK + 0x15) 433#define HI_ERR_UPG_BOOT_HASH (HI_ERR_UPG_CHECK + 0x16) 434#define HI_ERR_UPG_BOOT_SUB_KEY_LEN (HI_ERR_UPG_CHECK + 0x17) 435#define HI_ERR_UPG_USER_VERIFY (HI_ERR_UPG_CHECK + 0x18) 436#define HI_ERR_UPG_BOOT_SUB_KEY_HASH (HI_ERR_UPG_CHECK + 0x19) 437#define HI_ERR_UPG_BOOT_SECTION_HASH (HI_ERR_UPG_CHECK + 0x1A) 438#define HI_ERR_UPG_COMMON_HASH (HI_ERR_UPG_CHECK + 0x1B) 439#define HI_ERR_UPG_SECTION_HASH (HI_ERR_UPG_CHECK + 0x1C) 440#define HI_ERR_UPG_ADD_START (HI_ERR_UPG_CHECK + 0x1D) 441#define HI_ERR_UPG_ENCRYPT_NOT_MATCH (HI_ERR_UPG_CHECK + 0x1E) 442#define HI_ERR_UPG_OTA_NOT_MATCH (HI_ERR_UPG_CHECK + 0x1F) 443 444/* upgrade file crypto error */ 445#define HI_ERR_UPG_CRYPTO 0x800030A0 446#define HI_ERR_UPG_CRYPTO_PREPARE_ERR (HI_ERR_UPG_CRYPTO + 0x0) 447#define HI_ERR_UPG_FILE_DECRYPT_ERR (HI_ERR_UPG_CRYPTO + 0x1) 448#define HI_ERR_UPG_NOT_WITH_CACHE_MODE_ERR (HI_ERR_UPG_CRYPTO + 0x2) 449#define HI_ERR_UPG_NOT_DOWNLOAD_FINISH (HI_ERR_UPG_CRYPTO + 0x3) 450 451/* DIAG */ 452#define HI_ERR_DIAG_NOT_FOUND 0x800030C0 453#define HI_ERR_DIAG_INVALID_ID 0x800030C1 454#define HI_ERR_DIAG_FULL 0x800030C2 455#define HI_ERR_DIAG_CONSUMED 0x800030C3 456#define HI_ERR_DIAG_CONTINUE 0x800030C4 457#define HI_ERR_DIAG_TOO_SMALL_BUFFER 0x800030C5 458#define HI_ERR_DIAG_NO_MORE_DATA 0x800030C6 459#define HI_ERR_DIAG_NOT_ENOUGH_MEMORY 0x800030C7 460#define HI_ERR_DIAG_INVALID_HEAP_ADDR 0x800030C8 461#define HI_ERR_DIAG_NOT_CONNECT 0x800030C9 462#define HI_ERR_DIAG_BUSY 0x800030CA 463#define HI_ERR_DIAG_TOO_LARGE_FRAME 0x800030CB 464#define HI_ERR_DIAG_RAM_ALIGN 0x800030CC 465#define HI_ERR_DIAG_NOT_SUPPORT 0x800030CD 466#define HI_ERR_DIAG_UNAVAILABLE 0x800030CE 467#define HI_ERR_DIAG_CFG_NOT_ALLOW 0x800030CF 468#define HI_ERR_DIAG_INVALID_CODE_ADDR 0x800030D0 469#define HI_ERR_DIAG_OBJ_NOT_FOUND 0x800030D1 470#define HI_ERR_DIAG_QUEUE_FULL 0x800030D2 471#define HI_ERR_DIAG_NO_MORE_MEMORY 0x800030D3 472#define HI_ERR_DIAG_SYSTEM_CALL_ERROR 0x800030D4 473#define HI_ERR_DIAG_NO_INIT 0x800030D5 474#define HI_ERR_DIAG_INVALID_PARAMETER 0x800030D6 475#define HI_ERR_DIAG_STAT_NOT_SUPPORT 0x800030D7 476#define HI_ERR_DIAG_ID_OR_CALLBACK_ALREADY_REGISTERED 0x800030D8 477#define HI_ERR_DIAG_SET_CONN_ACK_INFO 0x800030D9 478#define HI_ERR_DIAG_CMD_NUM_EXCEED_UPPER_LIMIT 0x800030DA 479 480/* reset */ 481#define HI_ERR_RESET_TOO_LARGE_DATA 0x80003100 482#define HI_ERR_RESET_INVALID_PARAMETER 0x80003101 483 484/* syserror */ 485#define HI_ERR_SYSERROR_NOT_FOUND 0x80003140 486#define HI_ERR_SYSERROR_INVALID_PARAMETER 0x80003141 487 488 489/* APP */ 490#define HI_ERR_APP_INITILIZATION_ALREADY 0x80003180 491#define HI_ERR_APP_INVALID_PARAMETER 0x80003181 492 493/* CRC */ 494#define HI_ERR_CRC_INVALID_PARAMETER 0x800031C0 495 496 497/* sigma */ 498#define HI_ERR_SIGMA_INVALID_PARAMETER 0x80003200 499 500/* data collect */ 501#define HI_ERR_DATACOLLECT_INVALID_PARAMETER 0x80003240 502#define HI_ERR_DATACOLLECT_BUSY 0x80003241 503 504/* AT */ 505#define HI_ERR_AT_NAME_OR_FUNC_REPEAT_REGISTERED 0x80003280 506#define HI_ERR_AT_INVALID_PARAMETER 0x80003281 507 508/***************************************************************************** 509* 5、Protocol stack error codes 510*****************************************************************************/ 511/* wifi */ 512/* Note: The base value of the Wi-Fi error code hi_err_code_enum is changed to the start value, 513 * and other error codes are delayed at one time. 514 * CNcomment:说明:wifi错误码hi_err_code_enum 将base基值修改为起始值,其他错误码一次延顺 515 */ 516/* dmac */ 517#define HI_ERR_WIFI_DMAC_NOT_SUPPORT 0x80004000 518 519/* hmac */ 520#define HI_ERR_WIFI_HMAC_INVALID_PARAMETER 0x80004040 521 522/* wal */ 523#define HI_ERR_WIFI_WAL_MALLOC_FAIL 0x80004080 524#define HI_ERR_WIFI_WAL_FAILURE 0x80004081 525#define HI_ERR_WIFI_WAL_BUSY 0x80004082 526#define HI_ERR_WIFI_WAL_INVALID_PARAMETER 0x80004083 527 528/***************************************************************************** 529* 6、128 units reserved for Hisi.CNcomment:Hisi保留 unit128个 530* 7、64 units reserved for customer use. CNcomment:客户使用预留 unit64个 531*****************************************************************************/ 532#endif /* __HI_ERRNO_H__ */ 533