Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
Stm32EEPROMEmulation.hxx
Go to the documentation of this file.
1
34#ifndef _FREERTOS_DRIVERS_ST_STM32F0xxEEPROMEMULATION_HXX_
35#define _FREERTOS_DRIVERS_ST_STM32F0xxEEPROMEMULATION_HXX_
36
37#include "EEPROMEmulation.hxx"
38
45{
46public:
51 Stm32EEPROMEmulation(const char *name, size_t file_size);
52
58
59private:
62 static const uintptr_t PAGE_SIZE;
63
64 static inline const uint32_t* get_block(unsigned sector, unsigned offset);
65
72 const uint32_t* block(unsigned sector, unsigned offset) override;
73
77 void flash_erase(unsigned sector) override;
78
86 void flash_program(unsigned sector, unsigned start_block, uint32_t *data, uint32_t byte_count) override;
87
91
93};
94
95#endif /* _FREERTOS_DRIVERS_ST_STM32F0xxEEPROMEMULATION_HXX_ */
Emulates EEPROM in FLASH for the Tiva, LPC17xx and LPC40xx platforms.
size_t file_size()
Get the maximum file size of the EEPROM file.
Definition EEPROM.hxx:81
const char * name
device name
Definition Devtab.hxx:266
Emulates EEPROM in FLASH for the STM32F0xx platform.
void flash_erase(unsigned sector) override
Simple hardware abstraction for FLASH erase API.
const uint32_t * block(unsigned sector, unsigned offset) override
Computes the pointer to load the data stored in a specific block from.
void flash_program(unsigned sector, unsigned start_block, uint32_t *data, uint32_t byte_count) override
Simple hardware abstraction for FLASH program API.
Stm32EEPROMEmulation()
Default constructor.
static const uintptr_t PAGE_SIZE
The erase page length for the particular MCU.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.
Definition macros.h:171