亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? avr.tex

?? efsl-0.3.6.zip
?? TEX
字號:
This section describes how to implement Efsl on a AVR $\mu C$ connected toan SD-Card (SPI). For getting efsl to compile, the avr-gcc compiler and avr-libc library are required. On Windows you should install WinAVR (http://winavr.sourceforge.net/), on Linux you can install the packages separately (see http://www.nongnu.org/avr-libc/user-manual/install\_tools.htmlfor a nice howto).\subsubsection{Hardware}First, you need set up a prototype in which you connect the CD, CMD, DAT0\& CLK lines from the SD-Card to /CS, MOSI, MISO \& SCK from the Atmega.\newline\includegraphics[scale=0.65]{pics/sdcard.eps}\newline%\parbox[c]{.4\textwidth}{\begin{center}\includegraphics[width=.4\textwidth]{pics/sdconnection}\end{center}}\parbox[c]{.5\textwidth}{Connect the following lines on the SD-card:\begin{itemize}	\item{Pin 9 (DAT2) - NC\\(or pull-up to 3.3V)}	\item{Pin 1 (CD) - Any pin on the Atmega128}	\item{Pin 2 (CMD) - MOSI\\(pin 12 on the Atmega128)}	\item{Pin 3 (Vss) - GND}	\item{Pin 4 (Vdd) - +3.3V}	\item{Pin 5 (CLK) - SCK\\(pin 11 on the Atmega128)}	\item{Pin 6 (Vss) - GND}	\item{Pin 7 (DAT0) - MISO\\(pin 12 on the Atmega128)}	\item{Pin 8 (DAT1) - NC\\(or pull-up to 3.3V)}\end{itemize}}\parbox[c]{.5\textwidth}{\begin{center}	\includegraphics[width=.5\textwidth]{pics/sdconnection}	\newline\newline	Remark: this schematic includes pull-up's to 3.3V, which	can be left off.\end{center}}\newlineRemark 1: Make sure that your $\mu C$ is running on 3,3V, so you don'tdamage your SD-Card.\newline\newlineRemark 2: CD is currently static set to PB0, but will become variablein future releases.\subsubsection{Download \& Compile}Let's get started:\begin{enumerate}	\item{Get the latest release of efsl on http://www.sf.net/projects/efsl/}	\item{Unpack the library (on Windows, you can use WinACE or WinRAR)}	\item{Copy in directory \filename{conf} the file 		\filename{config-avr.h} to \filename{config.h}}	\item{Copy in directory \filename{conf} the file 		\filename{config-avr.makefile} to \filename{config.makefile}}	\item{Compile the library (\code{make avr})}\end{enumerate}Now you should have the following files in a directory called {lib}:\begin{itemize}	\item{\filename{libefsl-base.a}}	\item{\filename{libefsl-fs-vfat.a}}	\item{\filename{libefsl-prot-sdspi.a}}	\item{\filename{libefsl-hwd-atmega\_spi.a}}\end{itemize}\subsubsection{Example}Since Efsl itself is only a library, it's not supposed to do anything out of the box, than just compile. To get started, we'll show here a small exampleprogram that opens an existing file and writes the content to a new file.\newline\newlineFirst, create a new directory in which you put the compiled efsl-library (\filename{libefsl.a}) and create a new file called \filename{avrtest.c} containing:\lstset{numbers=left, stepnumber=1, numberstyle=\small, numbersep=5pt, tabsize=4}\begin{lstlisting}	#include <efs.h>	#include <sd.h>	#include <atmega_spi.h>	void hang(void);	void main(void)	{		efsl_storage_conf storage_conf;		efsl_fs_conf fs_conf;		efsl_storage storage;		efsl_fs fs;		File file_r;		File file_w;		atmegaSpiInterface spi_interface;		SdSpiProtocol sd_protocol;		char buf[512];		unsigned short e;		/* Init */		spi_interface.pinSelect=0x01;		sd_protocol.spiHwInterface=&spi_interface;		sd_protocol.spiHwInit=(void *)atmega_spi_init;		sd_protocol.spiSendByte=(void *)atmega_spi_send;		storage_conf.hwObject=&sd_protocol;		storage_conf.if_init_fptr=(void *)sd_Init;		storage_conf.if_read_fptr=(void *)sd_readSector;		storage_conf.if_write_fptr=(void *)sd_writeSector;		storage_conf.if_ioctl_fptr=(void *)sd_ioctl;		storage_conf.ioman_bufmem=0;		fs_conf.no_partitions=0;		fs_conf.storage=&storage;		if(efsl_initStorage(&storage,&storage_conf)){			hang();		}		if(efsl_initFs(&fs,&fs_conf)){			hang();		}		if(file_fopen(&file_r,&fs.filesystem,"orig.txt",'r')!=0){			hang();		}		if(file_fopen(&file_w,&fs.filesystem,"copy.txt",'w')!=0){			hang();		}				if(file_fopen(&file_r,&efs.myFs,"orig.txt",'r')!=0){			hang();		}		while((e=file_read(&file_r,512,buf))){			file_write(&file_w,e,buf);		}		file_fclose(&file_r);		file_fclose(&file_w);		fs_umount(&fs.filesystem);		hang();	}	void hang(void)	{		while((1))			_NOP();	}\end{lstlisting}$ $\newlineSome extra information on the code above: TODO%\begin{itemize}%	\item{Line 1: The header file for efsl is included here. When using the%		basic efsl functions, \filename{efs.h} is the only header file on the %		efsl library that needs to be included.}%	\item{Line 7: The object efs is created, this object will contain%		information about the hardware layer, the partition table and%		the disc.}%	\item{Line 8: The objects \code{file\_r} and \code{file\_w} are created, these objects %		will contain information about the files that we will open on the %		efs-object.}%	\item{Line 9: A buffer of 512 bytes is allocated. This buffer will be%		used for reading and writing blocks of data.}%	\item{Line 12: Call of \code{efs\_init()}, which will initialize the efs-object.%		To this function we pass:%		\begin{enumerate}%			\item{A pointer to the efs-object.}%			\item{A pointer to the file that contains the partition table /%				file system (in this example, we select a device as file).}%		\end{enumerate}%		If this function returns 0, it means that a valid fat partition is%		found on the SD-card connected.%		If no valid fat-filesystem is found, or the file does not exist, the%		function returns a negative value. In this example we then go to an%		infinite loop to prevent the program to continue.}%	\item{Line 16 \& 20: Call of \code{file\_fopen()}, which will initialize the%		file-objects. To this function we pass:%		\begin{enumerate}%			\item{A pointer to the file-object.}%			\item{A pointer to the filesystem-object.}%			\item{A pointer to the filename.}%			\item{A char containing the the mode (read, write, append).}%		\end{enumerate}%		If this function returns 0, it means the file has successfully been%		opened for reading / writing / appending.%	 	If the file could not be opened (because for example a file already %		exists), a negative value is returned.}%	\item{Line 24: Call of \code{file\_read()}, which will read a given value of%		bytes (in this example 512) from a file and put it's content into%		the buffer passed (in this example called buf). This function returns%		the amount of bytes read, so the while-loop will be executed as long%		as there are bytes left in the file.}%	\item{Line 25: Call of \code{file\_write()}, which will write a given value%		of bytes (in this example, the amount of bytes that was read%		by \code{file\_read()}) from the buffer passed to a file. This function returns%		the amount of bytes written.}%	\item{Line 28 \& 29: Call of \code{file\_fclose()}, which will close the%		file-objects.}%	\item{Line 31: Call of \code{fs\_umount()}, which will write all buffers to%		the the SD-card.}%\end{itemize}\subsubsection{Testing}So now let's test the program:\begin{enumerate}	\item	{	Compile the program:		\begin{itemize}			\item{On Linux (with avr-gcc): avr-gcc -I/home/user/src/base/include -I/home/user/src/include -I/home/user/src/fs/vfat/include -I/home/user/src/hwdrivers/atmega\_spi/include -I/home/user/src/protocols/sdcard\_spi/include -I/home/user/conf -ffreestanding -mmcu=atmega128 -Os -o avrtest.o avrtest.c -L/home/user/lib -lefsl-base -lefsl-fs-vfat -lefsl-hwd-atmega\_spi -lefsl-prot-sdspi}			\item{On Windows (with WinAVR): replace all slashes with backslashes} 		\end{itemize}	}	\item{Generate a hexfile 		(avr-objcopy -j .text -j .data -O ihex avrtest.o avrtest.hex)}	\item{Connect an SD-card to your Atmega128 with a file called 		\filename{orig.txt} on it.}	\item	{		Flash the hex file into your $\mu C$.		\begin{itemize}			\item{On Linux: avrdude -P /dev/ttyUSB0 -c stk500 -p m128 -Uflash:w:avrtest.hex}			\item{On Windows: use Atmel AVR-Studio}		\end{itemize}	}	\item{Reset your $\mu C$ and wait some time (depending on how big		the file \filename{orig.txt} is).}	\item{Disconnect the SD-card, so you can put it in your card reader		and find out if the file \filename{orig.txt} is copied to 		\filename{copy.txt}.}\end{enumerate}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频观看视频| 久久久久久久久久久99999| 精品国产成人在线影院| 亚洲视频一区二区免费在线观看 | 欧美日韩亚州综合| 国产精品无码永久免费888| 秋霞成人午夜伦在线观看| 色综合久久88色综合天天6| 亚洲精品一区二区三区精华液| 一区二区三区中文字幕精品精品| 国产一区二区三区免费播放 | 色婷婷激情综合| 国产香蕉久久精品综合网| 亚洲国产日韩a在线播放性色| 成人av网在线| 国产拍揄自揄精品视频麻豆| 免费观看久久久4p| 欧美挠脚心视频网站| 亚洲免费在线视频一区 二区| 国产一区999| av在线不卡网| 亚洲精品国产无天堂网2021| 91精品午夜视频| 成人一级黄色片| 日韩精品一级中文字幕精品视频免费观看 | 欧美系列日韩一区| 成人国产视频在线观看| 中文字幕一区二区三区四区不卡 | 久久99国产精品免费网站| 国产精品美女久久久久av爽李琼| 日欧美一区二区| 99久久久国产精品| 亚洲三级小视频| 一本大道综合伊人精品热热| 亚洲色图欧美在线| 欧美影视一区在线| 日韩国产精品91| 欧美一区二区三区日韩| 美女视频黄免费的久久| 精品国一区二区三区| 极品少妇xxxx偷拍精品少妇| 日韩欧美另类在线| 国产成人免费av在线| 国产精品色在线| 在线视频欧美精品| 丝袜诱惑亚洲看片| 欧美精品一区二区久久久| 久久精品国产亚洲高清剧情介绍| 精品国产成人系列| 99久久国产综合精品色伊| 亚洲一区免费视频| 欧美www视频| 成人福利视频在线| 亚洲国产毛片aaaaa无费看| 91麻豆精品国产91久久久久久| 奇米777欧美一区二区| 国产欧美视频在线观看| 91九色最新地址| 久久91精品国产91久久小草| 欧美国产禁国产网站cc| 在线精品视频一区二区| 美女脱光内衣内裤视频久久影院| 国产女人18水真多18精品一级做| 91小宝寻花一区二区三区| 午夜精品一区二区三区电影天堂| 欧美电影免费观看高清完整版| 丁香六月综合激情| 日韩高清国产一区在线| 欧美国产精品中文字幕| 这里只有精品视频在线观看| 国产精品一级二级三级| 一区二区成人在线| 久久久国产精华| 欧美性淫爽ww久久久久无| 国产乱色国产精品免费视频| 一区二区日韩av| 国产欧美精品一区| 91精品在线观看入口| 99视频精品免费视频| 日本欧美在线观看| 一区二区三区免费在线观看| 久久综合久久综合亚洲| 欧美色综合久久| 国产成人精品一区二| 综合网在线视频| 中文字幕亚洲成人| 亚洲一区二区综合| 亚洲大片免费看| 日本aⅴ亚洲精品中文乱码| 久久精品国产澳门| 国产.精品.日韩.另类.中文.在线.播放| 国产精品影视在线观看| 成人激情小说乱人伦| 色综合一个色综合亚洲| 蜜桃av一区二区在线观看| 国产精品久久久久影院亚瑟| 国产精品三级视频| 亚洲人成人一区二区在线观看| 一区二区在线观看免费| 五月婷婷综合网| 国产一区二区三区美女| www.亚洲在线| 欧美视频在线观看一区| 欧美一区二视频| 国产人成亚洲第一网站在线播放 | 91精品国产综合久久精品图片 | 日韩午夜在线观看| 在线播放中文一区| 欧美精品自拍偷拍动漫精品| 欧美午夜视频网站| 欧美性欧美巨大黑白大战| 91激情在线视频| av电影在线观看不卡| 99国产精品国产精品久久| 成人在线一区二区三区| 成人高清视频在线观看| 成人午夜大片免费观看| 99vv1com这只有精品| 91色视频在线| 欧美偷拍一区二区| 欧美男生操女生| 日韩精品一区二区三区四区视频 | 欧美日精品一区视频| 欧美日韩在线亚洲一区蜜芽| 在线观看国产一区二区| 欧美日韩在线播| 欧美一区2区视频在线观看| 日韩精品一区二区三区老鸭窝| 精品国产凹凸成av人导航| 国产午夜一区二区三区| 亚洲欧洲综合另类| 天天综合网 天天综合色| 免费观看日韩电影| 国产露脸91国语对白| www.日本不卡| 欧洲人成人精品| 欧美一卡在线观看| 久久婷婷国产综合国色天香| 国产精品久久综合| 亚洲国产精品久久人人爱蜜臀| 蜜桃精品视频在线| hitomi一区二区三区精品| 欧美日韩一本到| 久久久国产精品麻豆| 亚洲激情五月婷婷| 精品在线一区二区三区| 色婷婷综合视频在线观看| 日韩一区二区三区电影在线观看| 日本一区二区高清| 丝袜美腿成人在线| 不卡高清视频专区| 欧美喷潮久久久xxxxx| 国产欧美一区二区精品忘忧草| 亚洲五月六月丁香激情| 国产精品久久三| 国产精品91一区二区| 久久在线观看免费| 国产精品一区二区三区四区| 日韩女优av电影| 精品一区二区影视| 久久综合久久鬼色| 国产精品亚洲а∨天堂免在线| 日韩精品一区二区三区四区视频| 亚洲国产精品麻豆| 色综合中文字幕| 欧美三区在线视频| jvid福利写真一区二区三区| 日韩亚洲欧美高清| 久久精品国产一区二区三区免费看| 欧美性猛交xxxx乱大交退制版| 亚洲自拍都市欧美小说| 91麻豆国产精品久久| 亚洲一区二区三区影院| 国产寡妇亲子伦一区二区| 欧美成人国产一区二区| 免费视频最近日韩| xf在线a精品一区二区视频网站| 蜜桃一区二区三区四区| 国产精品乱人伦| 久久国内精品视频| 56国语精品自产拍在线观看| 国产精品成人免费精品自在线观看| 亚洲成av人在线观看| 日本电影欧美片| 国产精品色婷婷久久58| 麻豆91精品视频| 日韩欧美国产不卡| 亚洲一区二区精品久久av| 国产精品中文欧美| 日韩亚洲电影在线| 久久精品国产色蜜蜜麻豆| 91精品办公室少妇高潮对白| 国产视频亚洲色图| 国产毛片一区二区| 日韩亚洲欧美成人一区| 亚洲成人777| 色视频欧美一区二区三区| 国产精品久久久久国产精品日日| 久久精品国产一区二区三区免费看| 欧美视频在线一区二区三区|