1 /*------------------------------------------------------------------------------------------------*/
2 /* UNICENS V2.1.0-3491 */
3 /* Copyright (c) 2017 Microchip Technology Germany II GmbH & Co. KG. */
5 /* This program is free software: you can redistribute it and/or modify */
6 /* it under the terms of the GNU General Public License as published by */
7 /* the Free Software Foundation, either version 2 of the License, or */
8 /* (at your option) any later version. */
10 /* This program is distributed in the hope that it will be useful, */
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
13 /* GNU General Public License for more details. */
15 /* You should have received a copy of the GNU General Public License */
16 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* You may also obtain this software under a propriety license from Microchip. */
19 /* Please contact Microchip for further information. */
20 /*------------------------------------------------------------------------------------------------*/
24 * \brief This header file contains standard return values used by UNICENS functions
26 * \addtogroup G_UCS_INIT_AND_SRV_TYPES
38 /*------------------------------------------------------------------------------------------------*/
40 /*------------------------------------------------------------------------------------------------*/
41 /*! \brief Standard return codes used for synchronous response */
42 typedef enum Ucs_Return_
44 UCS_RET_SUCCESS = 0x00, /*!< \brief Operation successfully completed */
45 UCS_RET_ERR_PARAM = 0x01, /*!< \brief At least one parameter exceeds its
47 UCS_RET_ERR_BUFFER_OVERFLOW = 0x02, /*!< \brief Buffer overflow or service busy */
48 UCS_RET_ERR_NOT_AVAILABLE = 0x03, /*!< \brief Functionality not available */
49 UCS_RET_ERR_NOT_SUPPORTED = 0x04, /*!< \brief This function is not supported by this
50 derivative of INIC / physical layer / MOST
52 UCS_RET_ERR_INVALID_SHADOW = 0x05, /*!< \brief The requested information is not yet
54 UCS_RET_ERR_ALREADY_SET = 0x06, /*!< \brief The value to be set is already set. The
55 application can therefore be aware that no
56 message will be send to INIC and no
57 callback will be called */
58 UCS_RET_ERR_API_LOCKED = 0x07, /*!< \brief INIC performs already requested function. */
59 UCS_RET_ERR_NOT_INITIALIZED = 0x08 /*!< \brief UNICENS is not initialized */
63 /*! \brief Result codes used for asynchronous response */
64 typedef enum Ucs_Result_
66 UCS_RES_SUCCESS = 0x00, /*!< \brief Operation successfully completed */
67 UCS_RES_ERR_MOST_STANDARD = 0x01, /*!< \brief MOST standard error occurred */
68 UCS_RES_ERR_BUSY = 0x02, /*!< \brief Function currently busy */
69 UCS_RES_ERR_PROCESSING = 0x03, /*!< \brief Processing error occurred */
70 UCS_RES_ERR_CONFIGURATION = 0x04, /*!< \brief Configuration error occurred */
71 UCS_RES_ERR_SYSTEM = 0x05, /*!< \brief System error occurred */
72 UCS_RES_ERR_TIMEOUT = 0x06, /*!< \brief Timeout occurred */
73 UCS_RES_ERR_TRANSMISSION = 0x07 /*!< \brief Transmission error occurred */
77 /*! \brief Result values of initialization result callback function */
78 typedef enum Ucs_InitResult_
80 UCS_INIT_RES_SUCCESS = 0x00U, /*!< \brief Initialization succeeded */
81 UCS_INIT_RES_ERR_BUF_OVERFLOW = 0x01U, /*!< \brief No message buffer available */
82 UCS_INIT_RES_ERR_INIC_SYNC = 0x02U, /*!< \brief INIC synchronization failed */
83 UCS_INIT_RES_ERR_INIC_VERSION = 0x03U, /*!< \brief INIC device version check failed */
84 UCS_INIT_RES_ERR_INIC_SYSTEM = 0x04U, /*!< \brief Device attach failed due to an INIC
87 UCS_INIT_RES_ERR_DEV_ATT_CFG = 0x05U, /*!< \brief INIC device attach failed due to an
90 UCS_INIT_RES_ERR_DEV_ATT_PROC = 0x06U, /*!< \brief Device attach failed due to a
93 UCS_INIT_RES_ERR_NET_CFG = 0x07U, /*!< \brief Network Configuration request failed */
94 UCS_INIT_RES_ERR_INTERNAL = 0x0AU, /*!< \brief Internal error occurred */
95 UCS_INIT_RES_ERR_TIMEOUT = 0x0BU /*!< \brief Initialization timeout occurred */
99 /*------------------------------------------------------------------------------------------------*/
101 /*------------------------------------------------------------------------------------------------*/
102 /*! \brief Standard result structure which provides fields for detailed status and
105 typedef struct Ucs_StdResult_
107 Ucs_Result_t code; /*!< \brief Result/Error code */
108 uint8_t *info_ptr; /*!< \brief INIC error data */
109 uint8_t info_size; /*!< \brief Size of the INIC error data in bytes */
113 /*------------------------------------------------------------------------------------------------*/
115 /*------------------------------------------------------------------------------------------------*/
116 /*! \brief Function signature used for UNICENS standard result callbacks
117 * \param result Result of the callback
118 * \param user_ptr User reference provided in \ref Ucs_InitData_t "Ucs_InitData_t::user_ptr"
120 typedef void (*Ucs_StdResultCb_t)(Ucs_StdResult_t result, void *user_ptr);
122 /*! \brief Function signature used for UNICENS standard result callbacks
123 * \param result Result of the callback
124 * \param user_ptr User reference provided in \ref Ucs_InitData_t "Ucs_InitData_t::user_ptr"
126 typedef void (*Ucs_InitResultCb_t)(Ucs_InitResult_t result, void *user_ptr);
132 #endif /* #ifndef UCS_RET_H */
138 /*------------------------------------------------------------------------------------------------*/
140 /*------------------------------------------------------------------------------------------------*/