reactos/drivers/network/dd/nvnet/debug.h
Dmitry Borisov b79fbe2333 [NVNET] Add driver for nForce-based NICs
The driver supports all nVidia chipset models from 2001 until 2010, starting from nForce.
All NICs are compatible with x86 and amd64 devices only.

Tested by Daniel Reimer on OG Xbox and by me on MCP board.

CORE-15872 CORE-16216
2022-04-16 11:54:24 +03:00

44 lines
1.1 KiB
C

/*
* PROJECT: ReactOS nVidia nForce Ethernet Controller Driver
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Debugging support
* COPYRIGHT: Copyright 2021-2022 Dmitry Borisov <di.sean@protonmail.com>
*/
#pragma once
#define MIN_TRACE 0x00000001
#define MAX_TRACE 0x00000003
#if DBG
#ifndef NDEBUG
#define NDIS_DbgPrint(_t_, _x_) \
do { \
if (DbgPrint("(%s:%d) %s ", __FILE__, __LINE__, __FUNCTION__)) \
DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
if (DbgPrint _x_) \
DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
} while(0)
#else
#define NDIS_DbgPrint(_t_, _x_) \
if (_t_ == MAX_TRACE) \
{ \
if (DbgPrint("(%s:%d) %s ", __FILE__, __LINE__, __FUNCTION__)) \
DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
if (DbgPrint _x_) \
DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
}
#endif
#else
#define NDIS_DbgPrint(_t_, _x_)
#define ASSERT_IRQL(x)
#define ASSERT_IRQL_EQUAL(x)
#endif