118
CY4636 WirelessUSB™ LP Keyboard Mouse Reference Design Kit User Guide, Doc. # 001-70355 Rev. *A
Table A-11. CHidManagerClass Methods
Method
Type
Description
Create()
Public
This method creates an invisible window and uses the returned
window handle to register for HID device notification events, then it
creates a list of existing HID devices that are maintained by the
HID
manager.
IsHidDevicePresent()
Public
This method attempts to open a handle to the HID device to deter-
mine if it is present (or not) and returns the result
RefreshHidDevices()
Public
This method validates that all HID devices in the list are still pres-
ent, removes those from the list that are currently not present,
scans the list of all existing HID devices present, and then attempts
to add the existing HID devices to the list
GetDeviceCount()
Public
This method returns the number of connected devices
GetFirstHidDevice()
Public
This method returns a pointer to the first HID device in the list
GetNextHidDevice()
Public
This method returns a pointer to the next HID device in the list
GetCurrentHidDevice()
Public
This method returns a pointer to the current HID device in the list
GetHidDeviceWithPath()
Public
This method scans the current list of HID devices and returns a
pointer to the HID device that matches the device path provided
GetHidDeviceWithHandle()
Public
This method scans the current list of HID devices and returns a
pointer to the HID device that matches the device handle provided
HidDeviceAlreadyExists()
Public
This method determines if the HID device already exists in the list
AddHidDevice()
Public
This method checks if the provided HID device already exists, and
if
not, adds the new HID device to the end of the list, increments the
HID device counter, and call the HID callback function to indicate a
new HID device was added
RemoveHidDevice()
Public
This method scans though all HID devices in the list and removes
them
RemoveAllHidDevices()
Public
This method sends a feature report for each report ID exposed by
the HID device.
CreateUniqueDeviceID()
Public
This method attempts to create and maintain a unique ID for the
associated HID device
FreeUniqueDeviceID()
Public
This method frees the specified unique ID
NewHidDevice()
Protected This method allocates memory for a new HID device structure
DeleteHidDevice()
Protected
This method deletes previously allocated memory for an existing
HID device structure
RegisterHidNotification()
Protected
This method registers for notification of events for all HID devices
and calls HID callback function to indicate registration was com-
pleted
HidDeviceArrival()
Protected
This method makes sure the HID device does not already exist in
the list, and then creates a new HID device, opens a handle to the
device, adds the new HID device to the list, and registers event
notification for this new HID device