Lizzy project

Dependencies:   aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT

Committer:
jurica238814
Date:
Thu Jan 31 15:50:52 2019 +0100
Branch:
master
Revision:
29:b021b33cf666
Parent:
8:7ba4f82de9b6
Scaling factor hardcoded for acnSENSA format

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dbartolovic 8:7ba4f82de9b6 1 #include "bsp_buzz.h"
dbartolovic 8:7ba4f82de9b6 2
dbartolovic 8:7ba4f82de9b6 3
dbartolovic 8:7ba4f82de9b6 4 void Buzz::enable()
dbartolovic 8:7ba4f82de9b6 5 {
dbartolovic 8:7ba4f82de9b6 6 buzzer.enable(BUZZER_FREQUENCY_HZ);
dbartolovic 8:7ba4f82de9b6 7 buzzer.enableChannel(0, pwm_pin);
dbartolovic 8:7ba4f82de9b6 8 buzzer.setDuty(0,0.5f);
dbartolovic 8:7ba4f82de9b6 9
dbartolovic 8:7ba4f82de9b6 10 state = true;
dbartolovic 8:7ba4f82de9b6 11 }
dbartolovic 8:7ba4f82de9b6 12
dbartolovic 8:7ba4f82de9b6 13 void Buzz::disable()
dbartolovic 8:7ba4f82de9b6 14 {
dbartolovic 8:7ba4f82de9b6 15 buzzer.enable(0);
dbartolovic 8:7ba4f82de9b6 16 buzzer.setDuty(0, 0);
dbartolovic 8:7ba4f82de9b6 17 buzzer.disable();
dbartolovic 8:7ba4f82de9b6 18
dbartolovic 8:7ba4f82de9b6 19 state = false;
dbartolovic 8:7ba4f82de9b6 20 }