ei_errno.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. *------------------------------------------------------------------------------
  3. * @File : ei_errno.h
  4. * @Date : 2021-3-16
  5. * @Author : lomboswer <lomboswer@lombotech.com>
  6. * @Brief : Common file for MDP(Media Development Platform).
  7. *
  8. * Copyright (C) 2020-2021, LomboTech Co.Ltd. All rights reserved.
  9. *------------------------------------------------------------------------------
  10. */
  11. #ifndef __EI_ERRNO_H__
  12. #define __EI_ERRNO_H__
  13. #include "ei_debug.h"
  14. #ifdef __cplusplus
  15. #if __cplusplus
  16. extern "C" {
  17. #endif
  18. #endif /* __cplusplus */
  19. #define EI_ERR_APPID (0x80000000L + 0x60000000L)
  20. typedef enum eiERR_LEVEL_E {
  21. EN_ERR_LEVEL_DEBUG = 0,
  22. EN_ERR_LEVEL_INFO,
  23. EN_ERR_LEVEL_NOTICE,
  24. EN_ERR_LEVEL_WARNING,
  25. EN_ERR_LEVEL_ERROR,
  26. EN_ERR_LEVEL_CRIT,
  27. EN_ERR_LEVEL_ALERT,
  28. EN_ERR_LEVEL_FATAL,
  29. EN_ERR_LEVEL_MAX
  30. } ERR_LEVEL_E;
  31. #define EI_DEF_ERR( module, level, errid) \
  32. ((EI_S32)( (EI_ERR_APPID) | ((module) << 16 ) | ((level)<<12) | (errid) ))
  33. typedef enum eiEN_ERR_CODE_E {
  34. EN_ERR_INVALID_DEVID = 0x01,
  35. EN_ERR_INVALID_CHNID = 0x02,
  36. EN_ERR_ILLEGAL_PARAM = 0x03,
  37. EN_ERR_EXIST = 0x04,
  38. EN_ERR_UNEXIST = 0x05,
  39. EN_ERR_NULL_PTR = 0x06,
  40. EN_ERR_NOT_CONFIG = 0x07,
  41. EN_ERR_NOT_SUPPORT = 0x08,
  42. EN_ERR_NOT_PERM = 0x09,
  43. EN_ERR_LIST_EMPTY = 0x0a,
  44. EN_ERR_NOMEM = 0x0b,
  45. EN_ERR_NOBUF = 0x0c,
  46. EN_ERR_BUF_EMPTY = 0x0d,
  47. EN_ERR_BUF_FULL = 0x0e,
  48. EN_ERR_SYS_NOTREADY = 0x0f,
  49. EN_ERR_BADADDR = 0x10,
  50. EN_ERR_BUSY = 0x11,
  51. EN_ERR_SIZE_NOT_ENOUGH = 0x12,
  52. EN_ERR_AGAIN = 0x13,
  53. EN_ERR_TIMEOUT = 0x14,
  54. EN_ERR_NOTSUPP = 0x15,
  55. EN_ERR_NOT_ENABLED = 0x16,
  56. EN_ERR_NO_FOUND = 0x17,
  57. EN_ERR_OTHERS = 0x3e,
  58. EN_ERR_MAX = 0x3f,
  59. } EN_ERR_CODE_E;
  60. #ifdef __cplusplus
  61. #if __cplusplus
  62. }
  63. #endif
  64. #endif /* __cplusplus */
  65. #endif /* __EI_ERRNO_H__ */