Lizzy project

Dependencies:   aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT

bsp/bsp_buzz.cpp

Committer:
dbartolovic
Date:
2018-03-20
Revision:
8:7ba4f82de9b6

File content as of revision 8:7ba4f82de9b6:

#include "bsp_buzz.h"


void Buzz::enable()
{
    buzzer.enable(BUZZER_FREQUENCY_HZ);
    buzzer.enableChannel(0, pwm_pin);
    buzzer.setDuty(0,0.5f);
    
    state = true;
}

void Buzz::disable()
{
    buzzer.enable(0);
    buzzer.setDuty(0, 0);
    buzzer.disable();
    
    state = false;
}