How about using a union?
typedef union two_byte_merge {
struct {
uint8_t high_byte;
uint8_t low_byte;
} parts;
int16_t s_merged;
uint16_t u_merged;
} two_byte_merge_t;
two_byte_merge_t combined;
combined.parts.high_byte = 128;
combined.parts.low_byte = 128;
printf("HB: %u\n",combined.parts.high_byte);
printf("LB: %u\n",combined.parts.low_byte);
printf("signed merged: %d\n",combined.s_merged);
printf("unsigned merged: %u\n",combined.u_merged);
Or just:
uint16_t merged = ((uint16_t)(high_byte) << 8) | (uint16_t)(low_byte);