boards/avr-rss2: move EUI provider config to eui_provider_params.h
This commit is contained in:
parent
d3e8ffb021
commit
ac2edfca35
@ -23,9 +23,6 @@
|
|||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "periph/gpio.h"
|
#include "periph/gpio.h"
|
||||||
|
|
||||||
#include "at24mac.h"
|
|
||||||
#include "net/eui_provider.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -38,26 +35,6 @@ extern "C" {
|
|||||||
#define AT24MAC_PARAM_TYPE AT24MAC6XX
|
#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, uint8_t index)
|
|
||||||
{
|
|
||||||
(void) index;
|
|
||||||
|
|
||||||
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
|
* @name LED pin definitions and handlers
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
53
boards/avr-rss2/include/eui_provider_params.h
Normal file
53
boards/avr-rss2/include/eui_provider_params.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 ML!PA Consulting GmbH
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup boards_avr-rss2
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief EUI providers found on the board
|
||||||
|
*
|
||||||
|
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
|
||||||
|
*/
|
||||||
|
#ifndef EUI_PROVIDER_PARAMS_H
|
||||||
|
#define EUI_PROVIDER_PARAMS_H
|
||||||
|
|
||||||
|
#include "at24mac.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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, uint8_t index)
|
||||||
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
|
return at24mac_get_eui64(index, 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
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* EUI_PROVIDER_PARAMS_H */
|
||||||
|
/** @} */
|
||||||
Loading…
x
Reference in New Issue
Block a user