adc17 2.0.0.0
|
API for configuring and manipulating ADC 17 Click driver. More...
Modules | |
ADC 17 Registers Settings | |
Settings for registers of ADC 17 Click driver. | |
ADC 17 MikroBUS Map | |
MikroBUS pin mapping of ADC 17 Click driver. | |
Functions | |
void | adc17_cfg_setup (adc17_cfg_t *cfg) |
ADC 17 configuration object setup function. More... | |
err_t | adc17_init (adc17_t *ctx, adc17_cfg_t *cfg) |
ADC 17 initialization function. More... | |
err_t | adc17_default_cfg (adc17_t *ctx) |
ADC 17 default configuration function. More... | |
err_t | adc17_write_setup_byte (adc17_t *ctx, uint8_t setup_byte) |
ADC 17 write setup byte function. More... | |
err_t | adc17_write_config_byte (adc17_t *ctx, uint8_t config_byte) |
ADC 17 write config byte function. More... | |
err_t | adc17_set_channel (adc17_t *ctx, uint8_t channel) |
ADC 17 set channel function. More... | |
err_t | adc17_get_voltage (adc17_t *ctx, float *voltage) |
ADC 17 get voltage function. More... | |
API for configuring and manipulating ADC 17 Click driver.
void adc17_cfg_setup | ( | adc17_cfg_t * | cfg | ) |
ADC 17 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See adc17_cfg_t object definition for detailed explanation. |
err_t adc17_default_cfg | ( | adc17_t * | ctx | ) |
ADC 17 default configuration function.
This function executes a default configuration of ADC 17 click board.
[in] | ctx | : Click context object. See adc17_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t adc17_get_voltage | ( | adc17_t * | ctx, |
float * | voltage | ||
) |
ADC 17 get voltage function.
This function reads the voltage from the previously selected channel by using I2C serial interface.
[in] | ctx | : Click context object. See adc17_t object definition for detailed explanation. |
[out] | voltage | : Voltage value [V]. |
0
- Success, -1
- Error.err_t adc17_init | ( | adc17_t * | ctx, |
adc17_cfg_t * | cfg | ||
) |
ADC 17 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See adc17_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See adc17_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t adc17_set_channel | ( | adc17_t * | ctx, |
uint8_t | channel | ||
) |
ADC 17 set channel function.
This function sets the selected channel active by modifying the config byte.
[in] | ctx | : Click context object. See adc17_t object definition for detailed explanation. |
[in] | channel | : Channel number (0-1). |
0
- Success, -1
- Error.err_t adc17_write_config_byte | ( | adc17_t * | ctx, |
uint8_t | config_byte | ||
) |
ADC 17 write config byte function.
This function writes a config byte to the ADC chip by using I2C serial interface.
[in] | ctx | : Click context object. See adc17_t object definition for detailed explanation. |
[in] | config_byte | : Config byte to be written ( the value will be stored in ctx->config_byte ). |
0
- Success, -1
- Error.err_t adc17_write_setup_byte | ( | adc17_t * | ctx, |
uint8_t | setup_byte | ||
) |
ADC 17 write setup byte function.
This function writes a setup byte to the ADC chip by using I2C serial interface.
[in] | ctx | : Click context object. See adc17_t object definition for detailed explanation. |
[in] | setup_byte | : Setup byte to be written ( the value will be stored in ctx->setup_byte ). |
0
- Success, -1
- Error.