We need to include unistd.h for usleep():
hardware/asix-sigma/asix-sigma.c: In function 'sigma_fpga_init_bitbang':
hardware/asix-sigma/asix-sigma.c:450:3: warning: implicit declaration of function 'usleep'
usleep(10000);
And we need to tweak the type of chunks_per_read to match dl_lines_total:
hardware/asix-sigma/asix-sigma.c: In function 'download_capture':
hardware/asix-sigma/asix-sigma.c:1161:39: warning: comparison between signed and unsigned integer expressions
dl_lines_curr = MIN(chunks_per_read, dl_lines_total);
#include <glib/gstdio.h>
#include <ftdi.h>
#include <string.h>
+#include <unistd.h>
#include "libsigrok.h"
#include "libsigrok-internal.h"
#include "asix-sigma.h"
static int download_capture(struct sr_dev_inst *sdi)
{
struct dev_context *devc = sdi->priv;
- const int chunks_per_read = 32;
+ const uint32_t chunks_per_read = 32;
struct sigma_dram_line *dram_line;
int bufsz;
uint32_t stoppos, triggerpos;