xref: /btstack/src/mesh/mesh_node.c (revision 683cf298e33bb4d9a2b407ca533aeaebc0fd36fa)
1*683cf298SMatthias Ringwald /*
2*683cf298SMatthias Ringwald  * Copyright (C) 2019 BlueKitchen GmbH
3*683cf298SMatthias Ringwald  *
4*683cf298SMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5*683cf298SMatthias Ringwald  * modification, are permitted provided that the following conditions
6*683cf298SMatthias Ringwald  * are met:
7*683cf298SMatthias Ringwald  *
8*683cf298SMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9*683cf298SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10*683cf298SMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11*683cf298SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12*683cf298SMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13*683cf298SMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14*683cf298SMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15*683cf298SMatthias Ringwald  *    from this software without specific prior written permission.
16*683cf298SMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17*683cf298SMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18*683cf298SMatthias Ringwald  *    monetary gain.
19*683cf298SMatthias Ringwald  *
20*683cf298SMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21*683cf298SMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*683cf298SMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*683cf298SMatthias Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24*683cf298SMatthias Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25*683cf298SMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26*683cf298SMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27*683cf298SMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28*683cf298SMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29*683cf298SMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30*683cf298SMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*683cf298SMatthias Ringwald  * SUCH DAMAGE.
32*683cf298SMatthias Ringwald  *
33*683cf298SMatthias Ringwald  * Please inquire about commercial licensing options at
34*683cf298SMatthias Ringwald  * [email protected]
35*683cf298SMatthias Ringwald  *
36*683cf298SMatthias Ringwald  */
37*683cf298SMatthias Ringwald 
38*683cf298SMatthias Ringwald #define __BTSTACK_FILE__ "mesh_node.c"
39*683cf298SMatthias Ringwald 
40*683cf298SMatthias Ringwald #include "mesh/mesh_node.h"
41*683cf298SMatthias Ringwald 
42*683cf298SMatthias Ringwald static uint16_t primary_element_address;
43*683cf298SMatthias Ringwald 
44*683cf298SMatthias Ringwald void mesh_node_primary_element_address_set(uint16_t unicast_address){
45*683cf298SMatthias Ringwald     primary_element_address = unicast_address;
46*683cf298SMatthias Ringwald }
47*683cf298SMatthias Ringwald 
48*683cf298SMatthias Ringwald uint16_t mesh_node_primary_element_address_get(void){
49*683cf298SMatthias Ringwald     return primary_element_address;
50*683cf298SMatthias Ringwald }
51