CY4636 WirelessUSB™ LP Keyboard Mouse Reference Design Kit User Guide, Doc. # 001-70355 Rev. *A
73
Code Examples
5.2.3.3
Configuration Options
All configuration options for the application can be found in the config.h file. Each item is explained
below and can be changed to values that meet the developer's requirements.
MOUSE_REPORT_IN_MS.
This configuration value sets the shortest period at which the firmware
will honor events from the mouse hardware to transmit using the radio. The default value is approxi-
mately 10 milliseconds. Setting this value to something smaller than the USB poll period of 8 milli-
seconds generates excessive radio retries from the mouse and is not recommended. Larger values
improve battery life, but may affect usability of the mouse. See the timer module for a description of
timing accuracy. This valued is defined in milliseconds.
MOUSE_ACTIVE_MS.
This value sets how long the timer module runs generating poll interrupts for
the z-wheel and buttons. This time affects power consumption of the mouse. Once this time expires,
the buttons and zwheel go into a power down state, improving battery life. In power down state, z-
wheel movement exhibits latency. See the button/wheel modules for descriptions of power down
states and operation. This value is defined in milliseconds.
MOUSE_DISCONNECTED_POLL_MS.
Sets the rate at which the battery voltage is monitored
while in the disconnected state. This ensures that if the batteries go below the minimum battery volt-
age of 1.8 V, the radio and optical sensor are prevented from turning on.
MOUSE_TX_TIMEOUT_MS.
The transmit loop in the mouse attempts to guarantee delivery of
mouse events. This loop eventually times out if it does not receive a response from the bridge. This
value sets that time-out time. The default value is 2000. This value is defined in milliseconds.
PLATFORM_H.
This configuration value identifies the header file that has the platform configuration
information. The default value is pdc9302.h, which is the identifier for the mouse board that is
shipped with the RDK. This macro changes when the code is ported to another platform.
MOUSE_800_NOT_400_CPI.
This configuration definition is used to select between 800 or 400
counts per inch (cpi) when configuring the optical chip. If it is defined then 800 cpi is selected. If it not
defined then 400 cpi is selected. The default is 800 cpi.
MOUSE_BATTERY_STATUS.
Enabling this feature causes the battery level measurement code to
be compiled into the mouse image. The ADC block must be configured properly in the PSoC
Designer layout. The mouse then measures the battery level and reports any changes to the bridge.
Notification of the battery level is done at the following events: the battery level changes, the mouse
transitions from the idle state to the active state, mouse transitions from the disconnected state to
the connected state.
MOUSE_TEST_MODE.
This configuration definition is used to selectively compile code for mouse
test mode. If this value is defined, then the test mode is compiled into the executable image. The test
mode moves the mouse in a fashion to repeatedly draw the letters 'LP' in a drawing program. Mouse
acceleration or advanced motion must be turned off when performing this test. See the testmode
module for more information on entering this test mode.
MFG_TEST_CODE.
This configuration definition is used to selectively compile in the manufacturing
test code. The manufacturing test code in this mouse is compatible with the CY3631 Manufacturing
Test Kit offered by Cypress Semiconductor. See the mfgtest module for a description of how this test
mode is executed. See the CY3631 Manufacturing Test Kit documentation for a description of the
test operation.