mirror of
https://github.com/thelsing/knx.git
synced 2025-08-26 13:51:28 +02:00
comments only, hints for plattforms
This commit is contained in:
parent
dbfd190653
commit
6ad8bd64e5
@ -56,20 +56,28 @@ class Platform
|
|||||||
|
|
||||||
//Memory
|
//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 uint8_t* getEepromBuffer(uint16_t size);
|
||||||
virtual void commitToEeprom();
|
virtual void commitToEeprom();
|
||||||
|
// -------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
virtual uint8_t* getNonVolatileMemoryStart();
|
virtual uint8_t* getNonVolatileMemoryStart();
|
||||||
virtual size_t getNonVolatileMemorySize();
|
virtual size_t getNonVolatileMemorySize();
|
||||||
virtual void commitNonVolatileMemory();
|
virtual void commitNonVolatileMemory();
|
||||||
// address is relative to start of nonvolatile memory
|
// address is relative to start of nonvolatile memory
|
||||||
virtual uint32_t writeNonVolatileMemory(uint32_t relativeAddress, uint8_t* buffer, size_t size);
|
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();
|
NvMemoryType NonVolatileMemoryType();
|
||||||
void NonVolatileMemoryType(NvMemoryType type);
|
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:
|
protected:
|
||||||
// size of one EraseBlock in pages
|
// size of one EraseBlock in pages
|
||||||
virtual size_t flashEraseBlockSize();
|
virtual size_t flashEraseBlockSize();
|
||||||
@ -82,6 +90,10 @@ class Platform
|
|||||||
//write a single page to flash (pageNumber relative to userFashStart
|
//write a single page to flash (pageNumber relative to userFashStart
|
||||||
virtual void flashWritePage(uint16_t pageNumber, uint8_t* data);
|
virtual void flashWritePage(uint16_t pageNumber, uint8_t* data);
|
||||||
|
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
NvMemoryType _memoryType = Eeprom;
|
NvMemoryType _memoryType = Eeprom;
|
||||||
|
|
||||||
void loadEraseblockContaining(uint32_t relativeAddress);
|
void loadEraseblockContaining(uint32_t relativeAddress);
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
//write a single page to flash (pageNumber relative to userFashStart
|
//write a single page to flash (pageNumber relative to userFashStart
|
||||||
virtual void flashWritePage(uint16_t pageNumber, uint8_t* data);
|
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();
|
void writeBufferedEraseBlock();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user