loadcell3 2.0.0.0
|
API for configuring and manipulating Load Cell 3 Click driver. More...
Topics | |
Load Cell 3 Registers List | |
List of registers of Load Cell 3 Click driver. | |
Load Cell 3 Registers Settings | |
Settings for registers of Load Cell 3 Click driver. | |
Load Cell 3 MikroBUS Map | |
MikroBUS pin mapping of Load Cell 3 Click driver. | |
Weight | |
Status | |
Functions | |
void | loadcell3_cfg_setup (loadcell3_cfg_t *cfg) |
Load Cell 3 configuration object setup function. | |
err_t | loadcell3_init (loadcell3_t *ctx, loadcell3_cfg_t *cfg) |
Load Cell 3 initialization function. | |
err_t | loadcell3_default_cfg (loadcell3_t *ctx) |
Load Cell 3 default configuration function. | |
err_t | loadcell3_generic_write (loadcell3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Load Cell 3 I2C writing function. | |
err_t | loadcell3_generic_read (loadcell3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Load Cell 3 I2C reading function. | |
err_t | loadcell3_generic_eeprom_write (loadcell3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Load Cell 3 EEPROM I2C writing function. | |
err_t | loadcell3_generic_eeprom_read (loadcell3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Load Cell 3 I2C EEPROM reading function. | |
err_t | loadcell3_generic_test_page_write (loadcell3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Load Cell 3 test I2C writing function. | |
err_t | loadcell3_generic_test_page_read (loadcell3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Load Cell 3 Control and Status I2C EEPROM reading function. | |
err_t | loadcell3_set_memory_page_slave_addr (loadcell3_t *ctx, uint8_t memory_page) |
Load Cell 3 set memory page function. | |
err_t | loadcell3_accesses_controller (loadcell3_t *ctx) |
Load Cell 3 accesses controller function. | |
err_t | loadcell3_accesses_digital_interface_control (loadcell3_t *ctx) |
Load Cell 3 accesses digital interface control function. | |
err_t | loadcell3_soft_reset (loadcell3_t *ctx) |
Load Cell 3 soft reset function. | |
err_t | loadcell3_set_p_gain (loadcell3_t *ctx, uint8_t p_gain) |
Load Cell 3 set pressure gain function. | |
err_t | loadcell3_set_t_gain (loadcell3_t *ctx, uint8_t t_gain) |
Load Cell 3 set temperature gain function. | |
err_t | loadcell3_set_temp_mode (loadcell3_t *ctx, uint8_t t_mode) |
Load Cell 3 set temperature mode function. | |
err_t | loadcell3_set_t_mux_ctrl (loadcell3_t *ctx, uint8_t t_mux_ctrl) |
Load Cell 3 set mux control function. | |
err_t | loadcell3_itemp_ctrl (loadcell3_t *ctx, uint8_t itemp_ctrl) |
Load Cell 3 set ITEMP control function. | |
err_t | loadcell3_set_offset (loadcell3_t *ctx, uint8_t offset_cancel_val, uint8_t offset_cancel_sel) |
Load Cell 3 set offset function. | |
int16_t | loadcell3_get_p_adc_data (loadcell3_t *ctx) |
Load Cell 3 get pressure ADC data function. | |
int16_t | loadcell3_get_t_adc_data (loadcell3_t *ctx) |
Load Cell 3 get temperature ADC data function. | |
void | loadcell3_tare (loadcell3_t *ctx, loadcell3_data_t *cell_data) |
Load Cell 3 tare the scales function. | |
err_t | loadcell3_calibration (loadcell3_t *ctx, uint16_t cal_val, loadcell3_data_t *cell_data) |
Load Cell 3 calibration function. | |
float | loadcell3_get_weight (loadcell3_t *ctx, loadcell3_data_t *cell_data) |
Load Cell 3 get weight function. | |
API for configuring and manipulating Load Cell 3 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 loadcell3_accesses_controller | ( | loadcell3_t * | ctx | ) |
Load Cell 3 accesses controller function.
This function set ccontroller accesses the memory of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t loadcell3_accesses_digital_interface_control | ( | loadcell3_t * | ctx | ) |
Load Cell 3 accesses digital interface control function.
This function set digital interface accesses the memory of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t loadcell3_calibration | ( | loadcell3_t * | ctx, |
uint16_t | cal_val, | ||
loadcell3_data_t * | cell_data ) |
Load Cell 3 calibration function.
This function for the calibration sets the calibration value into the cell data structure of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | cal_val | : Etalon weight value
|
[out] | cell_data | : Pointer to the memory location of the structure where data be stored. |
0
- Success, -1
- Error.void loadcell3_cfg_setup | ( | loadcell3_cfg_t * | cfg | ) |
Load Cell 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See loadcell3_cfg_t object definition for detailed explanation. |
err_t loadcell3_default_cfg | ( | loadcell3_t * | ctx | ) |
Load Cell 3 default configuration function.
This function executes a default configuration of Load Cell 3 click board.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t loadcell3_generic_eeprom_read | ( | loadcell3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Load Cell 3 I2C EEPROM reading function.
This function reads a desired number of data bytes starting from the selected EEPROM memory page register by using I2C serial interface.
[in] | ctx | : Click context object. See loadcell3_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 loadcell3_generic_eeprom_write | ( | loadcell3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Load Cell 3 EEPROM I2C writing function.
This function writes a desired number of data bytes starting from the selected EEPROM memory page register by using I2C serial interface.
[in] | ctx | : Click context object. See loadcell3_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.err_t loadcell3_generic_read | ( | loadcell3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Load Cell 3 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 loadcell3_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 loadcell3_generic_test_page_read | ( | loadcell3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Load Cell 3 Control and Status I2C EEPROM reading function.
This function reads a desired number of data bytes starting from the selected control and status memory page register by using I2C serial interface.
[in] | ctx | : Click context object. See loadcell3_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 loadcell3_generic_test_page_write | ( | loadcell3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Load Cell 3 test I2C writing function.
This function writes a desired number of data bytes starting from the selected test memory page register by using I2C serial interface.
[in] | ctx | : Click context object. See loadcell3_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.err_t loadcell3_generic_write | ( | loadcell3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Load Cell 3 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 loadcell3_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.int16_t loadcell3_get_p_adc_data | ( | loadcell3_t * | ctx | ) |
Load Cell 3 get pressure ADC data function.
This function set desired offset of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
int16_t loadcell3_get_t_adc_data | ( | loadcell3_t * | ctx | ) |
Load Cell 3 get temperature ADC data function.
This function set desired offset of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
float loadcell3_get_weight | ( | loadcell3_t * | ctx, |
loadcell3_data_t * | cell_data ) |
Load Cell 3 get weight function.
This function gets float value of the scales measurements [ g ] of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[out] | cell_data | : Pointer to the memory location of the structure where data be stored. |
err_t loadcell3_init | ( | loadcell3_t * | ctx, |
loadcell3_cfg_t * | cfg ) |
Load Cell 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See loadcell3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t loadcell3_itemp_ctrl | ( | loadcell3_t * | ctx, |
uint8_t | itemp_ctrl ) |
Load Cell 3 set ITEMP control function.
This function set desired ITEMP control of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | itemp_ctrl | : Desired ITEMP control. |
0
- Success, -1
- Error.err_t loadcell3_set_memory_page_slave_addr | ( | loadcell3_t * | ctx, |
uint8_t | memory_page ) |
Load Cell 3 set memory page function.
This function set memory page slave address to control communication of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | memory_page | : Desired memory page slave address. |
0
- Success, -1
- Error.err_t loadcell3_set_offset | ( | loadcell3_t * | ctx, |
uint8_t | offset_cancel_val, | ||
uint8_t | offset_cancel_sel ) |
Load Cell 3 set offset function.
This function set desired offset of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | offset_cancel_val | : Desired offset cancel value. |
[in] | offset_cancel_sel | : Desired offset selection value. |
0
- Success, -1
- Error.err_t loadcell3_set_p_gain | ( | loadcell3_t * | ctx, |
uint8_t | p_gain ) |
Load Cell 3 set pressure gain function.
This function set desired pressure gain of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | p_gain | : Desired pressure gain steps. |
0
- Success, -1
- Error.err_t loadcell3_set_t_gain | ( | loadcell3_t * | ctx, |
uint8_t | t_gain ) |
Load Cell 3 set temperature gain function.
This function set desired temperature gain of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | t_gain | : Desired temperature gain steps. |
0
- Success, -1
- Error.err_t loadcell3_set_t_mux_ctrl | ( | loadcell3_t * | ctx, |
uint8_t | t_mux_ctrl ) |
Load Cell 3 set mux control function.
This function set desired pressure channel input MUX of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | t_mux_ctrl | : Desired P channel input MUX. |
0
- Success, -1
- Error.err_t loadcell3_set_temp_mode | ( | loadcell3_t * | ctx, |
uint8_t | t_mode ) |
Load Cell 3 set temperature mode function.
This function set desired temperature mode of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[in] | t_mode | : Desired temperature mode. |
0
- Success, -1
- Error.err_t loadcell3_soft_reset | ( | loadcell3_t * | ctx | ) |
Load Cell 3 soft reset function.
This function executes a software reset of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
0
- Success, -1
- Error.void loadcell3_tare | ( | loadcell3_t * | ctx, |
loadcell3_data_t * | cell_data ) |
Load Cell 3 tare the scales function.
This function for the tare scales sets the tara value into the cell data structure of the PGA302 Sensor Signal Conditioner With 0-5V Ratiometric Output on the Load Cell 3 click board™.
[in] | ctx | : Click context object. See loadcell3_t object definition for detailed explanation. |
[out] | cell_data | : Pointer to the memory location of the structure where data be stored. |