Analog Devices / Mbed OS EVAL-AD7689

Dependencies:   sdp_k1_sdram

Revision:
2:007533849deb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/ad7689_data_capture.h	Thu Jul 21 16:45:24 2022 +0530
@@ -0,0 +1,50 @@
+/***************************************************************************//**
+ *   @file   ad7689_data_capture.h
+ *   @brief  Header for AD7689 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.
+*******************************************************************************/
+
+#ifndef _AD7689_DATA_CAPTURE_H_
+#define _AD7689_DATA_CAPTURE_H_
+
+/******************************************************************************/
+/***************************** Include Files **********************************/
+/******************************************************************************/
+
+#include <stdint.h>
+#include "app_config.h"
+
+/******************************************************************************/
+/********************** Macros and Constants Definition ***********************/
+/******************************************************************************/
+
+#if defined(USE_SDRAM_CAPTURE_BUFFER)
+#define adc_data_buffer				SDRAM_START_ADDRESS
+#define DATA_BUFFER_SIZE			SDRAM_SIZE_BYTES
+#else
+extern int8_t adc_data_buffer[];
+#define DATA_BUFFER_SIZE			(32768)		// 32kbytes
+#endif
+
+/******************************************************************************/
+/********************** Variables and User Defined Data Types *****************/
+/******************************************************************************/
+
+/******************************************************************************/
+/************************ Public Declarations *********************************/
+/******************************************************************************/
+
+int32_t read_single_sample(uint8_t input_chn, uint32_t *raw_data);
+int32_t read_buffered_data(int8_t **pbuf, uint32_t nb_of_bytes);
+int32_t prepare_data_transfer(uint32_t ch_mask, uint8_t num_of_chns,
+			      uint8_t sample_size_in_byte);
+int32_t end_data_transfer(void);
+void data_capture_callback(void *ctx);
+
+#endif /* _AD7689_DATA_CAPTURE_H_ */