Can I use the USB HID mouse example provided by Silicon Labs (AN249) in a Windows CE (WinCE) environment?
Answer
Yes. Windows CE provides native support for the USB HID class, so it is possible to connect a USB mouse device designed around the USB C8051Fxxx families if the proper HID firmware is implemented in the device.
Silicon Labs provides a complete example of a USB mouse implementation. After installing the contents of the Development Kit CD, the USB mouse example can be found in the Examples directory under the appropriate C8051Fxxx devices. For example, for a C8051F340, the example cound be found in this directory (with a default installation of the Silicon Labs IDE):
Please note the following information from Microsoft regarding mouse and keyboard functionality in WinCE 4.2 and above:
SYSGEN_USB_HID no longer used for keyboard and mouse functionality
Projects created prior to Windows CE .NET version 4.2 that included the USB HID component have the SYSGEN_USB_HID variable set. As of Windows CE .NET version 4.2, this variable no longer brings in keyboard and mouse functionality. This functionality can be achieved by setting SYSGEN_USB_HID_CLIENTS=1, SYSGEN_USB_HID_KEYBOARD=1, or SYSGEN_USB_HID_MOUSE=1.
For more information please check the file attached to this article: WINCE_NET_V42_ReleaseNotes.pdf.
USB Mouse Example and WinCE