precision-converters-firmware
Functions | Variables
stm32_tdm_support.h File Reference

Header file for STM32 TDM-DMA Data Capture Wrapper file. More...

#include <stdint.h>
#include <stdbool.h>
#include "no_os_circular_buffer.h"
#include "iio_types.h"
#include "no_os_tdm.h"
Include dependency graph for stm32_tdm_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int32_t start_tdm_dma_to_cb_transfer (struct no_os_tdm_desc *tdm_desc, struct iio_device_data *iio_dev_data, uint32_t buffer_size, uint8_t bytes_per_sample, uint32_t n_samples_tdm_read)
 Read TDM DMA Data into the buffer. More...
 
void update_dma_buffer_overflow (void)
 Update the TDM DMA buffer overflow flag. More...
 
int32_t end_tdm_dma_to_cb_transfer (struct no_os_tdm_desc *tdm_desc, struct iio_device_data *iio_dev_data, uint32_t buffer_size, uint8_t bytes_per_sample)
 Update circular buffer indices and prepare for next async write via DMA. More...
 

Variables

volatile bool dma_buffer_full
 
uint8_t * dma_buff
 

Detailed Description

Header file for STM32 TDM-DMA Data Capture Wrapper file.

Copyright (c) 2023 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.

Function Documentation

◆ end_tdm_dma_to_cb_transfer()

int32_t end_tdm_dma_to_cb_transfer ( struct no_os_tdm_desc *  tdm_desc,
struct iio_device_data *  iio_dev_data,
uint32_t  buffer_size,
uint8_t  bytes_per_sample 
)

Update circular buffer indices and prepare for next async write via DMA.

Parameters
tdm_desc[in]- TDM Descriptor
iio_dev_data[in]- IIO Device data instance
buffer_size[in]- Buffer Size
bytes_per_sample[in]- Byte Per Sample
Returns
0 in case of Success, negative error code otherwise

◆ start_tdm_dma_to_cb_transfer()

int32_t start_tdm_dma_to_cb_transfer ( struct no_os_tdm_desc *  tdm_desc,
struct iio_device_data *  iio_dev_data,
uint32_t  buffer_size,
uint8_t  bytes_per_sample,
uint32_t  n_samples_tdm_read 
)

Read TDM DMA Data into the buffer.

Parameters
tdm_desc[in]- TDM descriptor
iio_dev_data[in]- IIO device data instance
buffer_size[in]- Buffer Size
bytes_per_sample[in]- Byte Per Sample
n_samples_tdm_read[in]- Number of samples to be read by TDM
Returns
0 in case of success, negative error code otherwise

◆ update_dma_buffer_overflow()

void update_dma_buffer_overflow ( void  )

Update the TDM DMA buffer overflow flag.

Returns
None

Variable Documentation

◆ dma_buff

uint8_t* dma_buff
extern

◆ dma_buffer_full

volatile bool dma_buffer_full
extern