CY8CKIT-040 PSoC
®
4000 Pioneer Kit Guide, Doc. # 001-91316 Rev. *F
96
Code Examples
3. After the primary color intensities (from the color palette) are derived from step 2, either the
brightness level or the saturation level selected by the slider is applied. The selection between
brightness and saturation is done using DO_SATURATION macro defined in
main.h
.
a. Disabling/commenting out the DO_SATURATION macro applies brightness control on the
color. Brightness control is a simple scaling of the three color intensities, derived at step 2,
using slider output. Default brightness value at power on is 100 percent or maximum.
b. Enabling the DO_SATURATION macro applies saturation as explained in
. In sat-
uration control, if the slider output is at half value, the intensities are retained. If it is less than
half value, all the intensities move towards the minimum intensity (black/darker). If it is more
than half value, all the intensities move towards the maximum intensity (white/brighter).
Default saturation value at power ON is 50 percent or HALF_SATURATION value. The
amount by which each color darkens or brightens is proportional to the slider position's rela-
tive difference from its center. See
.
Figure 5-51. Saturation Calculation Based on Slider Output
■
Sleep-Scan Mode
In the sleep-scan mode, the firmware scans either the proximity sensor or the gang sensor (sen-
sors in touchpad row elements ganged together) or both. This option is configurable during proj-
ect compilation by commenting out the ENABLE_PROXIMITY or ENABLE_GANG macros.
Keeping both will scan both the sensors in sleep, and disabling both will keep the device in active
scanning mode always.
❐
If a proximity sensor is used in sleep-scan mode and the device detects any proximity activity
on the sensor, the device will enter proximity scanning mode.
❐
If a gang sensor is used in sleep-scan mode and the device detects activity on the Trackpad
during its scan, the device enters active scanning mode directly.
The rate at which the device scans in the sleep-scan mode is configurable by changing the
macro SLEEP_TIMER_PERIOD defined in
main.h
.
Содержание 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...