Replace the fixed delay with the new half-duplex emulation code.
This commit is contained in:
parent
b6d24e72e2
commit
a2f4f1cd3f
@ -131,6 +131,9 @@ suunto_vyper2_device_open (device_t **out, const char* name)
|
|||||||
// Make sure everything is in a sane state.
|
// Make sure everything is in a sane state.
|
||||||
serial_flush (device->port, SERIAL_QUEUE_BOTH);
|
serial_flush (device->port, SERIAL_QUEUE_BOTH);
|
||||||
|
|
||||||
|
// Enable half-duplex emulation.
|
||||||
|
serial_set_halfduplex (device->port, 1);
|
||||||
|
|
||||||
// Override the base class values.
|
// Override the base class values.
|
||||||
device->base.layout = &suunto_vyper2_layout;
|
device->base.layout = &suunto_vyper2_layout;
|
||||||
|
|
||||||
@ -181,8 +184,6 @@ suunto_vyper2_device_packet (device_t *abstract, const unsigned char command[],
|
|||||||
return EXITCODE (n);
|
return EXITCODE (n);
|
||||||
}
|
}
|
||||||
|
|
||||||
serial_sleep (0x9);
|
|
||||||
|
|
||||||
// Clear RTS to receive the reply.
|
// Clear RTS to receive the reply.
|
||||||
serial_set_rts (device->port, 0);
|
serial_set_rts (device->port, 0);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user