1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 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 HAL_ERROR_H 17 #define HAL_ERROR_H 18 19 enum { 20 HAL_SUCCESS = 0, 21 HAL_FAILED = -1, 22 HAL_ERR_INVALID_PARAM = -2, 23 HAL_ERR_INVALID_LEN = -3, 24 HAL_ERR_BAD_ALLOC = -4, 25 HAL_ERR_NULL_PTR = -5, 26 HAL_ERR_MEMORY_COPY = -6, 27 HAL_ERR_FILE_NOT_EXIST = -7, 28 HAL_ERR_FILE = -8, 29 HAL_ERR_INIT_PARAM_SET_FAILED = -14, 30 HAL_ERR_ADD_PARAM_FAILED = -15, 31 HAL_ERR_GET_PARAM_FAILED = -16, 32 HAL_ERR_BUILD_PARAM_SET_FAILED = -17, 33 HAL_ERR_FRESH_PARAM_SET_FAILED = -18, 34 HAL_ERR_INIT_FAILED = -19, 35 HAL_ERR_HUKS = -20, 36 HAL_ERR_SHORT_BUFFER = -21, 37 HAL_ERR_NOT_SUPPORTED = -22, 38 HAL_ERR_MBEDTLS = -23, 39 }; 40 #endif