• 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 #if __cplusplus
16 extern "C" {
17 #endif
18 #endif /* __cplusplus */
19 
20 enum PlatformErrno {
21 #define HDF_PLT_ERR_START HDF_BSP_ERR_START            /**< Error number start of platform. */
22 #define HDF_PLT_ERR_NUM(v) (HDF_PLT_ERR_START + (v))
23     HDF_PLT_ERR_OS_API = HDF_ERR_BSP_PLT_API_ERR,
24     HDF_PLT_ERR_OPEN_DEV = HDF_PAL_ERR_DEV_CREATE,     /**< Failed to open a device. */
25     HDF_PLT_ERR_INNER = HDF_PAL_ERR_INNER,             /**< Internal error of platform framework. */
26     HDF_PLT_ERR_NO_DEV = HDF_PLT_ERR_NUM(-5),          /**< There is no device present. */
27     HDF_PLT_ERR_DEV_TYPE = HDF_PLT_ERR_NUM(-6),        /**< invalid device type */
28     HDF_PLT_ERR_DEV_GET = HDF_PLT_ERR_NUM(-7),         /**< err on device get */
29     HDF_PLT_ERR_DEV_ADD = HDF_PLT_ERR_NUM(-8),         /**< err on device add */
30     HDF_PLT_ERR_DEV_FULL = HDF_PLT_ERR_NUM(-9),        /**< device of a manager is full */
31     HDF_PLT_ERR_ID_REPEAT = HDF_PLT_ERR_NUM(-10),      /**< id number conflict */
32     HDF_PLT_ERR_NAME_REPEAT = HDF_PLT_ERR_NUM(-11),    /**< name conflict */
33     HDF_PLT_ERR_OBJ_REPEAT = HDF_PLT_ERR_NUM(-12),     /**< repeated object */
34     HDF_PLT_ERR_NO_DATA = HDF_PLT_ERR_NUM(-13),        /**< no data available */
35     HDF_PLT_RSC_NOT_AVL = HDF_PLT_ERR_NUM(-14),        /**< resource not available */
36 #define HDF_MMC_ERR_START (HDF_PLT_ERR_START - 50)     /**< Error number start for mmc. */
37 #define HDF_MMC_ERR_NUM(v) (HDF_MMC_ERR_START + (v))
38     HDF_MMC_ERR_SWITCH_FAIL = HDF_MMC_ERR_NUM(-1),
39     HDF_MMC_ERR_OTHER_CMD_IS_RUNNING = HDF_MMC_ERR_NUM(-2),
40     HDF_MMC_ERR_ILLEGAL_SEQ = HDF_MMC_ERR_NUM(-3),
41 };
42 
43 #ifdef __cplusplus
44 #if __cplusplus
45 }
46 #endif
47 #endif /* __cplusplus */
48 
49 #endif /* PLATFORM_ERRNO_H */
50