1 2 3 4 5
|
const uint8_t input[6U] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
uint16_t output[3U];
printf("in: %02X, %02X, %02X, %02X, %02X, %02X\n", input[0U], input[1U], input[2U], input[3U], input[4U], input[5U]);
u8_to_u16(input, output, 6U);
printf("out: %04X, %04X, %04X\n", output[0U], output[1U], output[2U]);
|