diff options
| author | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
|---|---|---|
| committer | Dave Wilson <[email protected]> | 2015-03-17 19:50:07 -0700 |
| commit | 97cf5197cf5b882b2c689d8dc2b555f2edf8f418 (patch) | |
| tree | 46f3701832d70b420eb0fc0eb93261f9da45db3f /pofx/WDF/Driver/MultiComp/driver/HwSim.h | |
| parent | ef1905bf1e8825bb31120dfb27e0daf3154d859a (diff) | |
Initial publish
Diffstat (limited to 'pofx/WDF/Driver/MultiComp/driver/HwSim.h')
| -rw-r--r-- | pofx/WDF/Driver/MultiComp/driver/HwSim.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/pofx/WDF/Driver/MultiComp/driver/HwSim.h b/pofx/WDF/Driver/MultiComp/driver/HwSim.h new file mode 100644 index 00000000..f23395a3 --- /dev/null +++ b/pofx/WDF/Driver/MultiComp/driver/HwSim.h @@ -0,0 +1,83 @@ +/*++ + +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 KMDF sample driver for + a multi-component device. + +Environment: + + Kernel mode + +--*/ + +#include "WdfMultiComp.h" + +#if !defined(_HWSIM_H_) +#define _HWSIM_H_ + +NTSTATUS +HwSimInitialize( + _In_ WDFDEVICE Device + ); + +VOID +HwSimD0Entry( + _In_ WDFDEVICE Device + ); + +VOID +HwSimD0Exit( + _In_ WDFDEVICE Device + ); + +VOID +HwSimFStateChange( + _In_ WDFDEVICE Device, + _In_ ULONG Component, + _In_ ULONG State + ); + +ULONG +HwSimReadComponent( + _In_ WDFDEVICE Device, + _In_ ULONG Component + ); + +// +// This structure represents the hardware simulation module's device context +// space +// +typedef struct _HWSIM_CONTEXT { + // + // The following array tracks the F-state for each of the device's + // components. It is used for verification purposes only. + // + ULONG ComponentFState[COMPONENT_COUNT]; + + // + // The following member tracks whether or not the device is in D0. It is + // used for verification purposes only. + // + 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) + +#endif // _HWSIM_H_ |
