aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/Source
diff options
context:
space:
mode:
Diffstat (limited to 'AT91SAM7S256/Source')
-rw-r--r--AT91SAM7S256/Source/d_bt.c4
-rw-r--r--AT91SAM7S256/Source/d_bt.h2
-rw-r--r--AT91SAM7S256/Source/d_bt.r7
3 files changed, 9 insertions, 4 deletions
diff --git a/AT91SAM7S256/Source/d_bt.c b/AT91SAM7S256/Source/d_bt.c
index 1a76fa5..cac6e76 100644
--- a/AT91SAM7S256/Source/d_bt.c
+++ b/AT91SAM7S256/Source/d_bt.c
@@ -124,12 +124,12 @@ void dBtSend(UBYTE *OutputBuffer, UBYTE BytesToSend)
BTSend(OutputBuffer, BytesToSend);
}
-UWORD dBtReceivedData(UWORD *pLength, UWORD *pBytesToGo)
+UWORD dBtReceivedData(UWORD *pLength, UWORD *pBytesToGo, UBYTE NoLengthBytes)
{
UWORD RtnVal;
RtnVal = TRUE;
- BTReceivedData(pLength, pBytesToGo);
+ BTReceivedData(pLength, pBytesToGo, NoLengthBytes);
if (*pLength)
{
SETTimeout(0);
diff --git a/AT91SAM7S256/Source/d_bt.h b/AT91SAM7S256/Source/d_bt.h
index aab544f..5a5fd97 100644
--- a/AT91SAM7S256/Source/d_bt.h
+++ b/AT91SAM7S256/Source/d_bt.h
@@ -33,7 +33,7 @@ void dBtResetTimeOut(void);
void dBtClearTimeOut(void);
UBYTE dBtGetBc4CmdSignal(void);
UWORD dBtTxEnd(void);
-UWORD dBtReceivedData(UWORD *pLength, UWORD *pBytesToGo);
+UWORD dBtReceivedData(UWORD *pLength, UWORD *pBytesToGo, UBYTE NoLengthBytes);
UWORD dBtCheckForTxBuf(void);
#endif
diff --git a/AT91SAM7S256/Source/d_bt.r b/AT91SAM7S256/Source/d_bt.r
index 0e9944e..76c079b 100644
--- a/AT91SAM7S256/Source/d_bt.r
+++ b/AT91SAM7S256/Source/d_bt.r
@@ -219,7 +219,7 @@ static UWORD RemainingLength;
}
-#define BTReceivedData(pByteCnt, pToGo)\
+#define BTReceivedData(pByteCnt, pToGo, noLenBytes)\
{\
UWORD InCnt, Cnt;\
*pByteCnt = 0;\
@@ -229,6 +229,11 @@ static UWORD RemainingLength;
{\
InCnt = SIZE_OF_INBUF;\
}\
+ if (noLenBytes)\
+ {\
+ FullRxLength = InCnt;\
+ RemainingLength = InCnt;\
+ }\
InCnt -= InBufOutCnt; /* Remove already read bytes */\
if (InCnt)\
{\