mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-03 12:07:52 +00:00
change power on the fly
This commit is contained in:
parent
dd98cfe808
commit
2f5aec25c9
@ -125,7 +125,11 @@ void CC2500_SetPower()
|
|||||||
power=IS_POWER_FLAG_on?CC2500_HIGH_POWER:CC2500_LOW_POWER;
|
power=IS_POWER_FLAG_on?CC2500_HIGH_POWER:CC2500_LOW_POWER;
|
||||||
if(IS_RANGE_FLAG_on)
|
if(IS_RANGE_FLAG_on)
|
||||||
power=CC2500_RANGE_POWER;
|
power=CC2500_RANGE_POWER;
|
||||||
|
if(prev_power != power)
|
||||||
|
{
|
||||||
CC2500_WriteReg(CC2500_3E_PATABLE, power);
|
CC2500_WriteReg(CC2500_3E_PATABLE, power);
|
||||||
|
prev_power=power;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CC2500_SetTxRxMode(uint8_t mode)
|
void CC2500_SetTxRxMode(uint8_t mode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user