
Mouse
observing packet data on a Listener, a correlation can be made with a USB protocol analyzer. This is useful for debugging data loss since the test mode guarantees packet delivery.
Entry to this test mode can be changed by modifying the macro TESTMODE_BUTTONS in the test- mode.c file. The button macros are defined in the buttons.h file.
3.3.5.4Buttons Module
The buttons module provides an API for handling both the bind and mouse buttons. This module must be changed when adding or removing buttons for a new mouse design. The button portion of the packet payload is formatted by this module and needs to change if more buttons are added. See the Mouse Module on page 42 module for a definition of the packet payload format.
This module manages power configurations that may be implemented to conserve power related to button presses. For example, button polling is turned off and interrupts are used to detect button presses in the idle state. It also manages the acquisition of button information depending on the implementation: interrupts or polling.
When changes in a button state are detected, the mouse module is notified for collection and report- ing of the data. Note It is important for the buttons module to always report the button state when a button is pressed. This condition frequently occurs when the mouse is moved with the button held down.
3.3.5.5Mfgtest Module
The manufacturing test module may be optionally compiled in, at the expense of code space, by defining the macro MFG_TEST_CODE. In addition, a more complete version may be compiled in by defining MFG_TX_MODES. The TX modes include code to perform a carrier test as well as a ran- dom data test.
The manufacturing test code is designed to be compatible with the CY3631 Manufacturing Test Kit Tester. Entry into this mode on the mouse is performed by placing a shorting block over pins four and five of the ISSP programming header and then inserting the batteries. The test mode may only be exited by removing the batteries and shorting block. For more information on how to use this test mode, refer to the CY3631 Manufacturing Test Kit documentation.
It is recommended that you not make changes to this module unless similar changes are made to the CY3631 Tester.
3.3.5.6Wheel Module
The wheel module implements the functionality of the
When the
44 | CY4672 Reference Design Guide, Document # |
[+] Feedback