English
Language : 

SDBC-DK3UG Datasheet, PDF (47/76 Pages) Silicon Laboratories – 4 buttons and 4 LEDs for custom purposes
SDBC-DK3 UG
9. Main
The main module main.c should include the main () function that is called upon startup. The main function should
first call several initialization routines and then the main program loop itself. Many of the initialization and internal
functions may be specific to the MCU hardware.
In this example the main loop sets the RF device into a continuous receive mode and wait for any incoming
packet(s). In addition, it also polls for a push button event by user. If a button is pressed, then it'll sends a payload
out using the internal FIFO and packet handler features of the EZRadioPRO device before returning to a
continuous receive mode.
9.1. Flow Chart Main ( )
Main
1) MCU and RF
Hardware Init ()
2) Set RF chip in Idle
mode and start
continuous receive
mode
No
Continuous loop in
receive mode
Yes
Valid Packet ?
No
Button Pressed ?
Yes
Figure 63. Flow Chart Main()
Blink LED2 to show that
the packet received
1) blink the LED
2) send a packet with
<64 bytes of payload
3) disable transmission
4) start continuous
receive again
Rev. 0.4
47