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.
Diff: targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_flash.h
- Revision:
- 441:d2c15dda23c1
- Parent:
- 392:2b59412bb664
- Child:
- 630:825f75ca301e
--- a/targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_flash.h Tue Dec 16 08:15:08 2014 +0000 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_flash.h Tue Jan 06 16:15:36 2015 +0000 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f0xx_hal_flash.h * @author MCD Application Team - * @version V1.1.0 - * @date 03-Oct-2014 + * @version V1.2.0 + * @date 11-December-2014 * @brief Header file of Flash HAL module. ****************************************************************************** * @attention @@ -60,15 +60,6 @@ * @{ */ -/** - * @brief FLASH Error source - */ -typedef enum -{ - FLASH_ERROR_PG = 0x01, - FLASH_ERROR_WRP = 0x02 -} FLASH_ErrorTypeDef; - /** * @brief FLASH Erase structure definition */ @@ -134,17 +125,18 @@ */ typedef struct { - __IO FLASH_ProcedureTypeDef ProcedureOnGoing; /* Internal variable to indicate which procedure is ongoing or not in IT context */ + __IO FLASH_ProcedureTypeDef ProcedureOnGoing; /*!< Internal variable to indicate which procedure is ongoing or not in IT context */ - __IO uint32_t DataRemaining; /* Internal variable to save the remaining pages to erase or half-word to program in IT context */ + __IO uint32_t DataRemaining; /*!< Internal variable to save the remaining pages to erase or half-word to program in IT context */ - __IO uint32_t Address; /* Internal variable to save address selected for program or erase */ + __IO uint32_t Address; /*!< Internal variable to save address selected for program or erase */ - __IO uint64_t Data; /* Internal variable to save data to be programmed */ + __IO uint64_t Data; /*!< Internal variable to save data to be programmed */ - HAL_LockTypeDef Lock; /* FLASH locking object */ + HAL_LockTypeDef Lock; /*!< FLASH locking object */ - __IO FLASH_ErrorTypeDef ErrorCode; /* FLASH error code */ + __IO uint32_t ErrorCode; /*!< FLASH error code + This parameter can be a value of @ref FLASH_Error */ } FLASH_ProcessTypeDef; @@ -158,6 +150,16 @@ * @{ */ +/** @defgroup FLASH_Error FLASH Error + * @{ + */ +#define FLASH_ERROR_NONE ((uint32_t)0x00000000) +#define FLASH_ERROR_PG ((uint32_t)0x00000001) +#define FLASH_ERROR_WRP ((uint32_t)0x00000002) +/** + * @} + */ + /** @defgroup FLASH_Type_Erase FLASH Type Erase * @{ */ @@ -204,7 +206,7 @@ #define OPTIONBYTE_USER ((uint32_t)0x04) /*!<USER option byte configuration*/ #define OPTIONBYTE_DATA ((uint32_t)0x08) /*!<DATA option byte configuration*/ -#define IS_OPTIONBYTE(VALUE) (((VALUE) < (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_DATA))) +#define IS_OPTIONBYTE(VALUE) ((VALUE) <= (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_DATA)) /** * @} */ @@ -485,7 +487,7 @@ * @{ */ /* Peripheral State and Error functions ***************************************/ -FLASH_ErrorTypeDef HAL_FLASH_GetError(void); +uint32_t HAL_FLASH_GetError(void); /** * @}