adc8
2.0.0.0
|
Functions | |
void | adc8_cfg_setup (adc8_cfg_t *cfg) |
Config Object Initialization function. More... | |
ADC8_RETVAL | adc8_init (adc8_t *ctx, adc8_cfg_t *cfg) |
Initialization function. More... | |
void | adc8_default_cfg (adc8_t *ctx) |
Click Default Configuration function. More... | |
void | adc8_generic_write (adc8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | adc8_generic_read (adc8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
void | adc8_set_cfg_register (adc8_t *ctx, uint16_t cfg) |
Device configuration for measurement. More... | |
uint16_t | adc8_get_adc_value (adc8_t *ctx, uint8_t channel) |
Get ADC value on the channel. More... | |
float | adc8_get_voltage (adc8_t *ctx, uint8_t channel) |
Read Voltage in mV. More... | |
uint8_t | adc8_get_interrupt_state (adc8_t *ctx) |
Get interrupt pin state. More... | |
void | adc8_get_single_channel (adc8_t *ctx, adc8_single_volt_t *volt) |
Get [Package} Single channel voltage. More... | |
void | adc8_get_diff_channel (adc8_t *ctx, adc8_diff_volt_t *volt) |
Get [Package] Diff channel voltage. More... | |
void adc8_cfg_setup | ( | adc8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void adc8_default_cfg | ( | adc8_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Adc8 click.
void adc8_generic_read | ( | adc8_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 |
This function reads data from the desired register.
void adc8_generic_write | ( | adc8_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. |
This function writes data to the desired register.
uint16_t adc8_get_adc_value | ( | adc8_t * | ctx, |
uint8_t | channel | ||
) |
Get ADC value on the channel.
ctx | Click object. |
channel | Channel (Single - 0,1,2 or 3 and diff 0-1, 0-3, 1-3, or 2-3) |
void adc8_get_diff_channel | ( | adc8_t * | ctx, |
adc8_diff_volt_t * | volt | ||
) |
Get [Package] Diff channel voltage.
ctx | Click object. |
*volt | Voltage - on the channel ( 0-1, 0-3, 1-3 and 2-3 ) |
uint8_t adc8_get_interrupt_state | ( | adc8_t * | ctx | ) |
Get interrupt pin state.
ctx | Click object. |
void adc8_get_single_channel | ( | adc8_t * | ctx, |
adc8_single_volt_t * | volt | ||
) |
Get [Package} Single channel voltage.
ctx | Click object. |
*volt | Voltage - on the channel ( 0, 1, 2 and 3 ) |
float adc8_get_voltage | ( | adc8_t * | ctx, |
uint8_t | channel | ||
) |
Read Voltage in mV.
ctx | Click object. |
channel | Channel (Single - 0,1,2 or 3 and diff 0-1, 0-3, 1-3, or 2-3) |
ADC8_RETVAL adc8_init | ( | adc8_t * | ctx, |
adc8_cfg_t * | cfg | ||
) |
Initialization function.
adc8 | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void adc8_set_cfg_register | ( | adc8_t * | ctx, |
uint16_t | cfg | ||
) |
Device configuration for measurement.
ctx | Click object. |
cfg | Config data |