drivers: ieee802154: rf2xx: Add tx mode CCA

Configure transceiver to create a 0 period backoff and perform only one
time the CCA without transmission retires for failures.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
Gerson Fernando Budke 2020-11-21 20:21:35 -03:00 committed by Carles Cufí
commit 2f3644ee0c

View file

@ -550,6 +550,11 @@ static int rf2xx_tx(const struct device *dev,
rf2xx_iface_reg_write(dev, RF2XX_XAH_CTRL_0_REG, 0x38);
break;
case IEEE802154_TX_MODE_CCA:
/* backoff period = 0 */
rf2xx_iface_reg_write(dev, RF2XX_CSMA_BE_REG, 0x00);
/* no frame retries & no csma/ca retries */
rf2xx_iface_reg_write(dev, RF2XX_XAH_CTRL_0_REG, 0x00);
break;
case IEEE802154_TX_MODE_TXTIME:
case IEEE802154_TX_MODE_TXTIME_CCA:
default: