Cypress CY4672 Espresso Maker User Manual


 
112 CY4672 Reference Design Guide, Document # 001-16968 Revision **
Software Guide
9.2.1.1 CHidDevice Class Methods
Table 9-1. CHidDeviceClass Methods
Method Type Description
OpenHidDevice() Public This method sets appropriate access rights, attempts to open a han-
dle to the HID device, obtains the top collection data, and makes a
call to setup input, output, and feature data buffers.
CloseHidDevice() Public This method closes the HID device handle, un-registers the HID
device notification, and frees pre-parsed data and data/report buffers.
RegisterHidDevice() Public This method registers the HID device handle for event notification.
IsOpen() Public This method is used to report if a valid handle is open to the HID
device.
IsOpenForRead() Public This method is used to report if the handle open to the HID device
allows for read access.
IsOpenForWrite() Public This method is used to report if the handle open to the HID device
allows for write access.
IsOpenOverlapped() Public This method is used to report if the handle open to the HID device
allows for overlapped I/O.
IsOpenExclusive() Public This method is used to report if the handle open to the HID device is
setup for exclusive access.
GetHandle() Public This method returns the handle to the HID device.
Read() Public This method reads an input report from the HID device, performs a
validity check, and unpacks the report data.
Write() Public This method is used for every report ID, packs a report buffer and
writes the report data to the HID device.
GetFeature() Public This method obtains the feature report from each report ID exposed
by the HID device.
SetFeature() Public This method sends a feature report for each report ID exposed by the
HID device.
UnpackReport() Public This method scans through the HID report and if it can, fills in any
data in the structures.
PackReport() Public This method packages the HID report based on the data in the struc-
tures.
GetManufacturerString() Public This method obtains the USB manufacturer string from the HID
device.
GetProductString() Public This method obtains the USB product string from the HID device.
GetSerialNumberString() Public This method obtains the USB serial number string from the HID
device.
RegGetValue() Public This method attempts to get a registry value from the registry key
where the device-specific configuration information for the HID device
is stored.
RegSetValue() Public This method attempts to set a registry value in the registry key where
the device-specific configuration information for the HID device is
stored.
SetupHidDevice() Protected This method sets up HID Input, Output and Feature data buffers used
to simplify communication with HID devices.
ValidateHidDevice() Protected This method simply returns TRUE, it is expected that this routine will
be overridden by the application where the actual validation will be
handled.
[+] Feedback