IIO firmware for the AD4110
Dependencies: tempsensors sdp_k1_sdram
app/ad4110_data_capture.h@1:a78dbaa4b05d, 2022-08-01 (annotated)
- Committer:
- Janani Sunil
- Date:
- Mon Aug 01 11:09:48 2022 +0530
- Revision:
- 1:a78dbaa4b05d
- Parent:
- 0:6ca37a8f8ba9
Initial implementation of AD4110 IIO Firmware
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Janani Sunil | 0:6ca37a8f8ba9 | 1 | /***************************************************************************//** |
Janani Sunil | 0:6ca37a8f8ba9 | 2 | * @file ad4110_data_capture.h |
Janani Sunil | 0:6ca37a8f8ba9 | 3 | * @brief Header file for AD4110 Data capture |
Janani Sunil | 0:6ca37a8f8ba9 | 4 | ******************************************************************************** |
Janani Sunil | 0:6ca37a8f8ba9 | 5 | * Copyright (c) 2022 Analog Devices, Inc. |
Janani Sunil | 0:6ca37a8f8ba9 | 6 | * All rights reserved. |
Janani Sunil | 0:6ca37a8f8ba9 | 7 | * |
Janani Sunil | 0:6ca37a8f8ba9 | 8 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
Janani Sunil | 0:6ca37a8f8ba9 | 9 | * By using this software you agree to the terms of the associated |
Janani Sunil | 0:6ca37a8f8ba9 | 10 | * Analog Devices Software License Agreement. |
Janani Sunil | 0:6ca37a8f8ba9 | 11 | *******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 12 | |
Janani Sunil | 0:6ca37a8f8ba9 | 13 | #ifndef _AD4110_DATA_CAPTURE_H_ |
Janani Sunil | 0:6ca37a8f8ba9 | 14 | #define _AD4110_DATA_CAPTURE_H_ |
Janani Sunil | 0:6ca37a8f8ba9 | 15 | |
Janani Sunil | 0:6ca37a8f8ba9 | 16 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 17 | /***************************** Include Files **********************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 18 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 19 | |
Janani Sunil | 0:6ca37a8f8ba9 | 20 | #include "app_config.h" |
Janani Sunil | 0:6ca37a8f8ba9 | 21 | |
Janani Sunil | 0:6ca37a8f8ba9 | 22 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 23 | /********************** Macros and Constants Definition ***********************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 24 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 25 | |
Janani Sunil | 0:6ca37a8f8ba9 | 26 | #if defined(USE_SDRAM_CAPTURE_BUFFER) |
Janani Sunil | 0:6ca37a8f8ba9 | 27 | #define adc_data_buffer SDRAM_START_ADDRESS |
Janani Sunil | 0:6ca37a8f8ba9 | 28 | #define DATA_BUFFER_SIZE SDRAM_SIZE_BYTES |
Janani Sunil | 0:6ca37a8f8ba9 | 29 | #else |
Janani Sunil | 0:6ca37a8f8ba9 | 30 | extern int8_t adc_data_buffer[]; |
Janani Sunil | 0:6ca37a8f8ba9 | 31 | #define DATA_BUFFER_SIZE (32768) // 32kbytes |
Janani Sunil | 0:6ca37a8f8ba9 | 32 | #endif |
Janani Sunil | 0:6ca37a8f8ba9 | 33 | |
Janani Sunil | 0:6ca37a8f8ba9 | 34 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 35 | /********************** Public/Extern Declarations ****************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 36 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 37 | |
Janani Sunil | 0:6ca37a8f8ba9 | 38 | int32_t prepare_data_transfer(uint32_t ch_mask, uint8_t num_of_chns, |
Janani Sunil | 0:6ca37a8f8ba9 | 39 | uint8_t sample_size_in_byte); |
Janani Sunil | 0:6ca37a8f8ba9 | 40 | int32_t end_data_transfer(void); |
Janani Sunil | 0:6ca37a8f8ba9 | 41 | int32_t read_buffered_data(int8_t **pbuf, uint32_t nb_of_bytes); |
Janani Sunil | 0:6ca37a8f8ba9 | 42 | void data_capture_callback(void *ctx); |
Janani Sunil | 0:6ca37a8f8ba9 | 43 | |
Janani Sunil | 0:6ca37a8f8ba9 | 44 | #endif /* _AD4110_DATA_CAPTURE_H_ */ |
Janani Sunil | 0:6ca37a8f8ba9 | 45 |