![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
嵌入式
风而已
这个作者很懒,什么都没留下…
展开
-
usb-gadget-configfs 的使用
usb gadget configfs 的使用挂载mount -t configfs none /sys/kernel/config挂载路径自定,上面命令挂载在 /sys/kernel/config 目录下挂载后的目录结构如下,configfs自动生成usb_gadget目录config| ---- usb_gadget创建 gadget目录mkdir -p /sys/kernel/config/usb_gadget/my_gadget挂载后的目录结构如下,都是usb原创 2020-09-29 11:24:59 · 5309 阅读 · 10 评论 -
linux gpio中断
最近用到gpio中断,gpio中断也是嵌入式系统用的比较多的。对于GPIO操作 linux 有一套标准的 API,set value、get value之类的,当然也有关于中断的。关于中断的就是:static inline int gpio_to_irq(unsigned int gpio){ return __gpio_to_irq(gpio);}1 使用g原创 2015-03-27 14:30:22 · 10183 阅读 · 2 评论 -
lwip rawapi TCP接收数据函数调用链
最近做一个东西需要使用网络协议,使用SPI接亚信AX88796C。 使用开源的LWIP协议栈。 看了一下从tcp_recv到底层驱动的调用,以便移植。 查了一下tcp_recv /** * Used to specify the function that should be called when a TCP * connection receives data. * * @param原创 2015-03-17 17:25:21 · 2510 阅读 · 1 评论 -
linux ttyS设备的close
/* * Open file table structure */struct files_struct { /* * read mostly part */ atomic_t count; struct fdtable __rcu *fdt; struct fdtable fdtab; /* * written part on a separate cach原创 2017-11-30 15:22:55 · 920 阅读 · 0 评论 -
使用iptables使多网口开发板可级联上网
需求情况开发板A有两个网口eth0 eth1,分别属于不同网段eth0在10.130.x.x ,而eth1在192.168.1.x开发板A eth0在192.168.1.x 那么板B eth0与 板A eth1 相连可以ping通, 那么板B如何通过板A连到10.130.x.x网段 如下图:使用开源工具iptables即可实现1,下载编译iptables下载不再细说,网上搜索iptables即可...原创 2018-03-22 13:21:20 · 1290 阅读 · 0 评论 -
arm linux 启动进入login
1.busybox 配置[*] login[*] passwd 重新编译busybox后,更新文件系统2.启动进入系统,使用passwd命令为root添加密码3.如果使用romfs需要把/etc/passwd 和/etc/shadow文件保存到rootfs4.在inittab里面加一句:::sysinit:/etc/init.d/rcS::respawn:/bin/login/etc/init....原创 2018-03-22 11:18:21 · 3563 阅读 · 0 评论 -
ARM Linux下spinlock 的实现
1),spin lock 结构体typedef struct spinlock { union { struct raw_spinlock rlock;#ifdef CONFIG_DEBUG_LOCK_ALLOC# define LOCK_PADSIZE (offsetof(struct raw_spinlock, dep_map)) st...原创 2019-08-07 17:58:43 · 788 阅读 · 0 评论