Veethree D7 SDK
Loading...
Searching...
No Matches
buzzer_common.h
Go to the documentation of this file.
1
5#ifndef BUZZER_COMMON_H
6#define BUZZER_COMMON_H
7
8#include <cstdint>
9
10namespace vsdk::sys {
14enum class buzzer_boost : uint8_t {
15 no_boost,
16 boost1,
17 boost2,
18 boost3,
19 boost4,
20 boost5,
21};
22
26constexpr uint32_t buzzer_default_period{ 500'000 };
30constexpr double buzzer_default_duty_cycle{ 0.5 };
31
48 buzzer_boost boost{ buzzer_boost::no_boost };
49};
50
51}; // namespace vsdk::sys
52
53#endif
Any entities that belong to the system library.
buzzer_boost
Define how loud the buzzer will be, the default value is the quietest no_boost while boost5 is the lo...
Definition buzzer_common.h:14
constexpr double buzzer_default_duty_cycle
buzzer_default_duty_cycle - default duty cycle as percentage of period.
Definition buzzer_common.h:30
constexpr uint32_t buzzer_default_period
buzzer_default_period - default time in nanoseconds used for generating the buzzer,...
Definition buzzer_common.h:26
The config class In case the buzzer requires customisation, period and duty cycle can be modified,...
Definition buzzer_common.h:36
uint32_t period
Buzzer period as per Linux PWM sysfs API (nanoseconds). Defaults to buzzer_default_period.
Definition buzzer_common.h:40
buzzer_boost boost
Buzzer boost level. Defaults to buzzer_boost::no_boost.
Definition buzzer_common.h:48
double duty_cycle
Buzzer period as a percentage of the period. The range is [0-1]. Defaults to buzzer_default_duty_cycl...
Definition buzzer_common.h:44