1 /*
2  * Copyright (c) 2015 TDK Invensense
3  *
4  * SPDX-License-Identifier: BSD 3-Clause
5  */
6 
7 /** @defgroup InvError Error code
8  *	@brief    Common error code
9  *
10  *	@ingroup EmbUtils
11  *	@{
12  */
13 
14 #ifndef _INV_ERROR_H_
15 #define _INV_ERROR_H_
16 
17 /** @brief Common error code definition
18  */
19 enum inv_error {
20 	INV_ERROR_SUCCESS    = 0, /**< no error */
21 	INV_ERROR            = -1, /**< unspecified error */
22 	INV_ERROR_NIMPL      = -2, /**< function not implemented for given arguments */
23 	INV_ERROR_TRANSPORT  = -3, /**< error occurred at transport level */
24 	INV_ERROR_TIMEOUT    = -4, /**< action did not complete in the expected time window */
25 	INV_ERROR_SIZE       = -5, /**< argument's size is not suitable to complete requested action */
26 	INV_ERROR_OS         = -6, /**< error related to OS */
27 	INV_ERROR_IO         = -7, /**< error related to IO operation */
28 	INV_ERROR_MEM        = -9, /**< not enough memory to complete requested action */
29 	INV_ERROR_HW         = -10, /**< error at HW level */
30 	INV_ERROR_BAD_ARG    = -11, /**< provided arguments are not good to perform requested action */
31 	INV_ERROR_UNEXPECTED = -12, /**< something unexpected happened */
32 	INV_ERROR_FILE       = -13, /**< cannot access file or unexpected format */
33 	INV_ERROR_PATH       = -14, /**< invalid file path */
34 	INV_ERROR_IMAGE_TYPE = -15, /**< error when image type is not managed */
35 	INV_ERROR_WATCHDOG   = -16, /**< error when device doesn't respond to ping */
36 };
37 
38 #endif /* _INV_ERROR_H_ */
39 
40 /** @} */
41