precision-converters-firmware
Loading...
Searching...
No Matches
stm32_tdm_support.h
Go to the documentation of this file.
1/***************************************************************************/
13#ifndef STM32_TDM_SUPPORT_H_
14#define STM32_TDM_SUPPORT_H_
15
16/******************************************************************************/
17/***************************** Include Files **********************************/
18/******************************************************************************/
19
20#include <stdint.h>
21#include <stdbool.h>
22#include "no_os_circular_buffer.h"
23#include "iio_types.h"
24#include "no_os_tdm.h"
25
26/******************************************************************************/
27/************************ Macros/Constants ************************************/
28/******************************************************************************/
29
30/******************************************************************************/
31/************************ Public Declarations *********************************/
32/******************************************************************************/
33
34extern volatile bool dma_buffer_full;
35extern uint8_t *dma_buff;
36int32_t start_tdm_dma_to_cb_transfer(struct no_os_tdm_desc *tdm_desc,
37 struct iio_device_data *iio_dev_data, uint32_t buffer_size,
38 uint8_t bytes_per_sample, uint32_t n_samples_tdm_read);
40int32_t end_tdm_dma_to_cb_transfer(struct no_os_tdm_desc *tdm_desc,
41 struct iio_device_data *iio_dev_data,
42 uint32_t buffer_size, uint8_t bytes_per_sample);
43
44#endif // STM32_TDM_SUPPORT_H_
uint8_t bytes_per_sample
Definition ad405x_iio.c:290
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.
Definition stm32_tdm_support.c:49
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.
Definition stm32_tdm_support.c:93
volatile bool dma_buffer_full
Definition stm32_tdm_support.c:28
uint8_t * dma_buff
Definition stm32_tdm_support.c:31
void update_dma_buffer_overflow(void)
Update the TDM DMA buffer overflow flag.
Definition stm32_tdm_support.c:80