Novice question using MPLABx + XC8
If i define my_variable using;
#define my_variable 0b10000000
And then I use it in a function that expects a 'char';
void my_function(char i);
I get a compiler warning;
warning: (752) conversion to shorter data type
By changing the function prototype to expect an 'int' the warning goes away so I think the defined my_variable is being assigned as an 'int'
So my question is how or can I structure my define so the defined my_variable is assigned as a 'char'..
I cannot see anything useful in the mplabx documentation.
Thanks.
(also posted to comp.arch.embedded)