摘要:
#include int checkCPU() { union w{ int a; char b; }c; c.a = 1; return (c.b == 1); } int main() { printf("This CPU is %s\n", checkCPU() ? "little" : "big"); ... 阅读全文
摘要:
#include #define LINUX_REBOOT_CMD_RESTART 0x01234567 int main() { reboot(LINUX_REBOOT_CMD_RESTART); return 0; } 阅读全文
摘要:
/* main.c */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <unist 阅读全文
摘要:
/* uart_tx.c */ #include #include #include #include #include #include #include #include #include #include #define TEST_LEN (1024 * 400) static char *dev_name = "/dev/ttyS2"; static int bau... 阅读全文