Use an extra bit for the pointers in the logbook entries.

Due to the larger memory capacity, the Oceanic OC1 needs an additional
bit to be able to address memory pages above 64K.
This commit is contained in:
Jef Driesen 2010-04-27 11:33:53 +00:00
parent 61f9603131
commit 6503ff2351

View File

@ -63,7 +63,10 @@ get_profile_first (const unsigned char data[], const oceanic_common_layout_t *la
value = array_uint16_le (data + 4);
}
return (value & 0x0FFF) * PAGESIZE;
if (layout->memsize > 0x10000)
return (value & 0x1FFF) * PAGESIZE;
else
return (value & 0x0FFF) * PAGESIZE;
}
@ -78,7 +81,10 @@ get_profile_last (const unsigned char data[], const oceanic_common_layout_t *lay
value = array_uint16_le (data + 6);
}
return (value & 0x0FFF) * PAGESIZE;
if (layout->memsize > 0x10000)
return (value & 0x1FFF) * PAGESIZE;
else
return (value & 0x0FFF) * PAGESIZE;
}