![Cypress CY4636 Скачать руководство пользователя страница 47](http://html.mh-extra.com/html/cypress/cy4636/cy4636_user-manual_2705993047.webp)
CY4636 WirelessUSB™ LP Keyboard Mouse Reference Design Kit User Guide, Doc. # 001-70355 Rev. *A
47
5.
Code Examples
All code examples are available at:
<Intalled_directory>\Cypress\CY4636 WirelessUSB LP RDK\<ver>\Firmware\
5.1
Project1- LP_RDK_Bridge
5.1.1
Project Description
This code example demonstrates the various features and functions offered by the bridge. The
bridge continuously checks the USB idle timer, received packet, the bind button, and the USB sus-
pend. The functionalities included are:
■
Check the Received Packet: When the bridge receives a valid packet, it parses the packet. If it is
a data packet, the bridge formats and sends a USB packet to the USB host. If it is a connect
request with an approved device or a ping request, the bridge sends a corresponding response .
■
Check the Bind Button: The bridge checks the bind button frequently. If this button is pressed, the
bridge goes into the bind state.
■
Check the USB Suspend: When suspended, the bridge supports remote wakeup by intermittently
turning the radio on when the sleep timer interrupt occurs, checking for valid data from the HID
devices, and then turning the radio off again if no HID traffic is detected
Table 5-1. ROM/RAM Usage
*The ENCRYPT_DATA option requires 64 bytes of extra ROM space to store the nonvolatile session
key.
5.1.2
Device Configurations
The enCoRe II is configured using the Device Editor in PSoC Designer. The bridge uses the SPI
Master, USB device, and the 1 millisecond Interval Timer enCoRe User Modules. The SPI Master
User Module is used by firmware to communicate with the LP radio. The USB Device User Module
allows the bridge to operate as a low speed USB device. The 1 millisecond Interval Timer User
Module is used for timing.
The following section includes a screenshot of the device editor showing the User Module mapping
and a description of resources and User Modules.
Total ROM (Bytes)
Total RAM (Bytes)
Basic Function
6522
164
Build Option
ROM Usage (Bytes
RAM Usage (Bytes)
ENCRYPT_DATA*
887
29
MFG_TEST_CODE
465
0
MFG_TX_MODES
632
2