Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Byteorder. More...

Macros

#define BT_BYTES_LIST_LE16(_v)
 Encode 16-bit value into array values in little-endian format.
 
#define BT_BYTES_LIST_LE24(_v)
 Encode 24-bit value into array values in little-endian format.
 
#define BT_BYTES_LIST_LE32(_v)
 Encode 32-bit value into array values in little-endian format.
 
#define BT_BYTES_LIST_LE40(_v)
 Encode 40-bit value into array values in little-endian format.
 
#define BT_BYTES_LIST_LE48(_v)
 Encode 48-bit value into array values in little-endian format.
 
#define BT_BYTES_LIST_LE64(_v)
 Encode 64-bit value into array values in little-endian format.
 

Detailed Description

Byteorder.

Macro Definition Documentation

◆ BT_BYTES_LIST_LE16

#define BT_BYTES_LIST_LE16 (   _v)

#include <zephyr/bluetooth/byteorder.h>

Value:
(((_v) >> 0) & 0xFFU), \
(((_v) >> 8) & 0xFFU) \

Encode 16-bit value into array values in little-endian format.

Helper macro to encode 16-bit values into comma separated values.

Note
_v is evaluated 2 times.
Parameters
_v16-bit integer in host endianness.
Returns
The comma separated values for the 16-bit value.

◆ BT_BYTES_LIST_LE24

#define BT_BYTES_LIST_LE24 (   _v)

#include <zephyr/bluetooth/byteorder.h>

Value:
(((_v) >> 16) & 0xFFU) \
#define BT_BYTES_LIST_LE16(_v)
Encode 16-bit value into array values in little-endian format.
Definition: byteorder.h:36

Encode 24-bit value into array values in little-endian format.

Helper macro to encode 24-bit values into comma separated values.

Note
_v is evaluated 3 times.
Parameters
_v24-bit integer in host endianness.
Returns
The comma separated values for the 24-bit value.

◆ BT_BYTES_LIST_LE32

#define BT_BYTES_LIST_LE32 (   _v)

#include <zephyr/bluetooth/byteorder.h>

Value:
(((_v) >> 24) & 0xFFU) \
#define BT_BYTES_LIST_LE24(_v)
Encode 24-bit value into array values in little-endian format.
Definition: byteorder.h:50

Encode 32-bit value into array values in little-endian format.

Helper macro to encode 32-bit values into comma separated values.

Note
_v is evaluated 4 times.
Parameters
_v32-bit integer in host endianness.
Returns
The comma separated values for the 32-bit value.

◆ BT_BYTES_LIST_LE40

#define BT_BYTES_LIST_LE40 (   _v)

#include <zephyr/bluetooth/byteorder.h>

Value:
BT_BYTES_LIST_LE16((_v) >> 24) \

Encode 40-bit value into array values in little-endian format.

Helper macro to encode 40-bit values into comma separated values.

Note
_v is evaluated 5 times.
Parameters
_v40-bit integer in host endianness.
Returns
The comma separated values for the 40-bit value.

◆ BT_BYTES_LIST_LE48

#define BT_BYTES_LIST_LE48 (   _v)

#include <zephyr/bluetooth/byteorder.h>

Value:
BT_BYTES_LIST_LE16((_v) >> 32) \
#define BT_BYTES_LIST_LE32(_v)
Encode 32-bit value into array values in little-endian format.
Definition: byteorder.h:64

Encode 48-bit value into array values in little-endian format.

Helper macro to encode 48-bit values into comma separated values.

Note
_v is evaluated 6 times.
Parameters
_v48-bit integer in host endianness.
Returns
The comma separated values for the 48-bit value.

◆ BT_BYTES_LIST_LE64

#define BT_BYTES_LIST_LE64 (   _v)

#include <zephyr/bluetooth/byteorder.h>

Value:
BT_BYTES_LIST_LE32((_v) >> 32) \

Encode 64-bit value into array values in little-endian format.

Helper macro to encode 64-bit values into comma separated values.

Note
_v is evaluated 8 times.
Parameters
_v64-bit integer in host endianness.
Returns
The comma separated values for the 64-bit value.