Contiki-NG
ble-addr.c File Reference

Driver for the retrieval of an BLE address from flash. More...

#include "contiki-conf.h"
#include "net/linkaddr.h"
#include <string.h>
#include "ble-addr.h"
#include "os/dev/ble-hal.h"

Go to the source code of this file.

Functions

void ble_addr_cpy_to (uint8_t *dst)
 Copy the node's factory BLE address to a destination memory area. More...
 
int ble_addr_to_eui64 (uint8_t *dst, uint8_t *src)
 Copy the node's BLE address to a destination memory area and converts it into a EUI64 address in the process. More...
 
void ble_eui64_addr_cpy_to (uint8_t *dst)
 Copy the node's EUI64 address that is based on its factory BLE address to a destination memory area. More...
 

Detailed Description

Driver for the retrieval of an BLE address from flash.

Author
Michael Spoerk mi.sp.nosp@m.oerk.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition in file ble-addr.c.

Function Documentation

◆ ble_addr_cpy_to()

void ble_addr_cpy_to ( uint8_t *  dst)

Copy the node's factory BLE address to a destination memory area.

Parameters
dstA pointer to the destination area where the BLE address is to be written

This function will copy 6 bytes and it will invert byte order in the process. The factory address on devices is normally little-endian, therefore you should expect dst to store the address in a big-endian order.

Definition at line 47 of file ble-addr.c.

◆ ble_addr_to_eui64()

int ble_addr_to_eui64 ( uint8_t *  dst,
uint8_t *  src 
)

Copy the node's BLE address to a destination memory area and converts it into a EUI64 address in the process.

Parameters
dstA pointer to the destination area where the EUI64 address is to be written
srcA pointer to the BLE address that is to be copied
Returns
0 : Returned successfully -1 : Returned with error

Definition at line 58 of file ble-addr.c.

◆ ble_eui64_addr_cpy_to()

void ble_eui64_addr_cpy_to ( uint8_t *  dst)

Copy the node's EUI64 address that is based on its factory BLE address to a destination memory area.

Parameters
dstA pointer to the destination area where the EUI64 address is to be written

Definition at line 73 of file ble-addr.c.