mxc_errors.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * @file
  3. * @brief List of common error return codes for Maxim Integrated libraries.
  4. */
  5. /* ****************************************************************************
  6. * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a
  9. * copy of this software and associated documentation files (the "Software"),
  10. * to deal in the Software without restriction, including without limitation
  11. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  12. * and/or sell copies of the Software, and to permit persons to whom the
  13. * Software is furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included
  16. * in all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  19. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  21. * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
  22. * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  23. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  24. * OTHER DEALINGS IN THE SOFTWARE.
  25. *
  26. * Except as contained in this notice, the name of Maxim Integrated
  27. * Products, Inc. shall not be used except as stated in the Maxim Integrated
  28. * Products, Inc. Branding Policy.
  29. *
  30. * The mere transfer of this software does not imply any licenses
  31. * of trade secrets, proprietary technology, copyrights, patents,
  32. * trademarks, maskwork rights, or any other form of intellectual
  33. * property whatsoever. Maxim Integrated Products, Inc. retains all
  34. * ownership rights.
  35. *
  36. * $Date: 2018-08-09 18:45:02 -0500 (Thu, 09 Aug 2018) $
  37. * $Revision: 36818 $
  38. *
  39. *************************************************************************** */
  40. /* Define to prevent redundant inclusion */
  41. #ifndef _MXC_ERRORS_H_
  42. #define _MXC_ERRORS_H_
  43. /**
  44. * @ingroup syscfg
  45. * @defgroup MXC_Error_Codes Error Codes
  46. * @brief A list of common error codes used by the API.
  47. * @note A Negative Error Convention is used to avoid conflict with
  48. * positive, Non-Error, returns.
  49. * @{
  50. */
  51. /** No Error */
  52. #define E_NO_ERROR 0
  53. /** No Error, success */
  54. #define E_SUCCESS 0
  55. /** Pointer is NULL */
  56. #define E_NULL_PTR -1
  57. /** No such device */
  58. #define E_NO_DEVICE -2
  59. /** Parameter not acceptable */
  60. #define E_BAD_PARAM -3
  61. /** Value not valid or allowed */
  62. #define E_INVALID -4
  63. /** Module not initialized */
  64. #define E_UNINITIALIZED -5
  65. /** Busy now, try again later */
  66. #define E_BUSY -6
  67. /** Operation not allowed in current state */
  68. #define E_BAD_STATE -7
  69. /** Generic error */
  70. #define E_UNKNOWN -8
  71. /** General communications error */
  72. #define E_COMM_ERR -9
  73. /** Operation timed out */
  74. #define E_TIME_OUT -10
  75. /** Expected response did not occur */
  76. #define E_NO_RESPONSE -11
  77. /** Operations resulted in unexpected overflow */
  78. #define E_OVERFLOW -12
  79. /** Operations resulted in unexpected underflow */
  80. #define E_UNDERFLOW -13
  81. /** Data or resource not available at this time */
  82. #define E_NONE_AVAIL -14
  83. /** Event was shutdown */
  84. #define E_SHUTDOWN -15
  85. /** Event was aborted */
  86. #define E_ABORT -16
  87. /** The requested operation is not supported */
  88. #define E_NOT_SUPPORTED -17
  89. /**@} end of MXC_Error_Codes group */
  90. #endif /* _MXC_ERRORS_H_ */