|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
This file contains definitions for FLASH Interface functionalities. More...
#include "platform.h"Go to the source code of this file.
Macros | |
| #define | FLASH_IF_BUFFER_SIZE 0x00000800U |
Enumerations | |
| enum | FLASH_IF_StatusTypedef { FLASH_IF_PARAM_ERROR = -6 , FLASH_IF_LOCK_ERROR = -5 , FLASH_IF_WRITE_ERROR = -4 , FLASH_IF_READ_ERROR = -3 , FLASH_IF_ERASE_ERROR = -2 , FLASH_IF_ERROR = -1 , FLASH_IF_OK = 0 , FLASH_IF_BUSY = 1 } |
| Flash status. More... | |
Functions | |
| FLASH_IF_StatusTypedef | FLASH_IF_Init (void *pAllocRamBuffer) |
| This function initializes the internal and external flash interface. | |
| FLASH_IF_StatusTypedef | FLASH_IF_DeInit (void) |
| This function de-initializes the internal and external flash interface. | |
| FLASH_IF_StatusTypedef | FLASH_IF_Write (void *pDestination, const void *pSource, uint32_t uLength) |
| This function writes a data buffer in internal or external flash. | |
| FLASH_IF_StatusTypedef | FLASH_IF_Read (void *pDestination, const void *pSource, uint32_t uLength) |
| This function reads a amount of data from flash and copy into the output data buffer. | |
| FLASH_IF_StatusTypedef | FLASH_IF_Erase (void *pStart, uint32_t uLength) |
| This function erases a amount of internal or external flash pages depending of the length. | |
This file contains definitions for FLASH Interface functionalities.
Copyright (c) 2026 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file flash_if.h.
| #define FLASH_IF_BUFFER_SIZE 0x00000800U |
FLASH Page Size, 2 KBytes
Definition at line 57 of file flash_if.h.
Flash status.
Definition at line 40 of file flash_if.h.
| FLASH_IF_StatusTypedef FLASH_IF_DeInit | ( | void | ) |
This function de-initializes the internal and external flash interface.
Definition at line 129 of file flash_if.c.
References FLASH_IF_OK, and pAllocatedBuffer.
| FLASH_IF_StatusTypedef FLASH_IF_Erase | ( | void * | pStart, |
| uint32_t | uLength ) |
This function erases a amount of internal or external flash pages depending of the length.
| pStart | pointer of flash address to erase |
| uLength | number of bytes to erase |
Definition at line 175 of file flash_if.c.
References FLASH_IF_ERROR, and FLASH_IF_INT_Erase().
| FLASH_IF_StatusTypedef FLASH_IF_Init | ( | void * | pAllocRamBuffer | ) |
This function initializes the internal and external flash interface.
| pAllocRamBuffer | pointer used to store a FLASH page in RAM when partial replacement is needed |
Definition at line 115 of file flash_if.c.
References FLASH_IF_OK, and pAllocatedBuffer.
| FLASH_IF_StatusTypedef FLASH_IF_Read | ( | void * | pDestination, |
| const void * | pSource, | ||
| uint32_t | uLength ) |
This function reads a amount of data from flash and copy into the output data buffer.
| pDestination | pointer of target location to copy the flash sector |
| pSource | pointer of flash address to read |
| uLength | number of bytes to read |
Definition at line 159 of file flash_if.c.
References FLASH_IF_ERROR, and FLASH_IF_INT_Read().
Referenced by OnRestoreContextRequest().
| FLASH_IF_StatusTypedef FLASH_IF_Write | ( | void * | pDestination, |
| const void * | pSource, | ||
| uint32_t | uLength ) |
This function writes a data buffer in internal or external flash.
| pDestination | pointer of flash address to write. It has to be 8 bytes aligned. |
| pSource | pointer on buffer with data to write |
| uLength | length of data buffer in bytes. It has to be 8 bytes aligned. |
Definition at line 143 of file flash_if.c.
References FLASH_IF_ERROR, and FLASH_IF_INT_Write().
Referenced by OnStoreContextRequest().