Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Buzzer Driver Backend API

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.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a Buzzer driver.

Typedef Documentation

◆ buzzer_beep_t

typedef int(* buzzer_beep_t) (const struct device *dev, uint32_t duration_ms)

#include <zephyr/drivers/buzzer.h>

Play the buzzer's default tone.

See buzzer_beep() for argument descriptions.

◆ buzzer_set_volume_t

typedef int(* buzzer_set_volume_t) (const struct device *dev, uint8_t percent)

#include <zephyr/drivers/buzzer.h>

Set the buzzer volume.

See buzzer_set_volume() for argument descriptions.

◆ buzzer_stop_t

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.

◆ buzzer_tone_t

typedef int(* buzzer_tone_t) (const struct device *dev, uint32_t freq_hz, uint32_t duration_ms)

#include <zephyr/drivers/buzzer.h>

Play a single tone for a given duration.

See buzzer_tone() for argument descriptions.