combine/merge two bytes into one...?
bit-manipulation, objective-c
Solution
uint16_t value = (highByte << 8) | lowByte ;
Problem
I working with serial frames. I'm receiving a 16-bit value as two separate 8-bit values. How can I merge buffer[0] with buffer[1]? I don't want 0b01+0b10 = 12 (base 10). I want it to equal 258. How can I accomplish this?