STM32F439xx HAL User Manual
|
Header file of I2S HAL module. More...
Go to the source code of this file.
Data Structures | |
struct | I2S_InitTypeDef |
I2S Init structure definition. More... | |
struct | __I2S_HandleTypeDef |
I2S handle Structure definition. More... | |
Defines | |
#define | HAL_I2S_ERROR_NONE (0x00000000U) |
#define | HAL_I2S_ERROR_TIMEOUT (0x00000001U) |
#define | HAL_I2S_ERROR_OVR (0x00000002U) |
#define | HAL_I2S_ERROR_UDR (0x00000004U) |
#define | HAL_I2S_ERROR_DMA (0x00000008U) |
#define | HAL_I2S_ERROR_PRESCALER (0x00000010U) |
#define | I2S_MODE_SLAVE_TX (0x00000000U) |
#define | I2S_MODE_SLAVE_RX (0x00000100U) |
#define | I2S_MODE_MASTER_TX (0x00000200U) |
#define | I2S_MODE_MASTER_RX (0x00000300U) |
#define | I2S_STANDARD_PHILIPS (0x00000000U) |
#define | I2S_STANDARD_MSB (0x00000010U) |
#define | I2S_STANDARD_LSB (0x00000020U) |
#define | I2S_STANDARD_PCM_SHORT (0x00000030U) |
#define | I2S_STANDARD_PCM_LONG (0x000000B0U) |
#define | I2S_DATAFORMAT_16B (0x00000000U) |
#define | I2S_DATAFORMAT_16B_EXTENDED (0x00000001U) |
#define | I2S_DATAFORMAT_24B (0x00000003U) |
#define | I2S_DATAFORMAT_32B (0x00000005U) |
#define | I2S_MCLKOUTPUT_ENABLE SPI_I2SPR_MCKOE |
#define | I2S_MCLKOUTPUT_DISABLE (0x00000000U) |
#define | I2S_AUDIOFREQ_192K (192000U) |
#define | I2S_AUDIOFREQ_96K (96000U) |
#define | I2S_AUDIOFREQ_48K (48000U) |
#define | I2S_AUDIOFREQ_44K (44100U) |
#define | I2S_AUDIOFREQ_32K (32000U) |
#define | I2S_AUDIOFREQ_22K (22050U) |
#define | I2S_AUDIOFREQ_16K (16000U) |
#define | I2S_AUDIOFREQ_11K (11025U) |
#define | I2S_AUDIOFREQ_8K (8000U) |
#define | I2S_AUDIOFREQ_DEFAULT (2U) |
#define | I2S_FULLDUPLEXMODE_DISABLE (0x00000000U) |
#define | I2S_FULLDUPLEXMODE_ENABLE (0x00000001U) |
#define | I2S_CPOL_LOW (0x00000000U) |
#define | I2S_CPOL_HIGH (SPI_I2SCFGR_CKPOL) |
#define | I2S_IT_TXE SPI_CR2_TXEIE |
#define | I2S_IT_RXNE SPI_CR2_RXNEIE |
#define | I2S_IT_ERR SPI_CR2_ERRIE |
#define | I2S_FLAG_TXE SPI_SR_TXE |
#define | I2S_FLAG_RXNE SPI_SR_RXNE |
#define | I2S_FLAG_UDR SPI_SR_UDR |
#define | I2S_FLAG_OVR SPI_SR_OVR |
#define | I2S_FLAG_FRE SPI_SR_FRE |
#define | I2S_FLAG_CHSIDE SPI_SR_CHSIDE |
#define | I2S_FLAG_BSY SPI_SR_BSY |
#define | I2S_CLOCK_PLL (0x00000000U) |
#define | I2S_CLOCK_EXTERNAL (0x00000001U) |
#define | __HAL_I2S_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_I2S_STATE_RESET) |
Reset I2S handle state. | |
#define | __HAL_I2S_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->I2SCFGR |= SPI_I2SCFGR_I2SE) |
Enable or disable the specified SPI peripheral (in I2S mode). | |
#define | __HAL_I2S_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->I2SCFGR &=(uint16_t)(~SPI_I2SCFGR_I2SE)) |
#define | __HAL_I2S_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__)) |
Enable or disable the specified I2S interrupts. | |
#define | __HAL_I2S_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 &=(uint16_t)(~(__INTERRUPT__))) |
#define | __HAL_I2S_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Checks if the specified I2S interrupt source is enabled or disabled. | |
#define | __HAL_I2S_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__)) |
Checks whether the specified I2S flag is set or not. | |
#define | __HAL_I2S_CLEAR_OVRFLAG(__HANDLE__) |
Clears the I2S OVR pending flag. | |
#define | __HAL_I2S_CLEAR_UDRFLAG(__HANDLE__) |
Clears the I2S UDR pending flag. | |
#define | IS_I2S_MODE(MODE) |
#define | IS_I2S_STANDARD(STANDARD) |
#define | IS_I2S_DATA_FORMAT(FORMAT) |
#define | IS_I2S_MCLK_OUTPUT(OUTPUT) |
#define | IS_I2S_AUDIO_FREQ(FREQ) |
#define | IS_I2S_FULLDUPLEX_MODE(MODE) |
#define | IS_I2S_CPOL(CPOL) |
#define | IS_I2S_CLOCKSOURCE(CLOCK) |
Typedefs | |
typedef struct __I2S_HandleTypeDef | I2S_HandleTypeDef |
I2S handle Structure definition. | |
Enumerations | |
enum | HAL_I2S_StateTypeDef { HAL_I2S_STATE_RESET = 0x00U, HAL_I2S_STATE_READY = 0x01U, HAL_I2S_STATE_BUSY = 0x02U, HAL_I2S_STATE_BUSY_TX = 0x03U, HAL_I2S_STATE_BUSY_RX = 0x04U, HAL_I2S_STATE_BUSY_TX_RX = 0x05U, HAL_I2S_STATE_TIMEOUT = 0x06U, HAL_I2S_STATE_ERROR = 0x07U } |
HAL State structures definition. More... | |
Functions | |
HAL_StatusTypeDef | HAL_I2S_Init (I2S_HandleTypeDef *hi2s) |
Initializes the I2S according to the specified parameters in the I2S_InitTypeDef and create the associated handle. | |
HAL_StatusTypeDef | HAL_I2S_DeInit (I2S_HandleTypeDef *hi2s) |
DeInitializes the I2S peripheral. | |
__weak void | HAL_I2S_MspInit (I2S_HandleTypeDef *hi2s) |
I2S MSP Init. | |
__weak void | HAL_I2S_MspDeInit (I2S_HandleTypeDef *hi2s) |
I2S MSP DeInit. | |
HAL_StatusTypeDef | HAL_I2S_Transmit (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout) |
Transmit an amount of data in blocking mode. | |
HAL_StatusTypeDef | HAL_I2S_Receive (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout) |
Receive an amount of data in blocking mode. | |
HAL_StatusTypeDef | HAL_I2S_Transmit_IT (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size) |
Transmit an amount of data in non-blocking mode with Interrupt. | |
HAL_StatusTypeDef | HAL_I2S_Receive_IT (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size) |
Receive an amount of data in non-blocking mode with Interrupt. | |
void | HAL_I2S_IRQHandler (I2S_HandleTypeDef *hi2s) |
This function handles I2S interrupt request. | |
HAL_StatusTypeDef | HAL_I2S_Transmit_DMA (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size) |
Transmit an amount of data in non-blocking mode with DMA. | |
HAL_StatusTypeDef | HAL_I2S_Receive_DMA (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size) |
Receive an amount of data in non-blocking mode with DMA. | |
HAL_StatusTypeDef | HAL_I2S_DMAPause (I2S_HandleTypeDef *hi2s) |
Pauses the audio stream playing from the Media. | |
HAL_StatusTypeDef | HAL_I2S_DMAResume (I2S_HandleTypeDef *hi2s) |
Resumes the audio stream playing from the Media. | |
HAL_StatusTypeDef | HAL_I2S_DMAStop (I2S_HandleTypeDef *hi2s) |
Resumes the audio stream playing from the Media. | |
__weak void | HAL_I2S_TxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
Tx Transfer Half completed callbacks. | |
__weak void | HAL_I2S_TxCpltCallback (I2S_HandleTypeDef *hi2s) |
Tx Transfer completed callbacks. | |
__weak void | HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
Rx Transfer half completed callbacks. | |
__weak void | HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s) |
Rx Transfer completed callbacks. | |
__weak void | HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s) |
I2S error callbacks. | |
HAL_I2S_StateTypeDef | HAL_I2S_GetState (I2S_HandleTypeDef *hi2s) |
Return the I2S state. | |
uint32_t | HAL_I2S_GetError (I2S_HandleTypeDef *hi2s) |
Return the I2S error code. |
Header file of I2S HAL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDER OR CONTRIBUTORS 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.
Definition in file stm32f4xx_hal_i2s.h.