Timex M851 Watch User Manual


 
M851 WristApp Design Guide Rev 1.2
Timex Corporation 80
The application is also responsible to make it a part of the record two status flags required by the PC. This
is the Record Modified and Record Deleted Flag.
APPLICATION NOTES:
It is required to close a database file after using it. Opening a file for access will also power the
EEPROM. Closing a file will deactivate power to the EEPROM.
4.27 Melody Services
The kernel provides ten system melodies for use by the application. Nine are predefined as system
melodies. One is defined for a custom melody. The kernel also provides macros to activate and deactivate
any melody. The user can change the melodies by downloading the new melody pattern from the PC.
The following are the macros used for manipulating the melodies.
Audio Macros
AUDSTART_SYSTEM_MELODY
AUDSTOP_MELODY
The available system melody indexes are:
Index Melody Name Typical Use
0
AUDSWBEEPMELODY
Switch beep
1
AUDHOURCHIMEMELODY
Hour chime
2
AUDALARMMELODY
Alarm popup melody
3
AUDAPPOINTMENTMELODY
Appointment popup melody
4
AUDTIMERMELODY
Timer melody
5
AUDINTERVALTIMERMELODY
Interval timer melody
6
AUDHALFTIMERMELODY
Halfway Mark of Timer melody
7
AUDCOMMERRORMELODY
Communications error tone
8
AUDCUSTOMMELODY
User define melody
These system melodies are activated by using the macro AUDSTART_SYSTEM_MELODY. The application
can specify whether a COREEVENT_MELODY_DONE is sent to the foreground application when the
melody is completed.
The melody done action parameters are:
Action Parameter Description
AUDSENDMELODYDONEEVENT
The event COREEVENT_MELODY_DONE is send to
the foreground application when the melody is
done.
AUDNOMELODYDONEEVENT
No action is required when the melody is done.
Below is a sample code to activate a system melody.
// begin alarm system melody and generate melody done event
AUDSTART_SYSTEM_MELODY AUDALARMMELODY,AUDSENDMELODYDONEEVENT
An application can define a melody table located in its own code space. The table must conform with the
Melody Table Structure discussed in the next section. To activate the user melody table, use the macro