1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

boards/avr-rss2: move EUI provider config to eui_provider_params.h

This commit is contained in:
Benjamin Valentin 2020-12-10 22:25:49 +01:00
parent d3e8ffb021
commit ac2edfca35
2 changed files with 53 additions and 23 deletions

View File

@ -23,9 +23,6 @@
#include "cpu.h"
#include "periph/gpio.h"
#include "at24mac.h"
#include "net/eui_provider.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -38,26 +35,6 @@ 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, 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
* @{

View 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 */
/** @} */