From a5143d8c7cdca611f823eb0a83ab4530b4d9774b Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 10 Jul 2008 12:25:02 +0000 Subject: [PATCH] Wait a small amount of time before sending the command. Without this delay, the transfer will fail most of the time. --- src/uwatec_memomouse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uwatec_memomouse.c b/src/uwatec_memomouse.c index 858bf70..165171e 100644 --- a/src/uwatec_memomouse.c +++ b/src/uwatec_memomouse.c @@ -381,6 +381,10 @@ uwatec_memomouse_device_download (device_t *abstract, unsigned char data[], unsi command[8] = uwatec_memomouse_checksum (command, 8, 0x00); uwatec_memomouse_reverse (command, sizeof (command)); + // Wait a small amount of time before sending the command. + // Without this delay, the transfer will fail most of the time. + serial_sleep (50); + // Keep send the command to the device, // until the ACK answer is received. unsigned char answer = NAK;