Try to get rid of "unused parameter" errors from the osint callback functions.
This commit is contained in:
parent
c396afe80b
commit
0aca2d822b
2
Makefile
2
Makefile
@ -3,6 +3,8 @@ RM=rm
|
|||||||
CC=cc
|
CC=cc
|
||||||
ECHO=echo
|
ECHO=echo
|
||||||
|
|
||||||
|
CFLAGS=-Wall
|
||||||
|
|
||||||
OBJS=\
|
OBJS=\
|
||||||
$(OBJDIR)/p1load.o \
|
$(OBJDIR)/p1load.o \
|
||||||
$(OBJDIR)/ploader.o
|
$(OBJDIR)/ploader.o
|
||||||
|
22
p1load.c
22
p1load.c
@ -44,9 +44,25 @@ enum {
|
|||||||
CHECK_PORT_NO_PROPELLER
|
CHECK_PORT_NO_PROPELLER
|
||||||
};
|
};
|
||||||
|
|
||||||
static void cb_reset(void *data) { hwreset(); }
|
#define UNUSED(x)
|
||||||
static int cb_tx(void *data, uint8_t* buf, int n) { return tx(buf, n); }
|
|
||||||
static int cb_rx_timeout(void *data, uint8_t* buf, int n, int timeout) { return rx_timeout(buf, n, timeout); }
|
static void cb_reset(void *data)
|
||||||
|
{
|
||||||
|
UNUSED(data); // osint keeps its state in globals
|
||||||
|
hwreset();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cb_tx(void *data, uint8_t* buf, int n)
|
||||||
|
{
|
||||||
|
UNUSED(data); // osint keeps its state in globals
|
||||||
|
return tx(buf, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cb_rx_timeout(void *data, uint8_t* buf, int n, int timeout)
|
||||||
|
{
|
||||||
|
UNUSED(data); // osint keeps its state in globals
|
||||||
|
return rx_timeout(buf, n, timeout);
|
||||||
|
}
|
||||||
|
|
||||||
static PL_serial serial = { cb_reset, cb_tx, cb_rx_timeout };
|
static PL_serial serial = { cb_reset, cb_tx, cb_rx_timeout };
|
||||||
static PL_state state;
|
static PL_state state;
|
||||||
|
Loading…
Reference in New Issue
Block a user