Contiki 2.6
|
00001 /* 00002 Copied from mc1322x/dev/cpu. 00003 00004 This file exists as a work-around for the hardware dependant calls 00005 to slip_arch_init. 00006 00007 Current the prototype for slip_arch_init is slip_arch_init(urb) 00008 00009 and a typical call is something like 00010 slip_arch_init(BAUD2URB(115200)) 00011 00012 BAUD2UBR is hardware specific, however. Furthermore, for the sky 00013 platform it's typically defined with #include "dev/uart1.h" (see 00014 rpl-boarder-router/slip-bridge.c), a sky specific file. dev/uart1.h 00015 includes msp430.h which includes the sky contiki-conf.h which 00016 defines BAUD2UBR. 00017 00018 To me, the correct think to pass is simply the baudrate and have the 00019 hardware specific conversion happen inside slip_arch_init. 00020 00021 Notably, most implementations just ignore the passed parameter 00022 anyway. (except AVR) 00023 00024 */ 00025 00026 #ifndef DEV_UART1_H 00027 #define DEV_UART1_H 00028 00029 #define BAUD2UBR(x) x 00030 00031 #endif