rename a bunch of configure macros

This commit is contained in:
hathach
2012-12-20 16:56:19 +07:00
parent ec4a3f6048
commit 00b3f48519
12 changed files with 62 additions and 39 deletions

View File

@@ -109,7 +109,7 @@
//#if ( defined CFG_PRINTF_UART || defined CFG_PRINTF_USBCDC || defined CFG_PRINTF_DEBUG )
#if CFG_TUSB_DEBUG_LEVEL
#if TUSB_CFG_DEBUG
#define PRINTF(...) printf(__VA_ARGS__)
#else
#define PRINTF(...)

View File

@@ -35,9 +35,15 @@
* This file is part of the tinyUSB stack.
*/
#include "errors.h"
#if TUSB_CFG_DEBUG == 3
char const* const TUSB_ErrorStr[] = {
# define ERROR_ENUM(x) #x,
# include "errors_def"
# undef ERROR_ENUM
0
};
#endif

View File

@@ -49,6 +49,8 @@
#ifndef _TUSB_ERRORS_H_
#define _TUSB_ERRORS_H_
#include "../tusb_cfg.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -64,8 +66,10 @@ typedef enum {
ERROR_COUNT
}TUSB_Error_t;
/// Enum to String for debugging purposes. Only available if \ref CFG_TUSB_DEBUG_LEVEL > 0
#if TUSB_CFG_DEBUG == 3
/// Enum to String for debugging purposes. Only available if \ref TUSB_CFG_DEBUG > 0
extern char const* const TUSB_ErrorStr[];
#endif
#ifdef __cplusplus
}