2020年4月3日

Linux线程调度

摘要: 代码如下: 1 #include <stdio.h> 2 #include <pthread.h> 3 #include <sched.h> 4 #include <assert.h> 5 6 static int api_get_thread_policy(pthread_attr_t *attr 阅读全文

posted @ 2020-04-03 11:24 Alvin2012 阅读(240) 评论(0) 推荐(0) 编辑

2020年3月26日

RS232总线

摘要: 全双工 分为:TX,RX,GND共3线 TX: RX: GND: 阅读全文

posted @ 2020-03-26 14:17 Alvin2012 阅读(313) 评论(0) 推荐(0) 编辑

RS485总线

摘要: 全双工:四线制。Y,Z,A,B共4线 半双工:两线制。A,B共2线 阅读全文

posted @ 2020-03-26 14:12 Alvin2012 阅读(433) 评论(0) 推荐(0) 编辑

I2C总线

摘要: 半双工 分为SDA,SCL共2线 SDA:串行数据线 SCL:串行时钟线 阅读全文

posted @ 2020-03-26 14:06 Alvin2012 阅读(124) 评论(0) 推荐(0) 编辑

SPI串行外设接口总线

摘要: 全双工 分为:SDI,SDO,SCLK,CS共4线 SDI:又叫MISO– Master Input Slave Output,主设备数据输入,从设备数据输出; SDO:又叫MOSI– Master Output Slave Input,主设备数据输出,从设备数据输入; SCLK:Serial Cl 阅读全文

posted @ 2020-03-26 13:58 Alvin2012 阅读(412) 评论(0) 推荐(0) 编辑

mdev监听热插拔事件

摘要: 1.在/etc/init.d/rcS中添加: echo /sbin/mdev> /proc/sys/kernel/hotplug mdev -s 注释: /proc/sys/kernel/hotplug中的默认路径是/sbin/hotplug,可以通过cat /proc/sys/kernel/hot 阅读全文

posted @ 2020-03-26 12:01 Alvin2012 阅读(257) 评论(0) 推荐(0) 编辑

2019年12月27日

linux的input子系统

摘要: 1.源码下载: 官网地址:https://www.kernel.org/ 作者本次下载的内核版本为linux-5.1.7 2.input子系统: 由于最近工作中用到了keyadc,需要将用户按键上报给应用层,用到了input子系统,所以在此写一下对input子系统的理解,加深印象。 input子系统 阅读全文

posted @ 2019-12-27 13:55 Alvin2012 阅读(243) 评论(0) 推荐(0) 编辑

2019年12月26日

qt creator配置qt versions: 使用从别处拷贝来的qt库时遇到的问题

摘要: 执行./qmake -v可以查看qmake版本和依赖的库的路径 如果库的路径和当前不一致,解决方法有两种: 方法一、 重新编译 方法二、 在qmake同目录下创建文件qt.conf [Paths] Prefix=/home/qtlib 配置完成后执行./qmake -v会看到指向的库的路径便问/ho 阅读全文

posted @ 2019-12-26 17:09 Alvin2012 阅读(863) 评论(0) 推荐(0) 编辑

2019年11月27日

linux显示bmp图像

摘要: fb_show_bmp.c 1 #include <unistd.h> 2 #include <stdio.h> 3 #include <stdlib.h> 4 #include <fcntl.h> 5 #include <string.h> 6 #include <linux/fb.h> 7 #i 阅读全文

posted @ 2019-11-27 11:30 Alvin2012 阅读(1929) 评论(0) 推荐(0) 编辑

2019年11月19日

gcc预处理、编译、汇编、链接

摘要: 预处理、编译、汇编、链接: 1 #include <stdio.h> 2 3 /* 4 // Pre-processing 5 gcc -E hello.c -o hello.i 6 // Compiling 7 gcc -S hello.i -o hello.s 8 // Assembling 9 阅读全文

posted @ 2019-11-19 10:37 Alvin2012 阅读(268) 评论(0) 推荐(0) 编辑

导航