Functions |
int | speaker_ctrl (unsigned char on) |
| Enables/disables speaker.
|
int | speaker_test (unsigned long freq, unsigned long time) |
| Programs speaker to generate tone for the given time interval.
|
Detailed Description
Functions that control the speaker output
Function Documentation
int speaker_ctrl |
( |
unsigned char |
on | ) |
|
Enables/disables speaker.
Enables/disables speaker, by both enabling/disabling Timer 2 and its output gate
- Parameters:
-
on | If zero disable speaker, otherwise enable it |
- Returns:
- Return 0 upon success and non-zero otherwise
int speaker_test |
( |
unsigned long |
freq, |
|
|
unsigned long |
time |
|
) |
| |
Programs speaker to generate tone for the given time interval.
- Parameters:
-
freq | Frequency of tone to generate in Hz |
time | Duration of tone in s |
- Returns:
- Return 0 upon success and non-zero otherwise