InvError.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * ________________________________________________________________________________________________________
  3. * Copyright (c) 2015-2015 InvenSense Inc. All rights reserved.
  4. *
  5. * This software, related documentation and any modifications thereto (collectively “Software”) is subject
  6. * to InvenSense and its licensors' intellectual property rights under U.S. and international copyright
  7. * and other intellectual property rights laws.
  8. *
  9. * InvenSense and its licensors retain all intellectual property and proprietary rights in and to the Software
  10. * and any use, reproduction, disclosure or distribution of the Software without an express license agreement
  11. * from InvenSense is strictly prohibited.
  12. *
  13. * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, THE SOFTWARE IS
  14. * PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  15. * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  16. * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, IN NO EVENT SHALL
  17. * INVENSENSE BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
  18. * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  19. * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  20. * OF THE SOFTWARE.
  21. * ________________________________________________________________________________________________________
  22. */
  23. /** @defgroup InvError Error code
  24. * @brief Common error code
  25. *
  26. * @ingroup EmbUtils
  27. * @{
  28. */
  29. #ifndef _INV_ERROR_H_
  30. #define _INV_ERROR_H_
  31. /** @brief Common error code definition
  32. */
  33. enum inv_error
  34. {
  35. INV_ERROR_SUCCESS = 0, /**< no error */
  36. INV_ERROR = -1, /**< unspecified error */
  37. INV_ERROR_NIMPL = -2, /**< function not implemented for given
  38. arguments */
  39. INV_ERROR_TRANSPORT = -3, /**< error occured at transport level */
  40. INV_ERROR_TIMEOUT = -4, /**< action did not complete in the expected
  41. time window */
  42. INV_ERROR_SIZE = -5, /**< size/length of given arguments is not
  43. suitable to complete requested action */
  44. INV_ERROR_OS = -6, /**< error related to OS */
  45. INV_ERROR_IO = -7, /**< error related to IO operation */
  46. INV_ERROR_MEM = -9, /**< not enough memory to complete requested
  47. action */
  48. INV_ERROR_HW = -10, /**< error at HW level */
  49. INV_ERROR_BAD_ARG = -11, /**< provided arguments are not good to
  50. perform requestion action */
  51. INV_ERROR_UNEXPECTED = -12, /**< something unexpected happened */
  52. INV_ERROR_FILE = -13, /**< cannot access file or unexpected format */
  53. INV_ERROR_PATH = -14, /**< invalid file path */
  54. INV_ERROR_IMAGE_TYPE = -15, /**< error when image type is not managed */
  55. INV_ERROR_WATCHDOG = -16, /**< error when device doesn't respond
  56. to ping */
  57. INV_ERROR_FIFO_OVERFLOW = -17, /**< FIFO overflow detected */
  58. };
  59. #endif /* _INV_ERROR_H_ */
  60. /** @} */