summaryrefslogtreecommitdiff
path: root/serial/VirtualSerial2/internal.h
blob: 82c149e39a774f6a87dde31da6f19eccc897e99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*++

Copyright (C) Microsoft Corporation, All Rights Reserved

Module Name:

    Internal.h

Abstract:

    This module contains the local type definitions for the VirtualSerial
    driver sample.

Environment:

    Windows Driver Framework

--*/

#pragma once

#ifdef _KERNEL_MODE
#include <ntddk.h>
#else
#include <windows.h>
#endif

#include <wdf.h>

#define _NTDEF_

//
// Include the type specific headers.
//
#include "serial.h"
#include "driver.h"
#include "device.h"
#include "ringbuffer.h"
#include "queue.h"

//
// Tracing and Assert
//

#define Trace(level, _fmt_, ...)                    \
    DbgPrintEx(DPFLTR_DEFAULT_ID, level,            \
                _fmt_ "\n", __VA_ARGS__)

#define TRACE_LEVEL_ERROR   DPFLTR_ERROR_LEVEL
#define TRACE_LEVEL_INFO    DPFLTR_INFO_LEVEL

#ifndef ASSERT
#define ASSERT(exp) {                               \
    if (!(exp)) {                                   \
        RtlAssert(#exp, __FILE__, __LINE__, NULL);  \
    }                                               \
}
#endif