Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

SDK • Re: Saving/restoring C++ instances to/from flash

$
0
0
The answer is yes, saving/restoring C++ instances to/from flash is as easy as storing the objects, starting from the instance pointer for sizeof(<class_name>) bytes, rounded up to the nearest flash page. It would probably also work after a power cycle, since memory allocations are the same from one run to another.

Using an SD card is more than I need for this project, but a good thing to keep in mind for the future.

Statistics: Posted by OAvKart — Mon Mar 04, 2024 5:28 am



Viewing all articles
Browse latest Browse all 4909

Trending Articles