Part Number: MSP430FR2355
Can someone please help me here as I am not getting this...
I have
float avg = 0; uint16_t *pTx = &avg;
avg is a bunch of a/d conversions and it looks good at runtime (as an example avg = 3834.0)
I send this value to a function :
UCA1TXBUF = itoa((((uint16_t)(avg)) >> (4 * lowByte)) & 0x0F);
and it gets transmitted just fine....
I would like to use a pointer however bcz I will be calling the function for various data. The issue I am running into is one time I call the function I will be passing a float (as you can see above), however there are times when the function will get called and I will be passing a volatile uint16_t to the function. How do I describe the pointer / typecast it to get around this?
Thanks