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

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

?? avr.tex

?? 基于LPC2148的MP3播放器軟件包。使用crossworks for arm軟件進行編譯。
?? 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 \filename{Makefile-AVR} to \filename{Makefile}}	\item{Copy \filename{conf/config-sample-avr.h} to \filename{conf/config.h}}	\item{Compile the library (\code{make lib})}\end{enumerate}Now you should have \filename{libefsl.a} in the efsl directory.\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>	void hang(void);	void main(void)	{		EmbeddedFileSystem efs;		EmbeddedFile file_r, file_w;		unsigned short i,e;		char buf[512];		if(efs_init(&efs,0)!=0){			hang();		}		if(file_fopen(&file_r,&efs.myFs,"orig.txt",'r')!=0){			hang();		}		if(file_fopen(&file_w,&efs.myFs,"copy.txt",'w')!=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(&efs.myFs);		hang();	}	void hang(void)	{		while((1))			_NOP();	}\end{lstlisting}$ $\newlineSome extra information on the code above:\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	{		Make sure that your directory contains both the example from above		called \filename{avrtest.c} and the library \filename{libefsl.a}.	}	\item	{	Compile the program:		\begin{itemize}			\item{On Linux (with avr-gcc): avr-gcc -I/home/user/efsl/inc/ 				-I/home/user/efsl/conf -ffreestanding -mmcu=atmega128 -Os -o 				avrtest.o avrtest.c -L./ -lefsl}			\item{On Windows (with WinAVR): avr-gcc 				-Ic:$\backslash$efsl$\backslash$inc				-Ic:$\backslash$efsl$\backslash$conf 				-ffreestanding -mmcu=atmega128 -Os -o				avrtest.o avrtest.c -L.$\backslash$ -lefsl}		\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一区二区三区免费野_久草精品视频
亚洲天堂av一区| 欧美视频完全免费看| 有码一区二区三区| 久久青草欧美一区二区三区| 成人国产精品视频| 日韩精品免费专区| 亚洲精品国产视频| 国产片一区二区| 精品国产乱码久久久久久夜甘婷婷| 97成人超碰视| 国产成人小视频| 经典三级视频一区| 日韩中文字幕区一区有砖一区 | 激情久久五月天| 亚洲高清视频的网址| 亚洲精品国产a久久久久久| 国产亚洲精品bt天堂精选| 91精品啪在线观看国产60岁| 色呦呦日韩精品| 三级欧美在线一区| 久久亚洲精品国产精品紫薇| 精品视频资源站| 色婷婷精品久久二区二区蜜臀av | 色综合久久久久综合99| 国产一区二区三区在线看麻豆| 午夜精品久久久久| 三级欧美在线一区| 久久99在线观看| 国产宾馆实践打屁股91| 久久99精品国产麻豆不卡| 另类的小说在线视频另类成人小视频在线 | 99视频精品在线| 99久精品国产| 欧美日韩国产大片| 精品免费99久久| 久久精品日产第一区二区三区高清版 | 国产三级一区二区三区| 久久久久一区二区三区四区| 久久精品一区二区| 久久亚洲捆绑美女| 国产精品青草综合久久久久99| 在线观看一区二区精品视频| 欧美日韩在线播放三区| 欧美日韩国产一区二区三区地区| 欧美性受xxxx黑人xyx| 欧美男生操女生| 欧美tk丨vk视频| 国产精品伦一区| 日本一区二区不卡视频| 欧美精选一区二区| 欧美精品v日韩精品v韩国精品v| 色婷婷综合久久久中文字幕| 欧美亚洲日本一区| 欧美丰满高潮xxxx喷水动漫| 精品国产一区久久| 亚洲视频 欧洲视频| 亚洲综合激情另类小说区| 日韩国产精品91| youjizz久久| 欧美综合一区二区三区| 日韩欧美国产综合一区| 国产亚洲精品aa午夜观看| 精品少妇一区二区| 尤物在线观看一区| 高清国产一区二区| 欧美电影一区二区三区| 成人欧美一区二区三区黑人麻豆| 亚洲精品乱码久久久久久黑人| 国产乱码一区二区三区| 欧美高清视频一二三区 | 国产黄人亚洲片| 欧美日韩高清影院| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲国产美国国产综合一区二区| 日韩福利视频导航| 欧亚一区二区三区| 国产精品久线观看视频| 国产在线视视频有精品| 欧美综合天天夜夜久久| 亚洲欧美另类图片小说| 成人国产精品视频| 一本久久a久久精品亚洲| 欧美一卡二卡三卡| 亚洲成人免费电影| 精品视频一区三区九区| 中文字幕制服丝袜成人av| 成人性视频免费网站| 国产喂奶挤奶一区二区三区 | 国产三级三级三级精品8ⅰ区| 麻豆久久久久久| 欧美xingq一区二区| 精品一区精品二区高清| 日韩欧美一区二区视频| 尤物av一区二区| 91香蕉视频在线| 一区二区三区丝袜| 欧美午夜精品一区二区蜜桃| 一区二区三区四区精品在线视频| 91色乱码一区二区三区| 亚洲美女淫视频| 7878成人国产在线观看| 国产剧情一区二区三区| 国产精品久久久久久妇女6080 | 97久久超碰国产精品| 亚洲线精品一区二区三区八戒| 欧美日韩在线播放三区四区| 久色婷婷小香蕉久久| 欧美国产一区在线| 91国在线观看| 国产一区二区三区综合| 亚洲图片欧美激情| 日韩欧美一二三四区| 成人av小说网| 久久国内精品视频| 久久久九九九九| 56国语精品自产拍在线观看| 国产jizzjizz一区二区| 一区二区三区欧美久久| 精品国产乱码久久久久久久| 色老头久久综合| 国产伦精品一区二区三区视频青涩 | 亚洲成av人**亚洲成av**| 国产欧美日韩中文久久| 日韩欧美在线一区二区三区| 91在线精品一区二区| 国产精品综合一区二区三区| 一二三区精品视频| 国产精品视频你懂的| 久久精品一区二区三区四区| 一本大道久久精品懂色aⅴ| 国产精品伊人色| 日韩美女视频一区| 337p日本欧洲亚洲大胆精品 | 99久久婷婷国产精品综合| 日本vs亚洲vs韩国一区三区二区| 亚洲男人都懂的| 久久久91精品国产一区二区三区| 在线观看欧美精品| 在线视频一区二区免费| 成人av片在线观看| hitomi一区二区三区精品| 99久久99久久久精品齐齐| 国产成人精品免费网站| 成人av网站免费| 欧美在线综合视频| 56国语精品自产拍在线观看| 日本丶国产丶欧美色综合| 成人免费高清在线| 色爱区综合激月婷婷| 欧美日韩一区二区三区四区| 欧美日韩高清在线播放| 久久免费的精品国产v∧| 中文字幕亚洲在| 韩国av一区二区| 91蝌蚪国产九色| 欧美精品一区二区三区四区 | 欧美一区在线视频| 国产精品久久久爽爽爽麻豆色哟哟 | 麻豆精品新av中文字幕| jlzzjlzz国产精品久久| 日韩欧美专区在线| 亚洲精品国产无天堂网2021| 国产麻豆精品视频| 日韩欧美一级在线播放| 五月婷婷另类国产| 一本久道久久综合中文字幕| 国产视频在线观看一区二区三区| 偷偷要91色婷婷| 欧美日韩午夜在线| 一区二区三区.www| 色狠狠一区二区三区香蕉| 国产精品理伦片| 成人丝袜高跟foot| 日本一区二区三区国色天香 | 国产午夜精品一区二区三区嫩草| 免费在线观看视频一区| 欧美一区二区三区四区久久| 性久久久久久久| 欧美人牲a欧美精品| 免费人成精品欧美精品| 欧美一区二区三区在| 国产美女主播视频一区| 精品欧美乱码久久久久久| 麻豆精品国产传媒mv男同| 精品免费一区二区三区| 久久99精品国产91久久来源| 久久久久久久精| 不卡av电影在线播放| ●精品国产综合乱码久久久久| 99久久综合精品| 夜夜揉揉日日人人青青一国产精品| 欧美视频在线不卡| 免费不卡在线观看| 欧美激情一二三区| 欧美三级日韩三级| 久久成人免费日本黄色| 国产精品视频免费| 欧美一区二区三区人| 成人99免费视频| 久久精品99国产精品|