@@ -347,9 +347,7 @@ static void tagSetup(dmEvt_t *pMsg);
347
347
/*************************************************************************************************/
348
348
static void tagDmCback (dmEvt_t * pDmEvt )
349
349
{
350
- #ifdef DEBUG
351
- debug_print (__func__ , __FILE__ , __LINE__ );
352
- #endif
350
+ debug_print (__func__ , __FILE__ , __LINE__ );
353
351
dmEvt_t * pMsg ;
354
352
uint16_t len ;
355
353
@@ -383,9 +381,7 @@ static void tagDmCback(dmEvt_t *pDmEvt)
383
381
/*************************************************************************************************/
384
382
static void tagAttCback (attEvt_t * pEvt )
385
383
{
386
- #ifdef DEBUG
387
- debug_print (__func__ , __FILE__ , __LINE__ );
388
- #endif
384
+ debug_print (__func__ , __FILE__ , __LINE__ );
389
385
attEvt_t * pMsg ;
390
386
391
387
if ((pMsg = WsfMsgAlloc (sizeof (attEvt_t ) + pEvt -> valueLen )) != NULL )
@@ -412,9 +408,7 @@ static void tagAttCback(attEvt_t *pEvt)
412
408
/*************************************************************************************************/
413
409
static void tagCccCback (attsCccEvt_t * pEvt )
414
410
{
415
- #ifdef DEBUG
416
- debug_print (__func__ , __FILE__ , __LINE__ );
417
- #endif
411
+ debug_print (__func__ , __FILE__ , __LINE__ );
418
412
attsCccEvt_t * pMsg ;
419
413
appDbHdl_t dbHdl ;
420
414
@@ -446,9 +440,7 @@ static uint8_t tagIasWriteCback(dmConnId_t connId, uint16_t handle, uint8_t oper
446
440
uint16_t offset , uint16_t len , uint8_t * pValue ,
447
441
attsAttr_t * pAttr )
448
442
{
449
- #ifdef DEBUG
450
- debug_print (__func__ , __FILE__ , __LINE__ );
451
- #endif
443
+ debug_print (__func__ , __FILE__ , __LINE__ );
452
444
ATT_TRACE_INFO3 ("tagIasWriteCback connId:%d handle:0x%04x op:0x%02x" ,
453
445
connId , handle , operation );
454
446
ATT_TRACE_INFO2 (" offset:0x%04x len:0x%04x" , offset , len );
@@ -471,9 +463,7 @@ static uint8_t tagIasWriteCback(dmConnId_t connId, uint16_t handle, uint8_t oper
471
463
/*************************************************************************************************/
472
464
static void tagOpen (dmEvt_t * pMsg )
473
465
{
474
- #ifdef DEBUG
475
- debug_print (__func__ , __FILE__ , __LINE__ );
476
- #endif
466
+ debug_print (__func__ , __FILE__ , __LINE__ );
477
467
/* Update peer address info */
478
468
tagCb .addrType = pMsg -> connOpen .addrType ;
479
469
BdaCpy (tagCb .peerAddr , pMsg -> connOpen .peerAddr );
@@ -492,9 +482,7 @@ static void tagOpen(dmEvt_t *pMsg)
492
482
/*************************************************************************************************/
493
483
static void tagClose (dmEvt_t * pMsg )
494
484
{
495
- #ifdef DEBUG
496
- debug_print (__func__ , __FILE__ , __LINE__ );
497
- #endif
485
+ debug_print (__func__ , __FILE__ , __LINE__ );
498
486
uint8_t * pVal ;
499
487
uint16_t len ;
500
488
@@ -530,9 +518,7 @@ static void tagClose(dmEvt_t *pMsg)
530
518
/*************************************************************************************************/
531
519
static void tagSecPairCmpl (dmEvt_t * pMsg )
532
520
{
533
- #ifdef DEBUG
534
- debug_print (__func__ , __FILE__ , __LINE__ );
535
- #endif
521
+ debug_print (__func__ , __FILE__ , __LINE__ );
536
522
appConnCb_t * pCb ;
537
523
dmSecKey_t * pPeerKey ;
538
524
@@ -566,9 +552,7 @@ static void tagSecPairCmpl(dmEvt_t *pMsg)
566
552
/*************************************************************************************************/
567
553
static void tagSetup (dmEvt_t * pMsg )
568
554
{
569
- #ifdef DEBUG
570
- debug_print (__func__ , __FILE__ , __LINE__ );
571
- #endif
555
+ debug_print (__func__ , __FILE__ , __LINE__ );
572
556
/* set advertising and scan response data for discoverable mode */
573
557
AppAdvSetData (APP_ADV_DATA_DISCOVERABLE , sizeof (tagAdvDataDisc ), (uint8_t * ) tagAdvDataDisc );
574
558
AppAdvSetData (APP_SCAN_DATA_DISCOVERABLE , sizeof (tagScanData ), (uint8_t * ) tagScanData );
@@ -594,9 +578,7 @@ static void tagSetup(dmEvt_t *pMsg)
594
578
/*************************************************************************************************/
595
579
static void tagValueUpdate (attEvt_t * pMsg )
596
580
{
597
- #ifdef DEBUG
598
- debug_print (__func__ , __FILE__ , __LINE__ );
599
- #endif
581
+ debug_print (__func__ , __FILE__ , __LINE__ );
600
582
if (pMsg -> hdr .status == ATT_SUCCESS )
601
583
{
602
584
// todo: add debugging statement here to see what's happening!
@@ -630,9 +612,7 @@ static void tagValueUpdate(attEvt_t *pMsg)
630
612
/*************************************************************************************************/
631
613
static void tagDiscGapCmpl (dmConnId_t connId )
632
614
{
633
- #ifdef DEBUG
634
- debug_print (__func__ , __FILE__ , __LINE__ );
635
- #endif
615
+ debug_print (__func__ , __FILE__ , __LINE__ );
636
616
appDbHdl_t dbHdl ;
637
617
638
618
/* if RPA Only attribute found on peer device */
@@ -657,9 +637,7 @@ static void tagDiscGapCmpl(dmConnId_t connId)
657
637
/*************************************************************************************************/
658
638
static void tagProcRssiTimer (dmEvt_t * pMsg )
659
639
{
660
- #ifdef DEBUG
661
- debug_print (__func__ , __FILE__ , __LINE__ );
662
- #endif
640
+ debug_print (__func__ , __FILE__ , __LINE__ );
663
641
dmConnId_t connId ;
664
642
665
643
/* if still connected */
@@ -686,9 +664,7 @@ static void tagProcRssiTimer(dmEvt_t *pMsg)
686
664
/*************************************************************************************************/
687
665
static void tagBtnCback (uint8_t btn )
688
666
{
689
- #ifdef DEBUG
690
- debug_print (__func__ , __FILE__ , __LINE__ );
691
- #endif
667
+ debug_print (__func__ , __FILE__ , __LINE__ );
692
668
dmConnId_t connId ;
693
669
694
670
/* button actions when connected */
@@ -838,9 +814,7 @@ static void tagBtnCback(uint8_t btn)
838
814
/*************************************************************************************************/
839
815
static void tagDiscCback (dmConnId_t connId , uint8_t status )
840
816
{
841
- #ifdef DEBUG
842
- debug_print (__func__ , __FILE__ , __LINE__ );
843
- #endif
817
+ debug_print (__func__ , __FILE__ , __LINE__ );
844
818
switch (status )
845
819
{
846
820
case APP_DISC_INIT :
@@ -1069,9 +1043,7 @@ static void tagProcMsg(dmEvt_t *pMsg)
1069
1043
/*************************************************************************************************/
1070
1044
void NusHandlerInit (wsfHandlerId_t handlerId )
1071
1045
{
1072
- #ifdef DEBUG
1073
- debug_print (__func__ , __FILE__ , __LINE__ );
1074
- #endif
1046
+ debug_print (__func__ , __FILE__ , __LINE__ );
1075
1047
APP_TRACE_INFO0 ("NusHandlerInit" );
1076
1048
1077
1049
/* store handler ID */
@@ -1115,9 +1087,7 @@ void NusHandlerInit(wsfHandlerId_t handlerId)
1115
1087
/*************************************************************************************************/
1116
1088
void NusHandler (wsfEventMask_t event , wsfMsgHdr_t * pMsg )
1117
1089
{
1118
- #ifdef DEBUG
1119
- debug_print (__func__ , __FILE__ , __LINE__ );
1120
- #endif
1090
+ debug_print (__func__ , __FILE__ , __LINE__ );
1121
1091
if (pMsg != NULL )
1122
1092
{
1123
1093
APP_TRACE_INFO1 ("Tag got evt %d" , pMsg -> event );
@@ -1157,9 +1127,7 @@ void NusHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg)
1157
1127
/*************************************************************************************************/
1158
1128
void NusStart (void )
1159
1129
{
1160
- #ifdef DEBUG
1161
- debug_print (__func__ , __FILE__ , __LINE__ );
1162
- #endif
1130
+ debug_print (__func__ , __FILE__ , __LINE__ );
1163
1131
/* Register for stack callbacks */
1164
1132
DmRegister (tagDmCback );
1165
1133
DmConnRegister (DM_CLIENT_ID_APP , tagDmCback );
0 commit comments