Example program for EVAL-AD4130
Dependencies: tempsensors sdp_k1_sdram
ad4130_data_capture.h File Reference
Header for AD4130 data capture interfaces. More...
Go to the source code of this file.
Functions | |
int32_t | ad4130_data_capture_init (void) |
Function to init the data capture for AD4130 device. | |
int32_t | read_single_sample (uint8_t input_chn, uint32_t *raw_data) |
Function to read the single ADC sample (raw data) for input channel. | |
int32_t | read_buffered_data (int8_t **pbuf, uint32_t nb_of_bytes) |
Function to read the ADC buffered raw data requested by IIO client. | |
int32_t | prepare_data_transfer (uint32_t ch_mask, uint8_t sample_size) |
Function to prepare the data ADC capture for new READBUFF request from IIO client (for active channels) | |
int32_t | end_data_transfer (void) |
Function to stop ADC data capture. | |
void | data_capture_callback (void *ctx) |
This is an ISR (Interrupt Service Routine) to monitor end of conversion event. | |
void | fifo_data_capture_callback (void *ctx) |
This is an ISR (Interrupt Service Routine) to monitor FIFO data available event. This function is expected to be called asynchronously when data from internal device FIFO is available to read. |
Detailed Description
Header for AD4130 data capture interfaces.
Copyright (c) 2021-22 Analog Devices, Inc. All rights reserved.
This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.
Definition in file ad4130_data_capture.h.
Function Documentation
int32_t ad4130_data_capture_init | ( | void | ) |
Function to init the data capture for AD4130 device.
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 119 of file ad4130_data_capture.c.
void data_capture_callback | ( | void * | ctx ) |
This is an ISR (Interrupt Service Routine) to monitor end of conversion event.
- Parameters:
-
ctx[in] - Callback context (unused)
- Returns:
- none
This is an Interrupt callback function/ISR invoked in synchronous/asynchronous manner depending upon the application implementation. The conversion results are read into acquisition buffer and control continue to sample next channel. This continues until conversion is stopped (through IIO client command)
Definition at line 533 of file ad4130_data_capture.c.
int32_t end_data_transfer | ( | void | ) |
Function to stop ADC data capture.
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 439 of file ad4130_data_capture.c.
void fifo_data_capture_callback | ( | void * | ctx ) |
This is an ISR (Interrupt Service Routine) to monitor FIFO data available event. This function is expected to be called asynchronously when data from internal device FIFO is available to read.
- Parameters:
-
ctx[in] - Callback context (unused)
- Returns:
- none
Definition at line 580 of file ad4130_data_capture.c.
int32_t prepare_data_transfer | ( | uint32_t | ch_mask, |
uint8_t | sample_size | ||
) |
Function to prepare the data ADC capture for new READBUFF request from IIO client (for active channels)
- Parameters:
-
ch_mask[in] - Channels to enable for data capturing sample_size[in] - Sample size in bytes
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 406 of file ad4130_data_capture.c.
int32_t read_buffered_data | ( | int8_t ** | pbuf, |
uint32_t | nb_of_bytes | ||
) |
Function to read the ADC buffered raw data requested by IIO client.
- Parameters:
-
pbuf[in] - Pointer to data buffer nb_of_bytes[in] - Number of bytes to read
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 758 of file ad4130_data_capture.c.
int32_t read_single_sample | ( | uint8_t | input_chn, |
uint32_t * | adc_raw | ||
) |
Function to read the single ADC sample (raw data) for input channel.
- Parameters:
-
input_chn[in] - Input channel to be sampled and read data for raw_data[in,out]- ADC raw data
- Returns:
- 0 in case of success, negative error code otherwise
- Note:
- The single conversion mode is used to read a single sample
Definition at line 326 of file ad4130_data_capture.c.
Generated on Wed Jul 20 2022 12:42:25 by 1.7.2