X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fserial-lcr%2Fapi.c;h=7f3fc5362ae1b980991857be4b88d7d66d2be0ad;hb=8712c7833fdc1e33363807b094ad998df1b97463;hp=d67171d4cdc653ebea95c381840f802eaa4d2da4;hpb=e434f624ba0c6ebde3c08eca8de241c035283703;p=libsigrok.git diff --git a/src/hardware/serial-lcr/api.c b/src/hardware/serial-lcr/api.c index d67171d4..7f3fc536 100644 --- a/src/hardware/serial-lcr/api.c +++ b/src/hardware/serial-lcr/api.c @@ -105,7 +105,6 @@ static int scan_lcr_port(const struct lcr_info *lcr, * send data periodically. So we check if the packets match the * probed device's expected format. */ - serial_flush(serial); if (lcr->packet_request) { ret = lcr->packet_request(serial); if (ret < 0) { @@ -115,7 +114,7 @@ static int scan_lcr_port(const struct lcr_info *lcr, } len = sizeof(buf); ret = serial_stream_detect(serial, buf, &len, - lcr->packet_size, lcr->packet_valid, 3000); + lcr->packet_size, lcr->packet_valid, NULL, NULL, 3000); if (ret != SR_OK) goto scan_port_cleanup; @@ -199,7 +198,7 @@ static int read_lcr_port(struct sr_dev_inst *sdi, len = sizeof(buf); scan_packet_check_setup(sdi); ret = serial_stream_detect(serial, buf, &len, - lcr->packet_size, scan_packet_check_func, 1500); + lcr->packet_size, scan_packet_check_func, NULL, NULL, 1500); scan_packet_check_setup(NULL); return ret;