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 * Description: slp error code 15 * ROM : NO 16 * STRATEGY : NO 17 */ 18 19 /** 20 * @defgroup middleware_service_slp_errcode SLP Error Code 21 * @ingroup middleware_service_slp 22 * @{ 23 */ 24 25 #ifndef SLP_ERRCODE_H 26 #define SLP_ERRCODE_H 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 /** 33 * @if Eng 34 * @brief SLP error code base. 35 * @else 36 * @brief SLP 错误码起始。 37 * @endif 38 */ 39 #define ERRCODE_SLP_BASE 0x80009400 40 41 /** 42 * @if Eng 43 * @brief SLP error code base. 44 * @else 45 * @brief SLP 错误码结束。 46 * @endif 47 */ 48 #define ERRCODE_SLP_END 0x800095FF 49 50 /** 51 * @if Eng 52 * @brief SLP Client error code base. 53 * @else 54 * @brief SLP Client 错误码起始。 55 * @endif 56 */ 57 #define ERRCODE_SLPC_BASE 0x80009600 58 59 /** 60 * @if Eng 61 * @brief SLP Client error code base. 62 * @else 63 * @brief SLP Client错误码结束。 64 * @endif 65 */ 66 #define ERRCODE_SLPC_END 0x800097FF 67 68 /** 69 * @if Eng 70 * @brief SLP error code. 71 * @else 72 * @brief SLP 错误码。 73 * @endif 74 */ 75 typedef enum { 76 ERRCODE_SLP_SUCCESS = 0, /*!< @if Eng error code of success 77 @else 执行成功错误码 @endif */ 78 ERRCODE_SLP_EXCEED_MAX_COUNTER = ERRCODE_SLP_BASE, /*!< @if Eng error code of exceeding max conter 79 @else 超过芯片最大计数值错误码 @endif */ 80 RRCODE_SLP_MAX = ERRCODE_SLP_END /*!< @if Eng maximum of SLP error code 81 @else SLP 错误码最大值 @endif */ 82 } ErrcodeSlp; 83 84 /** 85 * @if Eng 86 * @brief SLP Client error code. 87 * @else 88 * @brief SLP Client 错误码。 89 * @endif 90 */ 91 typedef enum { 92 ERRCODE_SLPC_SUCCESS = 0, /*!< @if Eng error code of success 93 @else 执行成功错误码 @endif */ 94 ERRCODE_SLPC_MALLOC_FAILED = ERRCODE_SLPC_BASE, /*!< @if Eng error code of malloc failed 95 @else 申请动态内存失败错误码 @endif */ 96 ERRCODE_SLPC_MEMCPY_FAILED, /*!< @if Eng error code of memcpy failed 97 @else 内存拷贝失败错误码 @endif */ 98 ERRCODE_SLPC_SEND_PAYLOAD_FAILED, /*!< @if Eng error code of sending payload failed 99 @else 发送负载失败错误码 @endif */ 100 ERRCODE_SLPC_RECV_PAYLOAD_FAILED, /*!< @if Eng error code of receiving payload failed 101 @else 接收负载失败错误码 @endif */ 102 RRCODE_SLPC_MAX = ERRCODE_SLPC_END /*!< @if Eng maximum of SLP error code 103 @else SLPC 错误码最大值 @endif */ 104 } ErrcodeSlpClient; 105 106 /** 107 * @} 108 */ 109 110 #ifdef __cplusplus 111 } 112 #endif 113 114 #endif