diff --git a/Makefile b/Makefile index 8e8f461..a304627 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ RM=rm CC=cc ECHO=echo +CFLAGS=-Wall + OBJS=\ $(OBJDIR)/p1load.o \ $(OBJDIR)/ploader.o diff --git a/p1load.c b/p1load.c index 10b5ceb..643dd9b 100644 --- a/p1load.c +++ b/p1load.c @@ -44,9 +44,25 @@ enum { CHECK_PORT_NO_PROPELLER }; -static void cb_reset(void *data) { hwreset(); } -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); } +#define UNUSED(x) + +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_state state;