Defines | Functions | Variables

# buzzer.c File Reference

Buzzer driver. More...

`#include <avr/io.h>`
`#include <avr/interrupt.h>`
`#include <util/delay.h>`
`#include "buzzer.h"`
Include dependency graph for buzzer.c:

Go to the source code of this file.

## Defines
#define | _BUZZER_C_ 1
## 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
| ISR (TIMER1_OVF_vect)
## Variables
uint16_t | buzzer_time = 0

## 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.c.

## 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.