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