/* if the selected dBm is out of range, use the closest available */ if (txPower > MAC_RADIO_TX_POWER_MAX_DBM) { txPower = MAC_RADIO_TX_POWER_MAX_DBM; }
/* * Set the global variable reqTxPower. This variable is referenced * by the function macRadioUpdateTxPower() to write the radio register. * * A lookup table is used to translate the power level to the register * value. */ HAL_ENTER_CRITICAL_SECTION(s); reqTxPower = macRadioDefsTxPowerTable[txPower]; HAL_EXIT_CRITICAL_SECTION(s);
/* update the radio power setting */ //************** 自己修改 ******* reqTxPower = 0xF5; //******************************* macRadioUpdateTxPower(); }