mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-18 07:56:30 +08:00
runtime: upgrade lwip to release 2.0.0.
This commit is contained in:
parent
b5a684830d
commit
4c94873560
@ -21,17 +21,17 @@ COREFILES=core/mem.c \
|
||||
core/tcp_out.c \
|
||||
core/udp.c \
|
||||
core/inet_chksum.c \
|
||||
core/timers.c \
|
||||
core/timeouts.c \
|
||||
core/init.c
|
||||
|
||||
CORE4FILES=core/ipv4/icmp.c \
|
||||
CORE4FILES=core/ipv4/etharp.c \
|
||||
core/ipv4/icmp.c \
|
||||
core/ipv4/ip4.c \
|
||||
core/ipv4/ip4_addr.c \
|
||||
core/ipv4/ip_frag.c
|
||||
core/ipv4/ip4_frag.c
|
||||
|
||||
# NETIFFILES: Files implementing various generic network interface functions.
|
||||
NETIFFILES=netif/etharp.c \
|
||||
netif/ethernet.c
|
||||
NETIFFILES=netif/ethernet.c
|
||||
|
||||
PPPFILES=netif/ppp/auth.c \
|
||||
netif/ppp/fsm.c \
|
||||
|
@ -6,33 +6,8 @@
|
||||
#define __ARCH_CC_H__
|
||||
|
||||
/* Include some files for defining library routines */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
|
||||
/* Define generic types */
|
||||
typedef unsigned char u8_t;
|
||||
typedef signed char s8_t;
|
||||
typedef unsigned short u16_t;
|
||||
typedef signed short s16_t;
|
||||
typedef unsigned long u32_t;
|
||||
typedef signed long s32_t;
|
||||
|
||||
typedef u32_t mem_ptr_t;
|
||||
|
||||
/* Define (sn)printf formatters for these types */
|
||||
#define U8_F "c"
|
||||
#define S8_F "c"
|
||||
#define X8_F "x"
|
||||
#define U16_F "u"
|
||||
#define S16_F "d"
|
||||
#define X16_F "x"
|
||||
#define U32_F "u"
|
||||
#define S32_F "d"
|
||||
#define X32_F "x"
|
||||
|
||||
/* Compiler hints for packing structures */
|
||||
#define PACK_STRUCT_FIELD(x) x
|
||||
#define PACK_STRUCT_STRUCT __attribute__((packed))
|
||||
|
@ -1,20 +0,0 @@
|
||||
// This file is Copyright (c) 2015 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||
// LiteETH lwIP port for ARTIQ
|
||||
// License: BSD
|
||||
|
||||
#ifndef __ARCH_SYS_ARCH_H__
|
||||
#define __ARCH_SYS_ARCH_H__
|
||||
|
||||
#define SYS_MBOX_NULL NULL
|
||||
#define SYS_SEM_NULL NULL
|
||||
|
||||
typedef void * sys_prot_t;
|
||||
|
||||
typedef void * sys_sem_t;
|
||||
|
||||
typedef void * sys_mbox_t;
|
||||
|
||||
typedef void * sys_thread_t;
|
||||
|
||||
#endif /* __ARCH_SYS_ARCH_H__ */
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
#define LWIP_CALLBACK_API 1
|
||||
|
||||
#define SYS_LIGHTWEIGHT_PROT 0
|
||||
|
||||
/* -------- TCP Timer Intervals ------- */
|
||||
#define TCP_TMR_INTERVAL 1 /* The TCP timer interval in
|
||||
milliseconds. */
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 33955c636d17bee230cde746a92e1cff11a7a177
|
||||
Subproject commit 216bf89491815029aa15463a18744afa04df58fe
|
@ -9,13 +9,10 @@
|
||||
#include <hw/flags.h>
|
||||
|
||||
#include <lwip/init.h>
|
||||
#include <lwip/memp.h>
|
||||
#include <lwip/ip4_addr.h>
|
||||
#include <lwip/ip4.h>
|
||||
#include <lwip/netif.h>
|
||||
#include <lwip/sys.h>
|
||||
#include <lwip/timeouts.h>
|
||||
#include <lwip/tcp.h>
|
||||
#include <lwip/timers.h>
|
||||
#ifdef CSR_ETHMAC_BASE
|
||||
#include <netif/etharp.h>
|
||||
#include <liteethif.h>
|
||||
@ -32,6 +29,7 @@ static struct netif netif;
|
||||
static ppp_pcb *ppp;
|
||||
#endif
|
||||
|
||||
void lwip_service(void);
|
||||
void lwip_service(void)
|
||||
{
|
||||
sys_check_timeouts();
|
||||
@ -107,6 +105,7 @@ static void fsip_or_default(struct ip4_addr *d, char *key, int i1, int i2, int i
|
||||
#endif
|
||||
}
|
||||
|
||||
void network_init(void);
|
||||
void network_init(void)
|
||||
{
|
||||
struct ip4_addr local_ip;
|
||||
@ -169,14 +168,17 @@ extern void _fheap, _eheap;
|
||||
|
||||
extern void rust_main();
|
||||
|
||||
u16_t tcp_sndbuf_(struct tcp_pcb *pcb);
|
||||
u16_t tcp_sndbuf_(struct tcp_pcb *pcb) {
|
||||
return tcp_sndbuf(pcb);
|
||||
}
|
||||
|
||||
u8_t* tcp_so_options_(struct tcp_pcb *pcb);
|
||||
u8_t* tcp_so_options_(struct tcp_pcb *pcb) {
|
||||
return &pcb->so_options;
|
||||
}
|
||||
|
||||
void tcp_nagle_disable_(struct tcp_pcb *pcb);
|
||||
void tcp_nagle_disable_(struct tcp_pcb *pcb) {
|
||||
tcp_nagle_disable(pcb);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user