Added carrier detect and auto-ack disable, and an example to use it
This commit is contained in:
19
RF24.cpp
19
RF24.cpp
@@ -331,7 +331,7 @@ void RF24::startListening(void)
|
||||
ce(HIGH);
|
||||
|
||||
// wait for the radio to come up (130us actually only needed)
|
||||
delay(1);
|
||||
delayMicroseconds(130);
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
@@ -591,5 +591,22 @@ boolean RF24::isAckPayloadAvailable(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
|
||||
void RF24::setAutoAck(bool enable)
|
||||
{
|
||||
if ( enable )
|
||||
write_register(EN_AA, B111111);
|
||||
else
|
||||
write_register(EN_AA, 0);
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
|
||||
boolean RF24::testCarrier(void)
|
||||
{
|
||||
return ( read_register(CD) & 1 );
|
||||
}
|
||||
|
||||
// vim:ai:cin:sts=2 sw=2 ft=cpp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user