precision-converters-firmware
Functions | Variables
stm32_tdm_support.c File Reference
#include "stm32_tdm_support.h"
Include dependency graph for stm32_tdm_support.c:

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
 

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
Here is the caller graph for this function:

◆ 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
Here is the caller graph for this function:

Variable Documentation

◆ dma_buff

uint8_t* dma_buff

◆ dma_buffer_full

volatile bool dma_buffer_full