dac5 2.0.0.0
Public function

Functions

void dac5_cfg_setup (dac5_cfg_t *cfg)
 Config Object Initialization function.
 
DAC5_RETVAL dac5_init (dac5_t *ctx, dac5_cfg_t *cfg)
 Initialization function.
 
void dac5_generic_write (dac5_t *ctx, uint8_t reg, uint16_t data_buf)
 Generic write function.
 
uint16_t dac5_generic_read (dac5_t *ctx, uint8_t reg)
 Generic read function.
 
void dac5_config (dac5_t *ctx, uint16_t config_data)
 Function for configurating click.
 
uint16_t dac5_get_device_id (dac5_t *ctx)
 Function for reading device id.
 
void dac5_software_reset (dac5_t *ctx)
 Function for software reset.
 
void dac5_clear (dac5_t *ctx)
 Function for clearing sent data.
 
uint8_t dac5_set_ldac_pin (dac5_t *ctx, uint8_t status)
 Function for setting LDAC pin status.
 
uint8_t dac5_send_data (dac5_t *ctx, uint8_t data_reg, uint16_t data_buf)
 Function for sending data to one output.
 

Detailed Description

Function Documentation

◆ dac5_cfg_setup()

void dac5_cfg_setup ( dac5_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.

◆ dac5_clear()

void dac5_clear ( dac5_t * ctx)

Function for clearing sent data.

Parameters
ctxClick object.

@description This functions clears output V

◆ dac5_config()

void dac5_config ( dac5_t * ctx,
uint16_t config_data )

Function for configurating click.

Parameters
ctxClick object.
config_dataConfiguration data

@description This function sends configures device

◆ dac5_generic_read()

uint16_t dac5_generic_read ( dac5_t * ctx,
uint8_t reg )

Generic read function.

Parameters
ctxClick object.
regRegister address.
Returns
Output read data

@description This function reads data from the desired register.

◆ dac5_generic_write()

void dac5_generic_write ( dac5_t * ctx,
uint8_t reg,
uint16_t data_buf )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.

@description This function writes data to the desired register.

◆ dac5_get_device_id()

uint16_t dac5_get_device_id ( dac5_t * ctx)

Function for reading device id.

Parameters
ctxClick object.
Returns
DAC5_DEVICE_ID if successful.

@description This function gets device id

◆ dac5_init()

DAC5_RETVAL dac5_init ( dac5_t * ctx,
dac5_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ dac5_send_data()

uint8_t dac5_send_data ( dac5_t * ctx,
uint8_t data_reg,
uint16_t data_buf )

Function for sending data to one output.

Parameters
ctxClick object.
data_regRegistar of sending target
data_bufData to be sent
Note
data_buf have minimum (DAC5_MIN_DATA) and maximum (DAC5_MAX_DATA) value
Returns
either DAC5_ERROR or DAC5_SUCCESS.

@description This function sends data for changing V on output

◆ dac5_set_ldac_pin()

uint8_t dac5_set_ldac_pin ( dac5_t * ctx,
uint8_t status )

Function for setting LDAC pin status.

Parameters
ctxClick object.
statusShould send either DAC5_SYNCHRONOUS or DAC5_ASYNCHRONOUS
Returns
either DAC5_ERROR or DAC5_SUCCESS.

@description This function sets state of ldac pin

◆ dac5_software_reset()

void dac5_software_reset ( dac5_t * ctx)

Function for software reset.

Parameters
ctxClick object.

@description This function resets device