boards/same54-xpro: add EUI-48 provider
Use the on-board AT24MAC chip as an EUI-48 provider.
This commit is contained in:
parent
08db12be3b
commit
182cb9d44b
@ -1,3 +1,7 @@
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
|
||||
ifneq (,$(filter eui_provider,$(USEMODULE)))
|
||||
USEMODULE += at24mac
|
||||
endif
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#define BOARD_H
|
||||
|
||||
#include "cpu.h"
|
||||
#include "at24mac.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -43,6 +44,22 @@ extern "C" {
|
||||
#define ATCA_PARAM_I2C I2C_DEV(1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief AT24Mac provides a EUI-48
|
||||
*/
|
||||
static inline int _at24mac_get_eui48(const void *arg, eui48_t *addr)
|
||||
{
|
||||
return at24mac_get_eui48((uintptr_t)arg, addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name EUI-48 sources on the board
|
||||
* AT24Mac is present on the board
|
||||
* @{
|
||||
*/
|
||||
#define EUI48_PROVIDER_FUNC _at24mac_get_eui48
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name LED pin definitions and handlers
|
||||
* @{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user