1 /**
2  * @file    mxc_errors.h
3  * @brief   List of common error return codes for Maxim Integrated libraries.
4 */
5 
6 /******************************************************************************
7  *
8  * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
9  * Analog Devices, Inc.),
10  * Copyright (C) 2023-2024 Analog Devices, Inc.
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  *     http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  ******************************************************************************/
25 
26 /* Define to prevent redundant inclusion */
27 #ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32670_MXC_ERRORS_H_
28 #define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32670_MXC_ERRORS_H_
29 
30 /**
31  * @ingroup syscfg
32  * @defgroup MXC_Error_Codes Error Codes
33  * @brief      A list of common error codes used by the API.
34  * @note       A Negative Error Convention is used to avoid conflict with
35  *             positive, Non-Error, returns.
36  * @{
37  */
38 
39 /** No Error */
40 #define E_NO_ERROR 0
41 /** No Error, success */
42 #define E_SUCCESS 0
43 /** Pointer is NULL */
44 #define E_NULL_PTR -1
45 /** No such device */
46 #define E_NO_DEVICE -2
47 /** Parameter not acceptable */
48 #define E_BAD_PARAM -3
49 /** Value not valid or allowed */
50 #define E_INVALID -4
51 /** Module not initialized */
52 #define E_UNINITIALIZED -5
53 /** Busy now, try again later */
54 #define E_BUSY -6
55 /** Operation not allowed in current state */
56 #define E_BAD_STATE -7
57 /** Generic error */
58 #define E_UNKNOWN -8
59 /** General communications error */
60 #define E_COMM_ERR -9
61 /** Operation timed out */
62 #define E_TIME_OUT -10
63 /** Expected response did not occur */
64 #define E_NO_RESPONSE -11
65 /** Operations resulted in unexpected overflow */
66 #define E_OVERFLOW -12
67 /** Operations resulted in unexpected underflow */
68 #define E_UNDERFLOW -13
69 /** Data or resource not available at this time */
70 #define E_NONE_AVAIL -14
71 /** Event was shutdown */
72 #define E_SHUTDOWN -15
73 /** Event was aborted */
74 #define E_ABORT -16
75 /** The requested operation is not supported */
76 #define E_NOT_SUPPORTED -17
77 /** The requested operation is failed */
78 #define E_FAIL -255
79 /**@} end of MXC_Error_Codes group */
80 
81 #endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32670_MXC_ERRORS_H_
82