uart1.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2002 by egnite Software GmbH. All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. Neither the name of the copyright holders nor the names of
00014  *    contributors may be used to endorse or promote products derived
00015  *    from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00018  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00019  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00020  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00021  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00022  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00023  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00024  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00025  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00026  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00027  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00028  * SUCH DAMAGE.
00029  *
00030  * For additional information see http://www.ethernut.de/
00031  *
00032  */
00033 
00034 /*
00035  * $Log: uart1.c,v $
00036  * Revision 1.2  2005/08/02 17:46:45  haraldkipp
00037  * Major API documentation update.
00038  *
00039  * Revision 1.1  2005/07/26 18:02:40  haraldkipp
00040  * Moved from dev.
00041  *
00042  * Revision 1.3  2004/05/24 20:15:49  drsung
00043  * Added function UartAvrSize to return number of chars in input buffer.
00044  *
00045  * Revision 1.2  2004/03/18 14:01:53  haraldkipp
00046  * Deprecated header file removed
00047  *
00048  * Revision 1.1.1.1  2003/05/09 14:40:53  haraldkipp
00049  * Initial using 3.2.1
00050  *
00051  * Revision 1.4  2003/02/04 17:50:55  harald
00052  * Version 3 released
00053  *
00054  * Revision 1.3  2003/01/14 13:43:32  harald
00055  * Definintions were moved
00056  *
00057  * Revision 1.2  2002/06/26 17:29:08  harald
00058  * First pre-release with 2.4 stack
00059  *
00060  */
00061 
00062 #include <dev/uartavr.h>
00063 
00068 
00069 
00070 static UARTDCB dcb_uart1;
00071 static IFSTREAM ifs_uart1;
00072 
00076 NUTDEVICE devUart1 = {
00077     0,                          
00078     {'u', 'a', 'r', 't', '1', 0, 0, 0, 0},      
00079     IFTYP_STREAM,               
00080     1,                          
00081     0,                          
00082     &ifs_uart1,                 
00083     &dcb_uart1,                 
00084     UartAvrInit,                
00085     UartAvrIOCtl,               
00086     UartAvrRead,                
00087     UartAvrWrite,               
00088     UartAvrWrite_P,             
00089     UartAvrOpen,                
00090     UartAvrClose,               
00091     UartAvrSize                 
00092 };
00093 

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/