adi_sys_error.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*!
  2. *****************************************************************************
  3. ** \file ./adi/inc/adi_sys_error.h
  4. **
  5. ** \version $Id: adi_sys_error.h 2 2014-08-07 07:42:50Z huangjunlei $
  6. **
  7. ** \brief ADI error codes & modules definition.
  8. **
  9. ** \attention THIS SAMPLE CODE IS PROVIDED AS IS. GOKE MICROELECTRONICS
  10. ** ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR
  11. ** OMMISSIONS
  12. **
  13. ** (C) Copyright 2012-2013 by GOKE MICROELECTRONICS CO.,LTD
  14. **
  15. *****************************************************************************
  16. */
  17. #ifndef _ADI_SYS_ERROR_H_
  18. #define _ADI_SYS_ERROR_H_
  19. /*
  20. ********************************************************************************
  21. ** Common error codes (reserved from 0 to -99)
  22. **
  23. ** Each error code shall be decreased in steps of 1.
  24. ********************************************************************************
  25. */
  26. //! Indication of success.
  27. #define GADI_OK 0
  28. //! Bad parameter passed.
  29. #define GADI_ERR_BAD_PARAMETER -1
  30. //! Memory allocation failed.
  31. #define GADI_ERR_OUT_OF_MEMORY -2
  32. //! Device already initialised.
  33. #define GADI_ERR_ALREADY_INITIALIZED -3
  34. //! Device not initialised.
  35. #define GADI_ERR_NOT_INITIALIZED -4
  36. //! Feature or function is not available.
  37. #define GADI_ERR_FEATURE_NOT_SUPPORTED -5
  38. //! Timeout occured.
  39. #define GADI_ERR_TIMEOUT -6
  40. //! The device is busy, try again later.
  41. #define GADI_ERR_DEVICE_BUSY -7
  42. //! Invalid handle was passed.
  43. #define GADI_ERR_INVALID_HANDLE -8
  44. //! Semaphore could not be created.
  45. #define GADI_ERR_SEMAPHORE_CREATE -9
  46. //! The driver's used version is not supported.
  47. #define GADI_ERR_UNSUPPORTED_VERSION -10
  48. //! Mailqueue coult not be created.
  49. #define GADI_ERR_MAILQUEUE_CREATE -11
  50. //! Device/handle is not open.
  51. #define GADI_ERR_NOT_OPEN -12
  52. //! Device/handle is already open.
  53. #define GADI_ERR_ALREADY_OPEN -13
  54. //! Thread could not be created.
  55. #define GADI_ERR_THREAD_CREATE -14
  56. //! Thread could not be created.
  57. #define GADI_ERR_FROM_DRIVER -15
  58. //! Thread could not be created.
  59. #define GADI_ERR_ALREAD_RUNNING -16
  60. //! Out of the max size.
  61. #define GADI_ERR_OUT_OF_SIZE -17
  62. //! File is written failed.
  63. #define GADI_ERR_WRITE_FAILED -18
  64. //! File is read failed.
  65. #define GADI_ERR_READ_FAILED -19
  66. //! Device/handle is not MAP.
  67. #define GADI_ERR_MAP -20
  68. //! operation is not permitted
  69. #define GADI_ERR_OPERATION_NOT_PERMIT -21
  70. /*
  71. ********************************************************************************
  72. **
  73. ** GADI module specific bases (range from -1,000 to -999,000)
  74. **
  75. ** Each module base shall be decreased in steps of 1,000.
  76. **
  77. ** The module specific error codes shall range from -100 to -999.
  78. ********************************************************************************
  79. */
  80. //! SYS module base
  81. #define GADI_SYS_MODULE_BASE -1000
  82. //! audio input module base
  83. #define GADI_AUDIO_MODULE_BASE -2000
  84. //! i2s module base
  85. #define GADI_I2S_MODULE_BASE -3000
  86. //! capture module base
  87. #define GADI_CAP_MODULE_BASE -4000
  88. //! face detection module base
  89. #define GADI_FD_MODULE_BASE -5000
  90. //! gpio module base
  91. #define GADI_GPIO_MODULE_BASE -6000
  92. //! i2c module base
  93. #define GADI_I2C_MODULE_BASE -7000
  94. //! isp module base
  95. #define GADI_ISP_MODULE_BASE -8000
  96. //! motion detection module base
  97. #define GADI_MD_MODULE_BASE -9000
  98. //! OSD module base
  99. #define GADI_OSD_MODULE_BASE -10000
  100. //! privacy mask module base
  101. #define GADI_PM_MODULE_BASE -11000
  102. //! PTZ module base
  103. #define GADI_PTZ_MODULE_BASE -12000
  104. //! PWM module base
  105. #define GADI_PWM_MODULE_BASE -13000
  106. //! SPI module base
  107. #define GADI_SPI_MODULE_BASE -14000
  108. //! video decode module base
  109. #define GADI_VDEC_MODULE_BASE -15000
  110. //! video encode module base
  111. #define GADI_VENC_MODULE_BASE -16000
  112. //! video input module base
  113. #define GADI_VI_MODULE_BASE -17000
  114. //! video output module base
  115. #define GADI_VO_MODULE_BASE -18000
  116. //! dsp output module base
  117. #define GADI_DSP_MODULE_BASE -19000
  118. //! ir output module base
  119. #define GADI_IR_MODULE_BASE -20000
  120. //! crypto output module base
  121. #define GADI_CRYPTO_MODULE_BASE -21000
  122. //! wdog output module base
  123. #define GADI_WDOG_MODULE_BASE -22000
  124. // TODO: GDerro 2 GADI Error....
  125. #endif /* _ADI_SYS_ERROR_H_ */