Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Uint16 to int(signed) conversion

$
0
0
Hi! Conversion, actually math, you re looking for: in2 = (int)in - 2048; Note that "blind" typecasting of uint in to int in is safe in your case because max value it holds is <= 4095. It will overflow if value is larger than 32767.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>