Defines | Functions

# buzzer.h File Reference

Buzzer driver. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | BUZZER_FREQ 1843
| TOP value for counter register to generate a 4000Hz sound.
## Functions
void | buzzer_init (void)
| Initialise the Buzzer driver.
void | buzzer_start (uint16_t time)
| start making noise
void | buzzer_stop (void)
| stop making noise

## Detailed Description

Buzzer driver.

Author:
  Dominic Rathje (dominic.rathje@uni-ulm.de)

Version:
  1.0

Note:
  - Compiler : WinAVR 20100110
  - Supported devices : ATMega8

Definition in file buzzer.h.

## Function Documentation

void buzzer_init | ( | void | ) |

Initialise the Buzzer driver.

Configures the Port Registers and Timer. Call this function at the beginning of your main function.

Definition at line 23 of file buzzer.c.

void buzzer_start | ( | uint16_t | time ) |

start making noise

call this function to start the buzzer. the sund will be disabled after time ticks. one tick equals 0.25ms

Parameters:

  time | duration of the beep

Definition at line 37 of file buzzer.c.

Here is the caller graph for this function:

void buzzer_stop | ( | void | ) |

stop making noise

this function disables the buzzer. for those who want to do the timing be themselves

Definition at line 45 of file buzzer.c.