1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

esp_now: use NETDEV_TYPE_ESP_NOW as device type

This commit is contained in:
Martine Lenders 2018-11-29 13:34:59 +01:00
parent 6d5af802a4
commit 03b91cbcb8
5 changed files with 5 additions and 4 deletions

View File

@ -753,7 +753,7 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len)
case NETOPT_DEVICE_TYPE:
CHECK_PARAM_RET (max_len >= sizeof(uint16_t), -EOVERFLOW);
*((uint16_t *)val) = NETDEV_TYPE_RAW;
*((uint16_t *)val) = NETDEV_TYPE_ESP_NOW;
res = sizeof(uint16_t);
break;

View File

@ -217,6 +217,7 @@ enum {
NETDEV_TYPE_LORA,
NETDEV_TYPE_NRFMIN,
NETDEV_TYPE_SLIP,
NETDEV_TYPE_ESP_NOW,
};
/**

View File

@ -879,7 +879,7 @@ int gnrc_netif_ipv6_get_iid(gnrc_netif_t *netif, eui64_t *eui64)
return 0;
#endif
#if defined(MODULE_ESP_NOW)
case NETDEV_TYPE_RAW:
case NETDEV_TYPE_ESP_NOW:
eui64->uint8[0] = netif->l2addr[0] ^ 0x02;
eui64->uint8[1] = netif->l2addr[1];
eui64->uint8[2] = netif->l2addr[2];

View File

@ -70,7 +70,7 @@ static inline uint8_t _reverse_iid(const ipv6_addr_t *dst,
return sizeof(uint8_t);
#endif /* MODULE_CC110X */
#ifdef MODULE_ESP_NOW
case NETDEV_TYPE_RAW:
case NETDEV_TYPE_ESP_NOW:
l2addr[0] = dst->u8[8] ^ 0x02;
l2addr[1] = dst->u8[9];
l2addr[2] = dst->u8[10];

View File

@ -205,7 +205,7 @@ static inline unsigned _get_l2addr_len(gnrc_netif_t *netif,
}
#endif /* defined(MODULE_NETDEV_IEEE802154) || defined(MODULE_XBEE) */
#ifdef MODULE_ESP_NOW
case NETDEV_TYPE_RAW:
case NETDEV_TYPE_ESP_NOW:
(void)opt;
return ETHERNET_ADDR_LEN;
#endif /* MODULE_ESP_NOW */