Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

ppp_hdlc.c File Reference

ppp_hdlc.c File Reference

PPP HDLC driver. More...

Go to the source code of this file.

Functions

error_t pppHdlcDriverInit (NetInterface *interface)
 PPP HDLC driver initialization.
void pppHdlcDriverTick (NetInterface *interface)
 PPP HDLC driver timer handler.
void pppHdlcDriverEnableIrq (NetInterface *interface)
 Enable interrupts.
void pppHdlcDriverDisableIrq (NetInterface *interface)
 Disable interrupts.
void pppHdlcDriverEventHandler (NetInterface *interface)
 PPP HDLC driver event handler.
error_t pppHdlcDriverSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset)
 Send a packet.
error_t pppHdlcDriverReceivePacket (NetInterface *interface)
 Receive a packet.
error_t pppHdlcDriverSetMulticastFilter (NetInterface *interface)
 Configure multicast MAC address filtering.
error_t pppHdlcDriverSendAtCommand (NetInterface *interface, const char_t *data)
 Send AT command.
error_t pppHdlcDriverReceiveAtCommand (NetInterface *interface, char_t *data, size_t size)
 Wait for an incoming AT command.
error_t pppHdlcDriverPurgeTxBuffer (PppContext *context)
 Purge TX buffer.
error_t pppHdlcDriverPurgeRxBuffer (PppContext *context)
 Purge RX buffer.
void pppHdlcDriverWriteTxQueue (PppContext *context, uint8_t c)
 Write TX queue.
uint8_t pppHdlcDriverReadRxQueue (PppContext *context)
 Read RX queue.
bool_t pppHdlcDriverReadTxQueue (NetInterface *interface, int_t *c)
 Read TX queue.
bool_t pppHdlcDriverWriteRxQueue (NetInterface *interface, uint8_t c)
 Write RX queue.

Variables

const NicDriver pppHdlcDriver
 PPP HDLC driver.

Detailed Description

PPP HDLC driver.

License

Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author:
Oryx Embedded SARL (www.oryx-embedded.com)
Version:
1.7.6

Definition in file ppp_hdlc.c.


Function Documentation

void pppHdlcDriverDisableIrq ( NetInterface *  interface )

Disable interrupts.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 135 of file ppp_hdlc.c.

void pppHdlcDriverEnableIrq ( NetInterface *  interface )

Enable interrupts.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 123 of file ppp_hdlc.c.

void pppHdlcDriverEventHandler ( NetInterface *  interface )

PPP HDLC driver event handler.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 146 of file ppp_hdlc.c.

error_t pppHdlcDriverInit ( NetInterface *  interface )

PPP HDLC driver initialization.

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 74 of file ppp_hdlc.c.

error_t pppHdlcDriverPurgeRxBuffer ( PppContext *  context )

Purge RX buffer.

Parameters:
[in]contextPointer to the PPP context
Returns:
Error code

Definition at line 528 of file ppp_hdlc.c.

error_t pppHdlcDriverPurgeTxBuffer ( PppContext *  context )

Purge TX buffer.

Parameters:
[in]contextPointer to the PPP context
Returns:
Error code

Definition at line 504 of file ppp_hdlc.c.

uint8_t pppHdlcDriverReadRxQueue ( PppContext *  context )

Read RX queue.

Parameters:
[in]contextPointer to the PPP context
Returns:
Character read from the queue

Definition at line 577 of file ppp_hdlc.c.

bool_t pppHdlcDriverReadTxQueue ( NetInterface *  interface,
int_t *  c 
)

Read TX queue.

Parameters:
[in]interfaceUnderlying network interface
[out]cCharacter read from the queue
Returns:
TRUE if a context switch is required

Definition at line 607 of file ppp_hdlc.c.

error_t pppHdlcDriverReceiveAtCommand ( NetInterface *  interface,
char_t *  data,
size_t  size 
)

Wait for an incoming AT command.

Parameters:
[in]interfaceUnderlying network interface
[out]dataBuffer where to store the incoming AT command
[in]sizeSize of the buffer, in bytes
Returns:
Error code

Definition at line 421 of file ppp_hdlc.c.

error_t pppHdlcDriverReceivePacket ( NetInterface *  interface )

Receive a packet.

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 290 of file ppp_hdlc.c.

error_t pppHdlcDriverSendAtCommand ( NetInterface *  interface,
const char_t *  data 
)

Send AT command.

Parameters:
[in]interfaceUnderlying network interface
[in]dataNULL-terminated string that contains the AT command to be sent
Returns:
Error code

Definition at line 386 of file ppp_hdlc.c.

error_t pppHdlcDriverSendPacket ( NetInterface *  interface,
const NetBuffer buffer,
size_t  offset 
)

Send a packet.

Parameters:
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
Returns:
Error code

Definition at line 181 of file ppp_hdlc.c.

error_t pppHdlcDriverSetMulticastFilter ( NetInterface *  interface )

Configure multicast MAC address filtering.

Parameters:
[in]interfaceUnderlying network interface
Returns:
Error code

Definition at line 372 of file ppp_hdlc.c.

void pppHdlcDriverTick ( NetInterface *  interface )

PPP HDLC driver timer handler.

This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state

Parameters:
[in]interfaceUnderlying network interface

Definition at line 113 of file ppp_hdlc.c.

bool_t pppHdlcDriverWriteRxQueue ( NetInterface *  interface,
uint8_t  c 
)

Write RX queue.

Parameters:
[in]interfaceUnderlying network interface
[in]cCharacter to be written
Returns:
TRUE if a context switch is required

Definition at line 654 of file ppp_hdlc.c.

void pppHdlcDriverWriteTxQueue ( PppContext *  context,
uint8_t  c 
)

Write TX queue.

Parameters:
[in]contextPointer to the PPP context
[in]cCharacter to be written

Definition at line 553 of file ppp_hdlc.c.


Variable Documentation

Initial value:

PPP HDLC driver.

Definition at line 47 of file ppp_hdlc.c.