Stupid question here:
I'm trying to convert a char array to a integer number. This is my case (extracted from main code, I've simplyfied it..):
int val;
char *buff;
uint8_t v1 = 2;
uint8_t v2 = 25;
buff[0] = v1;
buff[1] = v2;
val = strtol(buff, NULL, 16);
In that situation the val returns always '0' but, if I replace 'buff' with "0x225", it returns the expected value of 549.
What I'm doing wrong? Thanx in advance..