2016年10月21日

摘要: #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <linux/fb.h> #include <sys/mman.h> int main () { int fp=0; struct fb_var_screeninfo 阅读全文
posted @ 2016-10-21 15:36 嵌入式操作系统 阅读(300) 评论(0) 推荐(0)
摘要: /dev/spidev0.0对应ESAM, /dev/spidev1.2对应ATT7022E [cpp] view plain copy #include <stdint.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #i 阅读全文
posted @ 2016-10-21 14:42 嵌入式操作系统 阅读(650) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <math.h> char iiotype[16][32] = { 'in_voltage1_raw', 'in_voltag 阅读全文
posted @ 2016-10-21 13:40 嵌入式操作系统 阅读(206) 评论(0) 推荐(0)
摘要: 1.配置内核 打开I2C功能: 打开杂项设备,该选项打开后,EEPROM也就打开了。 2. 修改代码 修改文件: linux/arch/arm/mach-s3c2440/mach-smdk2440.c 增加如下代码片段: [cpp] view plain copy #include <linux/i 阅读全文
posted @ 2016-10-21 13:32 嵌入式操作系统 阅读(967) 评论(0) 推荐(0)
摘要: 应用层测试代码 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <linux/input.h> #include <sys/fcntl.h> int main(int argc, char *argv[]) { 阅读全文
posted @ 2016-10-21 11:15 嵌入式操作系统 阅读(240) 评论(0) 推荐(0)
摘要: 最简单的led驱动就是从端口输出0或1来关闭或点亮灯。而我们这里讲的led子系统,主要是对led事件进行了分装和优化,这里我们主要讲的是可 以实现跨平台的led驱动。不管你是使用三星的平台,还是Atmel的平台,你只要知道如何在你的BSP中添加平台数据,并且知道如何在应用程序中使用这 个驱动,那么你 阅读全文
posted @ 2016-10-21 11:10 嵌入式操作系统 阅读(431) 评论(0) 推荐(0)

导航