⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spi-driver_v2-install.txt~

📁 SPI是一种新代的串口驱动。这是linux下的
💻 TXT~
字号:
This document describes the installation procedure for the SPI driver.There are 2 basic steps to take:1.) Prepare the driver and the system for use.2.) Load tha driver into the kernel, possibly with options.Prepare the driver and the system=================================* First, you must be root for this all to work.* Build the driver by typing 	make  in the directory where you unpacked the archive. This creates a file spi.o  if all is ok. Move this file to a convenient location (e.g.        mv spi.o /lib/modules/misc/.  )* If you already use local major numbers pick a free one. If you do not know  what this is, choose 60 as the major number. Now issue the command:	mknod /dev/spi c <major> 0  with <major> being the major number from above, eg. 60. If you don't use  60 then remember the number you used. You will need it again for the  loading of the driver.  * If you want to have the driver loaded at boot time then do this step:  Edit the file /etc/conf.modules (may be called /etc/modules.conf on your   machine) and add a line like this:    	options spi base=0x378 spi_major=60 idle_ce=0xff  	  The values of <base>, <spi_major> and <idle_ce> given above are the  default ones compiled into the driver. <spi_major> must be the major number   of above. The <base> must be set to  the address of the parallel port to use. (0x378 is the first, 0x278 the  second and 0x3bc that on the hercules graphics cards.) The <idle_ce> is  the line status of the CE-lines when the bus is not in use. Change it to  reflect the right combination of CEs of your chips on the bus.	* If your startup scripts do not do it for you, issue the command	depmod -a	* If you do not run kerneld then you must load the module before you can use  it: (every time, not just once for the installation)  	insmod spi base=0x378 idle_ce=0xff spi_major=60  If you use the values given above you do not have to specify them as they  are the defaults, compiled into the driver. You have to specifiy only a value  that differs from the default on your machine. But most machines can use  these defaults. The idle_ce is perhaps the most likely candidate as there  are 256 possibilities for the correct combination of the idle stat of the  CE-lines. So the load will usually take this form:      insmod spi idle_ce=<my CE settings>  	  To unload it: rmmod spi    If you run kerneld, then you must specify this info in the conf.modules  file as indicated avove, because that is the place where the kerneld looks  for the parameters.How to use the spi device from then on is described in the filespi-driver_v2-interface.txt.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -