annotate ringtools/examples/ring.pwt @ 965:2969032bdfac

fcup-smsend[mult]: fix buglet in K&R C NULL pointer passing The only 100% safe way to pass a NULL pointer as a function argument in K&R C is to cast 0 to a pointer type; failing to do so may cause mysterious bugs (invalid stack frames or garbage in argument registers) on 64-bit machines. This issue has already been fixed in most of FC host tools, but I just found some missed spots: passing of NULL UDH to PDU encoding functions in fcup-smsend[mult] in the case of single (not concatenated) SMS.
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 01 Sep 2023 07:33:51 +0000
parents 74331b35b1da
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
854
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
1 # The most basic ringtone included in TI's TCS211 delivery was apparently
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
2 # intended to consist of alternating 800 Hz and 900 Hz tones, although
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
3 # the actual output was a continuous 99 Hz tone as a result of interface
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
4 # mismatch between the BZ_Tone() driver function and the tone generation
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
5 # tables.
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
6 #
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
7 # In 2016 we made FC Magnetite emit actual 800 Hz and 900 Hz tones,
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
8 # or rather the closest approximations to these two frequencies that
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
9 # can be produced in BU mode - see ring.buz example. In 2021 we are
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
10 # looking into the possibility of switching from BU mode to PWT mode;
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
11 # the present melody file is a test of how the closest PWT counterpart
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
12 # to 800/900 Hz would sound.
83
b064c2ce43d2 ringtools/examples: a couple of buzzer tone examples
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
854
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
14 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
15 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
16 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
17 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
18 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
19 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
20 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
21 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
22 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
23 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
24 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
25 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
26 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
27 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
28 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
29 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
30 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
31 a5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
32 g5 64 12
74331b35b1da ringtools/examples/ring.pwt: PWT equivalent of ring.buz
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
33 a5 64 12