Turn CC13xx RF back off after prop TX if it was off to start with
This commit is contained in:
parent
e0e20aa3fd
commit
320a753666
1 changed files with 6 additions and 0 deletions
|
@ -647,6 +647,7 @@ static int
|
|||
transmit(unsigned short transmit_len)
|
||||
{
|
||||
int ret;
|
||||
uint8_t was_off = 0;
|
||||
uint32_t cmd_status;
|
||||
volatile rfc_CMD_PROP_TX_ADV_t *cmd_tx_adv;
|
||||
|
||||
|
@ -654,6 +655,7 @@ transmit(unsigned short transmit_len)
|
|||
uint16_t total_length;
|
||||
|
||||
if(!rf_is_on()) {
|
||||
was_off = 1;
|
||||
if(on() != RF_CORE_CMD_OK) {
|
||||
PRINTF("transmit: on() failed\n");
|
||||
return RADIO_TX_ERR;
|
||||
|
@ -739,6 +741,10 @@ transmit(unsigned short transmit_len)
|
|||
|
||||
rx_on_prop();
|
||||
|
||||
if(was_off) {
|
||||
off();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue