nes-proj/cpu/stm32w108/hal/error.h

53 lines
1.0 KiB
C
Raw Normal View History

2010-10-25 09:03:38 +00:00
/**
2014-06-19 12:30:33 +00:00
* @file cpu/stm32w108/hal/error.h
2010-10-25 09:03:38 +00:00
* @brief Return codes for API functions and module definitions.
*
* See @ref status_codes for documentation.
2014-06-19 12:28:13 +00:00
*
2010-10-25 09:03:38 +00:00
* <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
*/
#ifndef ERRORS_H_
#define ERRORS_H_
2010-10-25 09:03:38 +00:00
#ifndef __STSTATUS_TYPE__
#define __STSTATUS_TYPE__
2010-10-25 09:03:38 +00:00
/**
* @brief Return type for St functions.
*/
typedef uint8_t StStatus;
2010-10-25 09:03:38 +00:00
#endif //__STSTATUS_TYPE__
/**
* @addtogroup status_codes
* @{
*/
/**
* @brief Macro used by error-def.h to define all of the return codes.
*
* @param symbol The name of the constant being defined. All St returns
* begin with ST_. For example, ::ST_ERR_FATAL.
2014-06-19 12:28:13 +00:00
*
2010-10-25 09:03:38 +00:00
* @param value The value of the return code. For example, 0x61.
*/
#define DEFINE_ERROR(symbol, value) \
ST_ ## symbol = value,
enum {
#include "error-def.h"
2014-06-19 12:28:13 +00:00
/** Gets defined as a count of all the possible return codes in the
* StZNet stack API.
2010-10-25 09:03:38 +00:00
*/
ST_ERROR_CODE_COUNT
};
#undef DEFINE_ERROR
#endif // ERRORS_H_
2010-10-25 09:03:38 +00:00
/**@} // End of addtogroup
*/