change error type to lower case for more consistency

change Error Enum to TUSB prefix for more consistency
start to add check for OS configure
This commit is contained in:
hathach
2013-01-19 00:57:58 +07:00
parent d8c8b9e38a
commit cfe7a3d23b
20 changed files with 55 additions and 48 deletions

View File

@@ -81,12 +81,12 @@ extern "C"
}while(0)
//--------------------------------------------------------------------+
// TUSB_Error_t Status Assert
// tusb_error_t Status Assert
//--------------------------------------------------------------------+
#define ASSERT_STATUS_MESSAGE(sts, message) \
do{\
TUSB_Error_t status = (TUSB_Error_t)(sts);\
if (tERROR_NONE != status) {\
tusb_error_t status = (tusb_error_t)(sts);\
if (TUSB_ERROR_NONE != status) {\
_PRINTF("Assert at %s line %d: %s %s\n", ASSERT_FILENAME, ASSERT_FUNCTION, __LINE__, TUSB_ErrorStr[status], message); \
return status;\
}\

View File

@@ -71,6 +71,8 @@
#include "hal/hal.h"
#include "core/tusb_types.h"
#include "core/std_descriptors.h"
#include "osal/osal.h"
/// min value
static inline uint32_t min_of(uint32_t x, uint32_t y) ATTR_ALWAYS_INLINE;

View File

@@ -59,17 +59,17 @@
#define ERROR_STRING(x) #x,
#define ERROR_TABLE(ENTRY) \
ENTRY(tERROR_NONE)\
ENTRY(TUSB_ERROR_NONE)\
ENTRY(tERROR_FAILED)\
/** \enum TUSB_Error_t
/** \enum tusb_error_t
* \brief Error Code returned
*/
typedef enum {
ERROR_TABLE(ERROR_ENUM)
ERROR_COUNT
}TUSB_Error_t;
}tusb_error_t;
#if TUSB_CFG_DEBUG == 3
/// Enum to String for debugging purposes. Only available if \ref TUSB_CFG_DEBUG > 0