Defines | |
#define | C4 260 |
Middle C. | |
#define | C4s 277 |
C#. | |
#define | D4 294 |
D. | |
#define | D4s 311 |
D#. | |
#define | E4 330 |
E. | |
#define | F4 349 |
F. | |
#define | F4s 370 |
F#. | |
#define | G4 392 |
G. | |
#define | G4s 415 |
G#. | |
#define | A4 440 |
A. | |
#define | A4s 466 |
A#. | |
#define | B4 494 |
B. | |
#define | C5 523 |
C. | |
Functions | |
void | buzzer_init (void) |
Initialize the buzzer. | |
void | buzzer_set_val (unsigned int buzz_value) |
Set the value the buzzer plays. | |
void | buzzer_set_freq (unsigned int buzz_freq) |
Set the frequency the buzzer plays. | |
void | buzzer_chirp (unsigned int ms, unsigned int buzz_freq) |
Play a frequency for a specified time. | |
void | buzzer_off (void) |
Turn the buzzer off. |
|
Play a frequency for a specified time. Plays the specified frequency for the specified amount of time. This function blocks execution until the time is completed. buzzer_init must be called before this function can be used.
|
|
Initialize the buzzer. Initializes the buzzer. Must be called before any other buzzer function may be used. |
|
Turn the buzzer off. Turns off the buzzer by disabling the timer0 clock.
|
|
Set the frequency the buzzer plays. Sets the buzzer frequency. Usage of constants such as C4 is highly recommended as input to this function. buzzer_init must be called before this function may be used.
|
|
Set the value the buzzer plays. Sets the value of the buzzer's pitch. Higher values are lower frequencies.
|