Browse Source

Merge commit 'efa8d1f' into update_old_avalon_20130513

Luke Dashjr 13 years ago
parent
commit
6ea62f7fdc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-avalon.c

+ 2 - 0
driver-avalon.c

@@ -336,6 +336,8 @@ static int avalon_reset(int fd, struct avalon_result *ar)
 	avalon_get_result(fd, ar, NULL, NULL);
 	avalon_get_result(fd, ar, NULL, NULL);
 
 
 	buf = (uint8_t *)ar;
 	buf = (uint8_t *)ar;
+	/* Sometimes there is one extra 0 byte for some reason in the buffer,
+	 * so work around it. */
 	if (buf[0] == 0)
 	if (buf[0] == 0)
 		buf = (uint8_t  *)(ar + 1);
 		buf = (uint8_t  *)(ar + 1);
 	if (buf[0] == 0xAA && buf[1] == 0x55 &&
 	if (buf[0] == 0xAA && buf[1] == 0x55 &&