- 博客(5)
- 收藏
- 关注
原创 led驱动程序
led_drv.c文件如下: #include <linux/module.h> #include <linux/fs.h> #include <linux/errno.h> #include <linux/miscdevice.h> #include <linux/kernel.h> #include <linux/major.h> #include <linux/mutex.h> #include <linux/
2020-12-09 19:19:18 748
原创 hello驱动
hello_drv.c 文件如下: #include <linux/module.h> #include <linux/fs.h> #include <linux/errno.h> #include <linux/miscdevice.h> #include <linux/kernel.h> #include <linux/major.h> #include <linux/mutex.h> #include <l.
2020-12-09 19:11:52 79
原创 udp网络编程
服务端代码 #include <sys/types.h> /* See NOTES */ #include <sys/socket.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <stdio.h>
2020-12-08 19:30:25 71
原创 tcp网络编程
tcp网络编程 服务端代码如下: #include <sys/types.h> /* See NOTES */ #include <sys/socket.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <s
2020-12-08 19:26:26 78
原创 # 查询方式的按键驱动程序框架详解
查询方式的按键驱动程序框架详解: 上层代码为drv.c,以下是详细代码 static struct class *button_class; static int major = 0;//先定义主设备号1(用来寻找驱动程序) static struct button_operations *p_button_opr;//在.h文件后定义b_opr结构体后,在.c文件中定义结构体的指针全局变量,由底层代码提供的 static int button_open (struct inode *node, stru
2020-11-25 18:46:37 258 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人