Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Konversi 8bit to 16bit
uint16_t data16bit;
uint8_t data8bit[2];
// data8bit[0]
// data bagian atas / HIGH
// data8bit[1]
// data bagian bawah / LOW
data16bit = ((data8bit[0] << 8) & 0xFF00) | data8bit[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment