Imprvove code style
This commit is contained in:
parent
626957c3ef
commit
6a5136ac76
|
@ -51,7 +51,7 @@
|
||||||
#include "net/netstack.h"
|
#include "net/netstack.h"
|
||||||
#include "dev/button-sensor.h"
|
#include "dev/button-sensor.h"
|
||||||
#include "dev/slip.h"
|
#include "dev/slip.h"
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -62,9 +62,9 @@
|
||||||
|
|
||||||
static uip_ipaddr_t prefix;
|
static uip_ipaddr_t prefix;
|
||||||
static uint8_t prefix_set;
|
static uint8_t prefix_set;
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
PROCESS(border_router_process, "Border router process");
|
PROCESS(border_router_process, "Border router process");
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
#if BORDER_ROUTER_CONF_WEBSERVER
|
#if BORDER_ROUTER_CONF_WEBSERVER
|
||||||
/* Use simple webserver with only one page for minimum footprint.
|
/* Use simple webserver with only one page for minimum footprint.
|
||||||
* Multiple connections can result in interleaved tcp segments since
|
* Multiple connections can result in interleaved tcp segments since
|
||||||
|
|
|
@ -55,7 +55,7 @@ static uip_ipaddr_t last_sender;
|
||||||
static void
|
static void
|
||||||
slip_input_callback(void)
|
slip_input_callback(void)
|
||||||
{
|
{
|
||||||
// PRINTF("SIN: %u\n", uip_len);
|
PRINTF("SIN: %u\n", uip_len);
|
||||||
if(uip_buf[0] == '!') {
|
if(uip_buf[0] == '!') {
|
||||||
PRINTF("Got configuration message of type %c\n", uip_buf[1]);
|
PRINTF("Got configuration message of type %c\n", uip_buf[1]);
|
||||||
uip_clear_buf();
|
uip_clear_buf();
|
||||||
|
@ -69,10 +69,10 @@ slip_input_callback(void)
|
||||||
PRINTF("\n");
|
PRINTF("\n");
|
||||||
set_prefix_64(&prefix);
|
set_prefix_64(&prefix);
|
||||||
}
|
}
|
||||||
} else if (uip_buf[0] == '?') {
|
} else if(uip_buf[0] == '?') {
|
||||||
PRINTF("Got request message of type %c\n", uip_buf[1]);
|
PRINTF("Got request message of type %c\n", uip_buf[1]);
|
||||||
if(uip_buf[1] == 'M') {
|
if(uip_buf[1] == 'M') {
|
||||||
char* hexchar = "0123456789abcdef";
|
char *hexchar = "0123456789abcdef";
|
||||||
int j;
|
int j;
|
||||||
/* this is just a test so far... just to see if it works */
|
/* this is just a test so far... just to see if it works */
|
||||||
uip_buf[0] = '!';
|
uip_buf[0] = '!';
|
||||||
|
@ -82,7 +82,6 @@ slip_input_callback(void)
|
||||||
}
|
}
|
||||||
uip_len = 18;
|
uip_len = 18;
|
||||||
slip_send();
|
slip_send();
|
||||||
|
|
||||||
}
|
}
|
||||||
uip_clear_buf();
|
uip_clear_buf();
|
||||||
}
|
}
|
||||||
|
@ -111,12 +110,11 @@ output(void)
|
||||||
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
PRINT6ADDR(&UIP_IP_BUF->destipaddr);
|
||||||
PRINTF("\n");
|
PRINTF("\n");
|
||||||
} else {
|
} else {
|
||||||
// PRINTF("SUT: %u\n", uip_len);
|
PRINTF("SUT: %u\n", uip_len);
|
||||||
slip_send();
|
slip_send();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#if !SLIP_BRIDGE_CONF_NO_PUTCHAR
|
#if !SLIP_BRIDGE_CONF_NO_PUTCHAR
|
||||||
#undef putchar
|
#undef putchar
|
||||||
|
|
Loading…
Reference in New Issue