only turn off if we are not in CC1020_OFF state. (patch by Jesper Karlsson)
This commit is contained in:
parent
4d21a3e203
commit
cd96248306
|
@ -364,6 +364,7 @@ cc1020_off(void)
|
|||
{
|
||||
int s;
|
||||
|
||||
if(cc1020_state != CC1020_OFF) {
|
||||
if(cc1020_state & CC1020_RX_SEARCHING) {
|
||||
/* Discard the current read buffer when the radio is shutting down. */
|
||||
cc1020_rxlen = 0;
|
||||
|
@ -379,6 +380,7 @@ cc1020_off(void)
|
|||
} else {
|
||||
cc1020_state |= CC1020_TURN_OFF;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -720,7 +722,7 @@ static void
|
|||
cc1020_setupPD(void)
|
||||
{
|
||||
/*
|
||||
* Power down components an reset all registers except MAIN
|
||||
* Power down components and reset all registers except MAIN
|
||||
* to their default values.
|
||||
*/
|
||||
cc1020_write_reg(CC1020_MAIN,
|
||||
|
@ -776,3 +778,4 @@ cc1020_wakeupTX(int analog)
|
|||
MS_DELAY(1);
|
||||
cc1020_write_reg(CC1020_MAIN, 0xD1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue