adc7 2.0.0.0
|
Functions | |
void | adc7_cfg_setup (adc7_cfg_t *cfg) |
Config Object Initialization function. | |
void | adc7_default_cfg (adc7_t *ctx) |
Default Configuration Initialization function. | |
ADC7_RETVAL | adc7_init (adc7_t *ctx, adc7_cfg_t *cfg) |
Initialization function. | |
uint8_t | adc7_set_config (adc7_t *ctx, uint8_t gain_config, uint8_t down_samp_factor, uint8_t filter_type) |
Configuration set function. | |
uint8_t | adc7_check_data_ready (adc7_t *ctx) |
Data Ready Check Function. | |
uint8_t | adc7_check_busy (adc7_t *ctx) |
Busy Check Function. | |
void | adc7_set_clock (adc7_t *ctx, uint8_t state) |
Set Clock. | |
void | adc7_preset_mode (adc7_t *ctx, uint8_t state) |
Preset Mode. | |
uint8_t | adc7_read_bytes (adc7_t *ctx, uint8_t n_bytes, uint8_t *data_out) |
Read Bytes Function. | |
void | adc7_start_conv_cycle (adc7_t *ctx) |
Start Conversion Function. | |
uint8_t | adc7_read_results (adc7_t *ctx, float *voltage) |
Start Conversion Function. | |
void adc7_cfg_setup | ( | adc7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t adc7_check_busy | ( | adc7_t * | ctx | ) |
Busy Check Function.
ctx | Click object. |
@description Function checks if device is busy.
uint8_t adc7_check_data_ready | ( | adc7_t * | ctx | ) |
Data Ready Check Function.
ctx | Click object. |
@description Function checks if data is ready for reading.
void adc7_default_cfg | ( | adc7_t * | ctx | ) |
Default Configuration Initialization function.
ctx | Click object. |
@description This function initializes default click configuration.
ADC7_RETVAL adc7_init | ( | adc7_t * | ctx, |
adc7_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 adc7_preset_mode | ( | adc7_t * | ctx, |
uint8_t | state ) |
Preset Mode.
ctx | Click object. |
state | 0 - Normal Mode, 1 - Preset Mode. |
@description Function puts the device to Preset or to Normal Mode.
uint8_t adc7_read_bytes | ( | adc7_t * | ctx, |
uint8_t | n_bytes, | ||
uint8_t * | data_out ) |
Read Bytes Function.
ctx | Click object. |
n_bytes | Number of bytes to be read. |
data_out | Memory where data bytes be stored. |
@description Function reads the desired number of data bytes. (32-bit converted data from ADC + configuration byte/bytes).
uint8_t adc7_read_results | ( | adc7_t * | ctx, |
float * | voltage ) |
Start Conversion Function.
ctx | Click object. |
voltage | Memory where converted voltage value is stored. |
@description Function reads 32bit converted voltage value from AD converter and calculates this value to mV.
void adc7_set_clock | ( | adc7_t * | ctx, |
uint8_t | state ) |
Set Clock.
ctx | Click object. |
state | 0 - low state, 1 - high state. |
@description Function sets clock (MCK) pin to desired state.
uint8_t adc7_set_config | ( | adc7_t * | ctx, |
uint8_t | gain_config, | ||
uint8_t | down_samp_factor, | ||
uint8_t | filter_type ) |
Configuration set function.
ctx | Click object. |
gain_config | Gain Configuration. |
down_samp_factor | Down Sampling Factor. |
filter_type | Filter Type. |
@description Function performs the device configuration by sending configuration data to configure the next conversion cycle.
void adc7_start_conv_cycle | ( | adc7_t * | ctx | ) |
Start Conversion Function.
ctx | Click object. |
@description Function generates clock signal on MCK pin and on that way starts and performs the desired number of conversion cycles, determined by Down Sampling Factor number.