I have an unsigned char array with 2 elements that represents a signed integer. How can I convert these 2 bytes into a signed integer?
Edit: The unsigne
wrap them up in a union:
union { unsigned char a[2]; int16_t smt; } number;
Now after filling the array you can use this as number.smt
number.smt