From db8d973b822f2e519eecb0792e5d43b568eaa50d Mon Sep 17 00:00:00 2001 From: Raphael Assenat Date: Sun, 6 Dec 2015 16:23:24 -0500 Subject: [PATCH] Display errors only when tracing --- gcn64_protocol.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gcn64_protocol.c b/gcn64_protocol.c index b09df0c..a02a084 100644 --- a/gcn64_protocol.c +++ b/gcn64_protocol.c @@ -86,7 +86,16 @@ unsigned char gcn64_transaction(const unsigned char *tx, int tx_len, unsigned ch SREG = sreg; if (count == 0xff) { - printf("rx error\n"); +#ifdef TRACE_GCN64 + printf("rx error\r\n"); +#endif + return 0; + } + + if (count == 0xfe) { +#ifdef TRACE_GCN64 + printf("buffer too small\r\n"); +#endif return 0; }