Loading...
Searching...
No Matches
eui_provider_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 ML!PA Consulting GmbH
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17#include "edbg_eui.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
26static inline int _edbg_get_eui64(uint8_t index, eui64_t *addr)
27{
28 (void)index;
29
30 /* EDBG can take a while to respond on cold boot */
31 unsigned tries = 10000;
32 while (--tries && edbg_get_eui64(addr)) {}
33 return tries ? 0 : -1;
34}
35
41#define EUI64_PROVIDER_FUNC _edbg_get_eui64
42#define EUI64_PROVIDER_TYPE NETDEV_AT86RF2XX
43#define EUI64_PROVIDER_INDEX 0
45
46#ifdef __cplusplus
47}
48#endif
49
int edbg_get_eui64(eui64_t *addr)
Get the unique EUI64 address from a Atmel EDBG debugger.
static int _edbg_get_eui64(uint8_t index, eui64_t *addr)
EDBG provides a EUI-64, the same that is printed on the board.
Data type to represent an EUI-64.
Definition eui64.h:55