MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / packU16LE

Function packU16LE

app/src/IO/Checksum.cpp:261–266  ·  view source on GitHub ↗

* @brief Packs a 16-bit unsigned integer into a little-endian QByteArray. */

Source from the content-addressed store, hash-verified

259 * @brief Packs a 16-bit unsigned integer into a little-endian QByteArray.
260 */
261static QByteArray packU16LE(uint16_t v)
262{
263 uint8_t out[2];
264 little_endian_memcpy(out, &v, sizeof(v));
265 return QByteArray(reinterpret_cast<char*>(out), sizeof(out));
266}
267
268/**
269 * @brief Packs a 32-bit unsigned integer into a big-endian QByteArray.

Callers 1

Checksum.cppFile · 0.85

Calls 1

little_endian_memcpyFunction · 0.85

Tested by

no test coverage detected