• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef PLATFORM_ERRNO_H
10 #define PLATFORM_ERRNO_H
11 
12 #include "hdf_base.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
17 
18 enum PlatformErrno {
19 #define HDF_PLT_ERR_START HDF_BSP_ERR_START            /**< Error number start of platform. */
20 #define HDF_PLT_ERR_NUM(v) (HDF_PLT_ERR_START + (v))
21     HDF_PLT_ERR_OS_API = HDF_ERR_BSP_PLT_API_ERR,
22     HDF_PLT_ERR_OPEN_DEV = HDF_PAL_ERR_DEV_CREATE,     /**< Failed to open a device. */
23     HDF_PLT_ERR_INNER = HDF_PAL_ERR_INNER,             /**< Internal error of platform framework. */
24     HDF_PLT_ERR_NO_DEV = HDF_PLT_ERR_NUM(-5),          /**< There is no device present. */
25     HDF_PLT_ERR_DEV_TYPE = HDF_PLT_ERR_NUM(-6),        /**< invalid device type */
26     HDF_PLT_ERR_DEV_GET = HDF_PLT_ERR_NUM(-7),         /**< err on device get */
27     HDF_PLT_ERR_DEV_ADD = HDF_PLT_ERR_NUM(-8),         /**< err on device add */
28     HDF_PLT_ERR_DEV_FULL = HDF_PLT_ERR_NUM(-9),        /**< device of a manager is full */
29     HDF_PLT_ERR_ID_REPEAT = HDF_PLT_ERR_NUM(-10),      /**< id number conflict */
30     HDF_PLT_ERR_NAME_REPEAT = HDF_PLT_ERR_NUM(-11),    /**< name conflict */
31     HDF_PLT_ERR_OBJ_REPEAT = HDF_PLT_ERR_NUM(-12),     /**< repeated object */
32     HDF_PLT_ERR_NO_DATA = HDF_PLT_ERR_NUM(-13),        /**< no data available */
33     HDF_PLT_RSC_NOT_AVL = HDF_PLT_ERR_NUM(-14),        /**< resource not available */
34     HDF_PLT_OUT_OF_RSC = HDF_PLT_ERR_NUM(-15),         /**< run out of resource */
35 #define HDF_MMC_ERR_START (HDF_PLT_ERR_START - 50)     /**< Error number start for mmc. */
36 #define HDF_MMC_ERR_NUM(v) (HDF_MMC_ERR_START + (v))
37     HDF_MMC_ERR_SWITCH_FAIL = HDF_MMC_ERR_NUM(-1),
38     HDF_MMC_ERR_OTHER_CMD_IS_RUNNING = HDF_MMC_ERR_NUM(-2),
39     HDF_MMC_ERR_ILLEGAL_SEQ = HDF_MMC_ERR_NUM(-3),
40 };
41 
42 #ifdef __cplusplus
43 }
44 #endif /* __cplusplus */
45 
46 #endif /* PLATFORM_ERRNO_H */
47