Home
last modified time | relevance | path

Searched refs:byteIndex (Results 1 – 3 of 3) sorted by relevance

/openbmc/libbej/src/
H A Dbej_common.c36 uint8_t byteIndex = sizeof(uint64_t) - 1; in bejIntLengthOfValue() local
39 uint8_t currentByte = (val >> (bitsPerByte * byteIndex)) & 0xFF; in bejIntLengthOfValue()
45 byteIndex--; in bejIntLengthOfValue()
46 currentByte = (val >> (bitsPerByte * byteIndex)) & 0xFF; in bejIntLengthOfValue()
/openbmc/phosphor-host-ipmid/include/ipmid/message/
H A Dpack.hpp45 template <typename NumericType, size_t byteIndex = 0>
48 if constexpr (byteIndex < sizeof(NumericType)) in PackBytes()
50 *pointer = static_cast<uint8_t>(i >> (8 * byteIndex)); in PackBytes()
51 PackBytes<NumericType, byteIndex + 1>(pointer + 1, i); in PackBytes()
55 template <typename NumericType, size_t byteIndex = 0>
58 if constexpr (byteIndex < sizeof(NumericType)) in PackBytesUnaligned()
60 p.appendBits(CHAR_BIT, static_cast<uint8_t>(i >> (8 * byteIndex))); in PackBytesUnaligned()
61 PackBytesUnaligned<NumericType, byteIndex + 1>(p, i); in PackBytesUnaligned()
H A Dunpack.hpp40 template <typename NumericType, size_t byteIndex = 0>
43 if constexpr (byteIndex < sizeof(NumericType)) in UnpackBytes()
45 i |= static_cast<NumericType>(*pointer) << (CHAR_BIT * byteIndex); in UnpackBytes()
46 UnpackBytes<NumericType, byteIndex + 1>(pointer + 1, i); in UnpackBytes()
50 template <typename NumericType, size_t byteIndex = 0>
53 if constexpr (byteIndex < sizeof(NumericType)) in UnpackBytesUnaligned()
56 << (CHAR_BIT * byteIndex); in UnpackBytesUnaligned()
57 UnpackBytesUnaligned<NumericType, byteIndex + 1>(p, i); in UnpackBytesUnaligned()