loadcell 2.0.0.0
Public function

Functions

void loadcell_cfg_setup (loadcell_cfg_t *cfg)
 Config Object Initialization function.
 
LOADCELL_RETVAL loadcell_init (loadcell_t *ctx, loadcell_cfg_t *cfg)
 Initialization function.
 
void loadcell_default_cfg (loadcell_t *ctx)
 Click Default Configuration function.
 
uint8_t loadcell_check_out (loadcell_t *ctx)
 Check status of pin DO (do_pin).
 
uint8_t loadcell_read_results (loadcell_t *ctx, uint8_t input_sel, uint32_t *data_out)
 Read results of function.
 
void loadcell_set_rate (loadcell_t *ctx, uint8_t rate_sel)
 Set rate function.
 
void loadcell_reset (loadcell_t *ctx)
 Reset clock function.
 
void loadcell_set_mode (loadcell_t *ctx, uint8_t pwr_mode)
 Set clock mode function.
 
void loadcell_tare (loadcell_t *ctx, uint8_t input_sel, loadcell_data_t *cell_data)
 Function of messure and read results.
 
uint8_t loadcell_calibration (loadcell_t *ctx, uint8_t input_sel, uint16_t cal_val, loadcell_data_t *cell_data)
 Calibration function.
 
float loadcell_get_weight (loadcell_t *ctx, uint8_t input_sel, loadcell_data_t *cell_data)
 Get weight function.
 

Detailed Description

Function Documentation

◆ loadcell_calibration()

uint8_t loadcell_calibration ( loadcell_t * ctx,
uint8_t input_sel,
uint16_t cal_val,
loadcell_data_t * cell_data )

Calibration function.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description This function do calibration.

◆ loadcell_cfg_setup()

void loadcell_cfg_setup ( loadcell_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.

◆ loadcell_check_out()

uint8_t loadcell_check_out ( loadcell_t * ctx)

Check status of pin DO (do_pin).

Parameters
loadcellClick object.
cfgClick configuration structure.

@description When the data output pin (DO) goes to a LOW logic level, the host microcontroller (MCU) can start generating clock pulses on the SCK pin.

◆ loadcell_default_cfg()

void loadcell_default_cfg ( loadcell_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Load cell click.

◆ loadcell_get_weight()

float loadcell_get_weight ( loadcell_t * ctx,
uint8_t input_sel,
loadcell_data_t * cell_data )

Get weight function.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description This function messure weight.

◆ loadcell_init()

LOADCELL_RETVAL loadcell_init ( loadcell_t * ctx,
loadcell_cfg_t * cfg )

Initialization function.

Parameters
loadcellClick object.
cfgClick configuration structure.

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

◆ loadcell_read_results()

uint8_t loadcell_read_results ( loadcell_t * ctx,
uint8_t input_sel,
uint32_t * data_out )

Read results of function.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description This function read result for this click.

◆ loadcell_reset()

void loadcell_reset ( loadcell_t * ctx)

Reset clock function.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description This function reset serial data clock.

◆ loadcell_set_mode()

void loadcell_set_mode ( loadcell_t * ctx,
uint8_t pwr_mode )

Set clock mode function.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description This function set clock mode.

◆ loadcell_set_rate()

void loadcell_set_rate ( loadcell_t * ctx,
uint8_t rate_sel )

Set rate function.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description A HIGH logic level on this pin will set the output data rate at 80 samples per second (SPS), while the LOW logic level will set the data rate to 10 SPS. .

◆ loadcell_tare()

void loadcell_tare ( loadcell_t * ctx,
uint8_t input_sel,
loadcell_data_t * cell_data )

Function of messure and read results.

Parameters
loadcellClick object.
cfgClick configuration structure.

@description This function read results of messure.