Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
buzzer_tunes.h File Reference

Play tunes on a passive piezo buzzer (e.g. More...

#include "std.h"
+ Include dependency graph for buzzer_tunes.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  buzzer_tunes_t {
  BUZZER_TUNES_NONE , BUZZER_TUNES_STARTUP , BUZZER_TUNES_ODE_TO_JOY , BUZZER_TUNES_TWINKLE ,
  BUZZER_TUNES_ANTHEM_ITALY , BUZZER_TUNES_ANTHEM_NETHERLANDS , BUZZER_TUNES_ANTHEM_FRANCE , BUZZER_TUNES_HAPPY_BIRTHDAY ,
  BUZZER_TUNES_MUSHROOM , BUZZER_TUNES_GRAN_VALS , BUZZER_TUNES_FUR_ELISE , BUZZER_TUNES_LA_CUCARACHA ,
  BUZZER_TUNES_WILLIAM_TELL , BUZZER_TUNES_CUSTOM_1 , BUZZER_TUNES_CUSTOM_2 , BUZZER_TUNES_CUSTOM_3 ,
  BUZZER_TUNES_NB
}
 Tunes, order must match the values of the tune setting. More...
 

Functions

void buzzer_tunes_init (void)
 
void buzzer_tunes_periodic (void)
 
void buzzer_tunes_play (uint8_t tune)
 Start a tune (BUZZER_TUNES_NONE stops), also the settings handler.
 

Variables

uint8_t buzzer_tunes_tune
 tune being played, BUZZER_TUNES_NONE when silent
 

Detailed Description

Play tunes on a passive piezo buzzer (e.g.

a startup tune)

Definition in file buzzer_tunes.h.

Enumeration Type Documentation

◆ buzzer_tunes_t

Tunes, order must match the values of the tune setting.

Enumerator
BUZZER_TUNES_NONE 
BUZZER_TUNES_STARTUP 
BUZZER_TUNES_ODE_TO_JOY 
BUZZER_TUNES_TWINKLE 
BUZZER_TUNES_ANTHEM_ITALY 
BUZZER_TUNES_ANTHEM_NETHERLANDS 
BUZZER_TUNES_ANTHEM_FRANCE 
BUZZER_TUNES_HAPPY_BIRTHDAY 
BUZZER_TUNES_MUSHROOM 
BUZZER_TUNES_GRAN_VALS 
BUZZER_TUNES_FUR_ELISE 
BUZZER_TUNES_LA_CUCARACHA 
BUZZER_TUNES_WILLIAM_TELL 
BUZZER_TUNES_CUSTOM_1 

custom RTTTL tunes, see BUZZER_TUNES_RTTTL_x

BUZZER_TUNES_CUSTOM_2 
BUZZER_TUNES_CUSTOM_3 
BUZZER_TUNES_NB 

Definition at line 32 of file buzzer_tunes.h.

Function Documentation

◆ buzzer_tunes_init()

void buzzer_tunes_init ( void  )
extern

Definition at line 406 of file buzzer_tunes.c.

References buzzer_arch_init(), buzzer_tunes_play(), and BUZZER_TUNES_STARTUP_TUNE.

+ Here is the call graph for this function:

◆ buzzer_tunes_periodic()

void buzzer_tunes_periodic ( void  )
extern

Definition at line 412 of file buzzer_tunes.c.

References buzzer_arch_tone(), BUZZER_TUNES_GAP_MS, get_sys_time_msec(), buzzer_note::ms, note, note_gap, note_start_ms, playing, and start_next_note().

+ Here is the call graph for this function:

◆ buzzer_tunes_play()

void buzzer_tunes_play ( uint8_t  tune)
extern

Start a tune (BUZZER_TUNES_NONE stops), also the settings handler.

Definition at line 384 of file buzzer_tunes.c.

References buzzer_arch_tone(), buzzer_tunes_custom, BUZZER_TUNES_CUSTOM_1, buzzer_tunes_list, BUZZER_TUNES_NB, BUZZER_TUNES_NONE, buzzer_tunes_tune, foo, playing, rtttl, rtttl_start(), start_next_note(), and tune_notes.

Referenced by buzzer_tunes_init(), and start_next_note().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ buzzer_tunes_tune

uint8_t buzzer_tunes_tune
extern

tune being played, BUZZER_TUNES_NONE when silent

Definition at line 277 of file buzzer_tunes.c.

Referenced by buzzer_tunes_play().