Analog Devices / Mbed OS EVAL-AD717x-AD411x-IIO

Dependencies:   sdp_k1_sdram

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ad717x_data_capture.h Source File

ad717x_data_capture.h

Go to the documentation of this file.
00001 /***************************************************************************//**
00002  *   @file    ad717x_data_capture.h
00003  *   @brief   Header file for AD717x Data capture
00004 ********************************************************************************
00005  * Copyright (c) 2021-22 Analog Devices, Inc.
00006  * All rights reserved.
00007  *
00008  * This software is proprietary to Analog Devices, Inc. and its licensors.
00009  * By using this software you agree to the terms of the associated
00010  * Analog Devices Software License Agreement.
00011 *******************************************************************************/
00012 
00013 #ifndef _AD717X_DATA_CAPTURE_H_
00014 #define _AD717X_DATA_CAPTURE_H_
00015 
00016 /******************************************************************************/
00017 /***************************** Include Files **********************************/
00018 /******************************************************************************/
00019 
00020 #include <stdint.h>
00021 #include "app_config.h"
00022 
00023 /******************************************************************************/
00024 /********************** Macros and Constants Definition ***********************/
00025 /******************************************************************************/
00026 
00027 #if defined(USE_SDRAM_CAPTURE_BUFFER)
00028 #define adc_data_buffer             SDRAM_START_ADDRESS
00029 #define DATA_BUFFER_SIZE            SDRAM_SIZE_BYTES
00030 #else
00031 extern int8_t adc_data_buffer[];
00032 #define DATA_BUFFER_SIZE            (32768)     // 32kbytes
00033 #endif
00034 
00035 /******************************************************************************/
00036 /********************** Public/Extern Declarations ****************************/
00037 /******************************************************************************/
00038 
00039 int32_t prepare_data_transfer(uint32_t ch_mask, uint8_t num_of_chns,
00040                   uint8_t sample_size_in_byte);
00041 int32_t end_data_transfer(void);
00042 int32_t read_buffered_data(int8_t **pbuf, uint32_t nb_of_bytes);
00043 void data_capture_callback(void *ctx, uint32_t event, void *extra);
00044 
00045 #endif /* _AD717X_DATA_CAPTURE_H_ */
00046