STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Initialization and de-initialization functions

Initialization and Configuration functions. More...

Collaboration diagram for Initialization and de-initialization functions:

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.
 
void HAL_I2S_MspInit (I2S_HandleTypeDef *hi2s)
 I2S MSP Init.
 
void HAL_I2S_MspDeInit (I2S_HandleTypeDef *hi2s)
 I2S MSP DeInit.
 

Detailed Description

Initialization and Configuration functions.

 ===============================================================================
              ##### Initialization and de-initialization functions #####
 ===============================================================================
    [..]  This subsection provides a set of functions allowing to initialize and
          de-initialize the I2Sx peripheral in simplex mode:

      (+) User must Implement HAL_I2S_MspInit() function in which he configures
          all related peripherals resources (CLOCK, GPIO, DMA, IT and NVIC ).

      (+) Call the function HAL_I2S_Init() to configure the selected device with
          the selected configuration:
        (++) Mode
        (++) Standard
        (++) Data Format
        (++) MCLK Output
        (++) Audio frequency
        (++) Polarity
        (++) Full duplex mode

     (+) Call the function HAL_I2S_DeInit() to restore the default configuration
          of the selected I2Sx peripheral.

Function Documentation

◆ HAL_I2S_Init()

HAL_StatusTypeDef HAL_I2S_Init ( I2S_HandleTypeDef * hi2s)

#include <stm32f4xx_hal_i2s.h>

Initializes the I2S according to the specified parameters in the I2S_InitTypeDef and create the associated handle.

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

Definition at line 265 of file stm32f4xx_hal_i2s.c.

References assert_param, I2S_InitTypeDef::AudioFreq, I2S_InitTypeDef::ClockSource, I2S_InitTypeDef::CPOL, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, I2S_InitTypeDef::FullDuplexMode, HAL_ERROR, HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_PRESCALER, HAL_I2S_ErrorCallback(), HAL_I2S_MspInit(), HAL_I2S_RxCpltCallback(), HAL_I2S_RxHalfCpltCallback(), HAL_I2S_STATE_BUSY, HAL_I2S_STATE_READY, HAL_I2S_STATE_RESET, HAL_I2S_TxCpltCallback(), HAL_I2S_TxHalfCpltCallback(), HAL_OK, HAL_RCCEx_GetPeriphCLKFreq(), HAL_UNLOCKED, I2S_AUDIOFREQ_DEFAULT, I2S_DATAFORMAT_16B, I2S_FULLDUPLEXMODE_ENABLE, I2S_IRQHandler(), I2S_MCLKOUTPUT_ENABLE, I2S_MODE_MASTER_TX, I2S_MODE_SLAVE_RX, I2S_MODE_SLAVE_TX, I2S_STANDARD_LSB, I2S_STANDARD_PCM_LONG, I2S_STANDARD_PCM_SHORT, __I2S_HandleTypeDef::Init, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::IrqHandlerISR, IS_I2S_AUDIO_FREQ, IS_I2S_CLOCKSOURCE, IS_I2S_CPOL, IS_I2S_DATA_FORMAT, IS_I2S_FULLDUPLEX_MODE, IS_I2S_MCLK_OUTPUT, IS_I2S_MODE, IS_I2S_STANDARD, __I2S_HandleTypeDef::Lock, I2S_InitTypeDef::MCLKOutput, I2S_InitTypeDef::Mode, RCC_PERIPHCLK_I2S_APB1, RCC_PERIPHCLK_I2S_APB2, I2S_InitTypeDef::Standard, and __I2S_HandleTypeDef::State.

◆ HAL_I2S_DeInit()

HAL_StatusTypeDef HAL_I2S_DeInit ( I2S_HandleTypeDef * hi2s)

#include <stm32f4xx_hal_i2s.h>

DeInitializes the I2S peripheral.

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

Definition at line 495 of file stm32f4xx_hal_i2s.c.

References __HAL_I2S_DISABLE, __HAL_UNLOCK, assert_param, __I2S_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_I2S_ERROR_NONE, HAL_I2S_MspDeInit(), HAL_I2S_STATE_BUSY, HAL_I2S_STATE_RESET, HAL_OK, __I2S_HandleTypeDef::Instance, and __I2S_HandleTypeDef::State.

◆ HAL_I2S_MspInit()

__weak void HAL_I2S_MspInit ( I2S_HandleTypeDef * hi2s)

#include <stm32f4xx_hal_i2s.h>

I2S MSP Init.

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

Definition at line 539 of file stm32f4xx_hal_i2s.c.

References UNUSED.

Referenced by HAL_I2S_Init().

◆ HAL_I2S_MspDeInit()

__weak void HAL_I2S_MspDeInit ( I2S_HandleTypeDef * hi2s)

#include <stm32f4xx_hal_i2s.h>

I2S MSP DeInit.

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

Definition at line 555 of file stm32f4xx_hal_i2s.c.

References UNUSED.

Referenced by HAL_I2S_DeInit().