I'm working with a proprietary protocol that transmits integers as 16 bit two's complement in two parts. The LSB is transmitted first followed by the MSB. Is the following code to restore the original value correct?
unsigned char message[BLK_SIZE];
// read LSB to message[0] and MSB to message[1]
short my_int = (message[1] << 8) | message[0];