loadcell4 2.0.0.0
|
API for configuring and manipulating Load Cell 4 Click driver. More...
Topics | |
Load Cell 4 Registers Settings | |
Settings for registers of Load Cell 4 Click driver. | |
Load Cell 4 MikroBUS Map | |
MikroBUS pin mapping of Load Cell 4 Click driver. | |
Functions | |
void | loadcell4_cfg_setup (loadcell4_cfg_t *cfg) |
Load Cell 4 configuration object setup function. | |
err_t | loadcell4_init (loadcell4_t *ctx, loadcell4_cfg_t *cfg) |
Load Cell 4 initialization function. | |
err_t | loadcell4_default_cfg (loadcell4_t *ctx) |
Load Cell 4 default configuration function. | |
err_t | loadcell4_generic_write (loadcell4_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Load Cell 4 I2C writing function. | |
err_t | loadcell4_generic_read (loadcell4_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Load Cell 4 I2C reading function. | |
void | loadcell4_read_raw (loadcell4_t *ctx, uint32_t *rx_data) |
Read raw data function. | |
uint8_t | loadcell4_read_data (loadcell4_t *ctx, uint16_t *bridge_data, int16_t *temperature_data) |
Read data function. | |
uint16_t | loadcell4_read_bridge_data (loadcell4_t *ctx) |
Read bridge data function. | |
void | loadcell4_start_cmd_mode (loadcell4_t *ctx) |
Start command mode function. | |
void | loadcell4_end_cmd_mode (loadcell4_t *ctx) |
Start command mode function. | |
void | loadcell4_power_dev (loadcell4_t *ctx, uint8_t power_state) |
Enable power function. | |
void | loadcell4_write_eeprom (loadcell4_t *ctx, uint8_t cmd_byte, uint16_t data_word) |
Write eeprom function. | |
uint16_t | loadcell4_read_eeprom (loadcell4_t *ctx, uint8_t cmd_byte) |
Write eeprom function. | |
uint8_t | loadcell4_get_int (loadcell4_t *ctx) |
Get state of the INT pin function. | |
void | loadcell4_tare (loadcell4_t *ctx, loadcell4_data_t *cell_data) |
Tare the scales function. | |
err_t | loadcell4_calibration (loadcell4_t *ctx, uint16_t cal_val, loadcell4_data_t *cell_data) |
Calibration function. | |
float | loadcell4_get_weight (loadcell4_t *ctx, loadcell4_data_t *cell_data) |
Get weight function. | |
API for configuring and manipulating Load Cell 4 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 loadcell4_calibration | ( | loadcell4_t * | ctx, |
uint16_t | cal_val, | ||
loadcell4_data_t * | cell_data ) |
Calibration function.
The function sets calibration and write the cell data structure value of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[in] | cal_val | : Etalon weight value |
[out] | cell_data | : Pointer to the memory location of the structure where cell data be stored |
0
- Success, -1
- Error.void loadcell4_cfg_setup | ( | loadcell4_cfg_t * | cfg | ) |
Load Cell 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
err_t loadcell4_default_cfg | ( | loadcell4_t * | ctx | ) |
Load Cell 4 default configuration function.
This function executes a default configuration of Load Cell 4 click board.
[in] | ctx | : Click context object. See loadcell4_t object definition for detailed explanation. |
0
- Success, -1
- Error.void loadcell4_end_cmd_mode | ( | loadcell4_t * | ctx | ) |
Start command mode function.
The function performs the end command mode of ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
err_t loadcell4_generic_read | ( | loadcell4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Load Cell 4 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See loadcell4_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t loadcell4_generic_write | ( | loadcell4_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Load Cell 4 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See loadcell4_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.uint8_t loadcell4_get_int | ( | loadcell4_t * | ctx | ) |
Get state of the INT pin function.
The function check data ready state by return state of the INT pin of Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
float loadcell4_get_weight | ( | loadcell4_t * | ctx, |
loadcell4_data_t * | cell_data ) |
Get weight function.
The function gets float value of the scales measurements [ g ] of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[out] | cell_data | : Pointer to the memory location of the structure where cell data be stored |
err_t loadcell4_init | ( | loadcell4_t * | ctx, |
loadcell4_cfg_t * | cfg ) |
Load Cell 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See loadcell4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void loadcell4_power_dev | ( | loadcell4_t * | ctx, |
uint8_t | power_state ) |
Enable power function.
The function performs power up or power down of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[out] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[in] | power_state | : Power settings. |
uint16_t loadcell4_read_bridge_data | ( | loadcell4_t * | ctx | ) |
Read bridge data function.
The function read the bridge data of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
uint8_t loadcell4_read_data | ( | loadcell4_t * | ctx, |
uint16_t * | bridge_data, | ||
int16_t * | temperature_data ) |
Read data function.
The function read the bridge and temperature data of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[out] | bridge_data | : Pointer to the memory location where bridge data be stored. |
[out] | temperature_data | : Pointer to the memory location where temperature data be stored. |
uint16_t loadcell4_read_eeprom | ( | loadcell4_t * | ctx, |
uint8_t | cmd_byte ) |
Write eeprom function.
The function read 16-bit data from the eeprom memmory of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[in] | cmd_byte | : 8-bit command byte. |
void loadcell4_read_raw | ( | loadcell4_t * | ctx, |
uint32_t * | rx_data ) |
Read raw data function.
The function read the raw data of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[out] | read_buf | : Pointer to the memory location where read data be stored. |
void loadcell4_start_cmd_mode | ( | loadcell4_t * | ctx | ) |
Start command mode function.
The function performs the start command mode of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
void loadcell4_tare | ( | loadcell4_t * | ctx, |
loadcell4_data_t * | cell_data ) |
Tare the scales function.
The function for tare scales sets tara value in the to the cell data structure.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[out] | cell_data | : Pointer to the memory location of the structure where cell data be stored. |
void loadcell4_write_eeprom | ( | loadcell4_t * | ctx, |
uint8_t | cmd_byte, | ||
uint16_t | data_word ) |
Write eeprom function.
The function write 16-bit data to the eeprom memmory of the ZSC31014, RBicilite� Digital Output Sensor Signal Conditioner on Load Cell 4 Click board.
[in] | cfg | : Click configuration structure. See loadcell4_cfg_t object definition for detailed explanation. |
[in] | cmd_byte | : 8-bit command byte. |
[in] | write_word | : 16-bit write data. |