MAV'RIC
piezo_speaker.h
1 /*
2  * piezo_speaker.h
3  *
4  * Created: 27/03/2014 18:20:04
5  * Author: schill
6  */
7 
8 
9 #ifndef PIEZO_SPEAKER_H_
10 #define PIEZO_SPEAKER_H_
11 
12 //#define PIEZO_HIGH_PIN AVR32_PIN_PA12
13 //#define PIEZO_LOW_PIN AVR32_PIN_PA15
14 
15 void piezo_speaker_init();
16 void piezo_speaker_init_binary();
17 
18 // instantaneous output voltage sent to the speaker - to make sounds this needs to be called repeatedly.
19 void piezo_speaker_set_value(int32_t analog_value);
20 void piezo_speaker_set_value_binary(int32_t binary_value);
21 
22 void piezo_speaker_beep(int32_t duration_ms, int32_t frequency);
23 
24 
25 #endif /* PIEZO_SPEAKER_H_ */