Loading...
Searching...
No Matches
eui_provider_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 ML!PA Consulting GmbH
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
18#ifndef EUI_PROVIDER_PARAMS_H
19#define EUI_PROVIDER_PARAMS_H
20
21#include "edbg_eui.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
30static inline int _edbg_get_eui64(uint8_t index, eui64_t *addr)
31{
32 (void)index;
33
34 /* EDBG can take a while to respond on cold boot */
35 unsigned tries = 10000;
36 while (--tries && edbg_get_eui64(addr)) {}
37 return tries ? 0 : -1;
38}
39
45#define EUI64_PROVIDER_FUNC _edbg_get_eui64
46#define EUI64_PROVIDER_TYPE NETDEV_AT86RF2XX
47#define EUI64_PROVIDER_INDEX 0
50#ifdef __cplusplus
51}
52#endif
53
54#endif /* EUI_PROVIDER_PARAMS_H */
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