Skip to content

Commit

Permalink
Use setTransmitPower()
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-sam committed Sep 24, 2018
1 parent 3898c0d commit 54a99d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/drivers/MicroBitRadio.cpp
Expand Up @@ -146,7 +146,7 @@ int MicroBitRadio::setFrequencyBand(int band)
if (ble_running())
return MICROBIT_NOT_SUPPORTED;

if (band < 0 || band > 100)
if (band < 0 || band > 83)
return MICROBIT_INVALID_PARAMETER;

// We need to disable the radio before setting the frequency
Expand Down Expand Up @@ -293,7 +293,7 @@ int MicroBitRadio::enable()
while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);

// Bring up the nrf51822 RADIO module in Nordic's proprietary 1MBps packet radio mode.
NRF_RADIO->TXPOWER = MICROBIT_RADIO_DEFAULT_TX_POWER;
setTransmitPower(MICROBIT_RADIO_DEFAULT_TX_POWER);
NRF_RADIO->FREQUENCY = MICROBIT_RADIO_DEFAULT_FREQUENCY;

// Configure for 1Mbps throughput.
Expand Down

0 comments on commit 54a99d6

Please sign in to comment.