![Cypress CY4636 User Manual Download Page 50](http://html.mh-extra.com/html/cypress/cy4636/cy4636_user-manual_2705993050.webp)
50
CY4636 WirelessUSB™ LP Keyboard Mouse Reference Design Kit User Guide, Doc. # 001-70355 Rev. *A
Code Examples
5.1.3
Firmware Architecture
Figure 5-2. Firmware Architecture Model
The bridge firmware is partitioned into two logical groups. The Common group is a collection of code
modules that provide the underlying support for the application. This group provides services such
as, radio protocol, radio driver, USB, timing, flash access, SPI and interrupts.
The Application group implements the core functionality and features of RDK wireless bridge. This
includes USB HID packet formatting and reporting, encryption, and manufacturing test mode. The
code modules for each of these groups are described below in further detail.
All of the following module descriptions have corresponding <module name>.c and <module
name>.h source code files. The module API and definitions are exported in the header file while the
module implementation and local definitions are contained in the C file.
5.1.3.1
Common Code
The modules consist of the common code logical grouping.
PSoC Generated Library Code.
There are currently only three files, generated by PSoC Designer,
that are modified for the use of the application. A minimal amount of code has been added to these
modules in user protected areas that are preserved across code generation.
■
USB include (USB_1.inc)
This file includes the additional code for the Battery Level and Link Quality software application in
USB_1_cls_hid.asm.
■
USB HID Class Module (USB_1_cls_hid.asm)
The additional user code provides support for the Battery Level and Link Quality software applica-
tion.
■
1 Millisecond Interval Timer Interrupt Module (MSTIMER.asm)
The additional user code decrements application countdown timers and checks for USB activity to
detect a USB suspend condition.
Flash.
The module includes routines to write to the enCoRe II flash to Encryption key.