?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/uartsw2conf.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>uartsw2conf.h</h1><a href="uartsw2conf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file uartsw2conf.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 : 'uartsw2conf.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-2003</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.6</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 2 Output Capture for transmit timing</span>
28 00019 <span class="comment">// -Timer 0 Output Capture for receive timing</span>
29 00020 <span class="comment">// -External Interrupt 2 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 interrupts from Timer0 and Timer2 can still</span>
33 00024 <span class="comment">// be used for other timing, but the prescalers for these timers must not be</span>
34 00025 <span class="comment">// changed.</span>
35 00026 <span class="comment">//</span>
36 00027 <span class="comment">// Serial output from this UART can be routed to any I/O pin. Serial input</span>
37 00028 <span class="comment">// for this UART must come from the External Interrupt 2 (INT2) I/O pin.</span>
38 00029 <span class="comment">// These options should be configured by editing your local copy of</span>
39 00030 <span class="comment">// "uartsw2conf.h".</span>
40 00031 <span class="comment">//</span>
41 00032 <span class="comment">// This code is distributed under the GNU Public License</span>
42 00033 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span>
43 00034 <span class="comment">//</span>
44 00035 <span class="comment">//*****************************************************************************</span>
45 00036
46 00037 <span class="preprocessor">#ifndef UARTSW2CONF_H</span>
47 00038 <span class="preprocessor"></span><span class="preprocessor">#define UARTSW2CONF_H</span>
48 00039 <span class="preprocessor"></span>
49 00040 <span class="comment">// constants/macros/typdefs</span>
50 00041
51 <a name="l00042"></a><a class="code" href="uartsw2conf_8h.html#a0">00042</a> <span class="preprocessor">#define UARTSW_RX_BUFFER_SIZE 0x20 </span><span class="comment">///&lt; UART receive buffer size in bytes</span>
52 00043 <span class="comment"></span>
53 <a name="l00044"></a><a class="code" href="uartsw2conf_8h.html#a1">00044</a> <span class="preprocessor">#define UARTSW_INVERT </span><span class="comment">///&lt; define to invert polarity of RX/TX signals</span>
54 00045 <span class="comment"></span>// when non-inverted, the serial line is appropriate for passing though
55 00046 <span class="comment">// an RS232 driver like the MAX232. When inverted, the serial line can</span>
56 00047 <span class="comment">// directly drive/receive RS232 signals to/from a DB9 connector. Be sure</span>
57 00048 <span class="comment">// to use a current-limiting resistor and perhaps a diode-clamp circuit when</span>
58 00049 <span class="comment">// connecting incoming RS232 signals to a microprocessor I/O pin.</span>
59 00050
60 00051 <span class="comment">// if non-inverted, the serial line idles high (logic 1) between bytes</span>
61 00052 <span class="comment">// if inverted, the serial line idles low (logic 0) between bytes</span>
62 00053
63 00054
64 00055 <span class="comment">// UART transmit pin defines</span>
65 <a name="l00056"></a><a class="code" href="uartsw2conf_8h.html#a2">00056</a> <span class="preprocessor">#define UARTSW_TX_PORT PORTB </span><span class="comment">///&lt; UART Transmit Port</span>
66 <a name="l00057"></a><a class="code" href="uartsw2conf_8h.html#a3">00057</a> <span class="comment"></span>#define UARTSW_TX_DDR DDRB <span class="comment">///&lt; UART Transmit DDR</span>
67 <a name="l00058"></a><a class="code" href="uartsw2conf_8h.html#a4">00058</a> <span class="comment"></span>#define UARTSW_TX_PIN PB3 <span class="comment">///&lt; UART Transmit Pin</span>
68 00059 <span class="comment"></span>
69 00060 <span class="comment">// UART receive pin defines</span>
70 00061 <span class="comment">// This pin must correspond to the</span>
71 00062 <span class="comment">// External Interrupt 2 (INT2) pin for your processor</span>
72 <a name="l00063"></a><a class="code" href="uartsw2conf_8h.html#a5">00063</a> <span class="preprocessor">#define UARTSW_RX_PORT PORTB </span><span class="comment">///&lt; UART Receive Port</span>
73 <a name="l00064"></a><a class="code" href="uartsw2conf_8h.html#a6">00064</a> <span class="comment"></span>#define UARTSW_RX_DDR DDRB <span class="comment">///&lt; UART Receive DDR</span>
74 <a name="l00065"></a><a class="code" href="uartsw2conf_8h.html#a7">00065</a> <span class="comment"></span>#define UARTSW_RX_PORTIN PINB <span class="comment">///&lt; UART Receive Port Input</span>
75 <a name="l00066"></a><a class="code" href="uartsw2conf_8h.html#a8">00066</a> <span class="comment"></span>#define UARTSW_RX_PIN PB2 <span class="comment">///&lt; UART Receive Pin</span>
76 00067 <span class="comment"></span>
77 00068 <span class="preprocessor">#endif</span>
78 </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:06 2006 for Procyon AVRlib by&nbsp;
79 <a href="http://www.doxygen.org/index.html">
80 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
81 </body>
82 </html>
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3