Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ppp_hdlc.h Source File

ppp_hdlc.h

Go to the documentation of this file.
00001 /**
00002  * @file ppp_hdlc.h
00003  * @brief PPP HDLC driver
00004  *
00005  * @section License
00006  *
00007  * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
00008  *
00009  * This file is part of CycloneTCP Open.
00010  *
00011  * This program is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU General Public License
00013  * as published by the Free Software Foundation; either version 2
00014  * of the License, or (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software Foundation,
00023  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00024  *
00025  * @author Oryx Embedded SARL (www.oryx-embedded.com)
00026  * @version 1.7.6
00027  **/
00028 
00029 #ifndef _PPP_HDLC_H
00030 #define _PPP_HDLC_H
00031 
00032 //Dependencies
00033 #include "core/nic.h"
00034 
00035 //PPP HDLC driver
00036 extern const NicDriver pppHdlcDriver;
00037 
00038 //PPP HDLC driver related functions
00039 error_t pppHdlcDriverInit(NetInterface *interface);
00040 
00041 void pppHdlcDriverTick(NetInterface *interface);
00042 
00043 void pppHdlcDriverEnableIrq(NetInterface *interface);
00044 void pppHdlcDriverDisableIrq(NetInterface *interface);
00045 void pppHdlcDriverEventHandler(NetInterface *interface);
00046 
00047 error_t pppHdlcDriverSendPacket(NetInterface *interface,
00048    const NetBuffer *buffer, size_t offset);
00049 
00050 error_t pppHdlcDriverReceivePacket(NetInterface *interface);
00051 
00052 error_t pppHdlcDriverSetMulticastFilter(NetInterface *interface);
00053 
00054 error_t pppHdlcDriverSendAtCommand(NetInterface *interface, const char_t *data);
00055 error_t pppHdlcDriverReceiveAtCommand(NetInterface *interface, char_t *data, size_t size);
00056 
00057 error_t pppHdlcDriverPurgeTxBuffer(PppContext *context);
00058 error_t pppHdlcDriverPurgeRxBuffer(PppContext *context);
00059 
00060 void pppHdlcDriverWriteTxQueue(PppContext *context, uint8_t c);
00061 uint8_t pppHdlcDriverReadRxQueue(PppContext *context);
00062 
00063 bool_t pppHdlcDriverReadTxQueue(NetInterface *interface, int_t *c);
00064 bool_t pppHdlcDriverWriteRxQueue(NetInterface *interface, uint8_t c);
00065 
00066 #endif
00067