accelProps.xAxis is a 32 bit integer reading from an accelerometer...
Int16U xVal = accelProps.xAxis;
Will the above copy the first 16 bits of the 32 bit integer into the 16 bit integer?
Printable View
accelProps.xAxis is a 32 bit integer reading from an accelerometer...
Int16U xVal = accelProps.xAxis;
Will the above copy the first 16 bits of the 32 bit integer into the 16 bit integer?
If by 'first', you mean 'least significant', then yes.
Thanks!!
Isn't this implementation defined, however? Truncation?