ST / X_NUCLEO_CCA01M1

Dependencies:   ST_I2S X_NUCLEO_COMMON

Dependents:   HelloWorld_CCA01M1 HelloWorld_CCA01M1_mbedOS HelloWorld_CCA01M1_mbedOS Karaoke_CCA01M1_CCA02M1_mbedOS ... more

Fork of X_NUCLEO_CCA01M1 by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

SoundTerminal Class Reference

SoundTerminal Class Reference

An abstract class for SoundTerminal components. More...

#include <SoundTerminal.h>

Inherits Component.

Inherited by STA350BW.

Public Member Functions

virtual int32_t play (int16_t *pData, uint16_t Size, bool loop)=0
 Playing a buffer of data.
virtual int32_t stop (void)=0
 Stop playing.
virtual int32_t set_volume (uint8_t channel, uint8_t value)=0
 Setting volume.
virtual int32_t set_frequency (uint32_t audio_freq)=0
 Setting frequency.
virtual ~SoundTerminal ()
 Destructor.
virtual int init (void *init)=0
 Initializing the component.
virtual int read_id (uint8_t *id)=0
 Getting the ID of the component.

Detailed Description

An abstract class for SoundTerminal components.

Definition at line 67 of file SoundTerminal.h.


Constructor & Destructor Documentation

virtual ~SoundTerminal (  ) [virtual]

Destructor.

Definition at line 104 of file SoundTerminal.h.


Member Function Documentation

virtual int init ( void *  init ) [pure virtual, inherited]

Initializing the component.

Parameters:
[in]initpointer to device specific initalization structure.
Return values:
0in case of success, an error code otherwise.

Implemented in STA350BW.

virtual int32_t play ( int16_t *  pData,
uint16_t  Size,
bool  loop 
) [pure virtual]

Playing a buffer of data.

Implemented in STA350BW.

virtual int read_id ( uint8_t *  id ) [pure virtual, inherited]

Getting the ID of the component.

Parameters:
[out]idpointer to an allocated variable to store the ID into.
Return values:
0in case of success, an error code otherwise.

Implemented in STA350BW.

virtual int32_t set_frequency ( uint32_t  audio_freq ) [pure virtual]

Setting frequency.

Implemented in STA350BW.

virtual int32_t set_volume ( uint8_t  channel,
uint8_t  value 
) [pure virtual]

Setting volume.

Implemented in STA350BW.

virtual int32_t stop ( void   ) [pure virtual]

Stop playing.

Implemented in STA350BW.