Go to the documentation of this file.
85 uint16_t bytes_number);
97 #endif // STM32_TDM_H_
@ NO_OS_TDM_MASTER_RX
Definition: no_os_tdm.h:48
void * extra
Definition: no_os_tdm.h:100
SAI_Block_TypeDef * base
Definition: stm32_tdm.h:48
Structure describing a callback to be registered.
Definition: no_os_irq.h:142
int32_t stm32_tdm_read(struct no_os_tdm_desc *desc, void *data, uint16_t nb_samples)
Read data using SAI TDM mode.
Definition: stm32_tdm.c:253
Header file of IRQ interface.
int32_t no_os_irq_register_callback(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id, struct no_os_callback_desc *callback_desc)
Register a callback to handle the irq events.
Definition: no_os_irq.c:92
uint8_t fs_active_length
Definition: no_os_tdm.h:71
int lf256fifo_init(struct lf256fifo **)
uint8_t data_offset
Definition: no_os_tdm.h:63
struct no_os_callback_desc rx_half_callback
Definition: stm32_tdm.h:65
Structure holding the initialization parameters for stm32 platform specific TDM parameters.
Definition: stm32_tdm.h:46
stm32 platform specific TDM descriptor
Definition: stm32_tdm.h:57
int32_t stm32_stop_tdm_transfer(struct no_os_tdm_desc *desc)
Stop SAI DMA transfer.
Definition: stm32_tdm.c:288
bool fs_lastbit
Definition: no_os_tdm.h:73
int32_t stm32_resume_tdm_transfer(struct no_os_tdm_desc *desc)
Resume SAI DMA transfer.
Definition: stm32_tdm.c:339
void(* rx_half_complete_callback)(void *rx_arg)
Definition: no_os_tdm.h:81
const struct no_os_tdm_platform_ops stm32_tdm_platform_ops
stm32 specific TDM platform ops structure
Definition: stm32_tdm.c:48
@ NO_OS_TDM_SLAVE_RX
Definition: no_os_tdm.h:50
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
int32_t stm32_resume_tdm_transfer(struct no_os_tdm_desc *desc)
Resume SAI DMA transfer.
Definition: stm32_tdm.c:339
uint32_t irq_id
Definition: no_os_tdm.h:94
@ NO_OS_TDM_DMA_IRQ
Definition: no_os_irq.h:89
const struct no_os_tdm_platform_ops stm32_tdm_platform_ops
stm32 platform specific TDM platform ops structure
Definition: stm32_tdm.c:48
enum no_os_irq_peripheral peripheral
Definition: no_os_irq.h:150
int32_t stm32_tdm_init(struct no_os_tdm_desc **desc, const struct no_os_tdm_init_param *param)
Initialize the TDM communication peripheral.
Definition: stm32_tdm.c:63
enum no_os_tdm_mode mode
Definition: no_os_tdm.h:59
Structure holding TDM descriptor.
Definition: no_os_tdm.h:92
uint32_t irq_id
Definition: no_os_tdm.h:77
Header file for stm32 irq specifics.
bool fs_active_low
Definition: no_os_tdm.h:69
void * ctx
Definition: no_os_irq.h:146
Header file for the stm32 tdm driver.
int32_t stm32_tdm_init(struct no_os_tdm_desc **desc, const struct no_os_tdm_init_param *param)
Initialize the TDM communication peripheral.
Definition: stm32_tdm.c:63
SAI_HandleTypeDef hsai
Definition: stm32_tdm.h:59
int32_t stm32_pause_tdm_transfer(struct no_os_tdm_desc *desc)
Pause SAI DMA transfer.
Definition: stm32_tdm.c:314
bool data_lsb_first
Definition: no_os_tdm.h:65
const struct no_os_irq_platform_ops * platform_ops
Definition: no_os_irq.h:111
const struct no_os_irq_platform_ops stm32_irq_ops
stm32 specific IRQ platform ops structure
Definition: stm32_irq.c:582
int32_t no_os_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: no_os_irq.c:45
struct no_os_irq_ctrl_desc * nvic_rx_halfcplt
Definition: stm32_tdm.h:61
@ NO_OS_TDM_SLAVE_TX
Definition: no_os_tdm.h:49
void(* rx_complete_callback)(void *rx_arg)
Definition: no_os_tdm.h:79
void * extra
Definition: no_os_tdm.h:85
void * handle
Definition: no_os_irq.h:152
void(* callback)(void *context)
Definition: no_os_irq.h:144
int32_t stm32_tdm_remove(struct no_os_tdm_desc *desc)
Free the resources allocated by stm32_tdm_init().
Definition: stm32_tdm.c:231
@ NO_OS_TDM_MASTER_TX
Definition: no_os_tdm.h:47
int32_t stm32_stop_tdm_transfer(struct no_os_tdm_desc *desc)
Stop SAI DMA transfer.
Definition: stm32_tdm.c:288
enum no_os_irq_event event
Definition: no_os_irq.h:148
SPSC lock-free fifo of fixed size (256), specialized for UART.
@ NO_OS_EVT_DMA_RX_COMPLETE
Definition: no_os_irq.h:70
Header file for stm32 gpio specifics.
int32_t stm32_tdm_read(struct no_os_tdm_desc *desc, void *data, uint16_t bytes_number)
Read data using SAI TDM mode.
Definition: stm32_tdm.c:253
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
int32_t stm32_pause_tdm_transfer(struct no_os_tdm_desc *desc)
Pause SAI DMA transfer.
Definition: stm32_tdm.c:314
int32_t stm32_tdm_remove(struct no_os_tdm_desc *desc)
Free the resources allocated by stm32_tdm_init().
Definition: stm32_tdm.c:231
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:107
uint8_t data_size
Definition: no_os_tdm.h:61
Structure holding the parameters for TDM initialization.
Definition: no_os_tdm.h:57
uint8_t slots_per_frame
Definition: no_os_tdm.h:67
int32_t no_os_irq_enable(struct no_os_irq_ctrl_desc *desc, uint32_t irq_id)
Enable specific interrupt.
Definition: no_os_irq.c:181
Header file of GPIO Interface.
@ NO_OS_EVT_DMA_RX_HALF_COMPLETE
Definition: no_os_irq.h:71
struct no_os_irq_ctrl_desc * nvic_rxcplt
Definition: stm32_tdm.h:63
Header file of TDM Interface.
Definition: no_os_irq.h:123
struct no_os_callback_desc rx_callback
Definition: stm32_tdm.h:67
bool rising_edge_sampling
Definition: no_os_tdm.h:75
struct lf256fifo * rx_fifo
Definition: no_os_tdm.h:98
Error macro definition for ARM Compiler.