Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ST_I2S by
Asynchronous I2S Hardware Abstraction Layer
Functions | |
| void | i2s_transfer (i2s_t *obj, void *tx, int tx_length, void *rx, int rx_length, bool circular, i2s_dma_prio_t prio, uint32_t handler_tx, uint32_t handler_rx, uint32_t event) | 
| Begin the I2S transfer.   | |
| uint32_t | i2s_irq_handler_asynch (i2s_t *obj, uint8_t direction) | 
| The asynchronous IRQ handler.   | |
| uint8_t | i2s_active (i2s_t *obj) | 
| Attempts to determine if the I2S peripheral is already in use.   | |
| void | i2s_abort_asynch (i2s_t *obj) | 
| Abort an I2S transfer.   | |
| int8_t | i2s_harmonize (i2s_t *dev_i2s_1, uint32_t *freq_i2s_1, i2s_t *dev_i2s_2, uint32_t *freq_i2s_2) | 
| Harmonize frequencies of two I2S devices TODO: doxygen description.   | |
Function Documentation
| void i2s_abort_asynch | ( | i2s_t * | obj ) | 
| uint8_t i2s_active | ( | i2s_t * | obj ) | 
Attempts to determine if the I2S peripheral is already in use.
For each assigned buffer, check if the corresponding buffer position is less than the buffer length. If buffers do not indicate activity, check if there are any bytes in the FIFOs.
- Parameters:
 - 
  
[in] obj The I2S object to check for activity  
- Returns:
 - Non-zero if the I2S port is active or zero if it is not.
 
| int8_t i2s_harmonize | ( | i2s_t * | dev_i2s_1, | 
| uint32_t * | freq_i2s_1, | ||
| i2s_t * | dev_i2s_2, | ||
| uint32_t * | freq_i2s_2 | ||
| ) | 
Harmonize frequencies of two I2S devices TODO: doxygen description.
- Returns:
 - Zero if the frequencies have been harmonized correctly, -1 otherwise.
 
| uint32_t i2s_irq_handler_asynch | ( | i2s_t * | obj, | 
| uint8_t | direction | ||
| ) | 
The asynchronous IRQ handler.
Reads the received values out of the RX FIFO, writes values into the TX FIFO and checks for transfer termination conditions, such as buffer overflows or transfer complete.
- Parameters:
 - 
  
[in] obj The I2S object that holds the transfer information [in] direction From whom is the irq coming (RX or TX)  
- Returns:
 - Event flags if a transfer termination condition was met; otherwise 0.
 
| void i2s_transfer | ( | i2s_t * | obj, | 
| void * | tx, | ||
| int | tx_length, | ||
| void * | rx, | ||
| int | rx_length, | ||
| bool | circular, | ||
| i2s_dma_prio_t | prio, | ||
| uint32_t | handler_tx, | ||
| uint32_t | handler_rx, | ||
| uint32_t | event | ||
| ) | 
Begin the I2S transfer.
Buffer pointers and lengths are specified in tx_buff and rx_buff
- Parameters:
 - 
  
[in] obj The I2S object that holds the transfer information [in] tx The transmit buffer [in] tx_length The number of bytes to transmit [in] rx The receive buffer [in] rx_length The number of bytes to receive [in] circular Enable circular buffer transfer [in] prio DMA priority of the transfer [in] handler_tx I2S tx interrupt handler [in] handler_rx I2S rx interrupt handler [in] event The logical OR of events to be registered  
Generated on Sun Jul 17 2022 07:57:10 by
 1.7.2 
    