Try to get rid of "unused parameter" errors from the osint callback functions.

This commit is contained in:
David Betz 2015-02-01 12:37:55 -05:00
parent c396afe80b
commit 0aca2d822b
2 changed files with 21 additions and 3 deletions

View File

@ -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

View File

@ -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;