Add 921600 baud to slip options, fix compiler warnings

This commit is contained in:
David Kopf 2012-01-08 13:33:40 -05:00
parent 3d388760c3
commit 777cc88872
4 changed files with 9 additions and 2 deletions

View file

@ -75,7 +75,7 @@ void packet_sent(uint8_t sessionid, uint8_t status, uint8_t tx)
packetbuf_attr_copyfrom(callback->attrs, callback->addrs);
mac_call_sent_callback(callback->cback, callback->ptr, status, tx);
} else {
printf("*** ERROR: too high session id %d\n", sessionid);
PRINTF("*** ERROR: too high session id %d\n", sessionid);
}
}
/*---------------------------------------------------------------------------*/

View file

@ -39,6 +39,7 @@
#include "contiki.h"
#include "net/uip.h"
#include <stdio.h>
int border_router_cmd_handler(const uint8_t *data, int len);
int slip_config_handle_arguments(int argc, char **argv);

View file

@ -117,7 +117,7 @@ slip_config_handle_arguments(int argc, char **argv)
fprintf(stderr,"usage: %s [options] ipaddress\n", prog);
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 aaaa::1/64\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," -L Log output format (adds time stamps)\n");
fprintf(stderr," -s siodev Serial device (default /dev/ttyUSB0)\n");
@ -163,6 +163,9 @@ exit(1);
case 115200:
slip_config_b_rate = B115200;
break;
case 921600:
slip_config_b_rate = B921600;
break;
default:
err(1, "unknown baudrate %d", baudrate);
break;

View file

@ -156,6 +156,9 @@ slip_input_callback(void)
static void
init(void)
{
#ifndef BAUD2UBR
#define BAUD2UBR(baud) baud
#endif
slip_arch_init(BAUD2UBR(115200));
process_start(&slip_process, NULL);
slip_set_input_callback(slip_input_callback);