File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,20 @@ LOCAL int16_t RF24_getSendingRSSI(void)
418
418
return static_cast <int16_t >(-29 - (8 * (RF24_getObserveTX () & 0xF )));
419
419
}
420
420
421
+ LOCAL void RF24_enableConstantCarrierWave (void )
422
+ {
423
+ RF24_standBy ();
424
+ delayMicroseconds (1500 );
425
+ RF24_setRFSetup (RF24_RF_SETUP | _BV (RF24_CONT_WAVE) | _BV (RF24_PLL_LOCK) );
426
+ RF24_ce (HIGH);
427
+ }
428
+
429
+ LOCAL void RF24_disableConstantCarrierWave (void )
430
+ {
431
+ RF24_ce (LOW);
432
+ RF24_setRFSetup (RF24_RF_SETUP);
433
+ }
434
+
421
435
#if defined(MY_RX_MESSAGE_BUFFER_FEATURE)
422
436
LOCAL void RF24_irqHandler (void )
423
437
{
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ extern HardwareSPI SPI; //!< SPI
146
146
#define RF24_CONFIGURATION (uint8_t) (RF24_CRC_16 << 2) //!< RF24_CONFIGURATION
147
147
#endif
148
148
#define RF24_FEATURE (uint8_t)( _BV(RF24_EN_DPL)) //!< RF24_FEATURE
149
- #define RF24_RF_SETUP (uint8_t)( ((MY_RF24_DATARATE & 0b10 ) << 4) | ((MY_RF24_DATARATE & 0b01 ) << 3) | (MY_RF24_PA_LEVEL << 1) ) + 1 //!< RF24_RF_SETUP, +1 for Si24R1 and LNA
149
+ #define RF24_RF_SETUP (uint8_t)(( ((MY_RF24_DATARATE & 0b10 ) << 4) | ((MY_RF24_DATARATE & 0b01 ) << 3) | (MY_RF24_PA_LEVEL << 1) ) + 1) //!< RF24_RF_SETUP, +1 for Si24R1 and LNA
150
150
151
151
// powerup delay
152
152
#define RF24_POWERUP_DELAY_MS (100u) //!< Power up delay, allow VCC to settle, transport to become fully operational
@@ -392,6 +392,14 @@ LOCAL bool RF24_setTxPowerPercent(const uint8_t newPowerPercent);
392
392
* @return Pseudo-RSSI based on ARC register
393
393
*/
394
394
LOCAL int16_t RF24_getSendingRSSI (void );
395
+ /**
396
+ * @brief Generate a constant carrier wave at active channel & transmit power (for testing only).
397
+ */
398
+ LOCAL void RF24_enableConstantCarrierWave (void ) __attribute__((unused ));
399
+ /**
400
+ * @brief Stop generating a constant carrier wave (for testing only).
401
+ */
402
+ LOCAL void RF24_disableConstantCarrierWave (void ) __attribute__((unused ));
395
403
396
404
397
405
#if defined(MY_RX_MESSAGE_BUFFER_FEATURE )
Original file line number Diff line number Diff line change 129
129
#define RF24_ARD (4)
130
130
#define RF24_ARC (0)
131
131
#define RF24_PLL_LOCK (4)
132
+ #define RF24_CONT_WAVE (7)
132
133
#define RF24_RF_DR (3)
133
134
#define RF24_RF_PWR (6)
134
135
#define RF24_RX_DR (6)
You can’t perform that action at this time.
0 commit comments