how to join two bytes into a 16-bit float. .
the microcontroller receives a total of 4 bytes of data every 50 µs via SPI. each Two bytes form a value, which is represented as a float with 16 bits.
how can i join two bytes into a 16-bit float?
float v_beta_d_star = 0.0f;
float v_beta_q_star = 0.0f;
float v_beta_d_star = (spi_values[0] << 8) | (spi_values[0] & 0xFF);
float v_beta_d_star = (spi_values[1] << 8) | (spi_values[1] & 0xFF);
