dac7  2.0.0.0
Functions
Public function

Functions

void dac7_cfg_setup (dac7_cfg_t *cfg)
 Config Object Initialization function. More...
 
DAC7_RETVAL dac7_init (dac7_t *ctx, dac7_cfg_t *cfg)
 Initialization function. More...
 
void dac7_write_data (dac7_t *ctx, uint8_t def_cmd, uint8_t addr_cmd, uint16_t write_data)
 Generic write data function. More...
 
DAC7_RETVAL_T dac7_set_channel (dac7_t *ctx, uint8_t set_cmd, uint8_t addr_ch, uint16_t write_data)
 Set the values of the specified channel function. More...
 
DAC7_RETVAL_T dac7_set_ch_voltage (dac7_t *ctx, uint8_t addr_ch, uint16_t vol_val, uint16_t v_ref_mv)
 Set the voltage values of the specified channel function. More...
 
DAC7_RETVAL_T dac7_update_channel (dac7_t *ctx, uint8_t addr_ch, uint16_t ch_data)
 Update channel function. More...
 
DAC7_RETVAL_T dac7_set_power (dac7_t *ctx, uint8_t pwr_en, uint8_t sel_ch)
 Set power mode function. More...
 
DAC7_RETVAL_T dac7_sw_reset (dac7_t *ctx)
 Software reset function. More...
 
DAC7_RETVAL_T dac7_set_ldac (dac7_t *ctx, uint8_t sel_ch)
 Set LDAC setup function. More...
 
DAC7_RETVAL_T dac7_set_internal_reference (dac7_t *ctx, uint8_t int_ref_en)
 Set internal reference function. More...
 

Detailed Description

Function Documentation

◆ dac7_cfg_setup()

void dac7_cfg_setup ( dac7_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.

◆ dac7_init()

DAC7_RETVAL dac7_init ( dac7_t ctx,
dac7_cfg_t cfg 
)

Initialization function.

Parameters
dac7Click object.
cfgClick configuration structure.

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

◆ dac7_set_ch_voltage()

DAC7_RETVAL_T dac7_set_ch_voltage ( dac7_t ctx,
uint8_t  addr_ch,
uint16_t  vol_val,
uint16_t  v_ref_mv 
)

Set the voltage values of the specified channel function.

Parameters
ctxClick object.
addr_ch3-bit address command.
vol_valVoltage values [ from 0 mV to 4096 mV or 5000 mV ].
v_ref_mvVoltage reference value.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function set 12-bit value of 3-bit command definition to the target 3-bit address command of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_set_channel()

DAC7_RETVAL_T dac7_set_channel ( dac7_t ctx,
uint8_t  set_cmd,
uint8_t  addr_ch,
uint16_t  write_data 
)

Set the values of the specified channel function.

Parameters
ctxClick object.
set_cmd3-bit command definition.
addr_ch3-bit address command.
write_data12-bit values of the specified channel.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function set 12-bit value of 3-bit command definition to the target 3-bit address command of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_set_internal_reference()

DAC7_RETVAL_T dac7_set_internal_reference ( dac7_t ctx,
uint8_t  int_ref_en 
)

Set internal reference function.

Parameters
ctxClick object.
int_ref_enChannel selection.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function set internal reference of respective channel of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_set_ldac()

DAC7_RETVAL_T dac7_set_ldac ( dac7_t ctx,
uint8_t  sel_ch 
)

Set LDAC setup function.

Parameters
ctxClick object.
sel_chChannel selection.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function set LDAC setup of respective channel of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_set_power()

DAC7_RETVAL_T dac7_set_power ( dac7_t ctx,
uint8_t  pwr_en,
uint8_t  sel_ch 
)

Set power mode function.

Parameters
ctxClick object.
pwr_enPower Enable/Disable.
sel_chChannel selection.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function set power mode of selected channel of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_sw_reset()

DAC7_RETVAL_T dac7_sw_reset ( dac7_t ctx)

Software reset function.

Parameters
ctxClick object.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function set software reset of selected channel of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_update_channel()

DAC7_RETVAL_T dac7_update_channel ( dac7_t ctx,
uint8_t  addr_ch,
uint16_t  ch_data 
)

Update channel function.

Parameters
ctxClick object.
addr_ch3-bit address command.
ch_data12-bit values of the specified channel.
Returns
8-bit data containing flags.

Flag state:

0x00 ( DAC7_ERROR ) - Error 0x01 ( DAC7_SUCCESS ) - Success pre

@description This function write and update 12-bit data to the target 3-bit address command of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.

◆ dac7_write_data()

void dac7_write_data ( dac7_t ctx,
uint8_t  def_cmd,
uint8_t  addr_cmd,
uint16_t  write_data 
)

Generic write data function.

Parameters
ctxClick object.
def_cmd3-bit command definition.
addr_cmd3-bit address command.
write_data12-bit data to write.

@description This function set 3-bit command definition and write 12-bit data to the target 3-bit address command of AD5624R Quad, 12-bit nanoDACs on DAC 7 Click board.