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