minor persist fix
This commit is contained in:
@@ -308,7 +308,7 @@ ushort crc16(const uchar* data_p, uchar length) {
|
||||
ushort persistOp(FILE *pfd, ushort maddr, ushort dataLen, ushort adl, ushort adh, uchar isWrite) {
|
||||
ushort status = 0, proc;
|
||||
if(pfd) {
|
||||
fseek(pfd, ((adh&0x7fffu) << 15) | adl, SEEK_SET);
|
||||
fseek(pfd, ((unsigned long) adh << 16) | adl, SEEK_SET);
|
||||
if(isWrite) /* writing to the persistent area from the memory */
|
||||
proc = (ushort) fwrite(&flatram[maddr], 1, dataLen, pfd);
|
||||
else /* reading from the persistent area into the memory */
|
||||
|
||||
Reference in New Issue
Block a user