From 424ce5af6ab831cd846a31620ff69ec6486c9268 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 13 Mar 2018 13:38:58 +0000 Subject: [PATCH] V67: #160 buffer size to 512, improved active test --- pigpio.c | 7 ++++++- pigpio.h | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pigpio.c b/pigpio.c index 3fc6402..68dab59 100644 --- a/pigpio.c +++ b/pigpio.c @@ -10651,7 +10651,12 @@ int bscXfer(bsc_xfer_t *xfer) active = 1; } - myGpioSleep(0, 200); + if (!active) + { + active = bscsReg[BSC_FR] & (BSC_FR_RXBUSY | BSC_FR_TXBUSY); + } + + if (active) myGpioSleep(0, 20); } bscFR = bscsReg[BSC_FR] & 0xffff; diff --git a/pigpio.h b/pigpio.h index 11ee4b9..dd6d2f8 100644 --- a/pigpio.h +++ b/pigpio.h @@ -31,7 +31,7 @@ For more information, please refer to #include #include -#define PIGPIO_VERSION 6702 +#define PIGPIO_VERSION 6703 /*TEXT @@ -496,7 +496,7 @@ typedef struct /* BSC FIFO size */ -#define BSC_FIFO_SIZE 16 +#define BSC_FIFO_SIZE 512 typedef struct {