summaryrefslogtreecommitdiff
path: root/tinyusb/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-01-19 00:57:58 +0700
committerhathach <[email protected]>2013-01-19 00:57:58 +0700
commitcfe7a3d23b4639c3578b166fc865450bc439d82c (patch)
tree7a831618538324b04bfd9e0f918a78a0aea92b34 /tinyusb/common
parentd8c8b9e38ad94ab84c24f22c2ecb79ce4d78b7ba (diff)
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
Diffstat (limited to 'tinyusb/common')
-rw-r--r--tinyusb/common/assertion.h6
-rw-r--r--tinyusb/common/common.h2
-rw-r--r--tinyusb/common/errors.h6
3 files changed, 8 insertions, 6 deletions
diff --git a/tinyusb/common/assertion.h b/tinyusb/common/assertion.h
index cf99622d8..1891e83f2 100644
--- a/tinyusb/common/assertion.h
+++ b/tinyusb/common/assertion.h
@@ -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;\
}\
diff --git a/tinyusb/common/common.h b/tinyusb/common/common.h
index 1aae86fe8..51ba07f97 100644
--- a/tinyusb/common/common.h
+++ b/tinyusb/common/common.h
@@ -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;
diff --git a/tinyusb/common/errors.h b/tinyusb/common/errors.h
index ae3d4a7cb..aa373e357 100644
--- a/tinyusb/common/errors.h
+++ b/tinyusb/common/errors.h
@@ -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