GFX Develop Branch
This commit is contained in:
@ -172,7 +172,7 @@
|
||||
|
||||
[..]
|
||||
Use function HAL_SAI_UnRegisterCallback() to reset a callback to the default
|
||||
weak (surcharged) function.
|
||||
weak function.
|
||||
HAL_SAI_UnRegisterCallback() takes as parameters the HAL peripheral handle,
|
||||
and the callback ID.
|
||||
[..]
|
||||
@ -187,10 +187,10 @@
|
||||
|
||||
[..]
|
||||
By default, after the HAL_SAI_Init and if the state is HAL_SAI_STATE_RESET
|
||||
all callbacks are reset to the corresponding legacy weak (surcharged) functions:
|
||||
all callbacks are reset to the corresponding legacy weak functions:
|
||||
examples HAL_SAI_RxCpltCallback(), HAL_SAI_ErrorCallback().
|
||||
Exception done for MspInit and MspDeInit callbacks that are respectively
|
||||
reset to the legacy weak (surcharged) functions in the HAL_SAI_Init
|
||||
reset to the legacy weak functions in the HAL_SAI_Init
|
||||
and HAL_SAI_DeInit only when these callbacks are null (not registered beforehand).
|
||||
If not, MspInit or MspDeInit are not null, the HAL_SAI_Init and HAL_SAI_DeInit
|
||||
keep and use the user MspInit/MspDeInit callbacks (registered beforehand).
|
||||
@ -207,7 +207,7 @@
|
||||
[..]
|
||||
When the compilation define USE_HAL_SAI_REGISTER_CALLBACKS is set to 0 or
|
||||
not defined, the callback registering feature is not available
|
||||
and weak (surcharged) callbacks are used.
|
||||
and weak callbacks are used.
|
||||
|
||||
@endverbatim
|
||||
*/
|
||||
@ -1516,6 +1516,12 @@ HAL_StatusTypeDef HAL_SAI_DMAStop(SAI_HandleTypeDef *hsai)
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hsai);
|
||||
|
||||
/* Disable SAI peripheral */
|
||||
if (SAI_Disable(hsai) != HAL_OK)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Disable the SAI DMA request */
|
||||
hsai->Instance->CR1 &= ~SAI_xCR1_DMAEN;
|
||||
|
||||
@ -1547,12 +1553,6 @@ HAL_StatusTypeDef HAL_SAI_DMAStop(SAI_HandleTypeDef *hsai)
|
||||
}
|
||||
}
|
||||
|
||||
/* Disable SAI peripheral */
|
||||
if (SAI_Disable(hsai) != HAL_OK)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Flush the fifo */
|
||||
SET_BIT(hsai->Instance->CR2, SAI_xCR2_FFLUSH);
|
||||
|
||||
@ -1578,6 +1578,12 @@ HAL_StatusTypeDef HAL_SAI_Abort(SAI_HandleTypeDef *hsai)
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hsai);
|
||||
|
||||
/* Disable SAI peripheral */
|
||||
if (SAI_Disable(hsai) != HAL_OK)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Check SAI DMA is enabled or not */
|
||||
if ((hsai->Instance->CR1 & SAI_xCR1_DMAEN) == SAI_xCR1_DMAEN)
|
||||
{
|
||||
@ -1617,12 +1623,6 @@ HAL_StatusTypeDef HAL_SAI_Abort(SAI_HandleTypeDef *hsai)
|
||||
hsai->Instance->IMR = 0;
|
||||
hsai->Instance->CLRFR = 0xFFFFFFFFU;
|
||||
|
||||
/* Disable SAI peripheral */
|
||||
if (SAI_Disable(hsai) != HAL_OK)
|
||||
{
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Flush the fifo */
|
||||
SET_BIT(hsai->Instance->CR2, SAI_xCR2_FFLUSH);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user