current3 2.0.0.0
|
Functions | |
void | current3_cfg_setup (current3_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | current3_init (current3_t *ctx, current3_cfg_t *cfg) |
Initialization function. | |
void | current3_default_cfg (current3_t *ctx, current3_sense_cfg_data_t sense_cfg_data) |
Click Default Configuration function. | |
err_t | current3_generic_write (current3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Generic write function. | |
err_t | current3_generic_read (current3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Generic read function. | |
float | current3_get_temperature (current3_t *ctx, uint8_t temp_sel) |
Get temperature function. | |
void | current3_get_status (current3_t *ctx, current3_status_data_t *status_cfg) |
Get status function. | |
void | current3_set_configuration (current3_t *ctx, current3_cfg_data_t cfg_data) |
Set configuration function. | |
void | current3_get_configuration (current3_t *ctx, current3_cfg_data_t *cfg_data) |
Get configuration function. | |
void | current3_set_voltage_sampling_config (current3_t *ctx, current3_voltage_cfg_data_t vtg_cfg_data) |
Set voltage sampling configuration function. | |
void | current3_get_voltage_sampling_config (current3_t *ctx, current3_voltage_cfg_data_t *vtg_cfg_data) |
Get voltage sampling configuration function. | |
void | current3_set_sense_sampling_config (current3_t *ctx, current3_sense_cfg_data_t sense_cfg_data) |
Set sense sampling configuration function. | |
void | current3_get_sense_sampling_config (current3_t *ctx, current3_sense_cfg_data_t *sense_cfg_data) |
Get sense sampling configuration function. | |
int16_t | current3_get_sense_voltage (current3_t *ctx) |
Get sense voltage function. | |
float | current3_get_source_voltage (current3_t *ctx) |
Get source voltage function. | |
float | current3_get_current (current3_t *ctx) |
Get current measurement function. | |
uint8_t | current3_check_therm (current3_t *ctx) |
Check therm ststus function. | |
uint8_t | current3_check_alert (current3_t *ctx) |
Check alert ststus function. | |
void current3_cfg_setup | ( | current3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint8_t current3_check_alert | ( | current3_t * | ctx | ) |
Check alert ststus function.
ctx | Click object. |
Function check alert stauts of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
uint8_t current3_check_therm | ( | current3_t * | ctx | ) |
Check therm ststus function.
ctx | Click object. |
Function check therm stauts by detecting temperatures drops below the Tcrit Limit of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
void current3_default_cfg | ( | current3_t * | ctx, |
current3_sense_cfg_data_t | sense_cfg_data ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Current3 click.
err_t current3_generic_read | ( | current3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_out | Output data buf |
len | Number of the bytes to be read |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t current3_generic_write | ( | current3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_in | Data buf to be written. |
len | Number of the bytes in data buf. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.void current3_get_configuration | ( | current3_t * | ctx, |
current3_cfg_data_t * | cfg_data ) |
Get configuration function.
ctx | Click object. |
cfg_data | Pointer to the memory location where data be stored. |
The function get the configuration by read data byte from a register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
float current3_get_current | ( | current3_t * | ctx | ) |
Get current measurement function.
ctx | Click object. |
The function current measurement measure the direction of current flow ( from SENSE+ to SENSE- or from SENSE- to SENSE+ ) of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
void current3_get_sense_sampling_config | ( | current3_t * | ctx, |
current3_sense_cfg_data_t * | sense_cfg_data ) |
Get sense sampling configuration function.
ctx | Click object. |
sense_cfg_data | Pointer to the memory location where data be stored. |
The function get sense sampling configurationby read data byte from a register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
int16_t current3_get_sense_voltage | ( | current3_t * | ctx | ) |
Get sense voltage function.
ctx | Click object. |
The function measured Vsense voltage across the sense resistor ( Rsense ) placed between the SENSE+ and SENSE- pins of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
The bit weighting values are for representation of the voltage relative to full scale. There is no internal scaling of data and all normal binary bit weightings still apply.
float current3_get_source_voltage | ( | current3_t * | ctx | ) |
Get source voltage function.
ctx | Click object. |
The function source voltage registers store the voltage measured at the SENSE+ pin of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
void current3_get_status | ( | current3_t * | ctx, |
current3_status_data_t * | status_cfg ) |
Get status function.
ctx | Click object. |
status_cfg | Structure where data be stored. |
The function get status by read data byte from a register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
float current3_get_temperature | ( | current3_t * | ctx, |
uint8_t | temp_sel ) |
Get temperature function.
ctx | Click object. |
temp_sel | - 0x00 ( CURRENT3_TEMP_INTERNAL_DIODE ) : Internal Diode. - 0x01 ( CURRENT3_TEMP_EXTERNAL_DIODE ) : External Diode. |
The function get the temperature by read multiple data bytes from a group of contiguous registers of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
void current3_get_voltage_sampling_config | ( | current3_t * | ctx, |
current3_voltage_cfg_data_t * | vtg_cfg_data ) |
Get voltage sampling configuration function.
ctx | Click object. |
vtg_cfg_data | Pointer to the memory location where data be stored. |
The function get voltage sampling configuration by read data byte from a register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
err_t current3_init | ( | current3_t * | ctx, |
current3_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.void current3_set_configuration | ( | current3_t * | ctx, |
current3_cfg_data_t | cfg_data ) |
Set configuration function.
ctx | Click object. |
cfg_data | Structure where data be stored. |
The function set the configuration by write data byte to the register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
void current3_set_sense_sampling_config | ( | current3_t * | ctx, |
current3_sense_cfg_data_t | sense_cfg_data ) |
Set sense sampling configuration function.
ctx | Click object. |
sense_cfg_data | Structure where data be stored. |
The function set sense sampling configuration by write data byte from a register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.
void current3_set_voltage_sampling_config | ( | current3_t * | ctx, |
current3_voltage_cfg_data_t | vtg_cfg_data ) |
Set voltage sampling configuration function.
ctx | Click object. |
vtg_cfg_data | Structure where data be stored. |
The function set voltage sampling configuration by write data byte from a register of the High-Side Current-Sense and Dual 1�C Temperature Monitor on Current 3 Click board.