ee icon indicating copy to clipboard operation
ee copied to clipboard

Writing Half word (16-bit) instead of Word(32-bits)

Open HamzaHajeir opened this issue 5 years ago • 6 comments

Hi

What would happen if I decided to store 16-bits variables instead of 32-bits ? Would that free up spaces ? As it's mentioned in ST EEPROM Emulation Docs

Or it's prohibited ?

Also, Can you provide an example to know where to start ? ST eeprom emulation has an example and clear way to use that lib. (EE_init() is the starter ofcourse.) But here it's confusing and don't know where to start, Don't know how it work, or how should it work. As whether it label pages in headers or not..

Thanks

HamzaHajeir avatar Mar 04 '20 16:03 HamzaHajeir

Hello. You can convert any data type to uint32 array by memcpy function.

nimaltd avatar Mar 04 '20 17:03 nimaltd

Thanks,

How about the straight use of the library, Can you provide a demo example ?

HamzaHajeir avatar Mar 05 '20 11:03 HamzaHajeir

I dont have yet. But its simple.

nimaltd avatar Mar 05 '20 14:03 nimaltd

First, thank you for creating this EEPROM library. I'm using it and it works. However, I'm wondering why in eepromConf.h, _EEPROM_USE_FLASH_PAGE is a define/constant. If it would be a variable, than some wear level machinism could be built in... is there a specific reason for it being constant?

michelkeijzers avatar May 08 '20 19:05 michelkeijzers

@michelkeijzers . waiting for next version :)

nimaltd avatar May 09 '20 05:05 nimaltd

@michelkeijzers . waiting for next version :)

I already made changes, but in my own git repository https://github.com/michelkeijzers/FuzzTester2 ... Note however, I removed also a bit of code (for STMF0 since I will not use it), and I added some variables and extra functions, which might slow down (slightly) performance and memory usage.

michelkeijzers avatar May 09 '20 16:05 michelkeijzers