Simple USBHost library for STM32F746NG Discovery board. Only either the Fastspeed or the Highspeed port can be used( not both together)
Dependents: DISCO-F746NG_USB_Host
Fork of KL46Z-USBHost by
Diff: USBHost/dbg.h
- Revision:
- 24:5396b6a93262
- Parent:
- 18:61554f238584
--- a/USBHost/dbg.h Sun May 01 03:18:11 2016 +0000 +++ b/USBHost/dbg.h Mon Jun 13 17:21:07 2016 +0000 @@ -18,6 +18,8 @@ #define USB_DEBUG_H //Debug is disabled by default +#define DEBUG 1 + #ifndef DEBUG #define DEBUG 3 /*INFO,ERR,WARN*/ #endif @@ -32,7 +34,7 @@ #define USB_DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);fprintf(stderr,"\r\n");} while(0); //#define USB_DBG(x, ...) std::printf("[USB_DBG: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); #define USB_DBG_HEX(A,B) debug_hex(A,B) -extern void debug_hex(uint8_t* buf, int size); +extern void debug_hex(unsigned char* buf, int size); #define USB_DBG_ERRSTAT() report.print_errstat(); #else #define USB_DBG(x, ...) @@ -48,7 +50,7 @@ #if (DEBUG > 2) #define USB_INFO(...) do{fprintf(stderr,__VA_ARGS__);fprintf(stderr,"\r\n");}while(0); -//#define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); +//#define USB_INFO(x, ...) std::printf("[USB_INFO: %s:%d]" x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);New Mouse device: #else #define USB_INFO(x, ...) #endif