From 3547b1d5ae2deaf910e4c696c364e85957ef68eb Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 8 Jul 2016 09:26:45 +0000 Subject: [PATCH] runtime: update ppp code for lwip 2.0.0. Fixes #499. --- artiq/runtime/main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/artiq/runtime/main.c b/artiq/runtime/main.c index 2248dd5d5..72f9ee5ce 100644 --- a/artiq/runtime/main.c +++ b/artiq/runtime/main.c @@ -22,7 +22,6 @@ #else #include #include -#include #endif #include "bridge_ctl.h" @@ -149,6 +148,13 @@ static void network_init(void) static int ppp_connected; +static u32_t ppp_output_cb(ppp_pcb *pcb, u8_t *data, u32_t len, void *ctx) +{ + for(int i = 0; i < len; i++) + uart_write(data[i]); + return len; +} + static void ppp_status_cb(ppp_pcb *pcb, int err_code, void *ctx) { if (err_code == PPPERR_NONE) { @@ -161,21 +167,12 @@ static void ppp_status_cb(ppp_pcb *pcb, int err_code, void *ctx) } } -u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len) -{ - int i; - - for(i=0;i