4 * \brief Status code definitions.
\r
6 * This file defines various status codes returned by functions,
\r
7 * indicating success or failure as well as what kind of failure.
\r
9 * Copyright (c) 2011-2013 Atmel Corporation. All rights reserved.
\r
11 * \asf_license_start
\r
15 * Redistribution and use in source and binary forms, with or without
\r
16 * modification, are permitted provided that the following conditions are met:
\r
18 * 1. Redistributions of source code must retain the above copyright notice,
\r
19 * this list of conditions and the following disclaimer.
\r
21 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
22 * this list of conditions and the following disclaimer in the documentation
\r
23 * and/or other materials provided with the distribution.
\r
25 * 3. The name of Atmel may not be used to endorse or promote products derived
\r
26 * from this software without specific prior written permission.
\r
28 * 4. This software may only be redistributed and used in connection with an
\r
29 * Atmel microcontroller product.
\r
31 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
\r
32 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
33 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
\r
34 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
\r
35 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
\r
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
\r
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
\r
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
\r
40 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\r
41 * POSSIBILITY OF SUCH DAMAGE.
\r
47 #ifndef STATUS_CODES_H_INCLUDED
\r
48 #define STATUS_CODES_H_INCLUDED
\r
50 /* Note: this is a local workaround to avoid a pre-processor clash due to the
\r
51 * lwIP macro ERR_TIMEOUT. */
\r
52 #if defined(__LWIP_ERR_H__) && defined(ERR_TIMEOUT)
\r
53 #if (ERR_TIMEOUT != -3)
\r
55 /* Internal check to make sure that the later restore of lwIP's ERR_TIMEOUT
\r
56 * macro is set to the correct value. Note that it is highly improbable that
\r
57 * this value ever changes in lwIP. */
\r
58 #error ASF developers: check lwip err.h new value for ERR_TIMEOUT
\r
64 * Status code that may be returned by shell commands and protocol
\r
67 * \note Any change to these status codes and the corresponding
\r
68 * message strings is strictly forbidden. New codes can be added,
\r
69 * however, but make sure that any message string tables are updated
\r
73 STATUS_OK = 0, //!< Success
\r
74 STATUS_ERR_BUSY = 0x19,
\r
75 STATUS_ERR_DENIED = 0x1C,
\r
76 STATUS_ERR_TIMEOUT = 0x12,
\r
77 ERR_IO_ERROR = -1, //!< I/O error
\r
78 ERR_FLUSHED = -2, //!< Request flushed from queue
\r
79 ERR_TIMEOUT = -3, //!< Operation timed out
\r
80 ERR_BAD_DATA = -4, //!< Data integrity check failed
\r
81 ERR_PROTOCOL = -5, //!< Protocol error
\r
82 ERR_UNSUPPORTED_DEV = -6, //!< Unsupported device
\r
83 ERR_NO_MEMORY = -7, //!< Insufficient memory
\r
84 ERR_INVALID_ARG = -8, //!< Invalid argument
\r
85 ERR_BAD_ADDRESS = -9, //!< Bad address
\r
86 ERR_BUSY = -10, //!< Resource is busy
\r
87 ERR_BAD_FORMAT = -11, //!< Data format not recognized
\r
88 ERR_NO_TIMER = -12, //!< No timer available
\r
89 ERR_TIMER_ALREADY_RUNNING = -13, //!< Timer already running
\r
90 ERR_TIMER_NOT_RUNNING = -14, //!< Timer not running
\r
93 * \brief Operation in progress
\r
95 * This status code is for driver-internal use when an operation
\r
96 * is currently being performed.
\r
98 * \note Drivers should never return this status code to any
\r
99 * callers. It is strictly for internal use.
\r
101 OPERATION_IN_PROGRESS = -128,
\r
104 typedef enum status_code status_code_t;
\r
106 #if defined(__LWIP_ERR_H__)
\r
107 #define ERR_TIMEOUT -3
\r
110 #endif /* STATUS_CODES_H_INCLUDED */
\r