diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-08-06 22:33:31 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-08-06 22:33:31 +0100 |
| commit | 3ef911345c94a6d612ab50c1e912e81cb2cc3f71 (patch) | |
| tree | 9425ff491cd738a3f6ae11028e1834925ea746e2 /stmhal/hal/src/stm32f4xx_hal_sdram.c | |
| parent | 8a11d693cf794c8cc276a5715df11ecdc8824ef1 (diff) | |
stmhal: Update STM32Cube F4 HAL driver to V1.3.0.
This patch updates ST's HAL to the latest version, V1.3.0, dated 19 June
2014. Files were copied verbatim from the ST package. Only change was
to suppress compiler warning of unused variables in 4 places.
A lot of the changes from ST are cosmetic: comments and white space.
Some small code changes here and there, and addition of F411 header.
Main code change is how SysTick interrupt is set: it now has a
configuration variable to set the priority, so we no longer need to work
around this (originall in system_stm32f4xx.c).
Diffstat (limited to 'stmhal/hal/src/stm32f4xx_hal_sdram.c')
| -rw-r--r-- | stmhal/hal/src/stm32f4xx_hal_sdram.c | 78 |
1 files changed, 50 insertions, 28 deletions
diff --git a/stmhal/hal/src/stm32f4xx_hal_sdram.c b/stmhal/hal/src/stm32f4xx_hal_sdram.c index a6ebf485f..e45a765a5 100644 --- a/stmhal/hal/src/stm32f4xx_hal_sdram.c +++ b/stmhal/hal/src/stm32f4xx_hal_sdram.c @@ -2,8 +2,8 @@ ******************************************************************************
* @file stm32f4xx_hal_sdram.c
* @author MCD Application Team
- * @version V1.0.0
- * @date 18-February-2014
+ * @version V1.1.0
+ * @date 19-June-2014
* @brief SDRAM HAL module driver.
* This file provides a generic firmware to drive SDRAM memories mounted
* as external device.
@@ -20,7 +20,7 @@ with SDRAM memories:
(#) Declare a SDRAM_HandleTypeDef handle structure, for example:
- SDRAM_HandleTypeDef hdsram; and:
+ SDRAM_HandleTypeDef hdsram
(++) Fill the SDRAM_HandleTypeDef handle "Init" field with the allowed
values of the structure member.
@@ -133,7 +133,8 @@ /**
* @brief Performs the SDRAM device initialization sequence.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param Timing: Pointer to SDRAM control timing structure
* @retval HAL status
*/
@@ -168,7 +169,8 @@ HAL_StatusTypeDef HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTy /**
* @brief Perform the SDRAM device initialization sequence.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_DeInit(SDRAM_HandleTypeDef *hsdram)
@@ -190,7 +192,8 @@ HAL_StatusTypeDef HAL_SDRAM_DeInit(SDRAM_HandleTypeDef *hsdram) /**
* @brief SDRAM MSP Init.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval None
*/
__weak void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram)
@@ -202,7 +205,8 @@ __weak void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram) /**
* @brief SDRAM MSP DeInit.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval None
*/
__weak void HAL_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram)
@@ -214,7 +218,8 @@ __weak void HAL_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram) /**
* @brief This function handles SDRAM refresh error interrupt request.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval HAL status
*/
void HAL_SDRAM_IRQHandler(SDRAM_HandleTypeDef *hsdram)
@@ -232,7 +237,8 @@ void HAL_SDRAM_IRQHandler(SDRAM_HandleTypeDef *hsdram) /**
* @brief SDRAM Refresh error callback.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval None
*/
__weak void HAL_SDRAM_RefreshErrorCallback(SDRAM_HandleTypeDef *hsdram)
@@ -244,7 +250,8 @@ __weak void HAL_SDRAM_RefreshErrorCallback(SDRAM_HandleTypeDef *hsdram) /**
* @brief DMA transfer complete callback.
- * @param hdma: DMA handle
+ * @param hdma: pointer to a DMA_HandleTypeDef structure that contains
+ * the configuration information for the specified DMA module.
* @retval None
*/
__weak void HAL_SDRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)
@@ -286,7 +293,8 @@ __weak void HAL_SDRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma) /**
* @brief Reads 8-bit data buffer from the SDRAM memory.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to read start address
* @param pDstBuffer: Pointer to destination buffer
* @param BufferSize: Size of the buffer to read from memory
@@ -326,7 +334,8 @@ HAL_StatusTypeDef HAL_SDRAM_Read_8b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddr /**
* @brief Writes 8-bit data buffer to SDRAM memory.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to write start address
* @param pSrcBuffer: Pointer to source buffer to write
* @param BufferSize: Size of the buffer to write to memory
@@ -369,7 +378,8 @@ HAL_StatusTypeDef HAL_SDRAM_Write_8b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAdd /**
* @brief Reads 16-bit data buffer from the SDRAM memory.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to read start address
* @param pDstBuffer: Pointer to destination buffer
* @param BufferSize: Size of the buffer to read from memory
@@ -408,7 +418,8 @@ HAL_StatusTypeDef HAL_SDRAM_Read_16b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAdd /**
* @brief Writes 16-bit data buffer to SDRAM memory.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to write start address
* @param pSrcBuffer: Pointer to source buffer to write
* @param BufferSize: Size of the buffer to write to memory
@@ -450,7 +461,8 @@ HAL_StatusTypeDef HAL_SDRAM_Write_16b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAd /**
* @brief Reads 32-bit data buffer from the SDRAM memory.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to read start address
* @param pDstBuffer: Pointer to destination buffer
* @param BufferSize: Size of the buffer to read from memory
@@ -489,7 +501,8 @@ HAL_StatusTypeDef HAL_SDRAM_Read_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAdd /**
* @brief Writes 32-bit data buffer to SDRAM memory.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to write start address
* @param pSrcBuffer: Pointer to source buffer to write
* @param BufferSize: Size of the buffer to write to memory
@@ -531,7 +544,8 @@ HAL_StatusTypeDef HAL_SDRAM_Write_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAd /**
* @brief Reads a Words data from the SDRAM memory using DMA transfer.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to read start address
* @param pDstBuffer: Pointer to destination buffer
* @param BufferSize: Size of the buffer to read from memory
@@ -571,7 +585,8 @@ HAL_StatusTypeDef HAL_SDRAM_Read_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAdd /**
* @brief Writes a Words data buffer to SDRAM memory using DMA transfer.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param pAddress: Pointer to write start address
* @param pSrcBuffer: Pointer to source buffer to write
* @param BufferSize: Size of the buffer to write to memory
@@ -630,7 +645,8 @@ HAL_StatusTypeDef HAL_SDRAM_Write_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAd /**
* @brief Enables dynamically SDRAM write protection.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Enable(SDRAM_HandleTypeDef *hsdram)
@@ -655,7 +671,8 @@ HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Enable(SDRAM_HandleTypeDef *hsdram) /**
* @brief Disables dynamically SDRAM write protection.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Disable(SDRAM_HandleTypeDef *hsdram)
@@ -680,10 +697,11 @@ HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Disable(SDRAM_HandleTypeDef *hsdram) /**
* @brief Sends Command to the SDRAM bank.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param Command: SDRAM command structure
* @param Timeout: Timeout duration
- * @retval HAL state
+ * @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
{
@@ -714,9 +732,10 @@ HAL_StatusTypeDef HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_C /**
* @brief Programs the SDRAM Memory Refresh rate.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param RefreshRate: The SDRAM refresh rate value
- * @retval HAL state
+ * @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate)
{
@@ -740,9 +759,10 @@ HAL_StatusTypeDef HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint /**
* @brief Sets the Number of consecutive SDRAM Memory auto Refresh commands.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @param AutoRefreshNumber: The SDRAM auto Refresh number
- * @retval None
+ * @retval HAL status
*/
HAL_StatusTypeDef HAL_SDRAM_SetAutoRefreshNumber(SDRAM_HandleTypeDef *hsdram, uint32_t AutoRefreshNumber)
{
@@ -766,7 +786,8 @@ HAL_StatusTypeDef HAL_SDRAM_SetAutoRefreshNumber(SDRAM_HandleTypeDef *hsdram, ui /**
* @brief Returns the SDRAM memory current mode.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval The SDRAM memory mode.
*/
uint32_t HAL_SDRAM_GetModeStatus(SDRAM_HandleTypeDef *hsdram)
@@ -796,7 +817,8 @@ uint32_t HAL_SDRAM_GetModeStatus(SDRAM_HandleTypeDef *hsdram) /**
* @brief Returns the SDRAM state.
- * @param hsdram: SDRAM handle
+ * @param hsdram: pointer to a SDRAM_HandleTypeDef structure that contains
+ * the configuration information for SDRAM module.
* @retval HAL state
*/
HAL_SDRAM_StateTypeDef HAL_SDRAM_GetState(SDRAM_HandleTypeDef *hsdram)
|
