Contiki-NG
Files | Functions

Files

 
 

Functions

uint8_t * ble_addr_ptr (void)
 Retrieve the pointer to where the BLE address is stored. More...
 
int ble_addr_be_cpy (uint8_t *dst)
 Copy the node's factory BLE address to a destination memory area in big-endian (be) order. More...
 
int ble_addr_le_cpy (uint8_t *dst)
 Copy the node's factory BLE address to a destination memory area in little-endian (le) order. 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...
 
int ble_addr_to_eui64_cpy (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

Function Documentation

◆ ble_addr_be_cpy()

int ble_addr_be_cpy ( uint8_t *  dst)

Copy the node's factory BLE address to a destination memory area in big-endian (be) order.

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

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 84 of file ble-addr.c.

◆ ble_addr_le_cpy()

int ble_addr_le_cpy ( uint8_t *  dst)

Copy the node's factory BLE address to a destination memory area in little-endian (le) order.

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

This function will copy 6 bytes, but will not invert the byte order. This is usefull for the RF core which assumes the BLE MAC address in little-endian order.

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

◆ ble_addr_ptr()

uint8_t * ble_addr_ptr ( void  )

Retrieve the pointer to where the BLE address is stored.

This function will return the primary address from info page, unless a valid address is found in the secondary address from CCFG.

Definition at line 58 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 122 of file ble-addr.c.

◆ ble_addr_to_eui64_cpy()

int ble_addr_to_eui64_cpy ( 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
Returns
0 : Returned successfully -1 : Returned with error

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