Contiki-NG
arch
cpu
simplelink-cc13xx-cc26xx
rf
ieee-addr.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018, Texas Instruments Incorporated - http://www.ti.com/
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
* 3. Neither the name of the copyright holder nor the names of its
14
* contributors may be used to endorse or promote products derived
15
* from this software without specific prior written permission.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28
* OF THE POSSIBILITY OF SUCH DAMAGE.
29
*/
30
/**
31
* \addtogroup cc13xx-cc26xx-cpu
32
* @{
33
*
34
* \defgroup cc13xx-cc26xx-rf-ieee-addr CC13xx/CC26xx IEEE Address Control
35
*
36
* Driver for the retrieval of an IEEE address from flash.
37
*
38
* The user can specify a hardcoded IEEE address through the
39
* IEEE_ADDR_CONF_HARDCODED configuration macro.
40
*
41
* If the user does not hard-code an address, then one will be read from either
42
* the primary location (InfoPage) or from the secondary location (on flash).
43
*
44
* In order to allow the user to easily program nodes with addresses, the
45
* secondary location is given priority: If it contains a valid address then
46
* it will be chosen in favour of the one on InfoPage.
47
*
48
* In this context, an address is valid if at least one of the 8 bytes does not
49
* equal 0xFF. If all 8 bytes are 0xFF, then the primary location will be used.
50
*
51
* In all cases, the address is assumed to be written little-endian.
52
*
53
* Lastly, it is possible to override the 2 LSB's of the address by using the
54
* NODE_ID make variable.
55
* @{
56
*
57
* \file
58
* Header file for the CC13xx/CC26xx IEEE address driver.
59
* \author
60
* Edvard Pettersen <e.pettersen@ti.com>
61
*/
62
/*---------------------------------------------------------------------------*/
63
#ifndef IEEE_ADDR_H_
64
#define IEEE_ADDR_H_
65
/*---------------------------------------------------------------------------*/
66
#include "contiki.h"
67
/*---------------------------------------------------------------------------*/
68
/**
69
* \brief Copy the device's IEEE address to a destination buffer.
70
* \param dst A pointer to the destination area where the IEEE address is to
71
* be written.
72
* \param len The number of bytes to write to destination area
73
* \return 0 : Returned successfully
74
* -1 : Returned with error
75
*
76
* This function will copy \p len bytes in LSB and it will invert byte order
77
* in the process. The factory address on devices is normally little-endian,
78
* therefore you should expect dst to store the address in a big-endian order.
79
*/
80
int
ieee_addr_cpy_to
(uint8_t *dst, uint8_t len);
81
/*---------------------------------------------------------------------------*/
82
#endif
/* IEEE_ADDR_H_ */
83
/*---------------------------------------------------------------------------*/
84
/**
85
* @}
86
* @}
87
*/
ieee_addr_cpy_to
void ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
Copy the node's IEEE address to a destination memory area.
Definition:
ieee-addr.c:46
Generated on Sat May 30 2020 17:03:55 for Contiki-NG by
1.8.13