amrcurent 2.0.0.0
|
Functions | |
void | amrcurent_cfg_setup (amrcurent_cfg_t *cfg) |
Config Object Initialization function. | |
AMRCURENT_RETVAL | amrcurent_init (amrcurent_t *ctx, amrcurent_cfg_t *cfg) |
Initialization function. | |
void | amrcurent_default_cfg (amrcurent_t *ctx) |
Click Default Configuration function. | |
void | amrcurent_generic_write (amrcurent_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | amrcurent_generic_read (amrcurent_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | amrcurrent_read_value (amrcurent_t *ctx) |
Reads ADC current data. | |
uint8_t | amrcurrent_get_int_pin_state (amrcurent_t *ctx) |
Gets state of the FLTB pin on int. | |
void | amrcurrent_set_rst_pin_state (amrcurent_t *ctx, uint8_t pin_state) |
Sets state of the reset pin. | |
void | amrcurrent_hw_reset (amrcurent_t *ctx) |
Hardware reset device. | |
float | amrcurrent_get_current (amrcurent_t *ctx) |
Reads current data in mA. | |
void amrcurent_cfg_setup | ( | amrcurent_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void amrcurent_default_cfg | ( | amrcurent_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for AMRCurent click.
void amrcurent_generic_read | ( | amrcurent_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void amrcurent_generic_write | ( | amrcurent_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
AMRCURENT_RETVAL amrcurent_init | ( | amrcurent_t * | ctx, |
amrcurent_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
float amrcurrent_get_current | ( | amrcurent_t * | ctx | ) |
Reads current data in mA.
ctx | Click object. |
@description This function gets current.
uint8_t amrcurrent_get_int_pin_state | ( | amrcurent_t * | ctx | ) |
Gets state of the FLTB pin on int.
ctx | Click object. |
@description This function state of the pin.
void amrcurrent_hw_reset | ( | amrcurent_t * | ctx | ) |
Hardware reset device.
ctx | Click object. |
@description This function reset hardware device.
uint16_t amrcurrent_read_value | ( | amrcurent_t * | ctx | ) |
Reads ADC current data.
ctx | Click object. |
@description This function read value.
void amrcurrent_set_rst_pin_state | ( | amrcurent_t * | ctx, |
uint8_t | pin_state ) |
Sets state of the reset pin.
ctx | Click object. |
pin_state | value of pin to be set. |
@description This function sets rst pin state.