]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/zeroplus-logic-cube/analyzer.c
Remove some unneeded double-spaces.
[libsigrok.git] / src / hardware / zeroplus-logic-cube / analyzer.c
index c404a66b73b04a47324f5c5c539c866fe8a0300e..321b17c0ed54f11a56c2ac09cf6f8d1e0e0240ba 100644 (file)
@@ -29,8 +29,9 @@
  *  THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <config.h>
 #include <assert.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 #include "analyzer.h"
 #include "gl_usb.h"
@@ -309,7 +310,7 @@ static int __analyzer_set_freq(libusb_device_handle *devh, int freq, int scale)
                {   1, FREQ_SCALE_KHZ, 64,  5,  5 },
                { 500, FREQ_SCALE_HZ,  64, 10,  5 },
                { 100, FREQ_SCALE_HZ,  68,  5,  8 },
-               {   0, 0,              0,   0,  0 }
+               ALL_ZERO
        };
 
        int i;
@@ -419,7 +420,7 @@ SR_PRIV void analyzer_read_start(libusb_device_handle *devh)
 }
 
 SR_PRIV int analyzer_read_data(libusb_device_handle *devh, void *buffer,
-                      unsigned int size)
+               unsigned int size)
 {
        return gl_read_bulk(devh, buffer, size);
 }
@@ -514,6 +515,7 @@ SR_PRIV int analyzer_add_triggers(const struct sr_dev_inst *sdi)
                        switch (match->match) {
                        case SR_TRIGGER_ZERO:
                                g_trigger_status[channel / 4] |= 2 << (channel % 4 * 2);
+                               break;
                        case SR_TRIGGER_ONE:
                                g_trigger_status[channel / 4] |= 1 << (channel % 4 * 2);
                                break;
@@ -553,7 +555,7 @@ SR_PRIV void analyzer_add_filter(int channel, int type)
        }
 
        g_filter_status[i] |=
-           1 << ((2 * channel) + (type == FILTER_LOW ? 1 : 0));
+               1 << ((2 * channel) + (type == FILTER_LOW ? 1 : 0));
 
        g_filter_enable = 1;
 }