gainamp2 2.0.0.0
|
Functions | |
void | gainamp2_cfg_setup (gainamp2_cfg_t *cfg) |
Config Object Initialization function. | |
GAINAMP2_RETVAL | gainamp2_init (gainamp2_t *ctx, gainamp2_cfg_t *cfg) |
Initialization function. | |
void | gainamp2_generic_transfer (gainamp2_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | gainamp2_write_command (gainamp2_t *ctx, uint8_t instruction, uint8_t input) |
Send Command. | |
void | gainamp2_set_channel_gain (gainamp2_t *ctx, uint8_t channel, uint8_t gain) |
Set the channel gain. | |
float | gainamp2_get_voltage (gainamp2_t *ctx) |
Return voltage measured from OUT pin. | |
void gainamp2_cfg_setup | ( | gainamp2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void gainamp2_generic_transfer | ( | gainamp2_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
float gainamp2_get_voltage | ( | gainamp2_t * | ctx | ) |
Return voltage measured from OUT pin.
ctx | Click object. |
@description This function returns voltage measured from OUT pin.
GAINAMP2_RETVAL gainamp2_init | ( | gainamp2_t * | ctx, |
gainamp2_cfg_t * | cfg ) |
Initialization function.
gainamp2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void gainamp2_set_channel_gain | ( | gainamp2_t * | ctx, |
uint8_t | channel, | ||
uint8_t | gain ) |
Set the channel gain.
ctx | Click object. |
channel | |
gain |
@description This function sets the channel gain.
void gainamp2_write_command | ( | gainamp2_t * | ctx, |
uint8_t | instruction, | ||
uint8_t | input ) |
Send Command.
ctx | Click object. |
instruction | |
input |
Function setup amplifier according to provided command.