|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Data Structures | |
| struct | buzzer_driver_api |
| Driver Operations Buzzer driver operations More... | |
Typedefs | |
| typedef int(* | buzzer_tone_t) (const struct device *dev, uint32_t freq_hz, uint32_t duration_ms) |
| Play a single tone for a given duration. | |
| typedef int(* | buzzer_set_volume_t) (const struct device *dev, uint8_t percent) |
| Set the buzzer volume. | |
| typedef int(* | buzzer_beep_t) (const struct device *dev, uint32_t duration_ms) |
| Play the buzzer's default tone. | |
| typedef int(* | buzzer_stop_t) (const struct device *dev) |
| Stop any tone currently being played. | |
This group contains the API type definitions, callback signatures, and other helpers required to implement a Buzzer driver.
#include <zephyr/drivers/buzzer.h>
Play the buzzer's default tone.
See buzzer_beep() for argument descriptions.
#include <zephyr/drivers/buzzer.h>
Set the buzzer volume.
See buzzer_set_volume() for argument descriptions.
| typedef int(* buzzer_stop_t) (const struct device *dev) |
#include <zephyr/drivers/buzzer.h>
Stop any tone currently being played.
See buzzer_stop() for argument descriptions.
#include <zephyr/drivers/buzzer.h>
Play a single tone for a given duration.
See buzzer_tone() for argument descriptions.