摘要:步骤1: make menuconfig配置内核, 开启PWM输出功能. [cpp] view plain copy Device Drivers > Misc devices > <*>Atmel AT32/AT91 PWM support [*] LEDSupport > <*> LED Sup
阅读全文
摘要:#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
阅读全文
摘要:/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
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <math.h> char iiotype[16][32] = { 'in_voltage1_raw', 'in_voltag
阅读全文
摘要:1.配置内核 打开I2C功能: 打开杂项设备,该选项打开后,EEPROM也就打开了。 2. 修改代码 修改文件: linux/arch/arm/mach-s3c2440/mach-smdk2440.c 增加如下代码片段: [cpp] view plain copy #include <linux/i
阅读全文
摘要:应用层测试代码 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <linux/input.h> #include <sys/fcntl.h> int main(int argc, char *argv[]) {
阅读全文
摘要:最简单的led驱动就是从端口输出0或1来关闭或点亮灯。而我们这里讲的led子系统,主要是对led事件进行了分装和优化,这里我们主要讲的是可 以实现跨平台的led驱动。不管你是使用三星的平台,还是Atmel的平台,你只要知道如何在你的BSP中添加平台数据,并且知道如何在应用程序中使用这 个驱动,那么你
阅读全文
摘要:http://blog.csdn.net/weiqing1981127/article/details/8511676 Linux下的Backlight子系统(一) http://blog.csdn.net/weiqing1981127/article/details/8515847 Linux下的
阅读全文
摘要:Linux中的进程间通信机制源自于Unix平台上的进程通信机制。Unix的两大分支AT&T Unix和BSD Unix在进程通信实现机制上的各有所不同,前者形成了运行在单个计算机上的System V IPC,后者则实现了基于socket的进程间通信机制。同时Linux也遵循IEEE制定的Posix
阅读全文
摘要:/* * @FileName: test_sleep.c * @Author: wzj * @Brief: * * * @History: * * @Date: 2012年02月07日星期二22:20:00 * */ #include<stdio.h> #include<stdlib.h> #inc
阅读全文
摘要:9260内部有5个内部计数器,分别为TIMER_CLOCK1 TIMER_CLOCK5。通过这5个时钟可以为各种内部设备提供时钟基准。 其中,红外发射38K方波,是通过CLOCK1计数产生。 配置寄存器如下 //选择TC通道 __sys_reg(AT91_PMC_PCER) = 1 << AT91S
阅读全文
摘要:Introduction Kernel Software triggers Unsigned single-ended channel conversion Setup Test procedure Signed differential channel conversion Setup Test
阅读全文
摘要:第一次: at+cereg=1 OK at ^RSSI: 21 ^HCSQ: "LTE",51,43,116,22 ^ndisdup=1,1,"3gnet" OK ^NDISSTAT: 1,,,"IPV4" at^dhcp? ^DHCP: 2BA5720A,F8FFFFFF,29A5720A,29A
阅读全文