?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 6

Line No. Rev Author Line
1 6 kaklik <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>Procyon AVRlib: conf/uartswconf.h Source File</title>
4 <link href="dox.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.4.2 -->
7 <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
8 <div class="nav">
9 <a class="el" href="dir_000000.html">conf</a></div>
10 <h1>uartswconf.h</h1><a href="uartswconf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file uartswconf.h \brief Interrupt-driven Software UART Driver Configuration. */</span>
11 00002 <span class="comment">//*****************************************************************************</span>
12 00003 <span class="comment">//</span>
13 00004 <span class="comment">// File Name : 'uartswconf.h'</span>
14 00005 <span class="comment">// Title : Interrupt-driven Software UART Driver Configuration</span>
15 00006 <span class="comment">// Author : Pascal Stang - Copyright (C) 2002-2004</span>
16 00007 <span class="comment">// Created : 7/20/2002</span>
17 00008 <span class="comment">// Revised : 4/27/2004</span>
18 00009 <span class="comment">// Version : 0.1</span>
19 00010 <span class="comment">// Target MCU : Atmel AVR Series (intended for the ATmega16 and ATmega32)</span>
20 00011 <span class="comment">// Editor Tabs : 4</span>
21 00012 <span class="comment">//</span>
22 00013 <span class="comment">// Description :</span>
23 00014 <span class="comment">// This uart library emulates the operation of a UART (serial port) using</span>
24 00015 <span class="comment">// the AVR's hardware timers, I/O pins, and some software.</span>
25 00016 <span class="comment">//</span>
26 00017 <span class="comment">// Specifically, this code uses:</span>
27 00018 <span class="comment">// -Timer 1 Output Compare A for transmit timing</span>
28 00019 <span class="comment">// -Timer 1 Output Compare B for receive timing</span>
29 00020 <span class="comment">// -Timer 1 Input Capture for receive triggering</span>
30 00021 <span class="comment">//</span>
31 00022 <span class="comment">// The above resources cannot be used for other purposes while this software</span>
32 00023 <span class="comment">// UART is enabled. The overflow interrupt from Timer1 can still be used for</span>
33 00024 <span class="comment">// other timing, but the prescaler for Timer1 must not be changed.</span>
34 00025 <span class="comment">//</span>
35 00026 <span class="comment">// Serial output from this UART can be routed to any I/O pin. Serial input</span>
36 00027 <span class="comment">// for this UART must come from the Timer1 Input Capture (IC1) I/O pin.</span>
37 00028 <span class="comment">// These options should be configured by editing your local copy of</span>
38 00029 <span class="comment">// "uartswconf.h".</span>
39 00030 <span class="comment">//</span>
40 00031 <span class="comment">// This code is distributed under the GNU Public License</span>
41 00032 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span>
42 00033 <span class="comment">//</span>
43 00034 <span class="comment">//*****************************************************************************</span>
44 00035
45 00036 <span class="preprocessor">#ifndef UARTSWCONF_H</span>
46 00037 <span class="preprocessor"></span><span class="preprocessor">#define UARTSWCONF_H</span>
47 00038 <span class="preprocessor"></span>
48 00039 <span class="comment">// constants/macros/typdefs</span>
49 00040
50 <a name="l00041"></a><a class="code" href="uartswconf_8h.html#a0">00041</a> <span class="preprocessor">#define UARTSW_RX_BUFFER_SIZE 0x20 </span><span class="comment">///&lt; UART receive buffer size in bytes</span>
51 00042 <span class="comment"></span>
52 <a name="l00043"></a><a class="code" href="uartswconf_8h.html#a1">00043</a> <span class="preprocessor">#define UARTSW_INVERT </span><span class="comment">///&lt; define to invert polarity of RX/TX signals</span>
53 00044 <span class="comment"></span>// when non-inverted, the serial line is appropriate for passing though
54 00045 <span class="comment">// an RS232 driver like the MAX232. When inverted, the serial line can</span>
55 00046 <span class="comment">// directly drive/receive RS232 signals to/from a DB9 connector. Be sure</span>
56 00047 <span class="comment">// to use a current-limiting resistor and perhaps a diode-clamp circuit when</span>
57 00048 <span class="comment">// connecting incoming RS232 signals to a microprocessor I/O pin.</span>
58 00049
59 00050 <span class="comment">// if non-inverted, the serial line idles high (logic 1) between bytes</span>
60 00051 <span class="comment">// if inverted, the serial line idles low (logic 0) between bytes</span>
61 00052
62 00053
63 00054 <span class="comment">// UART transmit pin defines</span>
64 <a name="l00055"></a><a class="code" href="uartswconf_8h.html#a2">00055</a> <span class="preprocessor">#define UARTSW_TX_PORT PORTD </span><span class="comment">///&lt; UART Transmit Port</span>
65 <a name="l00056"></a><a class="code" href="uartswconf_8h.html#a3">00056</a> <span class="comment"></span>#define UARTSW_TX_DDR DDRD <span class="comment">///&lt; UART Transmit DDR</span>
66 <a name="l00057"></a><a class="code" href="uartswconf_8h.html#a4">00057</a> <span class="comment"></span>#define UARTSW_TX_PIN PD5 <span class="comment">///&lt; UART Transmit Pin</span>
67 00058 <span class="comment"></span>
68 00059 <span class="comment">// UART receive pin defines</span>
69 00060 <span class="comment">// This pin must correspond to the</span>
70 00061 <span class="comment">// Timer1 Input Capture (ICP or IC1) pin for your processor</span>
71 <a name="l00062"></a><a class="code" href="uartswconf_8h.html#a5">00062</a> <span class="preprocessor">#define UARTSW_RX_PORT PORTD </span><span class="comment">///&lt; UART Receive Port</span>
72 <a name="l00063"></a><a class="code" href="uartswconf_8h.html#a6">00063</a> <span class="comment"></span>#define UARTSW_RX_DDR DDRD <span class="comment">///&lt; UART Receive DDR</span>
73 <a name="l00064"></a><a class="code" href="uartswconf_8h.html#a7">00064</a> <span class="comment"></span>#define UARTSW_RX_PORTIN PIND <span class="comment">///&lt; UART Receive Port Input</span>
74 <a name="l00065"></a><a class="code" href="uartswconf_8h.html#a8">00065</a> <span class="comment"></span>#define UARTSW_RX_PIN PD6 <span class="comment">///&lt; UART Receive Pin</span>
75 00066 <span class="comment"></span>
76 00067 <span class="preprocessor">#endif</span>
77 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:06 2006 for Procyon AVRlib by&nbsp;
78 <a href="http://www.doxygen.org/index.html">
79 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
80 </body>
81 </html>
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3