summaryrefslogtreecommitdiff
path: root/pofx/UMDF2/Driver/SingleComp/HwSim.h
blob: e884019d7e44a1566c0b699c328ce94a741de092 (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
59
60
61
62
63
/*++

Copyright (c) Microsoft Corporation.  All rights reserved.

    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
    KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
    PURPOSE.

Module Name:

    HwSim.h

Abstract:
    Header file for the hardware simulation module of the UMDF2 sample driver for
    a single-component device.

Environment:

    User mode

--*/

#pragma once

NTSTATUS
HwSimInitialize(
    _In_ WDFDEVICE Device
    );
    
VOID
HwSimD0Entry(
    _In_ WDFDEVICE Device
    );
    
VOID
HwSimD0Exit(
    _In_ WDFDEVICE Device
    );

ULONG
HwSimReadComponent(
    _In_ WDFDEVICE Device
    );

//
// This structure represents the hardware simulation module's device context
// space
//
typedef struct _HWSIM_CONTEXT {
    //
    // The following member tracks whether or not the device is in D0
    //
    BOOLEAN DevicePoweredOn;

    //
    // The following member tracks whether or not we have previously entered the
    // D0 state for this device
    //
    BOOLEAN FirstD0Entry;
} HWSIM_CONTEXT, *PHWSIM_CONTEXT;

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(HWSIM_CONTEXT, HwSimGetDeviceContext)