29#include "generated/airframe.h"
32#ifndef BUZZER_TUNES_STARTUP_TUNE
33#define BUZZER_TUNES_STARTUP_TUNE BUZZER_TUNES_STARTUP
37#define BUZZER_TUNES_GAP_MS 30
79#define BEATS(_b, _bpm) ((uint16_t)((_b) * 60000.0 / (_bpm)))
86#define TUNE_END {0, 0}
89#ifndef BUZZER_TUNES_RTTTL_1
90#define BUZZER_TUNES_RTTTL_1 ""
92#ifndef BUZZER_TUNES_RTTTL_2
93#define BUZZER_TUNES_RTTTL_2 ""
95#ifndef BUZZER_TUNES_RTTTL_3
96#define BUZZER_TUNES_RTTTL_3 ""
106 {
E6, 300}, {
E6, 300}, {
F6, 300}, {
G6, 300}, {
G6, 300}, {
F6, 300}, {
E6, 300}, {
D6, 300},
107 {
C6, 300}, {
C6, 300}, {
D6, 300}, {
E6, 300}, {
E6, 450}, {
D6, 150}, {
D6, 600},
108 {
E6, 300}, {
E6, 300}, {
F6, 300}, {
G6, 300}, {
G6, 300}, {
F6, 300}, {
E6, 300}, {
D6, 300},
109 {
C6, 300}, {
C6, 300}, {
D6, 300}, {
E6, 300}, {
D6, 450}, {
C6, 150}, {
C6, 600},
110 {
D6, 300}, {
D6, 300}, {
E6, 300}, {
C6, 300}, {
D6, 300}, {
E6, 150}, {
F6, 150}, {
E6, 300}, {
C6, 300},
111 {
D6, 300}, {
E6, 150}, {
F6, 150}, {
E6, 300}, {
D6, 300}, {
C6, 300}, {
D6, 300}, {
G5, 600},
112 {
E6, 300}, {
E6, 300}, {
F6, 300}, {
G6, 300}, {
G6, 300}, {
F6, 300}, {
E6, 300}, {
D6, 300},
113 {
C6, 300}, {
C6, 300}, {
D6, 300}, {
E6, 300}, {
D6, 450}, {
C6, 150}, {
C6, 600},
TUNE_END
118 {
C6, 300}, {
C6, 300}, {
G6, 300}, {
G6, 300}, {
A6, 300}, {
A6, 300}, {
G6, 600},
119 {
F6, 300}, {
F6, 300}, {
E6, 300}, {
E6, 300}, {
D6, 300}, {
D6, 300}, {
C6, 600},
120 {
G6, 300}, {
G6, 300}, {
F6, 300}, {
F6, 300}, {
E6, 300}, {
E6, 300}, {
D6, 600},
121 {
G6, 300}, {
G6, 300}, {
F6, 300}, {
F6, 300}, {
E6, 300}, {
E6, 300}, {
D6, 600},
122 {
C6, 300}, {
C6, 300}, {
G6, 300}, {
G6, 300}, {
A6, 300}, {
A6, 300}, {
G6, 600},
123 {
F6, 300}, {
F6, 300}, {
E6, 300}, {
E6, 300}, {
D6, 300}, {
D6, 300}, {
C6, 600},
TUNE_END
129 {
F5,
BEATS(1,
IT_BPM)}, {
F5,
BEATS(0.75,
IT_BPM)}, {
G5,
BEATS(0.25,
IT_BPM)}, {
F5,
BEATS(1,
IT_BPM)},
130 {
REST,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(0.75,
IT_BPM)}, {
Ds6,
BEATS(0.25,
IT_BPM)},
131 {
D6,
BEATS(1,
IT_BPM)}, {
REST,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(1,
IT_BPM)}, {
F6,
BEATS(0.75,
IT_BPM)},
132 {
Ds6,
BEATS(0.25,
IT_BPM)}, {
D6,
BEATS(2,
IT_BPM)}, {
C6,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(0.75,
IT_BPM)},
133 {
C6,
BEATS(0.25,
IT_BPM)}, {
As5,
BEATS(1,
IT_BPM)}, {
REST,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(1,
IT_BPM)},
134 {
D6,
BEATS(1,
IT_BPM)}, {
A5,
BEATS(2,
IT_BPM)}, {
As5,
BEATS(0.75,
IT_BPM)}, {
C6,
BEATS(0.25,
IT_BPM)},
135 {
As5,
BEATS(0.75,
IT_BPM)}, {
A5,
BEATS(0.25,
IT_BPM)}, {
G5,
BEATS(1,
IT_BPM)}, {
REST,
BEATS(1,
IT_BPM)},
136 {
As5,
BEATS(1,
IT_BPM)}, {
A5,
BEATS(0.75,
IT_BPM)}, {
As5,
BEATS(0.25,
IT_BPM)}, {
C6,
BEATS(1,
IT_BPM)},
137 {
REST,
BEATS(1,
IT_BPM)}, {
D5,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(2,
IT_BPM)}, {
Ds6,
BEATS(1,
IT_BPM)},
138 {
F5,
BEATS(1,
IT_BPM)}, {
F5,
BEATS(0.75,
IT_BPM)}, {
G5,
BEATS(0.25,
IT_BPM)}, {
F5,
BEATS(0.5,
IT_BPM)},
139 {
REST,
BEATS(1.5,
IT_BPM)}, {
D6,
BEATS(1,
IT_BPM)}, {
D6,
BEATS(0.75,
IT_BPM)}, {
Ds6,
BEATS(0.25,
IT_BPM)},
140 {
D6,
BEATS(2,
IT_BPM)}, {
D6,
BEATS(1,
IT_BPM)}, {
F6,
BEATS(0.75,
IT_BPM)}, {
Ds6,
BEATS(0.25,
IT_BPM)},
141 {
D6,
BEATS(1.5,
IT_BPM)}, {
F6,
BEATS(0.5,
IT_BPM)}, {
C6,
BEATS(0.5,
IT_BPM)}, {
F6,
BEATS(0.5,
IT_BPM)},
148 {
D5,
BEATS(1,
NL_BPM)}, {
G5,
BEATS(1,
NL_BPM)}, {
G5,
BEATS(1,
NL_BPM)}, {
A5,
BEATS(0.5,
NL_BPM)},
149 {
B5,
BEATS(0.5,
NL_BPM)}, {
C6,
BEATS(0.5,
NL_BPM)}, {
A5,
BEATS(0.5,
NL_BPM)}, {
B5,
BEATS(1,
NL_BPM)},
150 {
A5,
BEATS(0.5,
NL_BPM)}, {
B5,
BEATS(0.5,
NL_BPM)}, {
C6,
BEATS(1,
NL_BPM)}, {
B5,
BEATS(1,
NL_BPM)},
151 {
A5,
BEATS(0.5,
NL_BPM)}, {
G5,
BEATS(0.5,
NL_BPM)}, {
A5,
BEATS(1,
NL_BPM)}, {
G5,
BEATS(3,
NL_BPM)},
152 {
B5,
BEATS(0.5,
NL_BPM)}, {
C6,
BEATS(0.5,
NL_BPM)}, {
D6,
BEATS(2,
NL_BPM)}, {
E6,
BEATS(1,
NL_BPM)},
153 {
D6,
BEATS(2,
NL_BPM)}, {
C6,
BEATS(1,
NL_BPM)}, {
B5,
BEATS(1,
NL_BPM)}, {
A5,
BEATS(0.5,
NL_BPM)},
154 {
B5,
BEATS(0.5,
NL_BPM)}, {
C6,
BEATS(1,
NL_BPM)}, {
B5,
BEATS(1,
NL_BPM)}, {
A5,
BEATS(1,
NL_BPM)},
155 {
G5,
BEATS(1,
NL_BPM)}, {
A5,
BEATS(3,
NL_BPM)}, {
D5,
BEATS(1,
NL_BPM)}, {
G5,
BEATS(0.5,
NL_BPM)},
156 {
Fs5,
BEATS(0.5,
NL_BPM)}, {
G5,
BEATS(0.5,
NL_BPM)}, {
A5,
BEATS(0.5,
NL_BPM)}, {
B5,
BEATS(1,
NL_BPM)},
157 {
A5,
BEATS(2,
NL_BPM)}, {
G5,
BEATS(1,
NL_BPM)}, {
Fs5,
BEATS(1,
NL_BPM)}, {
D5,
BEATS(1,
NL_BPM)},
158 {
E5,
BEATS(0.5,
NL_BPM)}, {
Fs5,
BEATS(0.5,
NL_BPM)}, {
G5,
BEATS(1,
NL_BPM)}, {
G5,
BEATS(1,
NL_BPM)},
165 {
D5,
BEATS(0.25,
FR_BPM)}, {
D5,
BEATS(0.75,
FR_BPM)}, {
D5,
BEATS(0.25,
FR_BPM)}, {
G5,
BEATS(1,
FR_BPM)},
166 {
G5,
BEATS(1,
FR_BPM)}, {
A5,
BEATS(1,
FR_BPM)}, {
A5,
BEATS(1,
FR_BPM)}, {
D6,
BEATS(1.5,
FR_BPM)},
167 {
B5,
BEATS(0.5,
FR_BPM)}, {
G5,
BEATS(0.75,
FR_BPM)}, {
G5,
BEATS(0.25,
FR_BPM)}, {
B5,
BEATS(0.75,
FR_BPM)},
168 {
G5,
BEATS(0.25,
FR_BPM)}, {
E5,
BEATS(1,
FR_BPM)}, {
C6,
BEATS(1,
FR_BPM)}, {
REST,
BEATS(1,
FR_BPM)},
169 {
A5,
BEATS(0.75,
FR_BPM)}, {
Fs5,
BEATS(0.25,
FR_BPM)}, {
G5,
BEATS(1,
FR_BPM)}, {
REST,
BEATS(2,
FR_BPM)},
170 {
G5,
BEATS(0.75,
FR_BPM)}, {
A5,
BEATS(0.25,
FR_BPM)}, {
B5,
BEATS(1,
FR_BPM)}, {
B5,
BEATS(1,
FR_BPM)},
171 {
B5,
BEATS(1,
FR_BPM)}, {
C6,
BEATS(0.75,
FR_BPM)}, {
B5,
BEATS(0.25,
FR_BPM)}, {
B5,
BEATS(1,
FR_BPM)},
172 {
A5,
BEATS(1,
FR_BPM)}, {
REST,
BEATS(1,
FR_BPM)}, {
A5,
BEATS(0.75,
FR_BPM)}, {
B5,
BEATS(0.25,
FR_BPM)},
173 {
C6,
BEATS(1,
FR_BPM)}, {
C6,
BEATS(1,
FR_BPM)}, {
C6,
BEATS(1,
FR_BPM)}, {
D6,
BEATS(0.75,
FR_BPM)},
174 {
C6,
BEATS(0.25,
FR_BPM)}, {
B5,
BEATS(1,
FR_BPM)}, {
REST,
BEATS(2,
FR_BPM)}, {
D6,
BEATS(0.75,
FR_BPM)},
175 {
D6,
BEATS(0.25,
FR_BPM)}, {
D6,
BEATS(1,
FR_BPM)}, {
B5,
BEATS(0.75,
FR_BPM)}, {
G5,
BEATS(0.25,
FR_BPM)},
176 {
D6,
BEATS(1,
FR_BPM)}, {
B5,
BEATS(0.75,
FR_BPM)}, {
G5,
BEATS(0.25,
FR_BPM)}, {
D5,
BEATS(3,
FR_BPM)},
TUNE_END
181 {
G5, 300}, {
G5, 100}, {
A5, 400}, {
G5, 400}, {
C6, 400}, {
B5, 800},
182 {
G5, 300}, {
G5, 100}, {
A5, 400}, {
G5, 400}, {
D6, 400}, {
C6, 800},
183 {
G5, 300}, {
G5, 100}, {
G6, 400}, {
E6, 400}, {
C6, 400}, {
B5, 400}, {
A5, 800},
184 {
F6, 300}, {
F6, 100}, {
E6, 400}, {
C6, 400}, {
D6, 400}, {
C6, 800},
TUNE_END
190 {
E7, 150}, {
E7, 150}, {
REST, 150}, {
E7, 150}, {
REST, 150}, {
C7, 150}, {
E7, 150}, {
REST, 150},
191 {
G7, 300}, {
REST, 300}, {
G6, 300}, {
REST, 300}, {
C7, 450}, {
G6, 150}, {
REST, 300}, {
E6, 450},
192 {
A6, 300}, {
B6, 300}, {
As6, 150}, {
A6, 300}, {
G6, 200}, {
E7, 200}, {
G7, 200}, {
A7, 300},
193 {
F7, 150}, {
G7, 150}, {
REST, 150}, {
E7, 300}, {
C7, 150}, {
D7, 150}, {
B6, 450}, {
C7, 450},
194 {
G6, 150}, {
REST, 300}, {
E6, 450}, {
A6, 300}, {
B6, 300}, {
As6, 150}, {
A6, 300}, {
G6, 200},
195 {
E7, 200}, {
G7, 200}, {
A7, 300}, {
F7, 150}, {
G7, 150}, {
REST, 150}, {
E7, 300}, {
C7, 150},
196 {
D7, 150}, {
B6, 450}, {
REST, 300}, {
G7, 150}, {
Fs7, 150}, {
F7, 150}, {
D7, 300}, {
E7, 150},
197 {
REST, 150}, {
G6, 150}, {
A6, 150}, {
C7, 150}, {
REST, 150}, {
A6, 150}, {
C7, 150}, {
D7, 150},
198 {
REST, 300}, {
G7, 150}, {
Fs7, 150}, {
F7, 150}, {
D7, 300}, {
E7, 150}, {
REST, 150}, {
C5, 300},
199 {
C5, 150}, {
C5, 300}, {
REST, 300}, {
REST, 300}, {
G7, 150}, {
Fs7, 150}, {
F7, 150}, {
D7, 300},
200 {
E7, 150}, {
REST, 150}, {
G6, 150}, {
A6, 150}, {
C7, 150}, {
REST, 150}, {
A6, 150}, {
C7, 150},
201 {
D7, 150}, {
REST, 300}, {
Ds7, 300}, {
REST, 150}, {
D7, 450}, {
C7, 600}, {
REST, 600}, {
C7, 150},
202 {
C7, 300}, {
C7, 150}, {
REST, 150}, {
C7, 150}, {
D7, 300}, {
E7, 150}, {
C7, 300}, {
A6, 150},
203 {
G6, 600}, {
C7, 150}, {
C7, 300}, {
C7, 150}, {
REST, 150}, {
C7, 150}, {
D7, 150}, {
E7, 150},
204 {
REST, 1200}, {
C7, 150}, {
C7, 300}, {
C7, 150}, {
REST, 150}, {
C7, 150}, {
D7, 300}, {
E7, 150},
205 {
C7, 300}, {
A6, 150}, {
G6, 600}, {
E7, 150}, {
E7, 150}, {
REST, 150}, {
E7, 150}, {
REST, 150},
206 {
C7, 150}, {
E7, 300}, {
G7, 300}, {
REST, 300}, {
G6, 300}, {
REST, 300}, {
C7, 450}, {
G6, 150},
207 {
REST, 300}, {
E6, 450}, {
A6, 300}, {
B6, 300}, {
As6, 150}, {
A6, 300}, {
G6, 200}, {
E7, 200},
208 {
G7, 200}, {
A7, 300}, {
F7, 150}, {
G7, 150}, {
REST, 150}, {
E7, 300}, {
C7, 150}, {
D7, 150},
209 {
B6, 450}, {
C7, 450}, {
G6, 150}, {
REST, 300}, {
E6, 450}, {
A6, 300}, {
B6, 300}, {
As6, 150},
210 {
A6, 300}, {
G6, 200}, {
E7, 200}, {
G7, 200}, {
A7, 300}, {
F7, 150}, {
G7, 150}, {
REST, 150},
211 {
E7, 300}, {
C7, 150}, {
D7, 150}, {
B6, 450}, {
E7, 150}, {
C7, 300}, {
G6, 150}, {
REST, 300},
212 {
G6, 300}, {
A6, 150}, {
F7, 300}, {
F7, 150}, {
A6, 600}, {
B6, 200}, {
A7, 200}, {
A7, 200},
213 {
A7, 200}, {
G7, 200}, {
F7, 200}, {
E7, 150}, {
C7, 300}, {
A6, 150}, {
G6, 600}, {
E7, 150},
214 {
C7, 300}, {
G6, 150}, {
REST, 300}, {
G6, 300}, {
A6, 150}, {
F7, 300}, {
F7, 150}, {
A6, 600},
215 {
B6, 150}, {
F7, 300}, {
F7, 150}, {
F7, 200}, {
E7, 200}, {
D7, 200}, {
C7, 150}, {
G6, 300},
216 {
E6, 150}, {
C6, 600}, {
C7, 450}, {
G6, 450}, {
E6, 300}, {
A6, 200}, {
B6, 200}, {
A6, 200},
217 {
Gs6, 200}, {
As6, 200}, {
Gs6, 200}, {
G6, 150}, {
Fs6, 150}, {
G6, 900},
224 {
E6, 160}, {
D6, 160}, {
Fs5, 320}, {
Gs5, 320}, {
Cs6, 160}, {
B5, 160}, {
D5, 320}, {
E5, 320},
225 {
B5, 160}, {
A5, 160}, {
Cs5, 320}, {
E5, 320}, {
A5, 960},
TUNE_END
230 {
E6, 150}, {
Ds6, 150}, {
E6, 150}, {
Ds6, 150}, {
E6, 150}, {
B5, 150}, {
D6, 150}, {
C6, 150},
231 {
A5, 300}, {
REST, 150}, {
C5, 150}, {
E5, 150}, {
A5, 150}, {
B5, 300}, {
REST, 150},
232 {
E5, 150}, {
Gs5, 150}, {
B5, 150}, {
C6, 300}, {
REST, 150}, {
E5, 150}, {
E6, 150}, {
Ds6, 150},
233 {
E6, 150}, {
Ds6, 150}, {
E6, 150}, {
B5, 150}, {
D6, 150}, {
C6, 150},
234 {
A5, 300}, {
REST, 150}, {
C5, 150}, {
E5, 150}, {
A5, 150}, {
B5, 300}, {
REST, 150},
240 {
C6, 150}, {
C6, 150}, {
C6, 150}, {
F6, 450}, {
A6, 300},
241 {
C6, 150}, {
C6, 150}, {
C6, 150}, {
F6, 450}, {
A6, 600},
242 {
F6, 300}, {
F6, 150}, {
E6, 150}, {
E6, 150}, {
D6, 150}, {
D6, 150}, {
C6, 600},
243 {
C6, 150}, {
C6, 150}, {
C6, 150}, {
E6, 450}, {
G6, 300},
244 {
C6, 150}, {
C6, 150}, {
C6, 150}, {
E6, 450}, {
G6, 600},
245 {
C7, 300}, {
D7, 150}, {
C7, 150}, {
As6, 150}, {
A6, 150}, {
G6, 150}, {
F6, 600},
TUNE_END
250 {
G6, 100}, {
G6, 100}, {
G6, 200}, {
G6, 100}, {
G6, 100}, {
G6, 200},
251 {
G6, 100}, {
G6, 100}, {
C7, 200}, {
D7, 200}, {
E7, 400}, {
REST, 200},
252 {
G6, 100}, {
G6, 100}, {
G6, 200}, {
G6, 100}, {
G6, 100}, {
G6, 200},
253 {
G6, 100}, {
G6, 100}, {
C7, 200}, {
D7, 200}, {
E7, 400}, {
C7, 600},
TUNE_END
291 while (**
p >=
'0' && **
p <=
'9') {
292 n = n * 10 + (*(*p)++ -
'0');
301 while (*
p && *
p !=
':') {
p++; }
302 if (*
p !=
':') {
return false; }
305 while (*
p && *
p !=
':') {
307 if (key ==
'd' || key ==
'o' || key ==
'b') {
310 if (key ==
'd' && v > 0) {
rtttl_d = v; }
311 if (key ==
'o' && v > 0) {
rtttl_o = v; }
312 if (key ==
'b' && v > 0) {
rtttl_bpm = v; }
317 if (*
p !=
':') {
return false; }
326 static const uint16_t octave4[12] = {262, 277, 294, 311, 330, 349, 370, 392, 415, 440, 466, 494};
327 static const int8_t semitone[
'h' -
'a' + 1] = {9, 11, 0, 2, 4, 5, 7, 11};
329 while (*
p ==
' ' || *
p ==
',') {
p++; }
330 if (*
p ==
'\0') {
return false; }
334 if (c !=
'p' && (c <
'a' || c >
'h')) {
return false; }
337 if (*
p ==
'#') {
semi++;
p++; }
339 if (*
p ==
'.') {
dotted =
true;
p++; }
341 if (*
p >=
'0' && *
p <=
'9') { o = *
p++ -
'0'; }
342 if (*
p ==
'.') {
dotted =
true;
p++; }
343 while (*
p && *
p !=
',') {
p++; }
void buzzer_arch_init(void)
void buzzer_arch_tone(uint16_t freq)
Play a square wave at freq Hz, 0 for silence.
Piezo buzzer tone output with a ChibiOS PWM driver.
#define BUZZER_TUNES_RTTTL_1
Custom tunes (Custom 1..3) in RTTTL format ("name:d=4,o=6,b=120:c,e,g"), set in the airframe,...
static const struct buzzer_note tune_startup[]
Short rising arpeggio.
static struct buzzer_note note
note being played
#define BUZZER_TUNES_GAP_MS
Silence at the end of each note, so repeated notes are heard separately [ms].
static const struct buzzer_note tune_twinkle[]
Twinkle Twinkle Little Star, full song (public domain)
static const struct buzzer_note tune_william_tell[]
Rossini, William Tell Overture, galop opening, played twice (public domain)
void buzzer_tunes_init(void)
static const struct buzzer_note tune_anthem_netherlands[]
static bool note_gap
in the silent gap at the end of the note
#define FR_BPM
France, La Marseillaise, opening to "l'étendard sanglant est levé" (Rouget de Lisle 1792,...
#define BUZZER_TUNES_RTTTL_3
static const struct buzzer_note tune_la_cucaracha[]
La Cucaracha, chorus (traditional, public domain)
static const char * rtttl
next note of a RTTTL tune
#define NL_BPM
Netherlands, Wilhelmus, first verse (16th century, public domain)
static const char *const buzzer_tunes_custom[]
Custom tunes, RTTTL strings.
void buzzer_tunes_periodic(void)
static const struct buzzer_note tune_ode_to_joy[]
Beethoven, Ode to Joy, full theme (public domain)
static uint8_t rtttl_o
RTTTL default duration and octave.
static uint32_t note_start_ms
start time of the note
static const struct buzzer_note tune_gran_vals[]
Tarrega, Gran Vals, the phrase known as the Nokia ringtone (public domain)
static bool next_note(struct buzzer_note *n)
Get the next note of the tune, false at the end.
uint8_t buzzer_tunes_tune
tune being played, BUZZER_TUNES_NONE when silent
#define BUZZER_TUNES_STARTUP_TUNE
Tune played at startup, BUZZER_TUNES_NONE for silence.
#define BUZZER_TUNES_RTTTL_2
static bool rtttl_next(struct buzzer_note *n)
Parse the next RTTTL note "[duration]note[#][.][octave][.]", false at the end.
#define IT_BPM
Italy, Il Canto degli Italiani, first verse (Novaro 1847, public domain)
static const struct buzzer_note tune_mushroom[]
Mushroom Song.
static const struct buzzer_note *const buzzer_tunes_list[BUZZER_TUNES_CUSTOM_1]
static bool rtttl_start(const char *str)
Parse the RTTTL header "name:d=4,o=6,b=120:", false if invalid.
#define BEATS(_b, _bpm)
Duration of a number of beats at a tempo [ms].
void buzzer_tunes_play(uint8_t tune)
Start a tune (BUZZER_TUNES_NONE stops), also the settings handler.
static uint16_t rtttl_bpm
RTTTL tempo.
static const struct buzzer_note tune_anthem_france[]
static uint16_t rtttl_number(const char **p)
static const struct buzzer_note tune_fur_elise[]
Beethoven, Fur Elise, first section (public domain)
static const struct buzzer_note tune_anthem_italy[]
static void start_next_note(void)
static const struct buzzer_note * tune_notes
next note of a built-in tune
static const struct buzzer_note tune_happy_birthday[]
Happy Birthday (public domain)
uint16_t freq
[Hz], REST for silence
#define REST
Note frequencies [Hz], s for sharp, octaves 5 to 7 sound loudest on a piezo.
Play tunes on a passive piezo buzzer (e.g.
@ BUZZER_TUNES_CUSTOM_1
custom RTTTL tunes, see BUZZER_TUNES_RTTTL_x
@ BUZZER_TUNES_ODE_TO_JOY
@ BUZZER_TUNES_WILLIAM_TELL
@ BUZZER_TUNES_ANTHEM_NETHERLANDS
@ BUZZER_TUNES_HAPPY_BIRTHDAY
@ BUZZER_TUNES_ANTHEM_ITALY
@ BUZZER_TUNES_ANTHEM_FRANCE
@ BUZZER_TUNES_LA_CUCARACHA
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
Architecture independent timing functions.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)