I'm working on a project with SDcard, and I would like to write int and long in a file.
If I try to write 0x1954 I had 0x5419 on my file with file.write() so I did a circular shifting like:
data=(data<<8)|(data >> (16-8)); //circular shift file.write((char*)&data,sizeof(data));
But with a long, I have 0x54195521 on my file instead of 0x19542155. So I don't know how to fix this. If you have any idea, I would like to read it ! (Or another way to do it)