Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed-os-example-ble-Thermometer DISCO_L475VG_IOT01-Telegram-BOT DISCO_L475VG_IOT01-sche_cheveux DISCO_L475VG_IOT01-QSPI_FLASH_FILE_SYSTEM ... more
stm32l475e_iot01_qspi.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l475e_iot01_qspi.h 00004 * @author MCD Application Team 00005 * @brief This file contains the common defines and functions prototypes for 00006 * the stm32l475e_iot01_qspi.c driver. 00007 ****************************************************************************** 00008 * @attention 00009 * 00010 * <h2><center>© Copyright (c) 2017 STMicroelectronics. 00011 * All rights reserved.</center></h2> 00012 * 00013 * This software component is licensed by ST under BSD 3-Clause license, 00014 * the "License"; You may not use this file except in compliance with the 00015 * License. You may obtain a copy of the License at: 00016 * opensource.org/licenses/BSD-3-Clause 00017 * 00018 ****************************************************************************** 00019 */ 00020 00021 /* Define to prevent recursive inclusion -------------------------------------*/ 00022 #ifndef __STM32L475E_IOT01_QSPI_H 00023 #define __STM32L475E_IOT01_QSPI_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 /* Includes ------------------------------------------------------------------*/ 00030 #include "stm32l4xx_hal.h" 00031 #include "../Components/mx25r6435f/mx25r6435f.h" 00032 00033 /** @addtogroup BSP 00034 * @{ 00035 */ 00036 00037 /** @addtogroup STM32L475E_IOT01 00038 * @{ 00039 */ 00040 00041 /** @addtogroup STM32L475E_IOT01_QSPI 00042 * @{ 00043 */ 00044 00045 /* Exported constants --------------------------------------------------------*/ 00046 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Constants QSPI Exported Constants 00047 * @{ 00048 */ 00049 /* QSPI Error codes */ 00050 #define QSPI_OK ((uint8_t)0x00) 00051 #define QSPI_ERROR ((uint8_t)0x01) 00052 #define QSPI_BUSY ((uint8_t)0x02) 00053 #define QSPI_NOT_SUPPORTED ((uint8_t)0x04) 00054 #define QSPI_SUSPENDED ((uint8_t)0x08) 00055 00056 /** 00057 * @} 00058 */ 00059 00060 /* Exported types ------------------------------------------------------------*/ 00061 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Types QSPI Exported Types 00062 * @{ 00063 */ 00064 /* QSPI Info */ 00065 typedef struct { 00066 uint32_t FlashSize; /*!< Size of the flash */ 00067 uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */ 00068 uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */ 00069 uint32_t ProgPageSize; /*!< Size of pages for the program operation */ 00070 uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */ 00071 } QSPI_Info; 00072 00073 /** 00074 * @} 00075 */ 00076 00077 /* Exported functions --------------------------------------------------------*/ 00078 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Functions QSPI Exported Functions 00079 * @{ 00080 */ 00081 uint8_t BSP_QSPI_Init (void); 00082 uint8_t BSP_QSPI_DeInit (void); 00083 uint8_t BSP_QSPI_Read (uint8_t* pData, uint32_t ReadAddr, uint32_t Size); 00084 uint8_t BSP_QSPI_Write (uint8_t* pData, uint32_t WriteAddr, uint32_t Size); 00085 uint8_t BSP_QSPI_Erase_Block (uint32_t BlockAddress); 00086 uint8_t BSP_QSPI_Erase_Sector (uint32_t Sector); 00087 uint8_t BSP_QSPI_Erase_Chip (void); 00088 uint8_t BSP_QSPI_GetStatus (void); 00089 uint8_t BSP_QSPI_GetInfo (QSPI_Info* pInfo); 00090 uint8_t BSP_QSPI_EnableMemoryMappedMode(void); 00091 uint8_t BSP_QSPI_SuspendErase (void); 00092 uint8_t BSP_QSPI_ResumeErase (void); 00093 uint8_t BSP_QSPI_EnterDeepPowerDown (void); 00094 uint8_t BSP_QSPI_LeaveDeepPowerDown (void); 00095 00096 void BSP_QSPI_MspInit(void); 00097 void BSP_QSPI_MspDeInit(void); 00098 /** 00099 * @} 00100 */ 00101 00102 /** 00103 * @} 00104 */ 00105 00106 /** 00107 * @} 00108 */ 00109 00110 /** 00111 * @} 00112 */ 00113 00114 #ifdef __cplusplus 00115 } 00116 #endif 00117 00118 #endif /* __STM32L475E_IOT01_QSPI_H */ 00119 00120 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 13:55:42 by
1.7.2