T
Thomas Baier
Hi there,
I've got a little problem. My aim is to send a hex file to a
microcontroller. So I'm reading the hex-File into a buffer and then have to
convert it to send the hex numbers. So now I want to know how I can get a
long out of something like
char* buf = "0xFF";
I tried
long number = atoi((const char*) buf);
but this only returns 0, instead of 255. So how to do this?
Thanks for any help
Thomas
I've got a little problem. My aim is to send a hex file to a
microcontroller. So I'm reading the hex-File into a buffer and then have to
convert it to send the hex numbers. So now I want to know how I can get a
long out of something like
char* buf = "0xFF";
I tried
long number = atoi((const char*) buf);
but this only returns 0, instead of 255. So how to do this?
Thanks for any help
Thomas