📄 test_unrt.c
字号:
#include <linux/kernel.h>#include <linux/module.h>int init_module(void){ int red; s3c2410_serial_open(); printk("the COM2 is open\n"); char *pstr = "success\n"; red = s3c2410_serial_write(pstr,8); printk("the len of string is <%d>\n",red); char str[1024]; memset(str,'\0',1024); red = s3c2410_serial_read(str,10); printk("the send string is [%s]\n",str); printk("the len of string is <%d>\n",red); return 0;}void cleanup_module(void){ printk("the test is over\n");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -