Description: 本驱动程序在linux2.6.17中测试通过。yangxing msn:lelma_yx@hotmail.com
希望对SPI操作的朋友有所帮助。
一、工作方式:
从设备:SPI为MASTER模式
S3C2410:SPI为SLAVE模式+DMA
二、工作流程
1.S3C2410从接收:当从设备发送数据时,S3C2410利用DMA方式收数,收到指定长度的数据,则进入DMA中断,将接收的数据拷出。
2.S3C2410从发送:当S3C2410需要发送,首先由RTS请求发送,然后等待从设备应答CTS,当从设备应答CTS时,进入外部中断,启动DMA发送,发送完成,再次进入从接收状态。
三、文件位置
spi_dma_slave.c
spi_dma_slave.h
circular_buf.c
circular_buf.h
等文件存放入driver/char/目录
dma.c存放于arch/arm/mach-s3c2410/目录
dma.h存放于include/arm-asm/mach-s3c2410/目录
四、使用环境
1.arm-linux-gcc-3.4.1-the driver linux2.6.17 in which the test. Yangxing msn : lelma_yx@hotmail.com hope to operate SPI friends help. 1, mode of work : from equipment : SPI for the S3C2410 MASTER mode : SPI for SLAVE+ DMA mode 2, workflow 1.S3C2410 from receiving : When sending data from the device, using DMA S3C2410 debt, the length of the designated data DMA will enter the interruption will receive unfettered access to the data. 2.S3C2410 from this : When S3C2410 need this, the first request sent by the RTS, Then wait for the response from CTS equipment, when the equipment response from CTS, access to external interrupt start DMA sent, Send completed, re-entered, from receiving state. 3. Position papers spi_dma_slave.c spi_dma_slave.h circul ar_buf.c circular_buf.h documents onto the driver/char/Contents Platform: |
Size: 17408 |
Author:y |
Hits:
Description: 自己写的SHT11驱动
CPU为AT9200,linux内核版本为2.4.27
编译环境为gcc-2.95.3-himself wrote the SHT11 driven CPU for AT9200, linux kernel version 2 .4.27 build environment for gcc- 2.95.3 Platform: |
Size: 2048 |
Author:江山 |
Hits:
Description: LPC23XX ARM的驱动程序库,开发环境为KEIL RV。做LPC23XX程序时可以直接应用-LPC23XX ARM driver library, development environment for the KEIL RV. Do LPC23XX procedures can be applied directly Platform: |
Size: 1643520 |
Author:梁锋 |
Hits:
Description: ARM程序,2*2键盘功能,程序可扩展成3*3或4*4的键盘,在LPC2103上测试成功。-ARM procedures, 2* 2 keyboard functions, procedures can be extended into a 3* 3 or 4* 4 keyboard, to test the success of the LPC2103. Platform: |
Size: 108544 |
Author:党元一 |
Hits:
Description: 1、将makefile中的
CROSS =/usr/local/arm/2.95.3/bin/arm-linux-
CFLAGS+=-I/usr/local/src/2.4.18-rmk7/include
CFLAGS+=-I/usr/local/src/2.4.18-rmk7/include/linux
CFLAGS+=-I/usr/local/arm/2.95.3/arm-linux/include
路径改为你宿主机上的。
2、#make,来编译驱动模块。
3、#export PATH=$PATH:/usr/local/arm/2.95.3/bin //取决于你宿主机上的交叉编译工具路径
#arm-linux-gcc -o gpio_test gpio_test.c //编译应用程序
最终在你的当前文件夹下会生成gpiodrv.o与gpio_test两个文件。
4、#mkdir /tmp/1
5、通过ftp的方法,把gpio_test与gpiodrv.o文件下载到你的开发板上的/tmp/1目录中。
6、#mknod /dev/gpio c 220 0 //创建文件节点
#insmod gpiodrv.o
#chmod +x gpio_test
#./gpio_test
然后,就可以看到四个LED灯在闪烁了。:)-1, the makefile in the CROSS =/usr/local/arm/2.95.3/bin/arm-linux- CFLAGS+ =- I/usr/local/src/2.4.18-rmk7/include CFLAGS+ =- I/usr/local/src/2.4.18-rmk7/include/linux CFLAGS+ =- I/usr/local/arm/2.95.3/arm-linux/include changed the path on your host. 2,# make, to compile driver modules. 3,# export PATH = $ PATH:/usr/local/arm/2.95.3/bin// depends on your host on the path of the cross compiler tool# arm-linux-gcc-o gpio_test gpio_test.c// compile the application procedures for the ultimate in your current folder will be generated under the two documents gpiodrv.o and gpio_test. 4,# mkdir/tmp/1 5, through the ftp way to gpiodrv.o File Download gpio_test with the development of your board/tmp/1 directory. 6,# mknod/dev/gpio c 220 0// create a file node# insmod gpiodrv.o# chmod+ x gpio_test#./Gpio_test then four LED lights can be seen in the flicker of. :) Platform: |
Size: 9216 |
Author:马工 |
Hits:
Description: 程序代码使用说明:
(1)所有源代码目录下都提供了Makefile(非Qt),或者.pro(Qt),或者更详细的说明(第7章)。作为对比,也可以参考在书中的对应章节采用直接gcc命令的编译方法,来学习如何编写Makefile。
(2)Makefile中默认情况下采用“CC=gcc”或者“CPP=g++”的设置,交叉编译时请使用“ make CC=arm-linux-gcc CPP=arm-linux-g++”(假设你使用的是光盘中提供的arm-linux-gcc交叉编译工具链)或类似命令。当然,也可以修改这些Makefile。
(3)Qt程序的交叉编译请参考本书第2章:可以利用qmake自动生成用于交叉编译的Makefile。当然,也可以采用(2)的方法,或者直接修改Makefile。
(4)所有代码都在Redhat9和gcc3.4.1/arm-linux-gcc3.4.1/Qtopia-core-4.3.0的环境中编译测试通过。-Code instructions:
(1) all source directory provides Makefile (non Qt) or (Qt. Pro), or a more detailed instructions (chapter 7). In contrast, in the book can also refer the corresponding sections using direct GCC compiler method, the command to learn how to write a Makefile.
(2) in the default Makefile using "CC = GCC" or "CPP = g++" setting, cross-compiling please CC = "you arm- Linux- GCC CPP = arm- Linux- g++" (assuming you use CD in the arm- Linux- GCC cross-compiling toolchain) or similar commands. Of course, also can modify these Makefile.
(3) Qt program cross-compiling please refer to chapter 2: can use qmake automatically generated for cross-compiling of Makefile. Of course, also can use (2) method, or directly modified Makefile.
All code (4) in Redhat9 and gcc3.4.1/arm- Linux gcc3.4.1- Qtopia/says Andrea giancoli of environment 4.3.0- compiled by test. Platform: |
Size: 95232 |
Author:朱信 |
Hits:
Description: ARM嵌入式Linux系统开发从入门到精通一书第一章程序
第1章 test.c为书中介绍GDB中使用的例子,对应1.4.2.3小结。
makefile文件为书中介绍GCC中使用的例子,对应1.4.2.2小结。
SWI目录为介绍ADS工具时使用的例子,对应1.3节。
-ARM Embedded Linux system development from entry to the master program book chapter Platform: |
Size: 8192 |
Author:李非 |
Hits:
Description: 在linux系统嵌入式编程中,将usb接口的移动3G设备转为Moden设备的源代码(具有通用性,实验中使用的是中兴的mu351),该代码在ubumtu系统下编辑通过,使用的交叉编辑器是arm-linux-gcc(版本4.4.3,可以在网上下载)。-Embedded linux system programming, the usb interface of mobile 3G devices to the device source code Moden (generic, experiments using ZTE mu351), the code editor in ubumtu system through the use of cross-edit device is arm-linux-gcc (version 4.4.3, you can download). Platform: |
Size: 57344 |
Author:phobey |
Hits:
Description: mini2440实现数模ADC转换程序源码,以测试过直接可以用。arm-linux-gcc 4.3.2-mini2440 digital-analog ADC conversion program source code, can be used to directly tested. arm-linux-gcc 4.3.2 Platform: |
Size: 1377280 |
Author:daimin |
Hits: