adac 2.0.0.0
Public function

Functions

void adac_cfg_setup (adac_cfg_t *cfg)
 Config Object Initialization function.
 
ADAC_RETVAL adac_init (adac_t *ctx, adac_cfg_t *cfg)
 Initialization function.
 
void adac_generic_write (adac_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void adac_generic_read (adac_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void adac_hardware_reset (adac_t *ctx)
 Hardware reset function.
 
void adac_software_reset (adac_t *ctx, uint16_t cmd)
 Software reset function.
 
void adac_power_down_settings (adac_t *ctx, uint16_t settings)
 Power down function.
 
void adac_general_purpose_settings (adac_t *ctx, uint16_t settings)
 General purpose function.
 
uint16_t adac_read_config (adac_t *ctx)
 Read configuration function.
 
void adac_write_gpio (adac_t *ctx, uint8_t w_data)
 Write GPIO function.
 
uint8_t adac_read_gpio (adac_t *ctx)
 Read GPIO function.
 
uint16_t adac_read_dac (adac_t *ctx, uint8_t *chan)
 Read DAC function.
 
uint16_t adac_read_adc (adac_t *ctx, uint8_t *chan)
 Read ADC function.
 
void adac_write_dac_data (adac_t *ctx, uint8_t chan, uint16_t w_data)
 Write DAC data function.
 
void adac_write_dac (adac_t *ctx, uint8_t chan, uint8_t msb, uint8_t lsb)
 Write DAC function.
 
void adac_set_configuration (adac_t *ctx, uint8_t ptr, uint8_t msb, uint8_t lsb)
 Set configuration function.
 
uint16_t adac_read_data (adac_t *ctx, uint8_t addr)
 Read data function.
 
void adac_write_data (adac_t *ctx, uint8_t addr, uint16_t w_data)
 Write data function.
 

Detailed Description

Function Documentation

◆ adac_cfg_setup()

void adac_cfg_setup ( adac_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.

◆ adac_general_purpose_settings()

void adac_general_purpose_settings ( adac_t * ctx,
uint16_t settings )

General purpose function.

Parameters
ctxClick object.
settingsSettings.

@description This function configures general purpose register settings of the click module.

◆ adac_generic_read()

void adac_generic_read ( adac_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ adac_generic_write()

void adac_generic_write ( adac_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ adac_hardware_reset()

void adac_hardware_reset ( adac_t * ctx)

Hardware reset function.

Parameters
ctxClick object.

@description This function does a hardware reset of the click module.

◆ adac_init()

ADAC_RETVAL adac_init ( adac_t * ctx,
adac_cfg_t * cfg )

Initialization function.

Parameters
adacClick object.
cfgClick configuration structure.

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

◆ adac_power_down_settings()

void adac_power_down_settings ( adac_t * ctx,
uint16_t settings )

Power down function.

Parameters
ctxClick object.
settingsSettings.

@description This function configures power down settings of the click module.

◆ adac_read_adc()

uint16_t adac_read_adc ( adac_t * ctx,
uint8_t * chan )

Read ADC function.

Parameters
ctxClick object.
chanADC channel.

@description This function reads ADC data using the I2C serial interface.

◆ adac_read_config()

uint16_t adac_read_config ( adac_t * ctx)

Read configuration function.

Parameters
ctxClick object.

@description This function acquires the current settings data of the click module.

◆ adac_read_dac()

uint16_t adac_read_dac ( adac_t * ctx,
uint8_t * chan )

Read DAC function.

Parameters
ctxClick object.
chanDAC channel.

@description This function reads DAC data using the I2C serial interface.

◆ adac_read_data()

uint16_t adac_read_data ( adac_t * ctx,
uint8_t addr )

Read data function.

Parameters
ctxClick object.
addrRegister address.

@description This function reads 2 bytes of data from the specified register address using the I2C serial interface.

◆ adac_read_gpio()

uint8_t adac_read_gpio ( adac_t * ctx)

Read GPIO function.

Parameters
ctxClick object.

@description This function reads GPIO data using the I2C serial interface.

◆ adac_set_configuration()

void adac_set_configuration ( adac_t * ctx,
uint8_t ptr,
uint8_t msb,
uint8_t lsb )

Set configuration function.

Parameters
ctxClick object.
ptrPointer.
msbMost significant byte.
lsbLeast significant byte.

@description This function sets the configuration for the click module.

◆ adac_software_reset()

void adac_software_reset ( adac_t * ctx,
uint16_t cmd )

Software reset function.

Parameters
ctxClick object.
cmdCommand.

@description This function does a software reset of the click module.

◆ adac_write_dac()

void adac_write_dac ( adac_t * ctx,
uint8_t chan,
uint8_t msb,
uint8_t lsb )

Write DAC function.

Parameters
ctxClick object.
chanADC channel.
msbMost significant byte.
lsbLeast significant byte.

@description This function writes DAC using the I2C serial interface.

◆ adac_write_dac_data()

void adac_write_dac_data ( adac_t * ctx,
uint8_t chan,
uint16_t w_data )

Write DAC data function.

Parameters
ctxClick object.
chanADC channel.
w_dataWrite data.

@description This function writes DAC data using the I2C serial interface.

◆ adac_write_data()

void adac_write_data ( adac_t * ctx,
uint8_t addr,
uint16_t w_data )

Write data function.

Parameters
ctxClick object.
addrRegister address.

@description This function writes 2 bytes of data to the specified register address using the I2C serial interface.

◆ adac_write_gpio()

void adac_write_gpio ( adac_t * ctx,
uint8_t w_data )

Write GPIO function.

Parameters
ctxClick object.
w_dataWrite data.

@description This function writes GPIO data using the I2C serial interface.