loadcell8  2.1.0.0
Data Structures | Macros | Enumerations | Functions
loadcell8.h File Reference

This file contains API for Load Cell 8 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  loadcell8_t
 Load Cell 8 Click context object. More...
 
struct  loadcell8_cfg_t
 Load Cell 8 Click configuration object. More...
 
struct  loadcell8_data_t
 Load Cell 8 Click data object. More...
 

Macros

#define LOADCELL8_DATA_NO_DATA   0
 Load Cell 8 description setting. More...
 
#define LOADCELL8_DATA_OK   1
 
#define LOADCELL8_WEIGHT_100G   100u
 
#define LOADCELL8_WEIGHT_500G   500u
 
#define LOADCELL8_WEIGHT_1000G   1000u
 
#define LOADCELL8_WEIGHT_5000G   5000u
 
#define LOADCELL8_WEIGHT_10000G   10000u
 
#define LOADCELL8_WEIGHT_ZERO   0.0f
 
#define LOADCELL8_AVG_MEASURE_100   100.0
 
#define LOADCELL8_MEASURE_DATA_RES   0x3FFF
 
#define LOADCELL8_DEVICE_ADDRESS   0x78
 Load Cell 8 device address setting. More...
 
#define LOADCELL8_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  loadcell8_return_value_t { LOADCELL8_OK = 0, LOADCELL8_ERROR = -1 }
 Load Cell 8 Click return value data. More...
 

Functions

void loadcell8_cfg_setup (loadcell8_cfg_t *cfg)
 Load Cell 8 configuration object setup function. More...
 
err_t loadcell8_init (loadcell8_t *ctx, loadcell8_cfg_t *cfg)
 Load Cell 8 initialization function. More...
 
err_t loadcell8_default_cfg (loadcell8_t *ctx)
 Load Cell 8 default configuration function. More...
 
err_t loadcell8_generic_write (loadcell8_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Load Cell 8 I2C writing function. More...
 
err_t loadcell8_generic_read (loadcell8_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Load Cell 8 I2C reading function. More...
 
void loadcell8_hw_reset (loadcell8_t *ctx)
 Load Cell 8 HW reset function. More...
 
err_t loadcell8_read_raw_adc (loadcell8_t *ctx, uint32_t *raw_adc)
 Load Cell 8 read raw ADC value function. More...
 
err_t loadcell8_tare_scale (loadcell8_t *ctx, loadcell8_data_t *cell_data)
 Load Cell 8 read raw ADC value function. More...
 
err_t loadcell8_calibration_weight (loadcell8_t *ctx, uint16_t cal_val, loadcell8_data_t *cell_data)
 Load Cell 8 calibrate weight function. More...
 
err_t loadcell8_get_weight (loadcell8_t *ctx, loadcell8_data_t *cell_data, float *weight_g)
 Load Cell 8 get weight function. More...
 

Detailed Description

This file contains API for Load Cell 8 Click Driver.

Enumeration Type Documentation

◆ loadcell8_return_value_t

Load Cell 8 Click return value data.

Predefined enum values for driver return values.

Enumerator
LOADCELL8_OK 
LOADCELL8_ERROR