Skip to content

Commit ed106b7

Browse files
author
Bogdan Marinescu
committed
Merge branch 'master' of github.com:mbedmicro/mbed
2 parents bb3d95e + 170ac65 commit ed106b7

19 files changed

+1373
-170
lines changed

libraries/USBHost/USBHost/USBHostConf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#define USBHOST_MOUSE 1
5050

5151
/*
52-
* Enable USBHostSerial
52+
* Enable USBHostSerial or USBHostMultiSerial (if set > 1)
5353
*/
5454
#define USBHOST_SERIAL 1
5555

libraries/USBHost/USBHost/dbg.h

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,35 @@
1818
#define USB_DEBUG_H
1919

2020
//Debug is disabled by default
21-
#define DEBUG 0
21+
#define DEBUG 3 /*INFO,ERR,WARN*/
2222
#define DEBUG_TRANSFER 0
2323
#define DEBUG_EP_STATE 0
2424
#define DEBUG_EVENT 0
2525

26-
#if (DEBUG)
26+
#if (DEBUG > 3)
2727
#define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
2828
#else
2929
#define USB_DBG(x, ...)
3030
#endif
3131

32+
#if (DEBUG > 2)
33+
#define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
34+
#else
35+
#define USB_INFO(x, ...)
36+
#endif
37+
38+
#if (DEBUG > 1)
39+
#define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
40+
#else
41+
#define USB_WARN(x, ...)
42+
#endif
43+
44+
#if (DEBUG > 0)
45+
#define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
46+
#else
47+
#define USB_ERR(x, ...)
48+
#endif
49+
3250
#if (DEBUG_TRANSFER)
3351
#define USB_DBG_TRANSFER(x, ...) std::printf("[USB_TRANSFER: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
3452
#else
@@ -41,9 +59,6 @@
4159
#define USB_DBG_EVENT(x, ...)
4260
#endif
4361

44-
#define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
45-
#define USB_WARN(x, ...) std::printf("[USB_WARNING: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
46-
#define USB_ERR(x, ...) std::printf("[USB_ERR: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
4762

4863
#endif
4964

0 commit comments

Comments
 (0)