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_STAR , 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_set_events (uint8_t on)
 Settings handler: enable or disable the armed and alert tunes.
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
uint8_t buzzer_tunes_events_on
 armed and alert tunes enabled

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_STAR 
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 512 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 558 of file buzzer_tunes.c.

References buzzer_arch_tone(), BUZZER_TUNES_GAP_MS, event_update(), get_sys_time_msec(), 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 451 of file buzzer_tunes.c.

References BUZZER_TUNES_NONE, and tune_start().

Referenced by buzzer_tunes_init().

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

◆ buzzer_tunes_set_events()

void buzzer_tunes_set_events ( uint8_t on)
extern

Settings handler: enable or disable the armed and alert tunes.

Definition at line 472 of file buzzer_tunes.c.

References buzzer_tunes_events_on, BUZZER_TUNES_NONE, event_tune, and tune_start().

Here is the call graph for this function:

Variable Documentation

◆ buzzer_tunes_events_on

uint8_t buzzer_tunes_events_on
extern

armed and alert tunes enabled

Definition at line 342 of file buzzer_tunes.c.

Referenced by buzzer_tunes_set_events(), and event_update().

◆ buzzer_tunes_tune

uint8_t buzzer_tunes_tune
extern

tune being played, BUZZER_TUNES_NONE when silent

Definition at line 331 of file buzzer_tunes.c.

Referenced by event_start(), and tune_start().