@@ -153,28 +153,6 @@ uint32_t USEC_TO_TICKS(uint32_t usec)
153
153
#define BB_ENABLE_INLINE_DEC_RX FALSE
154
154
#endif
155
155
156
- #define PAL_LED0_MASK 0x00002000
157
- #define PAL_LED1_MASK 0x00004000
158
- #define PAL_LED2_MASK 0x00008000
159
- #define PAL_LED3_MASK 0x00010000
160
-
161
- /* LED definitions */
162
- #ifndef BB_LED_ENA
163
- #define BB_LED_ENA 0
164
- #endif
165
-
166
- #if (BB_LED_ENA == 1 )
167
- #define BB_LED_1M_ON () PalLedOn(0)
168
- #define BB_LED_2M_ON () PalLedOn(2)
169
- #define BB_LED_CODED_ON () PalLedOnGroup(PAL_LED0_MASK | PAL_LED2_MASK)
170
- #define BB_LED_OFF () PalLedOffGroup(PAL_LED0_MASK | PAL_LED2_MASK)
171
- #else
172
- #define BB_LED_1M_ON ()
173
- #define BB_LED_2M_ON ()
174
- #define BB_LED_CODED_ON ()
175
- #define BB_LED_OFF ()
176
- #endif
177
-
178
156
/*! \brief convert little endian byte buffer to uint16_t. */
179
157
#define BYTES_TO_UINT16 (n , p ) {n = ((uint16_t)(p)[0] + ((uint16_t)(p)[1] << 8));}
180
158
@@ -367,16 +345,12 @@ uint16_t diagCancels = 0;
367
345
#endif
368
346
/////////////////////////////////////////////////////////////////////////////////
369
347
370
- #if defined(BOARD_PCA10056 )
371
- #define DIAG_USER_DEBUG_PINS_ENA 1
372
- #else
373
- #define DIAG_USER_DEBUG_PINS_ENA 0
374
- #endif
348
+ #define DIAG_USER_DEBUG_PINS_ENA 0
375
349
376
- /////////////////////////////////////////////////////////////////////////////////
377
- #if defined(BOARD_PCA10028 )
350
+ #define DIAG_PINS_ENA 0
378
351
379
- #define DIAG_PINS_ENA 1
352
+ #if DIAG_PINS_ENA
353
+ #if defined(BOARD_PCA10028 )
380
354
381
355
#define TX_PIN 12 /* P0.12 */
382
356
#define RX_PIN 13 /* P0.13 */
@@ -390,8 +364,6 @@ uint16_t diagCancels = 0;
390
364
391
365
#elif defined(BOARD_PCA10040 )
392
366
393
- #define DIAG_PINS_ENA 1
394
-
395
367
#define TX_PIN 11 /* P0.11 */
396
368
#define RX_PIN 12 /* P0.12 */
397
369
#define RADIO_READY_TOGGLE_PIN 13 /* P0.13 */
@@ -403,31 +375,31 @@ uint16_t diagCancels = 0;
403
375
#define DIAG_PIN_CLEAR (x ) { nrf_gpio_pin_clear(x); }
404
376
#elif defined(BOARD_PCA10056 )
405
377
406
- #define DIAG_PINS_ENA 1
407
-
408
378
#define TX_PIN 3 /* P0.03 */
409
379
#define RX_PIN 4 /* P0.04 */
410
380
#define RADIO_READY_TOGGLE_PIN 30 /* P0.30 */
411
381
#define RADIO_END_TOGGLE_PIN 31 /* P0.31 */
412
382
#define RADIO_INT_PIN 29 /* P0.29 */
413
383
#define TIMER0_INT_PIN 28 /* P0.28 */
414
384
415
- #if DIAG_USER_DEBUG_PINS_ENA
385
+ #define DIAG_USER_DEBUG_PINS_ENA 1
416
386
#define USER_DEBUG_0_PIN 35 /* P1.03 */
417
387
#define USER_DEBUG_1_PIN 36 /* P1.04 */
418
388
#define USER_DEBUG_2_PIN 37 /* P1.05 */
419
389
#define USER_DEBUG_3_PIN 38 /* P1.06 */
420
- #endif
421
390
422
391
#define DIAG_PIN_SET (x ) { nrf_gpio_pin_set(x); }
423
392
#define DIAG_PIN_CLEAR (x ) { nrf_gpio_pin_clear(x); }
424
393
#else
394
+ #error "Diagnostic pins not supported on board"
395
+ #endif
425
396
426
- #define DIAG_PINS_ENA 0
397
+ #else // DIAG_PINS_ENA
427
398
428
399
#define DIAG_PIN_SET (x )
429
400
#define DIAG_PIN_CLEAR (x )
430
- #endif
401
+ #endif // DIAG_PINS_ENA
402
+
431
403
/////////////////////////////////////////////////////////////////////////////////
432
404
433
405
/*************************************************************************************************/
@@ -476,22 +448,6 @@ static inline void palBbSetRadioMode(uint8_t phy, uint8_t option)
476
448
break ;
477
449
}
478
450
479
- /* select LED according to client selection not actual PHY used */
480
- switch (bbRxPhy )
481
- {
482
- case BB_PHY_BLE_1M :
483
- BB_LED_1M_ON ();
484
- break ;
485
- case BB_PHY_BLE_2M :
486
- BB_LED_2M_ON ();
487
- break ;
488
- case BB_PHY_BLE_CODED :
489
- BB_LED_CODED_ON ();
490
- break ;
491
- default :
492
- break ;
493
- }
494
-
495
451
#if defined(NRF52832_XXAA )
496
452
* (volatile uint32_t * )0x40001777 = 0UL ; /* Disable fault tolerant AA correlator. */
497
453
#endif
@@ -1281,7 +1237,6 @@ void PalBbBleEnablePrbs15(bool_t enable)
1281
1237
1282
1238
/* update the driver state */
1283
1239
driverState = IDLE_STATE ;
1284
- BB_LED_OFF ();
1285
1240
}
1286
1241
}
1287
1242
@@ -2672,7 +2627,6 @@ void BbBleDrvRadioIRQHandler(void)
2672
2627
{
2673
2628
/* update driver state, *before* callback */
2674
2629
driverState = IDLE_STATE ;
2675
- BB_LED_OFF ();
2676
2630
2677
2631
/* run callback function */
2678
2632
palBbRestoreTrl ();
@@ -2759,7 +2713,6 @@ void BbBleDrvRadioIRQHandler(void)
2759
2713
rssi = (int8_t )(- (NRF_RADIO -> RSSISAMPLE & 0x7F )) - PalRadioGetRxRfPathComp ();
2760
2714
/* update driver state, *before* callback */
2761
2715
driverState = IDLE_STATE ;
2762
- BB_LED_OFF ();
2763
2716
2764
2717
/* Follow Rx PHY options */
2765
2718
bbTxPhyOptions = bbRxPhyOptions ;
@@ -2919,7 +2872,6 @@ static void palBbRadioHardStop(void)
2919
2872
2920
2873
/* update driver state */
2921
2874
driverState = IDLE_STATE ;
2922
- BB_LED_OFF ();
2923
2875
2924
2876
/* clear diagnostics pins */
2925
2877
DIAG_PIN_CLEAR ( TX_PIN );
0 commit comments