dac2 2.0.0.0
Public function

Functions

void dac2_cfg_setup (dac2_cfg_t *cfg)
 Config Object Initialization function.
 
DAC2_RETVAL dac2_init (dac2_t *ctx, dac2_cfg_t *cfg)
 Initialization function.
 
void dac2_generic_transfer (dac2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void dac2_default_cfg (dac2_t *ctx)
 Click Default Configuration function.
 
void dac2_clr_dac_2_reg (dac2_t *ctx)
 Asynchronous Clear Input function.
 
void dac2_write_output_voltage_procentage (dac2_t *ctx, uint8_t value_pct)
 Procentage generic write function.
 
void dac2_write_output_voltage_data (dac2_t *ctx, uint16_t value_data)
 Data generic write function.
 

Detailed Description

Function Documentation

◆ dac2_cfg_setup()

void dac2_cfg_setup ( dac2_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.

◆ dac2_clr_dac_2_reg()

void dac2_clr_dac_2_reg ( dac2_t * ctx)

Asynchronous Clear Input function.

Parameters
ctxClick object.

@description This function clears all registers and causes the DAC voltage outputs to drop to 0V for LTC2601.

◆ dac2_default_cfg()

void dac2_default_cfg ( dac2_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for LTC2601 click.

◆ dac2_generic_transfer()

void dac2_generic_transfer ( dac2_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ dac2_init()

DAC2_RETVAL dac2_init ( dac2_t * ctx,
dac2_cfg_t * cfg )

Initialization function.

Parameters
dac2Click object.
cfgClick configuration structure.

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

◆ dac2_write_output_voltage_data()

void dac2_write_output_voltage_data ( dac2_t * ctx,
uint16_t value_data )

Data generic write function.

Parameters
ctxClick object.
value_pctRequired 16-bit data of output voltage.

@description This function required 16-bit data value ( from 0 to 65535 ) convert to digital input and transforms it to the output voltage from 0 to Vref [mV].

◆ dac2_write_output_voltage_procentage()

void dac2_write_output_voltage_procentage ( dac2_t * ctx,
uint8_t value_pct )

Procentage generic write function.

Parameters
ctxClick object.
value_pctRequired percentage of output voltage ( from 0% to 100%).

@description This function required percentage value ( from 0% to 100% ) convert to digital input and transforms it to the output voltage from 0 to Vref [mV].