Fix bug in setDataRate

This commit is contained in:
maniacbug 2011-06-28 06:46:45 -07:00
parent a22906f961
commit 8701d82615
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ boolean RF24::testCarrier(void)
void RF24::setDataRate(rf24_datarate_e speed)
{
uint8_t setup = read_register(RF_SETUP) & RF_DR;
uint8_t setup = read_register(RF_SETUP) & _BV(RF_DR);
if (speed == RF24_2MBPS)
setup |= _BV(RF_DR);
write_register(RF_SETUP,setup);