mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Add 921600 baud to slip options, fix compiler warnings
This commit is contained in:
parent
3d388760c3
commit
777cc88872
@ -75,7 +75,7 @@ void packet_sent(uint8_t sessionid, uint8_t status, uint8_t tx)
|
|||||||
packetbuf_attr_copyfrom(callback->attrs, callback->addrs);
|
packetbuf_attr_copyfrom(callback->attrs, callback->addrs);
|
||||||
mac_call_sent_callback(callback->cback, callback->ptr, status, tx);
|
mac_call_sent_callback(callback->cback, callback->ptr, status, tx);
|
||||||
} else {
|
} else {
|
||||||
printf("*** ERROR: too high session id %d\n", sessionid);
|
PRINTF("*** ERROR: too high session id %d\n", sessionid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
#include "contiki.h"
|
#include "contiki.h"
|
||||||
#include "net/uip.h"
|
#include "net/uip.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int border_router_cmd_handler(const uint8_t *data, int len);
|
int border_router_cmd_handler(const uint8_t *data, int len);
|
||||||
int slip_config_handle_arguments(int argc, char **argv);
|
int slip_config_handle_arguments(int argc, char **argv);
|
||||||
|
@ -117,7 +117,7 @@ slip_config_handle_arguments(int argc, char **argv)
|
|||||||
fprintf(stderr,"usage: %s [options] ipaddress\n", prog);
|
fprintf(stderr,"usage: %s [options] ipaddress\n", prog);
|
||||||
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 aaaa::1/64\n");
|
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 aaaa::1/64\n");
|
||||||
fprintf(stderr,"Options are:\n");
|
fprintf(stderr,"Options are:\n");
|
||||||
fprintf(stderr," -B baudrate 9600,19200,38400,57600,115200 (default)\n");
|
fprintf(stderr," -B baudrate 9600,19200,38400,57600,115200,921600 (default 115200)\n");
|
||||||
fprintf(stderr," -H Hardware CTS/RTS flow control (default disabled)\n");
|
fprintf(stderr," -H Hardware CTS/RTS flow control (default disabled)\n");
|
||||||
fprintf(stderr," -L Log output format (adds time stamps)\n");
|
fprintf(stderr," -L Log output format (adds time stamps)\n");
|
||||||
fprintf(stderr," -s siodev Serial device (default /dev/ttyUSB0)\n");
|
fprintf(stderr," -s siodev Serial device (default /dev/ttyUSB0)\n");
|
||||||
@ -163,6 +163,9 @@ exit(1);
|
|||||||
case 115200:
|
case 115200:
|
||||||
slip_config_b_rate = B115200;
|
slip_config_b_rate = B115200;
|
||||||
break;
|
break;
|
||||||
|
case 921600:
|
||||||
|
slip_config_b_rate = B921600;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
err(1, "unknown baudrate %d", baudrate);
|
err(1, "unknown baudrate %d", baudrate);
|
||||||
break;
|
break;
|
||||||
|
@ -156,6 +156,9 @@ slip_input_callback(void)
|
|||||||
static void
|
static void
|
||||||
init(void)
|
init(void)
|
||||||
{
|
{
|
||||||
|
#ifndef BAUD2UBR
|
||||||
|
#define BAUD2UBR(baud) baud
|
||||||
|
#endif
|
||||||
slip_arch_init(BAUD2UBR(115200));
|
slip_arch_init(BAUD2UBR(115200));
|
||||||
process_start(&slip_process, NULL);
|
process_start(&slip_process, NULL);
|
||||||
slip_set_input_callback(slip_input_callback);
|
slip_set_input_callback(slip_input_callback);
|
||||||
|
Loading…
Reference in New Issue
Block a user