mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-26 16:12:55 +00:00
Allocate PBUF_POOL_BUFSIZE at once not harcoded 128.Init MTU for slip - 1500 for
now needs a SLIP_MTU in opts (later).Add prototypes for low level sio callbacks.
This commit is contained in:
parent
6dd350348d
commit
a071cbf86c
@ -50,6 +50,11 @@
|
|||||||
|
|
||||||
#define MAX_SIZE 1500
|
#define MAX_SIZE 1500
|
||||||
|
|
||||||
|
/* Low level serial functions */
|
||||||
|
extern void sio_send(u8_t, void*);
|
||||||
|
extern u8_t sio_recv(void *);
|
||||||
|
extern void * sio_open(u8_t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a pbuf doing the necessary SLIP encapsulation
|
* Send a pbuf doing the necessary SLIP encapsulation
|
||||||
*
|
*
|
||||||
@ -138,7 +143,7 @@ slipif_input( struct netif * netif )
|
|||||||
default:
|
default:
|
||||||
if(p == NULL) {
|
if(p == NULL) {
|
||||||
DEBUGF(SLIP_DEBUG, ("slipif_input: alloc\n"));
|
DEBUGF(SLIP_DEBUG, ("slipif_input: alloc\n"));
|
||||||
p = pbuf_alloc(PBUF_LINK, 128, PBUF_POOL);
|
p = pbuf_alloc(PBUF_LINK, PBUF_POOL_BUFSIZE, PBUF_POOL);
|
||||||
|
|
||||||
#ifdef LINK_STATS
|
#ifdef LINK_STATS
|
||||||
if(p == NULL) {
|
if(p == NULL) {
|
||||||
@ -201,6 +206,7 @@ slipif_init(struct netif *netif)
|
|||||||
netif->name[0] = 's';
|
netif->name[0] = 's';
|
||||||
netif->name[1] = 'l';
|
netif->name[1] = 'l';
|
||||||
netif->output = slipif_output;
|
netif->output = slipif_output;
|
||||||
|
netif->mtu = 1500;
|
||||||
|
|
||||||
netif->state = sio_open(netif->num);
|
netif->state = sio_open(netif->num);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user