ESP-IDF
BytesForBitSize
is only used within ESP-IDF.
Symbol previews are coming soon...
Symbols
loading (1/5)...
Files
loading (4/5)...
Summary
Syntax
Arguments
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
BytesForBitSize
BytesForBitSize macro
Determines number of byes to represent a given number of bits.
Syntax
Show:
Summary
Declaration
from
numeric_limits.hpp:59
#define
BytesForBitSize
(
aBitSize
)
static_cast
<
uint8_t
>
(
(
(
aBitSize
)
+
(
kBitsPerByte
-
1
)
)
/
kBitsPerByte
)
Arguments
Argument
Description
aBitSize
The bit-size (number of bits).
Return value
Number of bytes to represent @p aBitSize.
Examples
References
from
examples
Code
Location
#define
BytesForBitSize
(
aBitSize
)
static_cast
<
uint8_t
>
(
(
(
aBitSize
)
+
(
kBitsPerByte
-
1
)
)
/
kBitsPerByte
)
numeric_limits.hpp:59
uint8_t
mMask
[
BytesForBitSize
(
kNumBits
)
]
;
bit_set.hpp:131
static
uint8_t
SizeForLength
(
uint8_t
aLength
)
{
return
BytesForBitSize
(
aLength
)
;
}
ip6_address.hpp:260
hdr
[
1
]
=
BytesForBitSize
(
sizeof
(
hdr
)
+
len
)
-
1
;
lowpan.cpp:851
uint8_t
mRouterIdSet
[
BytesForBitSize
(
Mle
::
kMaxRouterId
+
1
)
]
;
mle_types.hpp:468
sha256
.
Update
(
aAddress
.
mAddress
.
mFields
.
m8
,
BytesForBitSize
(
aAddress
.
mPrefixLength
)
)
;
slaac_address.cpp:436
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out