?lang_form?
?lang_select?
?lang_submit?
?lang_endform?
{HEADER END}
{FILE START}
library
?curdirlinks? - Rev 6
?prevdifflink? - Blame - ?getfile?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Procyon AVRlib: conf/uartsw2conf.h Source File</title>
<link href="dox.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">conf</a></div>
<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>
00002 <span class="comment">//*****************************************************************************</span>
00003 <span class="comment">//</span>
00004 <span class="comment">// File Name : 'uartsw2conf.h'</span>
00005 <span class="comment">// Title : Interrupt-driven Software UART Driver Configuration</span>
00006 <span class="comment">// Author : Pascal Stang - Copyright (C) 2002-2003</span>
00007 <span class="comment">// Created : 7/20/2002</span>
00008 <span class="comment">// Revised : 4/27/2004</span>
00009 <span class="comment">// Version : 0.6</span>
00010 <span class="comment">// Target MCU : Atmel AVR Series (intended for the ATmega16 and ATmega32)</span>
00011 <span class="comment">// Editor Tabs : 4</span>
00012 <span class="comment">//</span>
00013 <span class="comment">// Description :</span>
00014 <span class="comment">// This uart library emulates the operation of a UART (serial port) using</span>
00015 <span class="comment">// the AVR's hardware timers, I/O pins, and some software.</span>
00016 <span class="comment">//</span>
00017 <span class="comment">// Specifically, this code uses:</span>
00018 <span class="comment">// -Timer 2 Output Capture for transmit timing</span>
00019 <span class="comment">// -Timer 0 Output Capture for receive timing</span>
00020 <span class="comment">// -External Interrupt 2 for receive triggering</span>
00021 <span class="comment">//</span>
00022 <span class="comment">// The above resources cannot be used for other purposes while this software</span>
00023 <span class="comment">// UART is enabled. The overflow interrupts from Timer0 and Timer2 can still</span>
00024 <span class="comment">// be used for other timing, but the prescalers for these timers must not be</span>
00025 <span class="comment">// changed.</span>
00026 <span class="comment">//</span>
00027 <span class="comment">// Serial output from this UART can be routed to any I/O pin. Serial input</span>
00028 <span class="comment">// for this UART must come from the External Interrupt 2 (INT2) I/O pin.</span>
00029 <span class="comment">// These options should be configured by editing your local copy of</span>
00030 <span class="comment">// "uartsw2conf.h".</span>
00031 <span class="comment">//</span>
00032 <span class="comment">// This code is distributed under the GNU Public License</span>
00033 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span>
00034 <span class="comment">//</span>
00035 <span class="comment">//*****************************************************************************</span>
00036
00037 <span class="preprocessor">#ifndef UARTSW2CONF_H</span>
00038 <span class="preprocessor"></span><span class="preprocessor">#define UARTSW2CONF_H</span>
00039 <span class="preprocessor"></span>
00040 <span class="comment">// constants/macros/typdefs</span>
00041
<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">///< UART receive buffer size in bytes</span>
00043 <span class="comment"></span>
<a name="l00044"></a><a class="code" href="uartsw2conf_8h.html#a1">00044</a> <span class="preprocessor">#define UARTSW_INVERT </span><span class="comment">///< define to invert polarity of RX/TX signals</span>
00045 <span class="comment"></span>// when non-inverted, the serial line is appropriate for passing though
00046 <span class="comment">// an RS232 driver like the MAX232. When inverted, the serial line can</span>
00047 <span class="comment">// directly drive/receive RS232 signals to/from a DB9 connector. Be sure</span>
00048 <span class="comment">// to use a current-limiting resistor and perhaps a diode-clamp circuit when</span>
00049 <span class="comment">// connecting incoming RS232 signals to a microprocessor I/O pin.</span>
00050
00051 <span class="comment">// if non-inverted, the serial line idles high (logic 1) between bytes</span>
00052 <span class="comment">// if inverted, the serial line idles low (logic 0) between bytes</span>
00053
00054
00055 <span class="comment">// UART transmit pin defines</span>
<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">///< UART Transmit Port</span>
<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">///< UART Transmit DDR</span>
<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">///< UART Transmit Pin</span>
00059 <span class="comment"></span>
00060 <span class="comment">// UART receive pin defines</span>
00061 <span class="comment">// This pin must correspond to the</span>
00062 <span class="comment">// External Interrupt 2 (INT2) pin for your processor</span>
<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">///< UART Receive Port</span>
<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">///< UART Receive DDR</span>
<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">///< UART Receive Port Input</span>
<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">///< UART Receive Pin</span>
00067 <span class="comment"></span>
00068 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:06 2006 for Procyon AVRlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
|
{FILE END}
{FOOTER START}
Powered by WebSVN v2.8.3