EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.h

Go to the documentation of this file.
00001 
00015 #ifndef __PS2MOUSEABSOLUTEPOINTER_H__
00016 #define __PS2MOUSEABSOLUTEPOINTER_H__
00017 
00018 #include <FrameworkDxe.h>
00019 
00020 #include <Protocol/AbsolutePointer.h>
00021 #include <Protocol/IsaIo.h>
00022 #include <Protocol/DevicePath.h>
00023 
00024 #include <Library/DebugLib.h>
00025 #include <Library/UefiDriverEntryPoint.h>
00026 #include <Library/UefiLib.h>
00027 #include <Library/BaseMemoryLib.h>
00028 #include <Library/MemoryAllocationLib.h>
00029 #include <Library/UefiBootServicesTableLib.h>
00030 #include <Library/ReportStatusCodeLib.h>
00031 
00032 //
00033 // Global Variables
00034 //
00035 extern EFI_DRIVER_BINDING_PROTOCOL   gPS2MouseAbsolutePointerDriver;
00036 extern EFI_COMPONENT_NAME_PROTOCOL   gPs2MouseAbsolutePointerComponentName;
00037 extern EFI_COMPONENT_NAME2_PROTOCOL  gPs2MouseAbsolutePointerComponentName2;
00038 
00039 //
00040 // PS/2 mouse sample rate
00041 //
00042 typedef enum {
00043   SampleRate10,
00044   SampleRate20,
00045   SampleRate40,
00046   SampleRate60,
00047   SampleRate80,
00048   SampleRate100,
00049   SampleRate200,
00050   MaxSampleRate
00051 } MOUSE_SR;
00052 
00053 //
00054 // PS/2 mouse resolution
00055 //
00056 typedef enum {
00057   MouseResolution1,
00058   MouseResolution2,
00059   MouseResolution4,
00060   MouseResolution8,
00061   MaxResolution
00062 } MOUSE_RE;
00063 
00064 //
00065 // PS/2 mouse scaling
00066 //
00067 typedef enum {
00068   Scaling1,
00069   Scaling2
00070 } MOUSE_SF;
00071 
00072 //
00073 // Driver Private Data
00074 //
00075 #define PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE SIGNATURE_32 ('p', '2', 's', 't')
00076 
00077 typedef struct {
00078   UINTN                               Signature;
00079 
00080   EFI_HANDLE                          Handle;
00081   EFI_ABSOLUTE_POINTER_PROTOCOL       AbsolutePointerProtocol;
00082   EFI_ABSOLUTE_POINTER_STATE          State;
00083   EFI_ABSOLUTE_POINTER_MODE           Mode;
00084   BOOLEAN                             StateChanged;
00085 
00086   //
00087   // PS2 Mouse device specific information
00088   //
00089   MOUSE_SR                            SampleRate;
00090   MOUSE_RE                            Resolution;
00091   MOUSE_SF                            Scaling;
00092   UINT8                               DataPackageSize;
00093 
00094   EFI_ISA_IO_PROTOCOL                 *IsaIo;
00095 
00096   EFI_EVENT                           TimerEvent;
00097 
00098   EFI_UNICODE_STRING_TABLE            *ControllerNameTable;
00099   EFI_DEVICE_PATH_PROTOCOL            *DevicePath;
00100 } PS2_MOUSE_ABSOLUTE_POINTER_DEV;
00101 
00102 #define PS2_MOUSE_ABSOLUTE_POINTER_DEV_FROM_THIS(a)  CR (a, PS2_MOUSE_ABSOLUTE_POINTER_DEV, AbsolutePointerProtocol, PS2_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE)
00103 
00104 //
00105 // Function prototypes
00106 //
00121 EFI_STATUS
00122 EFIAPI
00123 PS2MouseAbsolutePointerDriverSupported (
00124   IN EFI_DRIVER_BINDING_PROTOCOL    *This,
00125   IN EFI_HANDLE                     Controller,
00126   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath
00127   );
00128 
00144 EFI_STATUS
00145 EFIAPI
00146 PS2MouseAbsolutePointerDriverStart (
00147   IN EFI_DRIVER_BINDING_PROTOCOL    *This,
00148   IN EFI_HANDLE                     Controller,
00149   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath
00150   );
00151 
00166 EFI_STATUS
00167 EFIAPI
00168 PS2MouseAbsolutePointerDriverStop (
00169   IN EFI_DRIVER_BINDING_PROTOCOL   *This,
00170   IN EFI_HANDLE                    Controller,
00171   IN UINTN                         NumberOfChildren,
00172   IN EFI_HANDLE                    *ChildHandleBuffer
00173   );
00174 
00175 //
00176 // EFI Component Name Functions
00177 //
00217 EFI_STATUS
00218 EFIAPI
00219 Ps2MouseAbsolutePointerComponentNameGetDriverName (
00220   IN  EFI_COMPONENT_NAME_PROTOCOL  *This,
00221   IN  CHAR8                        *Language,
00222   OUT CHAR16                       **DriverName
00223   );
00224 
00225 
00294 EFI_STATUS
00295 EFIAPI
00296 Ps2MouseAbsolutePointerComponentNameGetControllerName (
00297   IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,
00298   IN  EFI_HANDLE                                      ControllerHandle,
00299   IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,
00300   IN  CHAR8                                           *Language,
00301   OUT CHAR16                                          **ControllerName
00302   );
00303 
00315 EFI_STATUS
00316 EFIAPI
00317 MouseAbsolutePointerReset (
00318   IN EFI_ABSOLUTE_POINTER_PROTOCOL  *This,
00319   IN BOOLEAN                        ExtendedVerification
00320   );
00321 
00332 EFI_STATUS
00333 EFIAPI
00334 MouseAbsolutePointerGetState (
00335   IN EFI_ABSOLUTE_POINTER_PROTOCOL  *This,
00336   IN OUT EFI_ABSOLUTE_POINTER_STATE   *State
00337   );
00338 
00348 VOID
00349 EFIAPI
00350 MouseAbsolutePointerWaitForInput (
00351   IN  EFI_EVENT               Event,
00352   IN  VOID                    *Context
00353   );
00354 
00363 VOID
00364 EFIAPI
00365 PollMouseAbsolutePointer (
00366   IN EFI_EVENT  Event,
00367   IN VOID       *Context
00368   );
00369 
00379 EFI_STATUS
00380 In8042Data (
00381   IN EFI_ISA_IO_PROTOCOL                  *IsaIo,
00382   IN OUT UINT8                            *Data
00383   );
00384 
00394 BOOLEAN
00395 CheckMouseAbsolutePointerConnect (
00396   IN  PS2_MOUSE_ABSOLUTE_POINTER_DEV     *MouseAbsolutePointerDev
00397   );
00398 
00399 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines