stereoamp 2.0.0.0
Public function

Functions

void stereoamp_cfg_setup (stereoamp_cfg_t *cfg)
 Config Object Initialization function.
 
STEREOAMP_RETVAL stereoamp_init (stereoamp_t *ctx, stereoamp_cfg_t *cfg)
 Initialization function.
 
void stereoamp_default_cfg (stereoamp_t *ctx)
 Click Default Configuration function.
 
void stereoamp_generic_write (stereoamp_t *ctx, uint8_t ch_addr, uint8_t reg_addr, uint8_t tx_data)
 Generic write function.
 
void stereoamp_set_volume (stereoamp_t *ctx, uint8_t volume)
 Set the volume function.
 
void stereoamp_mute (stereoamp_t *ctx)
 Set the mute mode function.
 
void stereoamp_soft_reset (stereoamp_t *ctx)
 Soft reset function.
 
void stereoamp_enable_diagnostic (stereoamp_t *ctx)
 Enable the diagnostic function.
 
void stereoamp_set_power_on (stereoamp_t *ctx)
 Set the power On by channel function.
 
void stereoamp_enable_fault (stereoamp_t *ctx)
 Enable the fault function.
 
uint8_t stereoamp_check_fault_left (stereoamp_t *ctx)
 Check the fault of the left speaker function.
 
uint8_t stereoamp_check_fault_right (stereoamp_t *ctx)
 Check the fault of the right speaker function.
 

Detailed Description

Function Documentation

◆ stereoamp_cfg_setup()

void stereoamp_cfg_setup ( stereoamp_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ stereoamp_check_fault_left()

uint8_t stereoamp_check_fault_left ( stereoamp_t * ctx)

Check the fault of the left speaker function.

Parameters
ctxClick object.

@description This function check the fault of the left speaker by get states of AN pin of StereoAmp click board.

◆ stereoamp_check_fault_right()

uint8_t stereoamp_check_fault_right ( stereoamp_t * ctx)

Check the fault of the right speaker function.

Parameters
ctxClick object.

@description This function check the fault of the right speaker by get states of INT pin of StereoAmp click board.

◆ stereoamp_default_cfg()

void stereoamp_default_cfg ( stereoamp_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for LTC2601 click.

◆ stereoamp_enable_diagnostic()

void stereoamp_enable_diagnostic ( stereoamp_t * ctx)

Enable the diagnostic function.

Parameters
ctxClick object.

@description This function enable the diagnostic by write to the Diagnostic Control register address of LM48100Q-Q1 chip on StereoAmp click board.

◆ stereoamp_enable_fault()

void stereoamp_enable_fault ( stereoamp_t * ctx)

Enable the fault function.

Parameters
ctxClick object.

@description This function enable the fault of both channels by write to the Fault Detection Control register address of LM48100Q-Q1 chip on StereoAmp click board.

◆ stereoamp_generic_write()

void stereoamp_generic_write ( stereoamp_t * ctx,
uint8_t ch_addr,
uint8_t reg_addr,
uint8_t tx_data )

Generic write function.

Parameters
ctxClick object.

@param ch_address 8-bit channel address.

0 = right channel ( speaker ) 1 = left channel ( speaker ) pre

Parameters
reg_addrRegister address.
tx_dataData to be written.

@description This function writes data to the desired register.

◆ stereoamp_init()

STEREOAMP_RETVAL stereoamp_init ( stereoamp_t * ctx,
stereoamp_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ stereoamp_mute()

void stereoamp_mute ( stereoamp_t * ctx)

Set the mute mode function.

Parameters
ctxClick object.

@description This function set the mute mode of both channels to the Volume Control register address of LM48100Q-Q1 chip on StereoAmp click board.

◆ stereoamp_set_power_on()

void stereoamp_set_power_on ( stereoamp_t * ctx)

Set the power On by channel function.

Parameters
ctxClick object.

@description This function set the power On of both channels by write to the Mode Control register address of LM48100Q-Q1 chip on StereoAmp click board.

◆ stereoamp_set_volume()

void stereoamp_set_volume ( stereoamp_t * ctx,
uint8_t volume )

Set the volume function.

Parameters
ctxClick object.
volume5-bit volume value from 0 ( 0x00 ) to 31 ( 0x1F ).

@description This function set the volume of both channels to the Volume Control register address of LM48100Q-Q1 chip on StereoAmp click board.

◆ stereoamp_soft_reset()

void stereoamp_soft_reset ( stereoamp_t * ctx)

Soft reset function.

Parameters
ctxClick object.

@description This function set soft reset by write to the Diagnostic Control register address of LM48100Q-Q1 chip on StereoAmp click board.