1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

drivers/at86rf2xx: add HAVE_ED_REGISTER macro

This commit is contained in:
Jose Alamos 2022-11-24 17:22:13 +01:00
parent 82d3324e63
commit 22c6d0242a
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9
2 changed files with 10 additions and 1 deletions

View File

@ -223,7 +223,7 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
netdev_ieee802154_rx_info_t *radio_info = info;
at86rf2xx_fb_read(dev, &(radio_info->lqi), 1);
#if defined(MODULE_AT86RF231) || IS_ACTIVE(AT86RF2XX_PERIPH)
#if AT86RF2XX_HAVE_ED_REGISTER
/* AT86RF231 does not provide ED at the end of the frame buffer, read
* from separate register instead */
at86rf2xx_fb_stop(dev);

View File

@ -116,6 +116,15 @@ extern "C" {
#define AT86RF2XX_IS_PERIPH (0)
#endif
/**
* @brief ED Register
*/
#if defined(MODULE_AT86RF231) || IS_ACTIVE(AT86RF2XX_PERIPH)
#define AT86RF2XX_HAVE_ED_REGISTER (1)
#else
#define AT86RF2XX_HAVE_ED_REGISTER (0)
#endif
/**
* @brief Support for SubGHz bands
*/