X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fzeroplus-logic-cube%2Fanalyzer.c;h=acb97e09db2af2df8beadfe564ddbe4c7daf9a62;hb=61c39f54bbcae7bdde86ddb11b2fd0ff308d319b;hp=bf77e22ef71b2ed106b143139af4343dab102ae9;hpb=6d1161142dfce461c8e54c09d821443c68916df8;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/analyzer.c b/hardware/zeroplus-logic-cube/analyzer.c index bf77e22e..acb97e09 100644 --- a/hardware/zeroplus-logic-cube/analyzer.c +++ b/hardware/zeroplus-logic-cube/analyzer.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2010 Sven Peter * Copyright (C) 2010 Haxx Enterprises @@ -404,7 +404,7 @@ SR_PRIV void analyzer_wait(libusb_device_handle *devh, int set, int unset) while (1) { status = gl_reg_read(devh, DEV_STATUS); - if ((status & set) && ((status & unset) == 0)) + if ((!set || (status & set)) && ((status & unset) == 0)) return; } } @@ -614,7 +614,7 @@ SR_PRIV void analyzer_wait_button(libusb_device_handle *devh) SR_PRIV void analyzer_wait_data(libusb_device_handle *devh) { - analyzer_wait(devh, STATUS_READY | 8, STATUS_BUSY); + analyzer_wait(devh, 0, STATUS_BUSY); } SR_PRIV int analyzer_decompress(void *input, unsigned int input_len,