mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/avr-rss2: define EUI-64 provider
This commit is contained in:
parent
fd0de8bf70
commit
aed7c18eb5
@ -1,5 +1,9 @@
|
||||
USEMODULE += boards_common_atmega
|
||||
|
||||
ifneq (,$(filter eui_provider,$(USEMODULE)))
|
||||
USEMODULE += at24mac
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += bme280_i2c
|
||||
USEMODULE += saul_gpio
|
||||
|
@ -23,6 +23,9 @@
|
||||
#include "cpu.h"
|
||||
#include "periph/gpio.h"
|
||||
|
||||
#include "at24mac.h"
|
||||
#include "net/eui_provider.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -35,6 +38,24 @@ extern "C" {
|
||||
#define AT24MAC_PARAM_TYPE AT24MAC6XX
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief AT24Mac provides a EUI-64, this is also printed on the board
|
||||
*/
|
||||
static inline int _at24mac_get_eui64(const void *arg, eui64_t *addr)
|
||||
{
|
||||
return at24mac_get_eui64((uintptr_t)arg, addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name EUI-64 sources on the board
|
||||
* AT24Mac is present on the board
|
||||
* @{
|
||||
*/
|
||||
#define EUI64_PROVIDER_FUNC _at24mac_get_eui64
|
||||
#define EUI64_PROVIDER_TYPE NETDEV_AT86RF2XX
|
||||
#define EUI64_PROVIDER_INDEX 0
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name LED pin definitions and handlers
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user