Re: How to prevent databse from being overwritten in xmem after a power cycle?

"petermcs-/[email protected] [rabbit-semi]" <[email protected]> 07 Aug 2015 22:37:55 -0700
Newsgroups gmane.comp.hardware.rabbit-semiconductor
Message-ID <[email protected]>
It is even simpler than that. To write to the struct use far pointers and normal access methods i.e.
 

 far TL_DATA_REC *ptr;
 ptr = Logs + index;
 ptr->x = 0;
 

 or if you are doing a lot of individual alterations to a record it can often produce much smaller code to do the following:
 

 TL_DATA_REC  temprec;
 far TL_DATA_REC *ptr;
 ptr = Logs + index;
 

 temprec = *ptr;
 

 // lots of changes/accesses to temprec
 

 *ptr = temprec;
 

 

 etc...
 Regards,
 Peter