CY8CKIT-040 PSoC
®
4000 Pioneer Kit Guide, Doc. # 001-91316 Rev. *F
93
Code Examples
Firmware Implementation Details
The firmware consists of three different modes: active scanning (ACTIVE_SCAN), sleep scanning
(SLEEP_SCAN), and proximity scanning (PROX_SCAN)
■
Active Scanning: Active scanning primarily performs two tasks:
❐
Scans the touchpad
❐
Updates the color based on touchpad activity
Scanning the touchpad sensors along with the proximity sensor, if enabled, in turn performs two sub-
tasks:
❐
Keeps the device in active scan mode
❐
Calculates the touch coordinate itself
Any activity on the touchpad or proximity sensor keeps the device in active scanning mode. If all
activity ceases, the firmware will fade off the RGB color displayed and enter sleep scanning mode.
The timeline at which the LED fades from last detected touch/proximity activity is defined by the
macro LED_DIM_THRESHOLD. The LED_DIM_RATE macro defines the rate at which LED dim-
ming is done. Refer to the
main.h
file for details on various macros used and their usage.
show the two different color selection models implemented in the proj-
ect. The two options are selectable using DO_SATURATION macro defined in
main.h
.
Figure 5-46. Hue and Brightness Control Implementation Model (default model)
Figure 5-47. Hue, Saturation, and Value (HSV) Implementation Model
Содержание CY8CKIT-040 PSoC 4000 Pioneer Kit
Страница 20: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 20 Kit Operation...
Страница 37: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 37 Hardware...
Страница 73: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 73 Code Examples Raw count and Baseline...