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 
9 #pragma once
10 
20 #include "edbg_eui.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
29 static inline int _edbg_get_eui64(uint8_t index, eui64_t *addr)
30 {
31  (void)index;
32 
33  /* EDBG can take a while to respond on cold boot */
34  unsigned tries = 10000;
35  while (--tries && edbg_get_eui64(addr)) {}
36  return tries ? 0 : -1;
37 }
38 
44 #define EUI64_PROVIDER_FUNC _edbg_get_eui64
45 #define EUI64_PROVIDER_TYPE NETDEV_AT86RF2XX
46 #define EUI64_PROVIDER_INDEX 0
49 #ifdef __cplusplus
50 }
51 #endif
52 
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