comments only, hints for plattforms

This commit is contained in:
SirSydom 2022-02-15 12:48:02 +01:00
parent dbfd190653
commit 6ad8bd64e5
2 changed files with 15 additions and 3 deletions

View File

@ -56,20 +56,28 @@ class Platform
//Memory
// --- Legacy support only. Do not use for new plattforms ---
// --- can be remove if all plattforms have been changed to support the NonVolatileMemory functions
virtual uint8_t* getEepromBuffer(uint16_t size);
virtual void commitToEeprom();
// -------------------------------------------------------------------------------------------------------
virtual uint8_t* getNonVolatileMemoryStart();
virtual size_t getNonVolatileMemorySize();
virtual void commitNonVolatileMemory();
// address is relative to start of nonvolatile memory
virtual uint32_t writeNonVolatileMemory(uint32_t relativeAddress, uint8_t* buffer, size_t size);
// size of one flash page in bytes
virtual size_t flashPageSize();
NvMemoryType NonVolatileMemoryType();
void NonVolatileMemoryType(NvMemoryType type);
// --- Overwrite these methods in the device-plattform to use flash memory handling by the knx stack ---
// --- also set _memoryType = Flash in the device-plattform's contructor
// --- optional: overwrite writeBufferedEraseBlock() in the device-plattform to reduce overhead when flashing multiple pages
// size of one flash page in bytes
virtual size_t flashPageSize();
protected:
// size of one EraseBlock in pages
virtual size_t flashEraseBlockSize();
@ -81,6 +89,10 @@ class Platform
virtual void flashErase(uint16_t eraseBlockNum);
//write a single page to flash (pageNumber relative to userFashStart
virtual void flashWritePage(uint16_t pageNumber, uint8_t* data);
// -------------------------------------------------------------------------------------------------------
NvMemoryType _memoryType = Eeprom;

View File

@ -44,7 +44,7 @@ public:
//write a single page to flash (pageNumber relative to userFashStart
virtual void flashWritePage(uint16_t pageNumber, uint8_t* data);
// writes _eraseblockBuffer to flash - overrides Plattform::writeBufferedEraseBlock()
// writes _eraseblockBuffer to flash - overrides Plattform::writeBufferedEraseBlock() for performance optimization only
void writeBufferedEraseBlock();
#endif
};