programme bts bruchet descroix duhautois
Dependencies: mbed ID12RFID SDFileSystem
eeprom_flash.h
- Committer:
- valentinbruchet
- Date:
- 2021-05-10
- Revision:
- 7:5132b1d68c11
- Parent:
- 1:e593ae8ff81d
File content as of revision 7:5132b1d68c11:
#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