1/* 2 * ASIX AX88172/AX88772/AX88178 USB 2.0 Ethernet Driver. 3 * Copyright (c) 2008, 2011 S.Zharski <imker@gmx.li> 4 * Distributed under the terms of the MIT license. 5 * 6 * Heavily based on code of the 7 * Driver for USB Ethernet Control Model devices 8 * Copyright (C) 2008 Michael Lotz <mmlr@mlotz.ch> 9 * Distributed under the terms of the MIT license. 10 * 11 */ 12#ifndef _USB_ASIX_SETTINGS_H_ 13#define _USB_ASIX_SETTINGS_H_ 14 15 16#include <driver_settings.h> 17 18#include "Driver.h" 19 20 21#ifdef _countof 22#warning "_countof(...) WAS ALREADY DEFINED!!! Remove local definition!" 23#undef _countof 24#endif 25#define _countof(array)(sizeof(array) / sizeof(array[0])) 26 27 28void load_settings(); 29void release_settings(); 30 31void usb_asix_trace(bool force, const char *func, const char *fmt, ...); 32 33 34#define TRACE(x...) usb_asix_trace(false, __func__, x) 35#define TRACE_ALWAYS(x...) usb_asix_trace(true, __func__, x) 36 37extern bool gTraceFlow; 38#define TRACE_FLOW(x...) usb_asix_trace(gTraceFlow, NULL, x) 39 40#define TRACE_RET(result) usb_asix_trace(false, __func__, \ 41 "Returns:%#010x\n", result); 42 43 44#endif // _USB_ASIX_SETTINGS_H_ 45