I keep getting conversion errors when using int8_t instead of char. This only happens on esp8266 boards and I'd like to figure out why.
Here's an example,
This compiles fine but complains if I change to uint8_t, int8_t, or byte but only on esp8266. It always works fine on an Uno.
If I add a cast to char (in strcpy) then I get a loss of precision error! How can going from 8 bits to a char loose precision?
I thought char and int8_t were interchangeable!!
I'm guessing that esp is using something other than 8 bits for a char.
Any thoughts anyone?
Mike.
Here's an example,
Code:
char buff[128]; //can't change this to uint8_t or int8_t
void setup() {
strcpy(buff,"Hello World!");
}
If I add a cast to char (in strcpy) then I get a loss of precision error! How can going from 8 bits to a char loose precision?
I thought char and int8_t were interchangeable!!
I'm guessing that esp is using something other than 8 bits for a char.
Any thoughts anyone?
Mike.