Enable big page support
The Oceanic Pro Plus 4 appears to support the big page B4 and B8 read commands, but with some strange twists: * When sending the B8 read command, a 256 byte packet is received. The checksums of the packet are valid, but the upper half of the payload data is always filled with zero bytes. That means we can't use this command. * The B4 read command appears to use a 2 byte checksum instead of the normal 1 byte checksum. That means we can use this command with a small model specific tweak.
This commit is contained in:
parent
3414f72f60
commit
ceae89e149
@ -948,7 +948,8 @@ oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, dc_iostream
|
||||
}
|
||||
|
||||
// Set the big page support.
|
||||
if (device->base.layout == &aeris_f11_layout) {
|
||||
if (device->base.layout == &aeris_f11_layout ||
|
||||
device->base.layout == &oceanic_proplus3_layout) {
|
||||
device->bigpage = 8;
|
||||
} else if (device->base.layout == &oceanic_proplusx_layout ||
|
||||
device->base.layout == &aqualung_i770r_layout ||
|
||||
@ -1042,7 +1043,7 @@ oceanic_atom2_device_read (dc_device_t *abstract, unsigned int address, unsigned
|
||||
break;
|
||||
case 8:
|
||||
read_cmd = CMD_READ8;
|
||||
crc_size = 1;
|
||||
crc_size = device->base.model == PROPLUS4 ? 2 : 1;
|
||||
break;
|
||||
case 16:
|
||||
read_cmd = CMD_READ16;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user