mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Thu Jul 02 16:30:08 2015 +0100
Revision:
581:39197bcd20f2
Parent:
489:119543c9f674
Synchronized with git revision ae2d3cdffe70184eb8736d94f76c45c93f4b7724

Full URL: https://github.com/mbedmicro/mbed/commit/ae2d3cdffe70184eb8736d94f76c45c93f4b7724/

Make it possible to build the core mbed library with yotta

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 489:119543c9f674 1 /**
mbed_official 489:119543c9f674 2 ******************************************************************************
mbed_official 489:119543c9f674 3 * @file stm32f1xx_hal_sram.h
mbed_official 489:119543c9f674 4 * @author MCD Application Team
mbed_official 489:119543c9f674 5 * @version V1.0.0
mbed_official 489:119543c9f674 6 * @date 15-December-2014
mbed_official 489:119543c9f674 7 * @brief Header file of SRAM HAL module.
mbed_official 489:119543c9f674 8 ******************************************************************************
mbed_official 489:119543c9f674 9 * @attention
mbed_official 489:119543c9f674 10 *
mbed_official 489:119543c9f674 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 489:119543c9f674 12 *
mbed_official 489:119543c9f674 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 489:119543c9f674 14 * are permitted provided that the following conditions are met:
mbed_official 489:119543c9f674 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 489:119543c9f674 16 * this list of conditions and the following disclaimer.
mbed_official 489:119543c9f674 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 489:119543c9f674 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 489:119543c9f674 19 * and/or other materials provided with the distribution.
mbed_official 489:119543c9f674 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 489:119543c9f674 21 * may be used to endorse or promote products derived from this software
mbed_official 489:119543c9f674 22 * without specific prior written permission.
mbed_official 489:119543c9f674 23 *
mbed_official 489:119543c9f674 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 489:119543c9f674 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 489:119543c9f674 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 489:119543c9f674 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 489:119543c9f674 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 489:119543c9f674 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 489:119543c9f674 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 489:119543c9f674 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 489:119543c9f674 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 489:119543c9f674 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 489:119543c9f674 34 *
mbed_official 489:119543c9f674 35 ******************************************************************************
mbed_official 489:119543c9f674 36 */
mbed_official 489:119543c9f674 37
mbed_official 489:119543c9f674 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 489:119543c9f674 39 #ifndef __STM32F1xx_HAL_SRAM_H
mbed_official 489:119543c9f674 40 #define __STM32F1xx_HAL_SRAM_H
mbed_official 489:119543c9f674 41
mbed_official 489:119543c9f674 42 #ifdef __cplusplus
mbed_official 489:119543c9f674 43 extern "C" {
mbed_official 489:119543c9f674 44 #endif
mbed_official 489:119543c9f674 45
mbed_official 489:119543c9f674 46 /* Includes ------------------------------------------------------------------*/
mbed_official 489:119543c9f674 47 #include "stm32f1xx_ll_fsmc.h"
mbed_official 489:119543c9f674 48
mbed_official 489:119543c9f674 49 /** @addtogroup STM32F1xx_HAL_Driver
mbed_official 489:119543c9f674 50 * @{
mbed_official 489:119543c9f674 51 */
mbed_official 489:119543c9f674 52
mbed_official 489:119543c9f674 53 #if defined (STM32F101xE) || defined(STM32F103xE) || defined(STM32F101xG) || defined(STM32F103xG) || defined(STM32F100xE)
mbed_official 489:119543c9f674 54
mbed_official 489:119543c9f674 55 /** @addtogroup SRAM
mbed_official 489:119543c9f674 56 * @{
mbed_official 489:119543c9f674 57 */
mbed_official 489:119543c9f674 58
mbed_official 489:119543c9f674 59 /* Exported typedef ----------------------------------------------------------*/
mbed_official 489:119543c9f674 60
mbed_official 489:119543c9f674 61 /** @defgroup SRAM_Exported_Types SRAM Exported Types
mbed_official 489:119543c9f674 62 * @{
mbed_official 489:119543c9f674 63 */
mbed_official 489:119543c9f674 64 /**
mbed_official 489:119543c9f674 65 * @brief HAL SRAM State structures definition
mbed_official 489:119543c9f674 66 */
mbed_official 489:119543c9f674 67 typedef enum
mbed_official 489:119543c9f674 68 {
mbed_official 489:119543c9f674 69 HAL_SRAM_STATE_RESET = 0x00, /*!< SRAM not yet initialized or disabled */
mbed_official 489:119543c9f674 70 HAL_SRAM_STATE_READY = 0x01, /*!< SRAM initialized and ready for use */
mbed_official 489:119543c9f674 71 HAL_SRAM_STATE_BUSY = 0x02, /*!< SRAM internal process is ongoing */
mbed_official 489:119543c9f674 72 HAL_SRAM_STATE_ERROR = 0x03, /*!< SRAM error state */
mbed_official 489:119543c9f674 73 HAL_SRAM_STATE_PROTECTED = 0x04 /*!< SRAM peripheral NORSRAM device write protected */
mbed_official 489:119543c9f674 74
mbed_official 489:119543c9f674 75 }HAL_SRAM_StateTypeDef;
mbed_official 489:119543c9f674 76
mbed_official 489:119543c9f674 77 /**
mbed_official 489:119543c9f674 78 * @brief SRAM handle Structure definition
mbed_official 489:119543c9f674 79 */
mbed_official 489:119543c9f674 80 typedef struct
mbed_official 489:119543c9f674 81 {
mbed_official 489:119543c9f674 82 FSMC_NORSRAM_TypeDef *Instance; /*!< Register base address */
mbed_official 489:119543c9f674 83
mbed_official 489:119543c9f674 84 FSMC_NORSRAM_EXTENDED_TypeDef *Extended; /*!< Extended mode register base address */
mbed_official 489:119543c9f674 85
mbed_official 489:119543c9f674 86 FSMC_NORSRAM_InitTypeDef Init; /*!< SRAM device control configuration parameters */
mbed_official 489:119543c9f674 87
mbed_official 489:119543c9f674 88 HAL_LockTypeDef Lock; /*!< SRAM locking object */
mbed_official 489:119543c9f674 89
mbed_official 489:119543c9f674 90 __IO HAL_SRAM_StateTypeDef State; /*!< SRAM device access state */
mbed_official 489:119543c9f674 91
mbed_official 489:119543c9f674 92 DMA_HandleTypeDef *hdma; /*!< Pointer DMA handler */
mbed_official 489:119543c9f674 93
mbed_official 489:119543c9f674 94 }SRAM_HandleTypeDef;
mbed_official 489:119543c9f674 95
mbed_official 489:119543c9f674 96 /**
mbed_official 489:119543c9f674 97 * @}
mbed_official 489:119543c9f674 98 */
mbed_official 489:119543c9f674 99
mbed_official 489:119543c9f674 100 /* Exported constants --------------------------------------------------------*/
mbed_official 489:119543c9f674 101 /* Exported macro ------------------------------------------------------------*/
mbed_official 489:119543c9f674 102
mbed_official 489:119543c9f674 103 /** @defgroup SRAM_Exported_Macros SRAM Exported Macros
mbed_official 489:119543c9f674 104 * @{
mbed_official 489:119543c9f674 105 */
mbed_official 489:119543c9f674 106
mbed_official 489:119543c9f674 107 /** @brief Reset SRAM handle state
mbed_official 489:119543c9f674 108 * @param __HANDLE__: SRAM handle
mbed_official 489:119543c9f674 109 * @retval None
mbed_official 489:119543c9f674 110 */
mbed_official 489:119543c9f674 111 #define __HAL_SRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SRAM_STATE_RESET)
mbed_official 489:119543c9f674 112
mbed_official 489:119543c9f674 113 /**
mbed_official 489:119543c9f674 114 * @}
mbed_official 489:119543c9f674 115 */
mbed_official 489:119543c9f674 116
mbed_official 489:119543c9f674 117 /* Exported functions --------------------------------------------------------*/
mbed_official 489:119543c9f674 118
mbed_official 489:119543c9f674 119 /** @addtogroup SRAM_Exported_Functions
mbed_official 489:119543c9f674 120 * @{
mbed_official 489:119543c9f674 121 */
mbed_official 489:119543c9f674 122
mbed_official 489:119543c9f674 123 /** @addtogroup SRAM_Exported_Functions_Group1
mbed_official 489:119543c9f674 124 * @{
mbed_official 489:119543c9f674 125 */
mbed_official 489:119543c9f674 126
mbed_official 489:119543c9f674 127 /* Initialization/de-initialization functions **********************************/
mbed_official 489:119543c9f674 128 HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTypeDef *Timing, FSMC_NORSRAM_TimingTypeDef *ExtTiming);
mbed_official 489:119543c9f674 129 HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram);
mbed_official 489:119543c9f674 130 void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram);
mbed_official 489:119543c9f674 131 void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram);
mbed_official 489:119543c9f674 132
mbed_official 489:119543c9f674 133 void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma);
mbed_official 489:119543c9f674 134 void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma);
mbed_official 489:119543c9f674 135
mbed_official 489:119543c9f674 136 /**
mbed_official 489:119543c9f674 137 * @}
mbed_official 489:119543c9f674 138 */
mbed_official 489:119543c9f674 139
mbed_official 489:119543c9f674 140 /** @addtogroup SRAM_Exported_Functions_Group2
mbed_official 489:119543c9f674 141 * @{
mbed_official 489:119543c9f674 142 */
mbed_official 489:119543c9f674 143
mbed_official 489:119543c9f674 144 /* I/O operation functions *****************************************************/
mbed_official 489:119543c9f674 145 HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 146 HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 147 HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 148 HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 149 HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 150 HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 151 HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 152 HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);
mbed_official 489:119543c9f674 153
mbed_official 489:119543c9f674 154 /**
mbed_official 489:119543c9f674 155 * @}
mbed_official 489:119543c9f674 156 */
mbed_official 489:119543c9f674 157
mbed_official 489:119543c9f674 158 /** @addtogroup SRAM_Exported_Functions_Group3
mbed_official 489:119543c9f674 159 * @{
mbed_official 489:119543c9f674 160 */
mbed_official 489:119543c9f674 161
mbed_official 489:119543c9f674 162 /* SRAM Control functions ******************************************************/
mbed_official 489:119543c9f674 163 HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram);
mbed_official 489:119543c9f674 164 HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram);
mbed_official 489:119543c9f674 165
mbed_official 489:119543c9f674 166 /**
mbed_official 489:119543c9f674 167 * @}
mbed_official 489:119543c9f674 168 */
mbed_official 489:119543c9f674 169
mbed_official 489:119543c9f674 170 /** @addtogroup SRAM_Exported_Functions_Group4
mbed_official 489:119543c9f674 171 * @{
mbed_official 489:119543c9f674 172 */
mbed_official 489:119543c9f674 173
mbed_official 489:119543c9f674 174 /* SRAM State functions *********************************************************/
mbed_official 489:119543c9f674 175 HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram);
mbed_official 489:119543c9f674 176
mbed_official 489:119543c9f674 177 /**
mbed_official 489:119543c9f674 178 * @}
mbed_official 489:119543c9f674 179 */
mbed_official 489:119543c9f674 180
mbed_official 489:119543c9f674 181 /**
mbed_official 489:119543c9f674 182 * @}
mbed_official 489:119543c9f674 183 */
mbed_official 489:119543c9f674 184
mbed_official 489:119543c9f674 185 /**
mbed_official 489:119543c9f674 186 * @}
mbed_official 489:119543c9f674 187 */
mbed_official 489:119543c9f674 188
mbed_official 489:119543c9f674 189 #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG || STM32F100xE */
mbed_official 489:119543c9f674 190
mbed_official 489:119543c9f674 191 /**
mbed_official 489:119543c9f674 192 * @}
mbed_official 489:119543c9f674 193 */
mbed_official 489:119543c9f674 194
mbed_official 489:119543c9f674 195 #ifdef __cplusplus
mbed_official 489:119543c9f674 196 }
mbed_official 489:119543c9f674 197 #endif
mbed_official 489:119543c9f674 198
mbed_official 489:119543c9f674 199 #endif /* __STM32F1xx_HAL_SRAM_H */
mbed_official 489:119543c9f674 200
mbed_official 489:119543c9f674 201 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/