loadcell7 2.1.0.0
|
API for configuring and manipulating Load Cell 7 Click driver. More...
Topics | |
Load Cell 7 Registers Settings | |
Settings for registers of Load Cell 7 Click driver. | |
Load Cell 7 MikroBUS Map | |
MikroBUS pin mapping of Load Cell 7 Click driver. | |
Functions | |
void | loadcell7_cfg_setup (loadcell7_cfg_t *cfg) |
Load Cell 7 configuration object setup function. | |
err_t | loadcell7_init (loadcell7_t *ctx, loadcell7_cfg_t *cfg) |
Load Cell 7 initialization function. | |
void | loadcell7_enable_device (loadcell7_t *ctx) |
Load Cell 7 enable device function. | |
void | loadcell7_disable_device (loadcell7_t *ctx) |
Load Cell 7 disable device function. | |
err_t | loadcell7_read_raw_adc (loadcell7_t *ctx, int32_t *data_out) |
Load Cell 7 read raw adc function. | |
err_t | loadcell7_tare_scale (loadcell7_t *ctx) |
Load Cell 7 tare scale function. | |
err_t | loadcell7_calibrate_weight (loadcell7_t *ctx, float cal_weight) |
Load Cell 7 calibrate weight function. | |
err_t | loadcell7_get_weight (loadcell7_t *ctx, float *weight) |
Load Cell 7 get weight function. | |
API for configuring and manipulating Load Cell 7 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t loadcell7_calibrate_weight | ( | loadcell7_t * | ctx, |
float | cal_weight ) |
Load Cell 7 calibrate weight function.
This function calibrates the weight by calculating the ctx->weight_scale for the input calibration weight.
[in] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
[in] | cal_weight | : Calibration weight value in grams of the goods placed on the scale. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void loadcell7_cfg_setup | ( | loadcell7_cfg_t * | cfg | ) |
Load Cell 7 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See loadcell7_cfg_t object definition for detailed explanation. |
void loadcell7_disable_device | ( | loadcell7_t * | ctx | ) |
Load Cell 7 disable device function.
This function disables the device by setting the CS (PWDN) pin to low logic state.
[in] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
void loadcell7_enable_device | ( | loadcell7_t * | ctx | ) |
Load Cell 7 enable device function.
This function enables the device by setting the CS (PWDN) pin to high logic state.
[in] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
err_t loadcell7_get_weight | ( | loadcell7_t * | ctx, |
float * | weight ) |
Load Cell 7 get weight function.
This function calculates the weight of the goods in grams.
[in] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
[out] | weight | : The weight of the goods in grams. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t loadcell7_init | ( | loadcell7_t * | ctx, |
loadcell7_cfg_t * | cfg ) |
Load Cell 7 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See loadcell7_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t loadcell7_read_raw_adc | ( | loadcell7_t * | ctx, |
int32_t * | data_out ) |
Load Cell 7 read raw adc function.
This function reads raw ADC measurements using SPI serial interface.
[in] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
[out] | data_out | : 24-bit ADC data out. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t loadcell7_tare_scale | ( | loadcell7_t * | ctx | ) |
Load Cell 7 tare scale function.
This function calculates the ctx->tare_scale which is the raw ADC readings of the empty container.
[in] | ctx | : Click context object. See loadcell7_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.