mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/at86rf2xx: add HAVE_RETRIES_REG macro
This commit is contained in:
parent
22c6d0242a
commit
5a865c3a6b
@ -669,7 +669,7 @@ static void _isr_send_complete(at86rf2xx_t *dev, uint8_t trac_status)
|
||||
return;
|
||||
}
|
||||
/* Only radios with the XAH_CTRL_2 register support frame retry reporting */
|
||||
#if AT86RF2XX_HAVE_RETRIES && defined(AT86RF2XX_REG__XAH_CTRL_2)
|
||||
#if AT86RF2XX_HAVE_RETRIES_REG
|
||||
dev->tx_retries = (at86rf2xx_reg_read(dev, AT86RF2XX_REG__XAH_CTRL_2)
|
||||
& AT86RF2XX_XAH_CTRL_2__ARET_FRAME_RETRIES_MASK) >>
|
||||
AT86RF2XX_XAH_CTRL_2__ARET_FRAME_RETRIES_OFFSET;
|
||||
|
@ -139,15 +139,25 @@ extern "C" {
|
||||
* @brief Frame retry counter reporting
|
||||
*
|
||||
* The AT86RF2XX_HAVE_RETRIES flag enables support for NETOPT_TX_RETRIES NEEDED
|
||||
* operation. Required for this functionality is the XAH_CTRL_2 register which
|
||||
* contains the frame retry counter. Only the at86rf232 and the at86rf233
|
||||
* support this register.
|
||||
* operation.
|
||||
*/
|
||||
#define AT86RF2XX_HAVE_RETRIES (1)
|
||||
#else
|
||||
#define AT86RF2XX_HAVE_RETRIES (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Frame retry counter register
|
||||
*
|
||||
* Some radios include the XAH_CTRL_2 register which contains the frame retry
|
||||
* counter. Only the at86rf232 and the at86rf233 support this register.
|
||||
*/
|
||||
#if AT86RF2XX_HAVE_RETRIES && defined(AT86RF2XX_REG__XAH_CTRL_2)
|
||||
#define AT86RF2XX_HAVE_RETRIES_REG (1)
|
||||
#else
|
||||
#define AT86RF2XX_HAVE_RETRIES_REG (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief TX Start IRQ
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user