GFX Develop Branch
This commit is contained in:
@ -82,15 +82,15 @@
|
||||
and a pointer to the user callback function.
|
||||
|
||||
Use function HAL_SDRAM_UnRegisterCallback() to reset a callback to the default
|
||||
weak (surcharged) function. It allows to reset following callbacks:
|
||||
weak (overridden) function. It allows to reset following callbacks:
|
||||
(+) MspInitCallback : SDRAM MspInit.
|
||||
(+) MspDeInitCallback : SDRAM MspDeInit.
|
||||
This function) takes as parameters the HAL peripheral handle and the Callback ID.
|
||||
|
||||
By default, after the HAL_SDRAM_Init and if the state is HAL_SDRAM_STATE_RESET
|
||||
all callbacks are reset to the corresponding legacy weak (surcharged) functions.
|
||||
all callbacks are reset to the corresponding legacy weak (overridden) functions.
|
||||
Exception done for MspInit and MspDeInit callbacks that are respectively
|
||||
reset to the legacy weak (surcharged) functions in the HAL_SDRAM_Init
|
||||
reset to the legacy weak (overridden) functions in the HAL_SDRAM_Init
|
||||
and HAL_SDRAM_DeInit only when these callbacks are null (not registered beforehand).
|
||||
If not, MspInit or MspDeInit are not null, the HAL_SDRAM_Init and HAL_SDRAM_DeInit
|
||||
keep and use the user MspInit/MspDeInit callbacks (registered beforehand)
|
||||
@ -105,7 +105,7 @@
|
||||
|
||||
When The compilation define USE_HAL_SDRAM_REGISTER_CALLBACKS is set to 0 or
|
||||
not defined, the callback registering feature is not available
|
||||
and weak (surcharged) callbacks are used.
|
||||
and weak (overridden) callbacks are used.
|
||||
|
||||
@endverbatim
|
||||
******************************************************************************
|
||||
@ -793,7 +793,7 @@ HAL_StatusTypeDef HAL_SDRAM_Write_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAd
|
||||
#if (USE_HAL_SDRAM_REGISTER_CALLBACKS == 1)
|
||||
/**
|
||||
* @brief Register a User SDRAM Callback
|
||||
* To be used instead of the weak (surcharged) predefined callback
|
||||
* To be used to override the weak predefined callback
|
||||
* @param hsdram : SDRAM handle
|
||||
* @param CallbackId : ID of the callback to be registered
|
||||
* This parameter can be one of the following values:
|
||||
@ -814,9 +814,6 @@ HAL_StatusTypeDef HAL_SDRAM_RegisterCallback(SDRAM_HandleTypeDef *hsdram, HAL_SD
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hsdram);
|
||||
|
||||
state = hsdram->State;
|
||||
if ((state == HAL_SDRAM_STATE_READY) || (state == HAL_SDRAM_STATE_WRITE_PROTECTED))
|
||||
{
|
||||
@ -859,14 +856,12 @@ HAL_StatusTypeDef HAL_SDRAM_RegisterCallback(SDRAM_HandleTypeDef *hsdram, HAL_SD
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Release Lock */
|
||||
__HAL_UNLOCK(hsdram);
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister a User SDRAM Callback
|
||||
* SDRAM Callback is redirected to the weak (surcharged) predefined callback
|
||||
* SDRAM Callback is redirected to the weak predefined callback
|
||||
* @param hsdram : SDRAM handle
|
||||
* @param CallbackId : ID of the callback to be unregistered
|
||||
* This parameter can be one of the following values:
|
||||
@ -882,9 +877,6 @@ HAL_StatusTypeDef HAL_SDRAM_UnRegisterCallback(SDRAM_HandleTypeDef *hsdram, HAL_
|
||||
HAL_StatusTypeDef status = HAL_OK;
|
||||
HAL_SDRAM_StateTypeDef state;
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hsdram);
|
||||
|
||||
state = hsdram->State;
|
||||
if ((state == HAL_SDRAM_STATE_READY) || (state == HAL_SDRAM_STATE_WRITE_PROTECTED))
|
||||
{
|
||||
@ -933,14 +925,12 @@ HAL_StatusTypeDef HAL_SDRAM_UnRegisterCallback(SDRAM_HandleTypeDef *hsdram, HAL_
|
||||
status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Release Lock */
|
||||
__HAL_UNLOCK(hsdram);
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register a User SDRAM Callback for DMA transfers
|
||||
* To be used instead of the weak (surcharged) predefined callback
|
||||
* To be used to override the weak predefined callback
|
||||
* @param hsdram : SDRAM handle
|
||||
* @param CallbackId : ID of the callback to be registered
|
||||
* This parameter can be one of the following values:
|
||||
|
||||
Reference in New Issue
Block a user