1 /* 2 * Davicom DM9601 USB 1.1 Ethernet Driver. 3 * Copyright (c) 2008, 2011 Siarzhuk Zharski <imker@gmx.li> 4 * Distributed under the terms of the MIT license. 5 */ 6 #ifndef _USB_DAVICOM_SETTINGS_H_ 7 #define _USB_DAVICOM_SETTINGS_H_ 8 9 10 void load_settings(); 11 void release_settings(); 12 void usb_davicom_trace(bool force, const char *func, const char *fmt, ...); 13 14 15 #define TRACE(x...) usb_davicom_trace(false, __func__, x) 16 #define TRACE_ALWAYS(x...) usb_davicom_trace(true, __func__, x) 17 18 19 #ifdef UDAV_TRACE 20 21 extern bool gTraceState; 22 extern bool gTraceRX; 23 extern bool gTraceTX; 24 extern bool gTraceStats; 25 #define TRACE_STATE(x...) usb_davicom_trace(gTraceState, NULL, x) 26 #define TRACE_STATS(x...) usb_davicom_trace(gTraceStats, NULL, x) 27 #define TRACE_RX(x...) usb_davicom_trace(gTraceRX, NULL, x) 28 #define TRACE_TX(x...) usb_davicom_trace(gTraceTX, NULL, x) 29 30 #else 31 32 #define TRACE_STATE(x...) 33 #define TRACE_STATS(x...) 34 #define TRACE_RX(x...) 35 #define TRACE_TX(x...) 36 37 #endif 38 39 40 #endif // _USB_DAVICOM_SETTINGS_H_ 41 42