Mouse
In the PRoC RDK mouse design, the master SPI communicates with both the radio and optical sen- sor. Because the optical sensor does not supports
3.3.4.4Radio Driver
The radio driver module is a low level module providing basic radio communication and configura- tion. Its general application is such that it is likely not to be changed by the firmware developer. It provides an interface for reading/writing radio registers, setting PN codes and initialization of the radio and transmitting or receiving packets. See the PRoC LP Radio Driver documentation for details.
3.3.4.5Protocol Module
The protocol module defines and implements the layer used to deliver packets from the device to the bridge. It manages the binding of devices to a bridge as well as the connection and interference immunity by channel hopping. This module has a dependency on the Radio Driver for sending for- matted packets and the flash module for storing the manufacturing ID of the bridge the device is bound to.
3.3.4.6Flash Module
The flash module is a smaller version of E2PROM module provided in PSoC Designer. It is limited in functionality and only implements the read/write routines required by the device. The flashsecurity.txt file must be modified so that the block being modified by this module is given read/write privilege, such as unprotected. Currently the very top most block in flash is used for this module.
3.3.4.7Port Module
GPIO pins on the PRoC LP ports can be configured as outputs with a pull up resistor. This is the case for mouse buttons and the Bind button. In order to activate the pull up, a data value of one must be written to the port data latch for the pin. This feature presents a problem when performing a read-
3.3.4.8Poll Module
The poll module manages the timing, enabling/disabling and polling of the mouse buttons and z- wheel inputs. When the mouse is active, polling is enabled and occurs at a rate of about 250 µs for the
3.3.4.9Timer Module
The PRoC LP has an internal low power oscillator (ILO) that is used for generating a clock to a Pro- grammable Interval Timer. This clock is affected by voltage and temperature and may drift over time. This module provides an interface to calibrate this clock to the system clock. The Programmable Interval Timer period is calibrated to be approximately 250 µs. Be especially careful when changing this period since the poll/debounce modules are coupled to this time value; see Poll Module and the Debounce Module on page 40.
The timer module also provides a set of functions for performing busy waits in the microsecond res- olution. For more coarse timing requirements, an API is provided for millisecond delays. The milli- second delay routines must be used as often as possible to provide for better power consumption
CY4672 Reference Design Guide, Document # | 41 |
[+] Feedback