EFI SIMPLE POINTER PROTOCOL

From PhoenixWiki

Jump to: navigation, search

Provides services that allow information about a pointer device to be retrieved.

Contents

GUID

#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \
  {0x31878c87,0xb75,0x11d5,0x9a,0x4f,0x0,0x90,0x27,0x3f,0xc1,0x4d}

Protocol Interface Structure

#include EFI_PROTOCOL_CONSUMER(SimplePointer)

extern EFI_GUID gEfiSimplePointerProtocolGuid;
typedef struct _EFI_SIMPLE_POINTER_PROTOCOL {
  EFI_SIMPLE_POINTER_RESET     Reset;
  EFI_SIMPLE_POINTER_GET_STATE GetState;
  EFI_EVENT                    WaitForInput;
  EFI_SIMPLE_POINTER_MODE      *Mode;
} EFI_SIMPLE_POINTER_PROTOCOL;

Members

Member Description
Reset Resets the pointer device.
GetState Retrieves the current state of the pointer device.
WaitForInput Event to use with WaitForEvent() to wait for input from the pointer device.
Mode Pointer to EFI_SIMPLE_POINTER_MODE data.

Description

The EFI_SIMPLE_POINTER_PROTOCOL provides a set of services for a pointer device that can use used as an input device from an application written to this specification. The services include the ability to reset the pointer device, retrieve get the state of the pointer device, and retrieve the capabilities of the pointer device.

Reset()

Resets the pointer device hardware.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_POINTER_RESET) (
  IN EFI_SIMPLE_POINTER_PROTOCOL *This,
  IN BOOLEAN                     ExtendedVerification
  );

Parameters

Parameter Description
This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance.
ExtendedVerification Indicates that the driver may perform a more exhaustive verification operation of the device during reset.

Description
This Reset() function resets the pointer device hardware.

As part of initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning. If the ExtendedVerification flag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible.

The hardware verification process is not defined by this specification and is left up to the platform firmware or driver to implement.

Status Codes Returned

Status Code Description
EFI_SUCCESS The device was reset.
EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset.

GetState()

Retrieves the current state of a pointer device.

Prototype

typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE)
  IN     EFI_SIMPLE_POINTER_PROTOCOL *This,
  IN OUT EFI_SIMPLE_POINTER_STATE    *State
  );

Parameters

Parameter Description
This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance.
State A pointer to the state information on the pointer device.

Description
The GetState() function retrieves the current state of a pointer device. This includes information on the buttons associated with the pointer device and the distance that each of the axes associated with the pointer device has been moved. If the state of the pointer device has not changed since the last call to GetState(), then EFI_NOT_READY is returned. If the state of the pointer device has changed since the last call to GetState(), then the state information is placed in State, and EFI_SUCCESS is returned. If a device error occurs while attempting to retrieve the state information, then EFI_DEVICE_ERROR is returned.

Status Codes Returned

Status Code Description
EFI_SUCCESS The state of the pointer device was returned in State.
EFI_NOT_READY The state of the pointer device has not changed since the last call to GetState().
EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's current state.

Copyright (C) 2008 Phoenix Technologies Ltd. All Rights Reserved. Portions copyright (C) 2008 UEFI Forum, Inc. Used with permission.

Personal tools