Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
deserialize_uint16.hpp
Go to the documentation of this file.
1#pragma once
3
4#include <bit>
5#include <cstdint>
7{
8inline uint16_t deserializeUInt16(communication::Byte mostSignificant, communication::Byte leastSignificant)
9{
10 const uint16_t kCombined
11 {
12 (uint16_t) mostSignificant << 8
13 | (uint16_t) leastSignificant << 0
14 };
15
16 //const int16_t* integer {reinterpret_cast<const int16_t*>(&kCombined)};
17
18 return kCombined;
19}
20}
coolSerial::Byte Byte
Definition byte.hpp:4
Definition deserialize_uint16.hpp:7
uint16_t deserializeUInt16(communication::Byte mostSignificant, communication::Byte leastSignificant)
Definition deserialize_uint16.hpp:8