From 9c20540e3d0ebf0d12642e5a4df85be82bb7f611 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 10 Dec 2020 22:33:43 +0100 Subject: [PATCH] boards/same54-xpro: move EUI provider config to eui_provider_params.h --- boards/same54-xpro/include/board.h | 19 ------- .../same54-xpro/include/eui_provider_params.h | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 boards/same54-xpro/include/eui_provider_params.h diff --git a/boards/same54-xpro/include/board.h b/boards/same54-xpro/include/board.h index 1eaae2b4c6..6d0e6a03c4 100644 --- a/boards/same54-xpro/include/board.h +++ b/boards/same54-xpro/include/board.h @@ -21,7 +21,6 @@ #define BOARD_H #include "cpu.h" -#include "at24mac.h" #include "mtd.h" #ifdef __cplusplus @@ -45,24 +44,6 @@ 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, uint8_t index) -{ - (void) index; - - 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 * @{ diff --git a/boards/same54-xpro/include/eui_provider_params.h b/boards/same54-xpro/include/eui_provider_params.h new file mode 100644 index 0000000000..5e8c8b503b --- /dev/null +++ b/boards/same54-xpro/include/eui_provider_params.h @@ -0,0 +1,50 @@ +/* + * 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_same54-xpro + * @{ + * + * @file + * @brief EUI providers found on the board + * + * @author Benjamin Valentin + */ +#ifndef EUI_PROVIDER_PARAMS_H +#define EUI_PROVIDER_PARAMS_H + +#include "at24mac.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief AT24Mac provides a EUI-48 + */ +static inline int _at24mac_get_eui48(const void *arg, eui48_t *addr, uint8_t index) +{ + (void) arg; + + return at24mac_get_eui48(index, addr); +} + +/** + * @name EUI-48 sources on the board + * AT24Mac is present on the board + * @{ + */ +#define EUI48_PROVIDER_FUNC _at24mac_get_eui48 +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* EUI_PROVIDER_PARAMS_H */ +/** @} */