|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
Header for eeprom module. More...
#include "stm32_def.h"Macros | |
| #define | FLASH_FLAG_ALL_ERRORS |
| Mask of all the flash error flags to clear before programming. | |
| #define | FLASH_PAGE_SIZE ((uint32_t)(8*1024)) /* 8kB page */ |
| Size of the flash area used for the EEPROM emulation. | |
| #define | E2END (FLASH_PAGE_SIZE - 1) |
| Last EEPROM address (EEPROM size - 1). | |
Functions | |
| uint8_t | eeprom_read_byte (const uint32_t pos) |
| Read a byte from the emulated EEPROM (flash). | |
| void | eeprom_write_byte (uint32_t pos, uint8_t value) |
| Write a byte to the emulated EEPROM (flash). | |
| void | eeprom_buffer_fill () |
| Copy the data from flash into the EEPROM buffer. | |
| void | eeprom_buffer_flush () |
| Write the EEPROM buffer content into flash. | |
| uint8_t | eeprom_buffered_read_byte (const uint32_t pos) |
| Read a byte from the EEPROM buffer, flash is not read. | |
| void | eeprom_buffered_write_byte (uint32_t pos, uint8_t value) |
| Write a byte to the EEPROM buffer, flash is not updated. | |
Header for eeprom module.
Copyright (c) 2016-2021, STMicroelectronics All rights reserved.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
| #define FLASH_FLAG_ALL_ERRORS |
Mask of all the flash error flags to clear before programming.
| #define FLASH_PAGE_SIZE ((uint32_t)(8*1024)) /* 8kB page */ |
Size of the flash area used for the EEPROM emulation.
FLASH_PAGE_SIZE is not defined for STM32F2xx, STM32F4xx and STM32F7xx Could be redefined in variant.h or using build_opt.h
| void eeprom_buffer_fill | ( | ) |
Copy the data from flash into the EEPROM buffer.
| void eeprom_buffer_flush | ( | ) |
Write the EEPROM buffer content into flash.
| uint8_t eeprom_buffered_read_byte | ( | const uint32_t | pos | ) |
Read a byte from the EEPROM buffer, flash is not read.
| pos | Address to read. |
| void eeprom_buffered_write_byte | ( | uint32_t | pos, |
| uint8_t | value | ||
| ) |
Write a byte to the EEPROM buffer, flash is not updated.
| pos | Address to write. |
| value | Value to write. |
| uint8_t eeprom_read_byte | ( | const uint32_t | pos | ) |
Read a byte from the emulated EEPROM (flash).
With a real data EEPROM, pos is a relative address and 0 is returned if it is out of range. Otherwise the flash content is first copied into the EEPROM buffer.
| pos | Address to read. |
| void eeprom_write_byte | ( | uint32_t | pos, |
| uint8_t | value | ||
| ) |
Write a byte to the emulated EEPROM (flash).
With a real data EEPROM, pos is a relative address and the write is ignored if it is out of range. Otherwise the byte is written to the EEPROM buffer, then the whole buffer is written into flash.
| pos | Address to write. |
| value | Value to write. |