asix-sigma: fix build time warnings
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);
This commit is contained in:
parent
a4737997a2
commit
e15e5873b3
|
@ -27,6 +27,7 @@
|
|||
#include <glib/gstdio.h>
|
||||
#include <ftdi.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "libsigrok.h"
|
||||
#include "libsigrok-internal.h"
|
||||
#include "asix-sigma.h"
|
||||
|
@ -1113,7 +1114,7 @@ static int decode_chunk_ts(struct sigma_dram_line *dram_line,
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue