M851 WristApp Design Guide Rev 1.2
Timex Corporation ii
TABLE OF CONTENTS
1 INTRODUCTION ................................................................................................................................ 1
1.1 APPLICABLE DOCUMENTS ............................................................................................................... 1
1.2 DEFINITION OF TERMS..................................................................................................................... 1
2 M851 HARDWARE ............................................................................................................................. 2
2.1 MICROCONTROLLER........................................................................................................................ 2
2.2 LCD................................................................................................................................................ 2
2.3 SWITCHES........................................................................................................................................ 2
2.4 LAMP............................................................................................................................................... 3
2.5 BUZZER ........................................................................................................................................... 3
2.6 USB DATALINK............................................................................................................................... 3
2.7 EEPROM........................................................................................................................................ 4
3 M851 PLATFORM............................................................................................................................... 5
3.1 OVERVIEW....................................................................................................................................... 5
3.2 KERNEL ARCHITECTURE ................................................................................................................. 6
4 WRISTAPP DESIGN GUIDE............................................................................................................. 7
4.1 NAMING CONVENTIONS................................................................................................................... 8
4.2 FILES AND DIRECTORIES.................................................................................................................. 9
4.2.1 Header Files ........................................................................................................................... 9
4.2.2 Source Files ............................................................................................................................ 9
4.2.3 Build Directory....................................................................................................................... 9
4.3 APPLICATION SETUP PARAMETERS................................................................................................ 10
4.3.1 Application Offset Mask........................................................................................................ 10
4.3.2 Timer Resource Requirements.............................................................................................. 10
4.3.3 Icon Resource ....................................................................................................................... 11
4.3.4 Memory Requirements.......................................................................................................... 11
4.3.5 Application Configuration Data ........................................................................................... 12
4.3.6 Application ID ...................................................................................................................... 12
4.3.7 Address Control Block.......................................................................................................... 13
4.3.8 Sample Application Parameter Template ............................................................................. 13
4.3.9 Application Initialization...................................................................................................... 14
4.4 APPLICATION STATE HANDLERS ................................................................................................... 15
4.4.1 Application Framework........................................................................................................ 15
4.4.2 State Transition Diagram ..................................................................................................... 15
4.4.2.1 A State Transition Diagram.............................................................................................. 15
4.4.2.2 Application State Transition Diagram .............................................................................. 15
4.4.2.3 Implementing The Application State Transition Diagram................................................ 16
4.4.3 State Index ............................................................................................................................ 18
4.4.4 System Events........................................................................................................................ 19
4.4.5 Requesting System Events..................................................................................................... 22
4.4.5.1 Switch Depressions........................................................................................................... 22
4.4.5.2 Switch Releases ................................................................................................................ 23
4.4.5.3 Popup Cancel Event.......................................................................................................... 23
4.4.5.4 Ring Edges and Pulses...................................................................................................... 23
4.4.5.5 Icon Refresh...................................................................................................................... 24
4.4.5.6 End of Scrolling................................................................................................................ 24
4.4.5.7 Resource Updates ............................................................................................................. 24
4.4.5.8 Timeouts ........................................................................................................................... 24
4.4.6 State Manager....................................................................................................................... 25