slipdev.h

Go to the documentation of this file.
00001 /**
00002  * \addtogroup slip
00003  * @{
00004  */
00005 
00006 /**
00007  * \file
00008  * SLIP header file.
00009  * \author Adam Dunkels <adam@dunkels.com>
00010  */
00011 
00012 /*
00013  * Copyright (c) 2001, Adam Dunkels.
00014  * All rights reserved. 
00015  *
00016  * Redistribution and use in source and binary forms, with or without 
00017  * modification, are permitted provided that the following conditions 
00018  * are met: 
00019  * 1. Redistributions of source code must retain the above copyright 
00020  *    notice, this list of conditions and the following disclaimer. 
00021  * 2. Redistributions in binary form must reproduce the above copyright 
00022  *    notice, this list of conditions and the following disclaimer in the 
00023  *    documentation and/or other materials provided with the distribution. 
00024  * 3. The name of the author may not be used to endorse or promote
00025  *    products derived from this software without specific prior
00026  *    written permission.  
00027  *
00028  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
00029  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00030  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00032  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00034  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00035  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00036  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00037  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00038  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
00039  *
00040  * This file is part of the uIP TCP/IP stack.
00041  *
00042  * $Id: slipdev.h,v 1.2 2009/03/17 20:28:44 nvt-se Exp $
00043  *
00044  */
00045 
00046 #ifndef __SLIPDEV_H__
00047 #define __SLIPDEV_H__
00048 
00049 #include "uip.h"
00050 
00051 /**
00052  * Put a character on the serial device.
00053  *
00054  * This function is used by the SLIP implementation to put a character
00055  * on the serial device. It must be implemented specifically for the
00056  * system on which the SLIP implementation is to be run.
00057  *
00058  * \param c The character to be put on the serial device.
00059  */
00060 void slipdev_char_put(u8_t c);
00061 
00062 /**
00063  * Poll the serial device for a character.
00064  *
00065  * This function is used by the SLIP implementation to poll the serial
00066  * device for a character. It must be implemented specifically for the
00067  * system on which the SLIP implementation is to be run.
00068  *
00069  * The function should return immediately regardless if a character is
00070  * available or not. If a character is available it should be placed
00071  * at the memory location pointed to by the pointer supplied by the
00072  * argument c.
00073  *
00074  * \param c A pointer to a byte that is filled in by the function with
00075  * the received character, if available.
00076  *
00077  * \retval 0 If no character is available.
00078  * \retval Non-zero If a character is available.
00079  */
00080 u8_t slipdev_char_poll(u8_t *c);
00081 
00082 void slipdev_init(void);
00083 u8_t slipdev_send(void);
00084 u16_t slipdev_poll(void);
00085 
00086 #endif /* __SLIPDEV_H__ */
00087 
00088 /** @} */

Generated on Mon Apr 11 14:23:31 2011 for Contiki 2.5 by  doxygen 1.6.1