Sometimes you don't know what type of CPU endian on your ARM platform. Here you can write a very simple program to test
/* Test CPU Endian */
#include
#include
int main() {
if (htons(1) == 1) puts("big endian");
else puts("little endian");
return 0;
}
/* End */
2009年1月5日 星期一
How to check CPU endian on Embedded Linux
Labels:
Embedded Linux
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言