Chameleon-Mini
Memory.h
1 /*
2  * Flash.h
3  *
4  * Created on: 20.03.2013
5  * Author: skuser
6  */
7 
8 #ifndef MEMORY_H_
9 #define MEMORY_H_
10 
11 #define MEMORY_SIZE (FLASH_DATA_SIZE) /* From makefile */
12 #define MEMORY_INIT_VALUE 0x00
13 #define MEMORY_SIZE_PER_SETTING 8192
14 
15 #ifndef __ASSEMBLER__
16 #include "Common.h"
17 
18 void MemoryInit(void);
19 void MemoryReadBlock(void *Buffer, uint16_t Address, uint16_t ByteCount);
20 void MemoryReadBlockInSetting(void *Buffer, uint16_t Address, uint16_t ByteCount);
21 void MemoryWriteBlock(const void *Buffer, uint16_t Address, uint16_t ByteCount);
22 void MemoryWriteBlockInSetting(const void *Buffer, uint16_t Address, uint16_t ByteCount);
23 void MemoryClear(void);
24 
25 void MemoryRecall(void);
26 void MemoryStore(void);
27 
28 /* For use with XModem */
29 bool MemoryUploadBlock(void *Buffer, uint32_t BlockAddress, uint16_t ByteCount);
30 bool MemoryDownloadBlock(void *Buffer, uint32_t BlockAddress, uint16_t ByteCount);
31 
32 /* EEPROM functions */
33 uint16_t WriteEEPBlock(uint16_t Address, const void *SrcPtr, uint16_t ByteCount);
34 uint16_t ReadEEPBlock(uint16_t Address, void *DestPtr, uint16_t ByteCount);
35 
36 #endif /* __ASSEMBLER__ */
37 
38 #endif /* MEMORY_H_ */