adc23
2.1.0.0
|
API for configuring and manipulating ADC 23 Click driver. More...
Modules | |
ADC 23 Registers List | |
List of registers of ADC 23 Click driver. | |
ADC 23 Registers Settings | |
Settings for registers of ADC 23 Click driver. | |
ADC 23 MikroBUS Map | |
MikroBUS pin mapping of ADC 23 Click driver. | |
Adc23_cmd | |
Functions | |
void | adc23_cfg_setup (adc23_cfg_t *cfg) |
ADC 23 configuration object setup function. More... | |
err_t | adc23_init (adc23_t *ctx, adc23_cfg_t *cfg) |
ADC 23 initialization function. More... | |
err_t | adc23_default_cfg (adc23_t *ctx) |
ADC 23 default configuration function. More... | |
err_t | adc23_generic_write (adc23_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
ADC 23 data writing function. More... | |
err_t | adc23_generic_read (adc23_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
ADC 23 data reading function. More... | |
err_t | adc23_generic_transfer (adc23_t *ctx, uint8_t *data_in, uint8_t *data_out, uint8_t len) |
ADC 23 data transfer function. More... | |
err_t | adc23_read_reg_cmd (adc23_t *ctx, uint8_t reg, uint16_t *data_out, uint8_t *reg_data_out) |
ADC 23 read register command function. More... | |
err_t | adc23_read_reg_data (adc23_t *ctx, uint8_t reg, uint32_t *data_out, uint8_t *reg_data_out) |
ADC 23 read register data function. More... | |
err_t | adc23_write_reg_cmd (adc23_t *ctx, uint8_t reg, uint8_t data_in, uint16_t *data_out) |
ADC 23 write register command function. More... | |
err_t | adc23_write_reg_data (adc23_t *ctx, uint8_t reg, uint8_t data_in, uint32_t *data_out) |
ADC 23 write register data function. More... | |
err_t | adc23_sw_reset (adc23_t *ctx) |
ADC 23 software reset function. More... | |
err_t | adc23_start_conversion (adc23_t *ctx) |
ADC 23 start conversion function. More... | |
err_t | adc23_stop_conversion (adc23_t *ctx) |
ADC 23 stop conversion function. More... | |
err_t | adc23_read_conversion_data (adc23_t *ctx, int32_t *adc_data) |
ADC 23 read conversion data function. More... | |
err_t | adc23_get_voltage (adc23_t *ctx, float *voltage) |
ADC 23 read get voltage level function. More... | |
void | adc23_set_start (adc23_t *ctx) |
ADC 23 set start function. More... | |
void | adc23_set_stop (adc23_t *ctx) |
ADC 23 set stop function. More... | |
void | adc23_hw_reset (adc23_t *ctx) |
ADC 23 hardware reset function. More... | |
uint8_t | adc23_get_data_ready (adc23_t *ctx) |
ADC 23 get data ready function. More... | |
API for configuring and manipulating ADC 23 Click driver.
void adc23_cfg_setup | ( | adc23_cfg_t * | cfg | ) |
ADC 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See adc23_cfg_t object definition for detailed explanation. |
err_t adc23_default_cfg | ( | adc23_t * | ctx | ) |
ADC 23 default configuration function.
This function executes a default configuration of ADC 23 click board.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_generic_read | ( | adc23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
ADC 23 data reading function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_generic_transfer | ( | adc23_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
ADC 23 data transfer function.
This function writes and reads a desired number of data bytes by using SPI serial interface.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be transferred (write/read). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_generic_write | ( | adc23_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
ADC 23 data writing function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t adc23_get_data_ready | ( | adc23_t * | ctx | ) |
ADC 23 get data ready function.
This function get states of the data ready [DRY] pin of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Conversion data are ready, 1
- Conversions are started or resynchronized. err_t adc23_get_voltage | ( | adc23_t * | ctx, |
float * | voltage | ||
) |
ADC 23 read get voltage level function.
This function reads results of 24-bit ADC raw data and converts them to proportional voltage level [mV], of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [mV]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void adc23_hw_reset | ( | adc23_t * | ctx | ) |
ADC 23 hardware reset function.
This function resets the module by toggling the reset [RST] pin of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_init | ( | adc23_t * | ctx, |
adc23_cfg_t * | cfg | ||
) |
ADC 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See adc23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_read_conversion_data | ( | adc23_t * | ctx, |
int32_t * | adc_data | ||
) |
ADC 23 read conversion data function.
This function is used to read 24-Bit ADC raw data value of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[out] | adc_data | : 24-Bit ADC data value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_read_reg_cmd | ( | adc23_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out, | ||
uint8_t * | reg_data_out | ||
) |
ADC 23 read register command function.
This function is used to read register data and follows an off-frame protocol in which the read command is sent in one frame and the 16-Bit ADC responds with register data in the next frame of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data, 16-Bit ADC value. |
[out] | reg_data_out | : Output read of register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_read_reg_data | ( | adc23_t * | ctx, |
uint8_t | reg, | ||
uint32_t * | data_out, | ||
uint8_t * | reg_data_out | ||
) |
ADC 23 read register data function.
This function is used to read register operation using the maximum 40-bit frame size in full-duplex operation and follows an off-frame protocol in which the read command is sent in one frame and the 24-Bit ADC responds with register data in the next frame of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data, 24-Bit ADC value. |
[out] | reg_data_out | : Output read of register data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void adc23_set_start | ( | adc23_t * | ctx | ) |
ADC 23 set start function.
This function is used for the synchronization control of the ADC converts continuously of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void adc23_set_stop | ( | adc23_t * | ctx | ) |
ADC 23 set stop function.
This function is used to stop the ADC converts continuously of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™.
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_start_conversion | ( | adc23_t * | ctx | ) |
ADC 23 start conversion function.
This function performs the conversion start command of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_stop_conversion | ( | adc23_t * | ctx | ) |
ADC 23 stop conversion function.
This function performs the conversion stop command of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_sw_reset | ( | adc23_t * | ctx | ) |
ADC 23 software reset function.
This function performs the reset sequence of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_write_reg_cmd | ( | adc23_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in, | ||
uint16_t * | data_out | ||
) |
ADC 23 write register command function.
This function is used to write register data performed in a single frame of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[out] | data_out | : Output read data, 16-Bit ADC value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t adc23_write_reg_data | ( | adc23_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in, | ||
uint32_t * | data_out | ||
) |
ADC 23 write register data function.
This function is used to write register data performed in a 24-Bit frame size of the ADS127L11, 400-kSPS, Wide-Bandwidth, 24-Bit, Delta-Sigma ADC on the ADC 23 Click board™
[in] | ctx | : Click context object. See adc23_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[out] | data_out | : Output read data, 24-Bit ADC value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.