|
@@ -12,14 +12,14 @@
|
12
|
12
|
#include <avr/interrupt.h>
|
13
|
13
|
#include <EEPROM.h>
|
14
|
14
|
#include "iface_cc2500.h"
|
15
|
|
-#define DEBUG
|
16
|
|
-#define DEBUG0
|
17
|
|
-#define DEBUG1
|
18
|
|
-#define DEBUG2
|
19
|
|
-#define DEBUG3
|
20
|
|
-#define DEBUG4
|
21
|
|
-#define DEBUG5
|
22
|
|
-#define FAILSAFE
|
|
15
|
+//#define DEBUG
|
|
16
|
+//#define DEBUG0
|
|
17
|
+//#define DEBUG1
|
|
18
|
+//#define DEBUG2
|
|
19
|
+//#define DEBUG3
|
|
20
|
+//#define DEBUG4
|
|
21
|
+//#define DEBUG5
|
|
22
|
+//#define FAILSAFE
|
23
|
23
|
#define SPIBB
|
24
|
24
|
//#define SPIHW
|
25
|
25
|
#if defined SPIHW
|
|
@@ -382,9 +382,9 @@ void getBind(void)
|
382
|
382
|
cc2500_readFifo((uint8_t *)ccData, ccLen);
|
383
|
383
|
if (ccData[ccLen - 1] & 0x80) {
|
384
|
384
|
if (ccData[2] == 0x01) {
|
385
|
|
- if(debug2) {
|
386
|
|
- //Serial.print(" ccData[2] = ");
|
387
|
|
- //Serial.println(ccData[2]);
|
|
385
|
+ if(debug3) {
|
|
386
|
+ Serial.print("ccLen = ");
|
|
387
|
+ Serial.println(ccLen);
|
388
|
388
|
}
|
389
|
389
|
if ((ccData[3] == txid[0]) && (ccData[4] == txid[1])) {
|
390
|
390
|
if(debug3)
|
|
@@ -396,7 +396,7 @@ void getBind(void)
|
396
|
396
|
}
|
397
|
397
|
if (ccData[5] == bindIdx) {
|
398
|
398
|
for (uint8_t n = 0; n < 5; n++) {
|
399
|
|
- if(debug2)
|
|
399
|
+ if(debug3)
|
400
|
400
|
{
|
401
|
401
|
Serial.print("ccData[6 + n] = ");
|
402
|
402
|
Serial.println(ccData[6 + n]);
|
|
@@ -404,7 +404,7 @@ void getBind(void)
|
404
|
404
|
Serial.println(ccData[ccLen - 3]);
|
405
|
405
|
}
|
406
|
406
|
//if (ccData[6 + n] == ccData[ccLen - 3]) {
|
407
|
|
- if (ccData[6 + n] == 3) {
|
|
407
|
+ if (ccData[6 + n] <= 3) {
|
408
|
408
|
eol = true;
|
409
|
409
|
#if defined(DEBUG)
|
410
|
410
|
Serial.print("listLength: ");
|