Cypress Semiconductor CY3280-MBR3 ユーザーズマニュアル

ページ / 90
CY3280-MBR3 Evaluation Kit User Guide, Doc. #: 001-89905 Rev. *B
70
Configuration Files and Example Projects
5.3.2.3
Flow Chart
 shows the flow chart of the code implemented in main.c.
Figure 5-31.  Project Flow Chart
 
Start
Initialize the components (TCPWM, 
I2C Master, Interrupt)
Configure the MBR3 device for 4 buttons and to 
generate host interrupt
Check if any LED on-time 
counter is greater than 0
Check if host interrupt occured
Read buttons status 
register 
Check the reason for 
interrupt
Turn on the corresponding 
RGB LED and the LED on 
the MBR3 kit
Yes
Yes
No
Check if timer flag is set
Yes
No
Touch
Turn off the LED for which 
on-time is elapsed
Decrement LED 
on-time counter
Check if LED on-time 
counter equals 0
Yes
No
Set LED on-time 
counter
Release
No