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/UMDF2/Driver/SingleComp/driver.h | |
| parent | ef1905bf1e8825bb31120dfb27e0daf3154d859a (diff) | |
Initial publish
Diffstat (limited to 'pofx/UMDF2/Driver/SingleComp/driver.h')
| -rw-r--r-- | pofx/UMDF2/Driver/SingleComp/driver.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/pofx/UMDF2/Driver/SingleComp/driver.h b/pofx/UMDF2/Driver/SingleComp/driver.h new file mode 100644 index 00000000..a707792a --- /dev/null +++ b/pofx/UMDF2/Driver/SingleComp/driver.h @@ -0,0 +1,85 @@ +/*++ + +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: + + Driver.h + +Abstract: + Header file for the UMDF2 sample driver for a single-component device. + +Environment: + + User mode + +--*/ + +#define QUEUE_COUNT 3 + +// +// This structure represents the driver's device context space +// +typedef struct _FDO_DATA +{ + // + // Tracks the active/idle state of the component + // + BOOLEAN IsActive; +} FDO_DATA, *PFDO_DATA; + +WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(FDO_DATA, FdoGetContext) + +// +// Driver's UMDF2 callbacks +// + +DRIVER_INITIALIZE DriverEntry; + +EVT_WDF_DRIVER_DEVICE_ADD SingleCompEvtDeviceAdd; +EVT_WDF_OBJECT_CONTEXT_CLEANUP SingleCompEvtDriverCleanup; + +EVT_WDF_DEVICE_D0_ENTRY SingleCompEvtDeviceD0Entry; +EVT_WDF_DEVICE_D0_EXIT SingleCompEvtDeviceD0Exit; + +EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL SingleCompEvtIoDeviceControl; + +// +// Helper functions +// + +NTSTATUS +AssignS0IdleSettings( + _In_ WDFDEVICE Device + ); + +// +// Define the tracing flags. +// +#define WPP_CONTROL_GUIDS \ + WPP_DEFINE_CONTROL_GUID( \ + MyDriverTraceControl, (f9eb5c3a,c292,4c69,8b52,ccf043c25ab0), \ + \ + WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \ + ) + +#define WPP_FLAGS_LEVEL_LOGGER(flag, level) \ + WPP_LEVEL_LOGGER(flag) + +#define WPP_FLAGS_LEVEL_ENABLED(flag, level) \ + (WPP_LEVEL_ENABLED(flag) && \ + WPP_CONTROL(WPP_BIT_ ## flag).Level >= level) + +// +// This comment block is scanned by the trace preprocessor to define our +// Trace function. +// +// begin_wpp config +// FUNC Trace{FLAGS=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...); +// end_wpp +// |
