no-OS
|
Header file of TDM Interface. More...
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Classes | |
struct | no_os_tdm_init_param |
Structure holding the parameters for TDM initialization. More... | |
struct | no_os_tdm_desc |
Structure holding TDM descriptor. More... | |
struct | no_os_tdm_platform_ops |
Structure holding TDM function pointers that point to the platform specific function. More... | |
Enumerations | |
enum | no_os_tdm_mode { NO_OS_TDM_MASTER_TX, NO_OS_TDM_MASTER_RX, NO_OS_TDM_SLAVE_TX, NO_OS_TDM_SLAVE_RX } |
Functions | |
int32_t | no_os_tdm_init (struct no_os_tdm_desc **desc, const struct no_os_tdm_init_param *param) |
Initialize the TDM communication peripheral. More... | |
int32_t | no_os_tdm_remove (struct no_os_tdm_desc *desc) |
Free the resources allocated by no_os_tdm_init(). More... | |
int32_t | no_os_tdm_read (struct no_os_tdm_desc *desc, void *data, uint16_t bytes_number) |
Read data using the TDM interface. More... | |
int32_t | no_os_tdm_write (struct no_os_tdm_desc *desc, void *data, uint16_t bytes_number) |
Write data using the TDM interface. More... | |
int32_t | no_os_tdm_pause (struct no_os_tdm_desc *desc) |
Pause TDM DMA transfer. More... | |
int32_t | no_os_tdm_resume (struct no_os_tdm_desc *desc) |
Resume TDM DMA transfer. More... | |
int32_t | no_os_tdm_stop (struct no_os_tdm_desc *desc) |
Stop TDM DMA transfer. More... | |
Header file of TDM Interface.
Copyright 2020(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
enum no_os_tdm_mode |
int32_t no_os_tdm_init | ( | struct no_os_tdm_desc ** | desc, |
const struct no_os_tdm_init_param * | param | ||
) |
Initialize the TDM communication peripheral.
desc | - The TDM descriptor. |
param | - The structure that contains the TDM parameters. |
int32_t no_os_tdm_pause | ( | struct no_os_tdm_desc * | desc | ) |
Pause TDM DMA transfer.
desc | - The TDM descriptor. |
int32_t no_os_tdm_read | ( | struct no_os_tdm_desc * | desc, |
void * | data, | ||
uint16_t | nb_samples | ||
) |
Read data using the TDM interface.
desc | - The TDM descriptor. |
data | - The buffer to store the received data. |
nb_samples | - Number of samples to read. |
int32_t no_os_tdm_remove | ( | struct no_os_tdm_desc * | desc | ) |
Free the resources allocated by no_os_tdm_init().
desc | - The TDM descriptor. |
int32_t no_os_tdm_resume | ( | struct no_os_tdm_desc * | desc | ) |
Resume TDM DMA transfer.
desc | - The TDM descriptor. |
int32_t no_os_tdm_stop | ( | struct no_os_tdm_desc * | desc | ) |
Stop TDM DMA transfer.
desc | - The TDM descriptor. |
int32_t no_os_tdm_write | ( | struct no_os_tdm_desc * | desc, |
void * | data, | ||
uint16_t | nb_samples | ||
) |
Write data using the TDM interface.
desc | - The TDM descriptor. |
data | - The buffer with the data to be transmitted. |
nb_samples | - Number of samples to write. |