mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	comments only, hints for plattforms
This commit is contained in:
		
							parent
							
								
									dbfd190653
								
							
						
					
					
						commit
						6ad8bd64e5
					
				@ -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();
 | 
			
		||||
@ -82,6 +90,10 @@ class Platform
 | 
			
		||||
    //write a single page to flash (pageNumber relative to userFashStart
 | 
			
		||||
    virtual void flashWritePage(uint16_t pageNumber, uint8_t* data); 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // -------------------------------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    NvMemoryType _memoryType = Eeprom;
 | 
			
		||||
 | 
			
		||||
    void loadEraseblockContaining(uint32_t relativeAddress);
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user