Contiki 2.6

error.h

00001 /**
00002  * @file error.h
00003  * @brief Return codes for API functions and module definitions.
00004  *
00005  * See @ref status_codes for documentation.
00006  * 
00007  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved.        -->
00008  */
00009 
00010 #ifndef __ERRORS_H__
00011 #define __ERRORS_H__
00012 
00013 /**
00014  * @brief  Return type for St functions.
00015  */
00016 #ifndef __STSTATUS_TYPE__
00017 #define __STSTATUS_TYPE__
00018   typedef int8u StStatus;
00019 #endif //__STSTATUS_TYPE__
00020 
00021 /**
00022  * @addtogroup status_codes
00023  * @{
00024  */
00025 
00026 /**
00027  * @brief Macro used by error-def.h to define all of the return codes.
00028  *
00029  * @param symbol  The name of the constant being defined. All St returns
00030  *                begin with ST_. For example, ::ST_CONNECTION_OPEN.
00031  * 
00032  * @param value   The value of the return code. For example, 0x61.
00033  */
00034 #define DEFINE_ERROR(symbol, value) \
00035  ST_ ## symbol = value,
00036 
00037 
00038 enum {
00039 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00040 #include "error-def.h"
00041 #endif //DOXYGEN_SHOULD_SKIP_THIS
00042   /** Gets defined as a count of all the possible return codes in the 
00043   * StZNet stack API. 
00044   */
00045   ST_ERROR_CODE_COUNT
00046 
00047 };
00048 
00049 #undef DEFINE_ERROR
00050 
00051 #endif // __ERRORS_H__
00052 
00053 /**@} // End of addtogroup
00054  */
00055  
00056