I need to transmit a 7-bit signed integer (values are restricted -64 - +63). My current method, shown below, seems to be inconsistent with 12.7.
Code: Select all
int_8 s8a;
uint_8 u8b;
...
u8b = s8a & 0x7F;
Code: Select all
int_8 s8a;
uint_8 u8b;
...
u8b = ((uint_8)s8a & 0x7F;