adc14 2.1.0.0
|
API for configuring and manipulating ADC 14 Click driver. More...
Topics | |
ADC 14 Registers Settings | |
Settings for registers of ADC 14 Click driver. | |
ADC 14 MikroBUS Map | |
MikroBUS pin mapping of ADC 14 Click driver. | |
Functions | |
void | adc14_cfg_setup (adc14_cfg_t *cfg) |
ADC 14 configuration object setup function. | |
err_t | adc14_init (adc14_t *ctx, adc14_cfg_t *cfg) |
ADC 14 initialization function. | |
void | adc14_device_shutdown (adc14_t *ctx) |
ADC 14 device shutdown function. | |
void | adc14_device_power_up (adc14_t *ctx) |
ADC 14 device shutdown function. | |
err_t | adc14_read_conversion_data (adc14_t *ctx, uint16_t *adc_data) |
ADC 14 read conversion data function. | |
err_t | adc14_get_voltage (adc14_t *ctx, float *voltage) |
ADC 14 get voltage function. | |
err_t | adc14_set_vref (adc14_t *ctx, float vref) |
ADC 14 set voltage reference function. | |
API for configuring and manipulating ADC 14 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void adc14_cfg_setup | ( | adc14_cfg_t * | cfg | ) |
ADC 14 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See adc14_cfg_t object definition for detailed explanation. |
void adc14_device_power_up | ( | adc14_t * | ctx | ) |
ADC 14 device shutdown function.
This function is used for the device power up and enabled internal voltage reference [2.048V] of the MCP1501, High-Precision Buffered Voltage Reference on the ADC 14 Click board™.
[out] | ctx | : Click context object. See adc14_t object definition for detailed explanation. |
void adc14_device_shutdown | ( | adc14_t * | ctx | ) |
ADC 14 device shutdown function.
This function is used for the device shutdown voltage reference of the MCP1501, High-Precision Buffered Voltage Reference on the ADC 14 Click board™.
[out] | ctx | : Click context object. See adc14_t object definition for detailed explanation. |
err_t adc14_get_voltage | ( | adc14_t * | ctx, |
float * | voltage ) |
ADC 14 get voltage function.
This function reads results of 12-Bit ADC raw data and converts them to proportional voltage level [mV], of the MAX11108, Low-Power, Serial 12-Bit ADC on the ADC 14 Click board™.
[in] | ctx | : Click context object. See adc14_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc14_init | ( | adc14_t * | ctx, |
adc14_cfg_t * | cfg ) |
ADC 14 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See adc14_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See adc14_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc14_read_conversion_data | ( | adc14_t * | ctx, |
uint16_t * | adc_data ) |
ADC 14 read conversion data function.
This function is used to reads 12-Bit ADC raw data value of the MAX11108, Low-Power, Serial 12-Bit ADC on the ADC 14 Click board™.
[in] | ctx | : Click context object. See adc14_t object definition for detailed explanation. |
[out] | adc_data | : 12-Bit ADC data value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc14_set_vref | ( | adc14_t * | ctx, |
float | vref ) |
ADC 14 set voltage reference function.
This function sets external voltage reference and converts them to proportional voltage level [mV], of the MAX11108, Low-Power, Serial 12-Bit ADC on the ADC 14 Click board™.
[in] | ctx | : Click context object. See adc14_t object definition for detailed explanation. |
[out] | vref | : External voltage reference [0-3.3V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.