Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
buzzer_driver_api Struct Reference

Driver Operations Buzzer driver operations More...

#include <zephyr/drivers/buzzer.h>

Data Fields

buzzer_tone_t tone
  REQ Play a single tone at freq_hz for duration_ms.
buzzer_set_volume_t set_volume
  REQ Set the buzzer volume.
buzzer_beep_t beep
  REQ Play the buzzer's default tone for duration_ms.
buzzer_stop_t stop
  REQ Stop any tone currently being played.

Detailed Description

Driver Operations Buzzer driver operations

This is the driver API structure any Buzzer driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ beep

buzzer_beep_t buzzer_driver_api::beep

REQ Play the buzzer's default tone for duration_ms.

◆ set_volume

buzzer_set_volume_t buzzer_driver_api::set_volume

REQ Set the buzzer volume.

◆ stop

buzzer_stop_t buzzer_driver_api::stop

REQ Stop any tone currently being played.

◆ tone

buzzer_tone_t buzzer_driver_api::tone

REQ Play a single tone at freq_hz for duration_ms.


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