loadcell6 2.0.0.0
Load Cell 6 Click Driver

API for configuring and manipulating Load Cell 6 Click driver. More...

Topics

 Load Cell 6 Registers List
 List of registers of Load Cell 6 Click driver.
 
 Load Cell 6 Registers Settings
 Settings for registers of Load Cell 6 Click driver.
 
 Load Cell 6 MikroBUS Map
 MikroBUS pin mapping of Load Cell 6 Click driver.
 

Functions

void loadcell6_cfg_setup (loadcell6_cfg_t *cfg)
 Load Cell 6 configuration object setup function.
 
err_t loadcell6_init (loadcell6_t *ctx, loadcell6_cfg_t *cfg)
 Load Cell 6 initialization function.
 
err_t loadcell6_default_cfg (loadcell6_t *ctx)
 Load Cell 6 default configuration function.
 
err_t loadcell6_generic_write (loadcell6_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Load Cell 6 data writing function.
 
err_t loadcell6_generic_read (loadcell6_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Load Cell 6 data reading function.
 
err_t loadcell6_hw_reset (loadcell6_t *ctx)
 Load Cell 6 hw reset function.
 
uint8_t loadcell6_sync (loadcell6_t *ctx)
 Load Cell 6 get sync function.
 
uint8_t loadcell6_check_data_ready (loadcell6_t *ctx)
 Load Cell 6 check data ready function.
 
err_t loadcell6_write_reg (loadcell6_t *ctx, uint8_t reg, uint8_t data_in)
 Load Cell 6 write reg function.
 
err_t loadcell6_read_reg (loadcell6_t *ctx, uint8_t reg, uint8_t *data_out)
 Load Cell 6 read reg function.
 
err_t loadcell6_write_reg_data (loadcell6_t *ctx, uint8_t reg, uint32_t data_in)
 Load Cell 6 read reg data function.
 
err_t loadcell6_read_reg_data (loadcell6_t *ctx, uint8_t reg, uint32_t *data_out)
 Load Cell 6 read reg data function.
 
err_t loadcell6_set_command (loadcell6_t *ctx, uint8_t cmd)
 Load Cell 6 set command function.
 
err_t loadcell6_get_status (loadcell6_t *ctx, uint16_t *status)
 Load Cell 6 get status function.
 
err_t loadcell6_read_adc (loadcell6_t *ctx, uint32_t *data_out)
 Load Cell 6 read ADC data function.
 
err_t loadcell6_tare (loadcell6_t *ctx, loadcell6_data_t *cell_data)
 Load Cell 6 tare the scales function.
 
err_t loadcell6_calibration (loadcell6_t *ctx, uint16_t cal_val, loadcell6_data_t *cell_data)
 Load Cell 6 calibration function.
 
err_t loadcell6_get_weight (loadcell6_t *ctx, loadcell6_data_t *cell_data, float *weight_g)
 Load Cell 6 get weight function.
 

Detailed Description

API for configuring and manipulating Load Cell 6 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

◆ loadcell6_calibration()

err_t loadcell6_calibration ( loadcell6_t * ctx,
uint16_t cal_val,
loadcell6_data_t * cell_data )

Load Cell 6 calibration function.

This function for the calibration sets the calibration value into the cell data structure of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
[in]cal_val: Etalon weight value
  • 100 ( LOADCELL6_WEIGHT_100G ) : 100g etalon,
  • 200 ( LOADCELL6_WEIGHT_200G ) : 200g etalon,
  • 500 ( LOADCELL6_WEIGHT_500G ) : 500g etalon,
  • 1000 ( LOADCELL6_WEIGHT_1000G ) : 1000g etalon,
  • 5000 ( LOADCELL6_WEIGHT_5000G ) : 5000g etalon,
  • 10000 ( LOADCELL6_WEIGHT_10000G ) : 10000g etalon.
[out]cell_data: Pointer to the memory location of the structure where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_cfg_setup()

void loadcell6_cfg_setup ( loadcell6_cfg_t * cfg)

Load Cell 6 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ loadcell6_check_data_ready()

uint8_t loadcell6_check_data_ready ( loadcell6_t * ctx)

Load Cell 6 check data ready function.

This function check data ready state of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • -1 - High pin state.
Note
None.

◆ loadcell6_default_cfg()

err_t loadcell6_default_cfg ( loadcell6_t * ctx)

Load Cell 6 default configuration function.

This function executes a default configuration of Load Cell 6 click board.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ loadcell6_generic_read()

err_t loadcell6_generic_read ( loadcell6_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Load Cell 6 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 loadcell6_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_generic_write()

err_t loadcell6_generic_write ( loadcell6_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Load Cell 6 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 loadcell6_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_get_status()

err_t loadcell6_get_status ( loadcell6_t * ctx,
uint16_t * status )

Load Cell 6 get status function.

This function reads status of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
[out]status: Status data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_get_weight()

err_t loadcell6_get_weight ( loadcell6_t * ctx,
loadcell6_data_t * cell_data,
float * weight_g )

Load Cell 6 get weight function.

This function gets float value of the scales measurements [ g ] of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
[out]cell_data: Pointer to the memory location of the structure where data be stored.
[out]weight_g: Float value of the scales measurements [ g ].
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_hw_reset()

err_t loadcell6_hw_reset ( loadcell6_t * ctx)

Load Cell 6 hw reset function.

This function executes a hardware reset of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_init()

err_t loadcell6_init ( loadcell6_t * ctx,
loadcell6_cfg_t * cfg )

Load Cell 6 initialization function.

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

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

◆ loadcell6_read_adc()

err_t loadcell6_read_adc ( loadcell6_t * ctx,
uint32_t * data_out )

Load Cell 6 read ADC data function.

This function reads the ADC data of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
[out]data_out: ADC data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_read_reg()

err_t loadcell6_read_reg ( loadcell6_t * ctx,
uint8_t reg,
uint8_t * data_out )

Load Cell 6 read reg function.

This function reads a byte of data from the selected register of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_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.

◆ loadcell6_read_reg_data()

err_t loadcell6_read_reg_data ( loadcell6_t * ctx,
uint8_t reg,
uint32_t * data_out )

Load Cell 6 read reg data function.

This function reads a 24-bit data from the selected register of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_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.

◆ loadcell6_set_command()

err_t loadcell6_set_command ( loadcell6_t * ctx,
uint8_t cmd )

Load Cell 6 set command function.

This function writes a desired commands of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
[in]cmd: Desired command.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ loadcell6_sync()

uint8_t loadcell6_sync ( loadcell6_t * ctx)

Load Cell 6 get sync function.

This function get sync state of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • -1 - High pin state.
Note
None.

◆ loadcell6_tare()

err_t loadcell6_tare ( loadcell6_t * ctx,
loadcell6_data_t * cell_data )

Load Cell 6 tare the scales function.

This function for the tare scales sets the tara value into the cell data structure of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

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

◆ loadcell6_write_reg()

err_t loadcell6_write_reg ( loadcell6_t * ctx,
uint8_t reg,
uint8_t data_in )

Load Cell 6 write reg function.

This function writes a byte of the data to the selected register of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™

Parameters
[in]ctx: Click context object. See loadcell6_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.

◆ loadcell6_write_reg_data()

err_t loadcell6_write_reg_data ( loadcell6_t * ctx,
uint8_t reg,
uint32_t data_in )

Load Cell 6 read reg data function.

This function writes a 24-bit data to the selected register of the MAX11270 24-Bit, 10mW, 130dB SNR, 64ksps Delta-Sigma ADC with Integrated PGA on the Load Cell 6 click board™.

Parameters
[in]ctx: Click context object. See loadcell6_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.