?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/uartswconf.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>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>
00002 <span class="comment">//*****************************************************************************</span>
00003 <span class="comment">//</span>
00004 <span class="comment">// File Name : 'uartswconf.h'</span>
00005 <span class="comment">// Title : Interrupt-driven Software UART Driver Configuration</span>
00006 <span class="comment">// Author : Pascal Stang - Copyright (C) 2002-2004</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.1</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 1 Output Compare A for transmit timing</span>
00019 <span class="comment">// -Timer 1 Output Compare B for receive timing</span>
00020 <span class="comment">// -Timer 1 Input Capture 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 interrupt from Timer1 can still be used for</span>
00024 <span class="comment">// other timing, but the prescaler for Timer1 must not be changed.</span>
00025 <span class="comment">//</span>
00026 <span class="comment">// Serial output from this UART can be routed to any I/O pin. Serial input</span>
00027 <span class="comment">// for this UART must come from the Timer1 Input Capture (IC1) I/O pin.</span>
00028 <span class="comment">// These options should be configured by editing your local copy of</span>
00029 <span class="comment">// "uartswconf.h".</span>
00030 <span class="comment">//</span>
00031 <span class="comment">// This code is distributed under the GNU Public License</span>
00032 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span>
00033 <span class="comment">//</span>
00034 <span class="comment">//*****************************************************************************</span>
00035
00036 <span class="preprocessor">#ifndef UARTSWCONF_H</span>
00037 <span class="preprocessor"></span><span class="preprocessor">#define UARTSWCONF_H</span>
00038 <span class="preprocessor"></span>
00039 <span class="comment">// constants/macros/typdefs</span>
00040
<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">///< UART receive buffer size in bytes</span>
00042 <span class="comment"></span>
<a name="l00043"></a><a class="code" href="uartswconf_8h.html#a1">00043</a> <span class="preprocessor">#define UARTSW_INVERT </span><span class="comment">///< define to invert polarity of RX/TX signals</span>
00044 <span class="comment"></span>// when non-inverted, the serial line is appropriate for passing though
00045 <span class="comment">// an RS232 driver like the MAX232. When inverted, the serial line can</span>
00046 <span class="comment">// directly drive/receive RS232 signals to/from a DB9 connector. Be sure</span>
00047 <span class="comment">// to use a current-limiting resistor and perhaps a diode-clamp circuit when</span>
00048 <span class="comment">// connecting incoming RS232 signals to a microprocessor I/O pin.</span>
00049
00050 <span class="comment">// if non-inverted, the serial line idles high (logic 1) between bytes</span>
00051 <span class="comment">// if inverted, the serial line idles low (logic 0) between bytes</span>
00052
00053
00054 <span class="comment">// UART transmit pin defines</span>
<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">///< UART Transmit Port</span>
<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">///< UART Transmit DDR</span>
<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">///< UART Transmit Pin</span>
00058 <span class="comment"></span>
00059 <span class="comment">// UART receive pin defines</span>
00060 <span class="comment">// This pin must correspond to the</span>
00061 <span class="comment">// Timer1 Input Capture (ICP or IC1) pin for your processor</span>
<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">///< UART Receive Port</span>
<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">///< UART Receive DDR</span>
<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">///< UART Receive Port Input</span>
<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">///< UART Receive Pin</span>
00066 <span class="comment"></span>
00067 <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