Loading...
Searching...
No Matches
furi_hal_speaker.h File Reference

Speaker HAL. More...

#include <furi.h>

Go to the source code of this file.

Functions

void furi_hal_speaker_init (void)
 Init speaker.
 
void furi_hal_speaker_deinit (void)
 Deinit speaker.
 
FURI_WARN_UNUSED bool furi_hal_speaker_acquire (uint32_t timeout)
 Acquire speaker ownership.
 
void furi_hal_speaker_release (void)
 Release speaker ownership.
 
bool furi_hal_speaker_is_mine (void)
 Check current process speaker ownership.
 
void furi_hal_speaker_start (float frequency, float volume)
 Play a note.
 
void furi_hal_speaker_set_volume (float volume)
 Set volume.
 
void furi_hal_speaker_stop (void)
 Stop playback.
 

Detailed Description

Speaker HAL.

Function Documentation

◆ furi_hal_speaker_acquire()

FURI_WARN_UNUSED bool furi_hal_speaker_acquire ( uint32_t timeout)

Acquire speaker ownership.

Warning
You must acquire speaker ownership before use
Parameters
timeoutTimeout during which speaker ownership must be acquired
Returns
bool returns true on success

◆ furi_hal_speaker_is_mine()

bool furi_hal_speaker_is_mine ( void )

Check current process speaker ownership.

Warning
always returns true if called from ISR
Returns
bool returns true if process owns speaker

◆ furi_hal_speaker_release()

void furi_hal_speaker_release ( void )

Release speaker ownership.

Warning
You must release speaker ownership after use

◆ furi_hal_speaker_set_volume()

void furi_hal_speaker_set_volume ( float volume)

Set volume.

Warning
no ownership check if called from ISR
Parameters
volumeThe volume

◆ furi_hal_speaker_start()

void furi_hal_speaker_start ( float frequency,
float volume )

Play a note.

Warning
no ownership check if called from ISR
Parameters
frequencyThe frequency
volumeThe volume

◆ furi_hal_speaker_stop()

void furi_hal_speaker_stop ( void )

Stop playback.

Warning
no ownership check if called from ISR