speaker  2.0.0.0
Modules | Functions
Speaker Click Driver

API for configuring and manipulating Speaker Click driver. More...

Modules

 Speaker MikroBUS Map
 MikroBUS pin mapping of Speaker Click driver.
 

Functions

void speaker_cfg_setup (speaker_cfg_t *cfg)
 Speaker configuration object setup function. More...
 
err_t speaker_init (speaker_t *ctx, speaker_cfg_t *cfg)
 Speaker initialization function. More...
 
err_t speaker_default_cfg (speaker_t *ctx)
 Speaker default configuration function. More...
 
err_t speaker_enable_slave_amp (speaker_t *ctx)
 Speaker enables the slave amplifier function. More...
 
err_t speaker_disable_slave_amp (speaker_t *ctx)
 Speaker disables the slave amplifier function. More...
 
err_t speaker_shutdown (speaker_t *ctx)
 Speaker shutdown mode function. More...
 
err_t speaker_normal_operation (speaker_t *ctx)
 Speaker normal operation mode function. More...
 

Detailed Description

API for configuring and manipulating Speaker Click driver.

Function Documentation

◆ speaker_cfg_setup()

void speaker_cfg_setup ( speaker_cfg_t cfg)

Speaker configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See speaker_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ speaker_default_cfg()

err_t speaker_default_cfg ( speaker_t ctx)

Speaker default configuration function.

This function executes a default configuration of Speaker click board.

Parameters
[in]ctx: Click context object. See speaker_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ speaker_disable_slave_amp()

err_t speaker_disable_slave_amp ( speaker_t ctx)

Speaker disables the slave amplifier function.

This function disables the slave amplifier by sets the SB ( INT ) pin on the high level of the Speaker click board™.

Parameters
[in]ctx: Click context object. See speaker_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ speaker_enable_slave_amp()

err_t speaker_enable_slave_amp ( speaker_t ctx)

Speaker enables the slave amplifier function.

This function enables the slave amplifier by clears the SB ( INT ) pin on the low level of the Speaker click board™.

Parameters
[in]ctx: Click context object. See speaker_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ speaker_init()

err_t speaker_init ( speaker_t ctx,
speaker_cfg_t cfg 
)

Speaker initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See speaker_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See speaker_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ speaker_normal_operation()

err_t speaker_normal_operation ( speaker_t ctx)

Speaker normal operation mode function.

This function enables the shutdown mode by sets the PWR ( PWM ) pin on the high level of the Speaker click board™.

Parameters
[in]ctx: Click context object. See speaker_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ speaker_shutdown()

err_t speaker_shutdown ( speaker_t ctx)

Speaker shutdown mode function.

This function enables the shutdown mode by clears the PWR ( PWM ) pin on the low level of the Speaker click board™.

Parameters
[in]ctx: Click context object. See speaker_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.