root / trunk / code / projects / colonet / utilities / dragonfly_wireless_relay / buzzer.h @ 396
History | View | Annotate | Download (717 Bytes)
1 |
/*
|
---|---|
2 |
buzzer.h - Contains function prototypes for running the buzzer
|
3 |
|
4 |
author: Robotics Club, Colony Project
|
5 |
*/
|
6 |
#ifndef _BUZZER_H_
|
7 |
#define _BUZZER_H_
|
8 |
|
9 |
//Musical note definitions
|
10 |
//Source: http://www.answers.com/topic/piano-key-frequencies
|
11 |
#define C4 260 //Middle C |
12 |
#define C4s 277 //C sharp |
13 |
#define D4 294 |
14 |
#define D4s 311 |
15 |
#define E4 330 |
16 |
#define F4 349 |
17 |
#define F4s 370 |
18 |
#define G4 392 |
19 |
#define G4s 415 |
20 |
#define A4 440 |
21 |
#define A4s 466 |
22 |
#define B4 494 |
23 |
#define C5 523 |
24 |
|
25 |
// Function descriptions can be found in buzzer.c
|
26 |
void buzzer_init(void); |
27 |
void buzzer_set_val(unsigned int buzz_value); |
28 |
void buzzer_set_freq(unsigned int buzz_freq); |
29 |
void buzzer_chirp(unsigned int ms, unsigned int buzz_freq); |
30 |
void buzzer_off(void); |
31 |
|
32 |
#endif
|