stm32f103
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Buzzer Class Reference

Implements abstraction layer for buzzers. More...

#include <buzzer.h>

Classes

struct  Config
 Configuration for buzzers. More...
 

Public Member Functions

 Buzzer (const Config &config)
 Constructor for buzzer. More...
 
void SetEnable (const bool flag)
 Sets the state of the buzzer. More...
 

Protected Member Functions

Pin * GetPin ()
 
GPIO * GetGpio ()
 

Detailed Description

Implements abstraction layer for buzzers.

Constructor & Destructor Documentation

Buzzer::Buzzer ( const Config &  config)
explicit

Constructor for buzzer.

Note
Buzzer will always be in off state after constructor is called. If it isn't, your board may have a pull-up resistor, and this feature will be implemented later.
Parameters
configBuzzer configuration

Member Function Documentation

GPIO* Buzzer::GetGpio ( )
inlineprotected
Returns
GPIO object underlying the buzzer
Pin* Buzzer::GetPin ( )
inlineprotected
Returns
Pinout of buzzer
void Buzzer::SetEnable ( const bool  flag)

Sets the state of the buzzer.

Parameters
flagTrue if the buzzer should be on

The documentation for this class was generated from the following file: