daq3 2.0.0.0
DAQ 3 Click Driver

API for configuring and manipulating DAQ 3 Click driver. More...

Topics

 DAQ 3 Registers List
 List of registers of DAQ 3 Click driver.
 
 DAQ 3 Registers Settings
 Settings for registers of DAQ 3 Click driver.
 
 DAQ 3 MikroBUS Map
 MikroBUS pin mapping of DAQ 3 Click driver.
 
 Reg_cmd_default
 
 Mode
 
 Pd_ref
 
 Pd_amp
 

Functions

void daq3_cfg_setup (daq3_cfg_t *cfg)
 DAQ 3 configuration object setup function.
 
err_t daq3_init (daq3_t *ctx, daq3_cfg_t *cfg)
 DAQ 3 initialization function.
 
void daq3_default_cfg (daq3_t *ctx)
 DAQ 3 default configuration function.
 
void daq3_set_pwr_mode (daq3_t *ctx, uint8_t mode)
 DAQ 3 set power mode function.
 
void daq3_set_pwr_down_ref_buf (daq3_t *ctx, uint8_t pd_ref)
 DAQ 3 set power reference buffer function.
 
void daq3_set_pwr_down_amp (daq3_t *ctx, uint8_t pd_amp)
 DAQ 3 set power Amplifier function.
 
uint8_t daq3_get_sdo (daq3_t *ctx)
 DAQ 3 get state of SDO function.
 
err_t daq3_generic_write (daq3_t *ctx, uint8_t reg, uint8_t data_in)
 DAQ 3 data writing function.
 
err_t daq3_generic_read (daq3_t *ctx, uint8_t reg, uint8_t *data_out)
 DAQ 3 data reading function.
 
err_t daq3_set_reg_cfg (daq3_t *ctx, daq3_reg_cfg_t cfg_data)
 DAQ 3 set command register function.
 
err_t daq3_get_reg_cfg (daq3_t *ctx, daq3_reg_cfg_t *cfg_data)
 DAQ 3 get command register function.
 
int32_t daq3_get_conversion_result (daq3_t *ctx, daq3_reg_cfg_t cfg_data)
 DAQ 3 get conversion result function.
 
float daq3_get_voltage (daq3_t *ctx)
 DAQ 3 get voltage function.
 

Detailed Description

API for configuring and manipulating DAQ 3 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ daq3_cfg_setup()

void daq3_cfg_setup ( daq3_cfg_t * cfg)

DAQ 3 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See daq3_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ daq3_default_cfg()

void daq3_default_cfg ( daq3_t * ctx)

DAQ 3 default configuration function.

This function executes a default configuration of DAQ 3 click board.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ daq3_generic_read()

err_t daq3_generic_read ( daq3_t * ctx,
uint8_t reg,
uint8_t * data_out )

DAQ 3 data reading function.

This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ daq3_generic_write()

err_t daq3_generic_write ( daq3_t * ctx,
uint8_t reg,
uint8_t data_in )

DAQ 3 data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ daq3_get_conversion_result()

int32_t daq3_get_conversion_result ( daq3_t * ctx,
daq3_reg_cfg_t cfg_data )

DAQ 3 get conversion result function.

This function reads a conversion result data of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]cfg_data: Structure where gesture data be stored.
Returns
18-bit, two complement, ADC conversion data.

See #err_t definition for detailed explanation.

Note
None.

◆ daq3_get_reg_cfg()

err_t daq3_get_reg_cfg ( daq3_t * ctx,
daq3_reg_cfg_t * cfg_data )

DAQ 3 get command register function.

This function get command register status of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]cfg_data: Pointer to the memory location where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ daq3_get_sdo()

uint8_t daq3_get_sdo ( daq3_t * ctx)

DAQ 3 get state of SDO function.

This function get State of SDO on Power-Up of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[out]ctx: Click context object. See daq3_t object definition for detailed explanation.
Returns
  • 0x00 - Low,
  • 0x01 - High.
Note
None.

◆ daq3_get_voltage()

float daq3_get_voltage ( daq3_t * ctx)

DAQ 3 get voltage function.

This function reads a conversion result data and calculate voltage [ mV ] of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
Returns
Volatge [ mV ].

See #err_t definition for detailed explanation.

Note
None.

◆ daq3_init()

err_t daq3_init ( daq3_t * ctx,
daq3_cfg_t * cfg )

DAQ 3 initialization function.

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

Parameters
[out]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See daq3_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ daq3_set_pwr_down_amp()

void daq3_set_pwr_down_amp ( daq3_t * ctx,
uint8_t pd_amp )

DAQ 3 set power Amplifier function.

This function set power Amplifier of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[out]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]pd_amp
Amplifier:
  • 0x00 ( DAQ3_PD_AMP_POWER_DOWN ) - Power-Down,
  • 0x01 ( DAQ3_PD_AMP_POWER_UP ) - Power-Up.
Note
None.

◆ daq3_set_pwr_down_ref_buf()

void daq3_set_pwr_down_ref_buf ( daq3_t * ctx,
uint8_t pd_ref )

DAQ 3 set power reference buffer function.

This function set power reference buffer of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[out]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]pd_ref
Reference buffer:
  • 0x00 ( DAQ3_PD_REF_POWER_DOWN ) - Power-Down,
  • 0x01 ( DAQ3_PD_REF_POWER_UP ) - Power-Up.
Note
None.

◆ daq3_set_pwr_mode()

void daq3_set_pwr_mode ( daq3_t * ctx,
uint8_t mode )

DAQ 3 set power mode function.

This function set power mode for the fully differential ADC Driver of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[out]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]mode
Power mode:
  • 0x00 ( DAQ3_LOW_POWER_MODE ) - Low Power Mode,
  • 0x01 ( DAQ3_FULL_PERFORMANCE_MODE ) - Full Performance Mode.
Note
None.

◆ daq3_set_reg_cfg()

err_t daq3_set_reg_cfg ( daq3_t * ctx,
daq3_reg_cfg_t cfg_data )

DAQ 3 set command register function.

This function set command register status of ADAQ4003 18-Bit, 2 MSPS, µModule Data Acquisition Solution on DAQ 3 click board.

Parameters
[in]ctx: Click context object. See daq3_t object definition for detailed explanation.
[in]cfg_data: Structure where gesture data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.