Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用串行帧。我收到一个 16 位值作为两个单独的 8 位值。如何将缓冲区 [0] 与缓冲区 [1] 合并?我不想要 0b01+0b10 = 12(以 10 为底)。我希望它等于 258。
我怎样才能做到这一点?
uint16_t value = (highByte << 8) | lowByte ;