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.
Dependencies: mbed SDFileSystem
eeprom_flash.h
- Committer:
- adragar
- Date:
- 2021-05-04
- Revision:
- 4:a73ad3555745
- Parent:
- 1:e593ae8ff81d
File content as of revision 4:a73ad3555745:
#ifndef __EEPROM_FLASH_H
#define __EEPROM_FLASH_H
#include "mbed.h"
//#define EEPROM_START_ADDRESS ((uint32_t)0x08019000) // EEPROM emulation start address: after 100KByte of used Flash memory
#define EEPROM_START_ADDRESS ((uint32_t)0x0801C000) // EEPROM emulation start address: after 112KByte of used Flash memory
void enableEEPROMWriting(); // Unlock and keep PER cleared
void disableEEPROMWriting(); // Lock
// Write functions
HAL_StatusTypeDef writeEEPROMHalfWord(uint32_t address, uint16_t data);
HAL_StatusTypeDef writeEEPROMWord(uint32_t address, uint32_t data);
// Read functions
uint16_t readEEPROMHalfWord(uint32_t address);
uint32_t readEEPROMWord(uint32_t address);
#endif