adc3 2.0.0.0
|
Functions | |
void | adc3_cfg_setup (adc3_cfg_t *cfg) |
Config Object Initialization function. | |
ADC3_RETVAL | adc3_init (adc3_t *ctx, adc3_cfg_t *cfg) |
Initialization function. | |
void | adc3_default_cfg (adc3_t *ctx) |
Click Default Configuration function. | |
void | adc3_generic_write (adc3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | adc3_generic_read (adc3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | adc3_reset (adc3_t *ctx) |
General call reset function. | |
void | adc3_latch (adc3_t *ctx) |
General call latch function. | |
void | adc3_conversion (adc3_t *ctx) |
General call conversion function. | |
int16_t | adc3_read_measurement (adc3_t *ctx, uint8_t channel, uint8_t resolution, uint8_t gain) |
ADC3 read measurement function. | |
float | adc3_read_voltage (adc3_t *ctx, uint8_t channel, uint8_t resolution, uint8_t gain) |
Read voltage function. | |
void adc3_cfg_setup | ( | adc3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void adc3_conversion | ( | adc3_t * | ctx | ) |
General call conversion function.
ctx | Click object. |
@description This function is used to initiate general call conversion.
void adc3_default_cfg | ( | adc3_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Adc3 click.
void adc3_generic_read | ( | adc3_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 adc3_generic_write | ( | adc3_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.
ADC3_RETVAL adc3_init | ( | adc3_t * | ctx, |
adc3_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.
void adc3_latch | ( | adc3_t * | ctx | ) |
General call latch function.
ctx | Click object. |
@description This function is used to initiate general call latch.
int16_t adc3_read_measurement | ( | adc3_t * | ctx, |
uint8_t | channel, | ||
uint8_t | resolution, | ||
uint8_t | gain ) |
ADC3 read measurement function.
ctx | Click object. |
channel | 8-bit data representing channel, conversion mode, conversion rate, and PGA gain values. |
resolution | 8-bit data representing conversion rate. |
gain | 8-bit data representing PGA gain. |
@description This function is used to read digitaly converted data from any of the 4 channels.
float adc3_read_voltage | ( | adc3_t * | ctx, |
uint8_t | channel, | ||
uint8_t | resolution, | ||
uint8_t | gain ) |
Read voltage function.
ctx | Click object. |
channel | 8-bit data representing channel, conversion mode, conversion rate, and PGA gain values. |
resolution | 8-bit data representing conversion rate. |
gain | 8-bit data representing PGA gain. |
@description This function is used to read ADC value and calculate voltage.
void adc3_reset | ( | adc3_t * | ctx | ) |
General call reset function.
ctx | Click object. |
@description This function is used to initiate general call reset.