思澈科技软件开发工具包  2.20
I2S_Exported_Functions_Group2

Functions

HAL_StatusTypeDef HAL_I2S_Config_Transmit (I2S_HandleTypeDef *hi2s, I2S_CFG_T *cfg)
 Set I2S transmit configures. More...
 
HAL_StatusTypeDef HAL_I2S_Config_Receive (I2S_HandleTypeDef *hi2s, I2S_CFG_T *cfg)
 Set I2S Receive configures. More...
 
HAL_StatusTypeDef HAL_I2S_Transmit (I2S_HandleTypeDef *hi2s, uint8_t *pData, uint32_t Size, uint32_t Timeout)
 Set I2S Transmit data with polling mode. More...
 
HAL_StatusTypeDef HAL_I2S_Receive (I2S_HandleTypeDef *hi2s, uint8_t *pData, uint32_t Size, uint32_t Timeout)
 Set I2S receive data with polling mode. More...
 
HAL_StatusTypeDef HAL_I2S_Transmit_IT (I2S_HandleTypeDef *hi2s, uint8_t *pData, uint32_t Size)
 Transmit an amount of data in non-blocking mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_I2S_Receive_IT (I2S_HandleTypeDef *hi2s, uint8_t *pData, uint32_t Size)
 Receive an amount of data in non-blocking mode with Interrupt. More...
 
void HAL_I2S_IRQHandler (I2S_HandleTypeDef *hi2s)
 This function handles I2S interrupt request. More...
 
HAL_StatusTypeDef HAL_I2S_Transmit_DMA (I2S_HandleTypeDef *hi2s, uint8_t *pData, uint32_t Size)
 Set I2S Transmit data with DMA mode. More...
 
HAL_StatusTypeDef HAL_I2S_Receive_DMA (I2S_HandleTypeDef *hi2s, uint8_t *pData, uint32_t Size)
 Set I2S Transmit data with DMA mode. More...
 
HAL_StatusTypeDef HAL_I2S_DMAPause (I2S_HandleTypeDef *hi2s)
 Pauses the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_I2S_DMAResume (I2S_HandleTypeDef *hi2s)
 Resumes the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_I2S_DMAStop (I2S_HandleTypeDef *hi2s)
 Stops the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_I2S_TX_DMAPause (I2S_HandleTypeDef *hi2s)
 Pauses the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_I2S_TX_DMAResume (I2S_HandleTypeDef *hi2s)
 Resumes the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_I2S_TX_DMAStop (I2S_HandleTypeDef *hi2s)
 Stops the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_I2S_RX_DMAPause (I2S_HandleTypeDef *hi2s)
 Pauses the audio stream recording. More...
 
HAL_StatusTypeDef HAL_I2S_RX_DMAResume (I2S_HandleTypeDef *hi2s)
 Resumes the audio stream recording. More...
 
HAL_StatusTypeDef HAL_I2S_RX_DMAStop (I2S_HandleTypeDef *hi2s)
 Stops the audio stream recording. More...
 
void HAL_I2S_TxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Tx Transfer Half completed callbacks. More...
 
void HAL_I2S_TxCpltCallback (I2S_HandleTypeDef *hi2s)
 Tx Transfer completed callbacks. More...
 
void HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer half completed callbacks. More...
 
void HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer completed callbacks. More...
 
void HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s)
 I2S error callbacks. More...
 

Detailed Description

Function Documentation

◆ HAL_I2S_Config_Receive()

HAL_StatusTypeDef HAL_I2S_Config_Receive ( I2S_HandleTypeDef hi2s,
I2S_CFG_T cfg 
)

Set I2S Receive configures.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
cfgchannel, track, volume and others parameters
Return values
HALstatus

◆ HAL_I2S_Config_Transmit()

HAL_StatusTypeDef HAL_I2S_Config_Transmit ( I2S_HandleTypeDef hi2s,
I2S_CFG_T cfg 
)

Set I2S transmit configures.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
cfgchannel, track, volume and others parameters
Return values
HALstatus

◆ HAL_I2S_DMAPause()

HAL_StatusTypeDef HAL_I2S_DMAPause ( I2S_HandleTypeDef hi2s)

Pauses the audio stream playing from the Media.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_DMAResume()

HAL_StatusTypeDef HAL_I2S_DMAResume ( I2S_HandleTypeDef hi2s)

Resumes the audio stream playing from the Media.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_DMAStop()

HAL_StatusTypeDef HAL_I2S_DMAStop ( I2S_HandleTypeDef hi2s)

Stops the audio stream playing from the Media.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_ErrorCallback()

void HAL_I2S_ErrorCallback ( I2S_HandleTypeDef hi2s)

I2S error callbacks.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
None

◆ HAL_I2S_IRQHandler()

void HAL_I2S_IRQHandler ( I2S_HandleTypeDef hi2s)

This function handles I2S interrupt request.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
None

◆ HAL_I2S_Receive()

HAL_StatusTypeDef HAL_I2S_Receive ( I2S_HandleTypeDef hi2s,
uint8_t *  pData,
uint32_t  Size,
uint32_t  Timeout 
)

Set I2S receive data with polling mode.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDatadata buffer
Sizedata length need to be transmit
Timeouttime out threshold if not finish, in ms
Return values
HALstatus

◆ HAL_I2S_Receive_DMA()

HAL_StatusTypeDef HAL_I2S_Receive_DMA ( I2S_HandleTypeDef hi2s,
uint8_t *  pData,
uint32_t  Size 
)

Set I2S Transmit data with DMA mode.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDatadata buffer
Sizedata length need to be transmit
Return values
HALstatus

◆ HAL_I2S_Receive_IT()

HAL_StatusTypeDef HAL_I2S_Receive_IT ( I2S_HandleTypeDef hi2s,
uint8_t *  pData,
uint32_t  Size 
)

Receive an amount of data in non-blocking mode with Interrupt.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 16-bit pointer to the Receive data buffer.
Sizenumber of data sample to be sent:
Note
When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S configuration phase, the Size parameter means the number of 16-bit data length in the transaction and when a 24-bit data frame or a 32-bit data frame is selected the Size parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
It is recommended to use DMA for the I2S receiver to avoid de-synchronisation between Master and Slave otherwise the I2S interrupt should be optimized.
This function can use an Audio Frequency up to 48KHz when I2S Clock Source is 32MHz
Return values
HALstatus

◆ HAL_I2S_RX_DMAPause()

HAL_StatusTypeDef HAL_I2S_RX_DMAPause ( I2S_HandleTypeDef hi2s)

Pauses the audio stream recording.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_RX_DMAResume()

HAL_StatusTypeDef HAL_I2S_RX_DMAResume ( I2S_HandleTypeDef hi2s)

Resumes the audio stream recording.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_RX_DMAStop()

HAL_StatusTypeDef HAL_I2S_RX_DMAStop ( I2S_HandleTypeDef hi2s)

Stops the audio stream recording.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_RxCpltCallback()

void HAL_I2S_RxCpltCallback ( I2S_HandleTypeDef hi2s)

Rx Transfer completed callbacks.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
None

◆ HAL_I2S_RxHalfCpltCallback()

void HAL_I2S_RxHalfCpltCallback ( I2S_HandleTypeDef hi2s)

Rx Transfer half completed callbacks.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
None

◆ HAL_I2S_Transmit()

HAL_StatusTypeDef HAL_I2S_Transmit ( I2S_HandleTypeDef hi2s,
uint8_t *  pData,
uint32_t  Size,
uint32_t  Timeout 
)

Set I2S Transmit data with polling mode.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDatadata buffer
Sizedata length need to be transmit
Timeouttime out threshold if not finish, in ms
Return values
HALstatus

◆ HAL_I2S_Transmit_DMA()

HAL_StatusTypeDef HAL_I2S_Transmit_DMA ( I2S_HandleTypeDef hi2s,
uint8_t *  pData,
uint32_t  Size 
)

Set I2S Transmit data with DMA mode.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDatadata buffer
Sizedata length need to be transmit
Return values
HALstatus

◆ HAL_I2S_Transmit_IT()

HAL_StatusTypeDef HAL_I2S_Transmit_IT ( I2S_HandleTypeDef hi2s,
uint8_t *  pData,
uint32_t  Size 
)

Transmit an amount of data in non-blocking mode with Interrupt.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 16-bit pointer to data buffer.
Sizenumber of data sample to be sent:
Note
When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S configuration phase, the Size parameter means the number of 16-bit data length in the transaction and when a 24-bit data frame or a 32-bit data frame is selected the Size parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
This function can use an Audio Frequency up to 48KHz when I2S Clock Source is 32MHz
Return values
HALstatus

◆ HAL_I2S_TX_DMAPause()

HAL_StatusTypeDef HAL_I2S_TX_DMAPause ( I2S_HandleTypeDef hi2s)

Pauses the audio stream playing from the Media.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_TX_DMAResume()

HAL_StatusTypeDef HAL_I2S_TX_DMAResume ( I2S_HandleTypeDef hi2s)

Resumes the audio stream playing from the Media.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_TX_DMAStop()

HAL_StatusTypeDef HAL_I2S_TX_DMAStop ( I2S_HandleTypeDef hi2s)

Stops the audio stream playing from the Media.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
HALstatus

◆ HAL_I2S_TxCpltCallback()

void HAL_I2S_TxCpltCallback ( I2S_HandleTypeDef hi2s)

Tx Transfer completed callbacks.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
None

◆ HAL_I2S_TxHalfCpltCallback()

void HAL_I2S_TxHalfCpltCallback ( I2S_HandleTypeDef hi2s)

Tx Transfer Half completed callbacks.

Parameters
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values
None