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?
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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Thanks!!