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:
@@ -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;\
|
||||
}\
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user