Beispiel #1
0
/**
  * @brief  Deinitialize the SAIx peripheral registers to their default reset values.
  * @param  SAIx: To select the SAIx peripheral, where x can be the different instances 
  *                     
  * @retval None
  */
void SAI_DeInit(SAI_TypeDef* SAIx)
{
  /* Check the parameters */
  assert_param(IS_SAI_PERIPH(SAIx));
  
  if(SAIx == SAI1)
  {
    /* Enable SAI1 reset state */
    RCC_APB2PeriphResetCmd(RCC_APB2Periph_SAI1, ENABLE);
    /* Release SAI1 from reset state */
    RCC_APB2PeriphResetCmd(RCC_APB2Periph_SAI1, DISABLE); 
  }
  else
  {
#if defined(STM32F446xx)
  if(SAIx == SAI2)
    {
      /* Enable SAI2 reset state */
      RCC_APB2PeriphResetCmd(RCC_APB2Periph_SAI2, ENABLE);
      /* Release SAI2 from reset state */
      RCC_APB2PeriphResetCmd(RCC_APB2Periph_SAI2, DISABLE);   
    }
#endif /* STM32F446xx */
  }
}
Beispiel #2
0
/**
 * @brief  Deinitialize the SAIx peripheral registers to their default reset values.
 * @param  SAIx: To select the SAIx peripheral, where x can be the different instances 
 *                     
 * @retval None
 */
void SAI_DeInit(SAI_TypeDef* SAIx)
{
	/* Check the parameters */
	assert_param(IS_SAI_PERIPH(SAIx));
	
	/* Enable SAI1 reset state */
	RCC_APB2PeriphResetCmd(RCC_APB2Periph_SAI1, ENABLE);
	/* Release SAI1 from reset state */
	RCC_APB2PeriphResetCmd(RCC_APB2Periph_SAI1, DISABLE);
}