mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/samr21-xpro: define EUI-64 provider
This commit is contained in:
parent
f714fac3f4
commit
fd0de8bf70
@ -2,6 +2,10 @@ ifneq (,$(filter netdev_default,$(USEMODULE)))
|
||||
USEMODULE += at86rf233
|
||||
endif
|
||||
|
||||
ifneq (,$(filter eui_provider,$(USEMODULE)))
|
||||
USEMODULE += edbg_eui
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "periph_conf.h"
|
||||
#include "periph_cpu.h"
|
||||
|
||||
#include "edbg_eui.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -57,6 +59,25 @@ extern "C" {
|
||||
#define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
|
||||
#define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
|
||||
|
||||
/**
|
||||
* @brief EDBG provides a EUI-64, the same that is printed on the board
|
||||
*/
|
||||
static inline int _edbg_get_eui64(const void *arg, eui64_t *addr)
|
||||
{
|
||||
(void) arg;
|
||||
return edbg_get_eui64(addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name EUI sources on the board
|
||||
* EUI-64 inside EDBG for the internal radio
|
||||
* @{
|
||||
*/
|
||||
#define EUI64_PROVIDER_FUNC _edbg_get_eui64
|
||||
#define EUI64_PROVIDER_TYPE NETDEV_AT86RF2XX
|
||||
#define EUI64_PROVIDER_INDEX 0
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name OpenWSN timing constants
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user