68
"C" Programming Guide For Optimus S/R
If there is a beeper sequence already in progress, the later will override the
original one.
Return
None
See Also
beeper_status, off_beeper, play
play
Purpose
To play melody by specifying a sequence of how a beeper is activated.
Syntax
void play (const char *sequence);
char *sequence; /* pointer to a buffer where a melody sequence resides */
Example
const char song[ ]={0x31,10,0x32,10,0x33,10,0x34,10,
0x35,10,0x36,10,0x37,10,0x41,10,
0x31,4,0x32,4,0x33,4,0x34,4,
0x35,4,0x36,4,0x37,4,0x41,4,0x00,0x00};
play(song);
Description
This routine is similar to on_beeper(). However, the frequency character is
specified as:
Bit 7
6
5
4
3
2
1
0
Frequency for A (La)
Scale
# key
Musical Scale
Reserved
000: Reserved
001(1): 55 Hz
010(2): 110 Hz
011(3): 220 Hz
100(4): 440 Hz
101(5): 880 Hz
110(6): 1760 Hz
111(7): 3520 Hz
0: disable
1: enable
000: Reserved
001(1): Do
010(2): Re
011(3): Mi
100(4): Fa
101(5): So
110(6): La
111(7): Ti
Return
None
See Also
beeper_status, off_beeper, on_beeper
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...