OpenNet
Hardware_WDF.h
Aller à la documentation de ce fichier.
1 
2 // Product OpenNet
3 
8 
9 #pragma once
10 
11 // Includes
13 
14 // ===== Includes ===========================================================
15 #include <OpenNetK/OSDep.h>
16 #include <OpenNetK/SpinLock.h>
17 
18 namespace OpenNetK
19 {
20  class Hardware;
21 
22  // Class
24 
36  {
37 
38  public:
39 
51  NTSTATUS Init(WDFDEVICE aDevice, Hardware * aHardware);
52 
62  NTSTATUS D0Entry(WDF_POWER_DEVICE_STATE aPreviousState);
63 
73  NTSTATUS D0Exit(WDF_POWER_DEVICE_STATE aTargetState);
74 
86  NTSTATUS PrepareHardware(WDFCMRESLIST aRaw, WDFCMRESLIST aTranslated);
87 
97  NTSTATUS ReleaseHardware(WDFCMRESLIST aTranslated);
98 
99  //internal:
100 
101  NTSTATUS Interrupt_Disable ();
102  NTSTATUS Interrupt_Enable ();
103  BOOLEAN Interrupt_Isr (ULONG aMessageId);
104  void Interrupt_Dpc ();
105 
106  void Tick();
107 
108  void TrigProcess2();
109 
110  void Work();
111 
112  private:
113 
114  void InitTimer();
115  void InitWorkItem();
116 
117  NTSTATUS PrepareInterrupt(CM_PARTIAL_RESOURCE_DESCRIPTOR * aTranslated, CM_PARTIAL_RESOURCE_DESCRIPTOR * aRaw);
118  NTSTATUS PrepareMemory (CM_PARTIAL_RESOURCE_DESCRIPTOR * aTranslated);
119 
120  WDFCOMMONBUFFER mCommonBuffer;
121  WDFDEVICE mDevice ;
122  WDFDMAENABLER mDmaEnabler ;
123  Hardware * mHardware ;
124  OpenNetK_OSDep mOSDep ;
125 
126  unsigned int mIntCount ;
127  WDFINTERRUPT mInterrupt;
128 
129  unsigned int mMemCount;
130  unsigned int mMemSize_byte[6];
131  void * mMem_MA [6];
132 
133  WDFTIMER mTimer;
134 
135  WDFWORKITEM mWorkItem;
136 
137  // ===== Zone 0 =====================================================
138  SpinLock mZone0;
139 
140  };
141 
142 }
Cette structure contient des pointeurs vers les fonctions qui dependes du systeme d'exploitation...
Definition: OSDep.h:178
La class Hardware_WDF (DDK, Windows seulement)
Definition: Hardware_WDF.h:35
OpenNetK_OSDep.
OpenNetK::SpinLock.
NTSTATUS PrepareHardware(WDFCMRESLIST aRaw, WDFCMRESLIST aTranslated)
Preparer le meteriel.
Interface d'un spinlock.
Definition: SpinLock.h:36
Cette classe déclare l'interface du materiel.
Definition: Hardware.h:37
NTSTATUS ReleaseHardware(WDFCMRESLIST aTranslated)
Relacher le materiel.
Definition: Adapter.h:26
NTSTATUS D0Entry(WDF_POWER_DEVICE_STATE aPreviousState)
Entrer dans l'etat D0.
NTSTATUS Init(WDFDEVICE aDevice, Hardware *aHardware)
Initialise l'instance.
NTSTATUS D0Exit(WDF_POWER_DEVICE_STATE aTargetState)
Sortir de l'état D0.