SLAU292G November 2009 – July 2015
The Chronos module software is structured according to the menu items. The source for each menu item is stored in a separate source file (for example, "temperate.c" for the temperature menu and its functions). Details can be found in the flow chart in Figure 3-12. The data logger application works in a very similar way and, therefore, is not described separately.
Each menu item has at least the following functions:
The source code file "menu.c" contains two linked lists with menu items, one for the upper LCD line (Line1), one for the lower LCD line (Line2). Each list entry contains the following pointers:
To support the various RF frequencies and compiler licenses, the following configurations are available:
RF Frequencies
IDE Versions (CCS, IAR)
Figure 3-12 shows the basic software flow of the demo application.
After a power-up reset, the hardware is initialized, the display memory is cleared and the radio is set to sleep mode. The main loop waits for wake-up events, which can be either a scheduled event such as a clock interrupt, or a button event.
Button events lead to the execution of either mx_functions or sx_functions.
If the LCD is updated with new data, the modules set a display flag, and LCD Line1, Line2, or both are updated by calling the menu-specific display functions. Display updates have been reduced as much as possible; for example, when the time changes from 10:22 to 10:23, only the last digit is updated.