I have a uint8_t array that contains two elements:
uint8_t ui8[2]; // uint8_t array
ui8[0] = 70; // LSB
ui1[1] = 60; // MSB
I want to get a uint16_t number (not an array) from these two uin8_t values. I used this approach in order to get this result: uint16_t ui16 = 6070
uint16_t ui16 = ui8[1] | (ui8[0] << 8);
But I got uint16_t ui16 = 15430;
Am using the wrong method to get what I need? Or is there something missing?