Cypress CY4672 Espresso Maker User Manual


 
CY4672 Reference Design Guide, Document # 001-16968 Revision ** 45
Mouse
When z-wheel motion is detected, the mouse module is notified for collection and reporting of the
data; see Mouse Module on page 42.
3.3.5.7 Battery Module
The battery monitor circuit is implemented using the Low Voltage Interrupt (LVI) on the LP radio. Fol-
lowing is an explanation of the process to measure the battery voltage.
The process first sets the LVI threshold to 1.8V and then checks for an LVI interrupt. If the interrupt
does not occur then it repeatedly sets the LVI TH and PMU OUTV with the following combination
and checks the status.
It then returns a battery level between 1 and 10: 1 being below 1.8V and 10 being above 2.7 volts.
3.3.6 Configuration Options
All configuration options for the application can be found in the config.h file, and some of them are
defined in the Project > Setting > Compiler > Macro defines. Each option is explained below and can
be changed to values that meet the developer’s needs.
3.3.6.1 MOUSE_REPORT_IN_MS
This configuration value sets the shortest period at which the firmware honors events from the
mouse hardware to transmit using the radio. The default value is approximately 10 milliseconds. Set-
ting this value to something smaller than the USB poll period of 8 milliseconds 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 on page 41 for a description of timing accuracy.
This valued is defined in milliseconds.
3.3.6.2 MOUSE_ACTIVE_MS
This value sets how long the timer module runs generating poll interrupts for the z-wheel and but-
tons. This time affects power consumption of the mouse. Once this time expires, the buttons and z-
wheel go into a power down state, improving battery life. In power down state, z-wheel movement
exhibits latency. See the Buttons Module and Wheel Module on page 44 for descriptions of power
down states and operation. This value is defined in milliseconds.
3.3.6.3 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 voltage of 1.8 V, the radio and optical sensor are
prevented from turning on.
3.3.6.4 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.
Table 3-2. LVI TH and PMU OUTV Combinations
LVI TH PMU OUTV VOLTAGE IF INTERRUPT OCCURS
1.8V 2.7V < 1.8V
2.0V 2.7V < 2.0V
2.2V 2.7V < 2.2V
PMU OUTV 2.7V < 2.7V
[+] Feedback