diff --git a/cpu/avr/dev/rs232.c b/cpu/avr/dev/rs232.c index 6e9bfb307..d84865605 100644 --- a/cpu/avr/dev/rs232.c +++ b/cpu/avr/dev/rs232.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: rs232.c,v 1.4 2008/11/09 15:39:49 c_oflynn Exp $ + * @(#)$Id: rs232.c,v 1.5 2009/03/17 20:32:22 adamdunkels Exp $ */ #include @@ -40,7 +40,6 @@ #include "contiki.h" #include "dev/slip.h" -#include "dev/serial.h" #include "dev/rs232.h" #ifdef RS232_CONF_PRINTF_BUFFER_LENGTH @@ -126,11 +125,11 @@ void rs232_init (uint8_t port, uint8_t bd, uint8_t ffmt) { *(rs232_ports[port].UBRRH) = (uint8_t)(bd>>8); - *(rs232_ports[port].UBRRL) = (uint8_t)bd; + *(rs232_ports[port].UBRRL) = (uint8_t)bd; /* * - Enable receiver and transmitter, - * - Enable interrupts for receiver and transmitter + * - Enable interrupts for receiver and transmitter */ *(rs232_ports[port].UCSRB) = USART_INTERRUPT_RX_COMPLETE | USART_INTERRUPT_TX_COMPLETE | \ USART_RECEIVER_ENABLE | USART_TRANSMITTER_ENABLE; diff --git a/platform/avr-rcb/contiki-rcb-main.c b/platform/avr-rcb/contiki-rcb-main.c index 4cd1b6ba4..28504553b 100644 --- a/platform/avr-rcb/contiki-rcb-main.c +++ b/platform/avr-rcb/contiki-rcb-main.c @@ -50,13 +50,13 @@ #include "contiki-lib.h" #include "dev/rs232.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" #include "sicslowmac.h" -FUSES = +FUSES = { .low = 0xe2, .high = 0x99, @@ -88,7 +88,7 @@ init_lowlevel(void) /* Redirect stdout to second port */ rs232_redirect_stdout(RS232_PORT_1); - DDRE |= LED1 | LED2 | LED3; + DDRE |= LED1 | LED2 | LED3; } @@ -105,12 +105,12 @@ PROCESS_THREAD(rcb_leds, ev, data) if (ev == ICMP6_ECHO_REQUEST) { - LEDOn(LED2); + LEDOn(LED2); etimer_set(&et, CLOCK_SECOND/10); } else { LEDOff(LED2); } - } + } } PROCESS_END(); } diff --git a/platform/avr-rcb/contiki-rcb.h b/platform/avr-rcb/contiki-rcb.h index e640944a5..eb37e0f26 100644 --- a/platform/avr-rcb/contiki-rcb.h +++ b/platform/avr-rcb/contiki-rcb.h @@ -48,7 +48,7 @@ #include "dev/rs232.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" void init_lowlevel(void); diff --git a/platform/avr-zigbit/contiki-avr-zigbit-main.c b/platform/avr-zigbit/contiki-avr-zigbit-main.c index 1c3bf7eb7..7cf5afaea 100644 --- a/platform/avr-zigbit/contiki-avr-zigbit-main.c +++ b/platform/avr-zigbit/contiki-avr-zigbit-main.c @@ -50,15 +50,15 @@ #include "contiki-lib.h" #include "dev/rs232.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" #include "sicslowmac.h" -FUSES = +FUSES = { .low = (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0), // 0xe2, - .high = (FUSE_BOOTSZ0 /*& FUSE_BOOTSZ1*/ & FUSE_SPIEN & FUSE_JTAGEN), //0x9D, + .high = (FUSE_BOOTSZ0 /*& FUSE_BOOTSZ1*/ & FUSE_SPIEN & FUSE_JTAGEN), //0x9D, .extended = 0xff, }; diff --git a/platform/avr-zigbit/contiki-avr-zigbit.h b/platform/avr-zigbit/contiki-avr-zigbit.h index 36617a14b..b72e27410 100644 --- a/platform/avr-zigbit/contiki-avr-zigbit.h +++ b/platform/avr-zigbit/contiki-avr-zigbit.h @@ -48,7 +48,7 @@ #include "dev/rs232.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" void init_lowlevel(void); diff --git a/platform/cooja/testapps/testserial.c b/platform/cooja/testapps/testserial.c index b8b519888..cb0b247c6 100644 --- a/platform/cooja/testapps/testserial.c +++ b/platform/cooja/testapps/testserial.c @@ -26,11 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: testserial.c,v 1.3 2009/03/17 15:56:32 adamdunkels Exp $ + * $Id: testserial.c,v 1.4 2009/03/17 20:32:22 adamdunkels Exp $ */ #include "contiki.h" -#include "dev/serial-port.h" +#include "dev/serial-line.h" #include "dev/rs232.h" #include @@ -47,7 +47,7 @@ PROCESS_THREAD(test_serial_process, ev, data) etimer_set(&et, CLOCK_SECOND); /* Start serial process */ - serial_port_init(); + serial_line_init(); printf("Starting serial test process\n"); @@ -60,7 +60,7 @@ PROCESS_THREAD(test_serial_process, ev, data) etimer_restart(&et); } - if(ev == serial_port_event_message) { + if(ev == serial_line_event_message) { printf("Message received: '%s'\n", data); } } diff --git a/platform/ethernut2/ethernut-main.c b/platform/ethernut2/ethernut-main.c index 2cfb8e98c..7197584f0 100644 --- a/platform/ethernut2/ethernut-main.c +++ b/platform/ethernut2/ethernut-main.c @@ -29,13 +29,13 @@ * * This file is part of the Contiki OS * - * $Id: ethernut-main.c,v 1.2 2006/06/20 21:23:10 adamdunkels Exp $ + * $Id: ethernut-main.c,v 1.3 2009/03/17 20:32:22 adamdunkels Exp $ * */ #include "contiki.h" #include "contiki-net.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" #include "dev/rs232.h" @@ -59,13 +59,13 @@ PROCESS_THREAD(serial_test, ev, data) PROCESS_BEGIN(); while(1) { - PROCESS_WAIT_EVENT_UNTIL(ev == serial_event_message); + PROCESS_WAIT_EVENT_UNTIL(ev == serial_line_event_message); rs232_print(data); } PROCESS_END(); } -PROCINIT(&etimer_process, &serial_process, &slip_process, +PROCINIT(&etimer_process, &serial_line_process, &slip_process, &uip_fw_process); int diff --git a/platform/msb430/contiki-msb430.h b/platform/msb430/contiki-msb430.h index 776b89d04..37b75b26e 100644 --- a/platform/msb430/contiki-msb430.h +++ b/platform/msb430/contiki-msb430.h @@ -45,7 +45,7 @@ #include "dev/lpm.h" #include "dev/msb430-uart1.h" #include "dev/rs232.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" #ifdef WITH_SDC diff --git a/platform/pc-6001/contiki-serial-main.c b/platform/pc-6001/contiki-serial-main.c index 3fc82780c..409ec1fbc 100644 --- a/platform/pc-6001/contiki-serial-main.c +++ b/platform/pc-6001/contiki-serial-main.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: contiki-serial-main.c,v 1.3 2007/11/28 09:44:27 matsutsuka Exp $ + * $Id: contiki-serial-main.c,v 1.4 2009/03/17 20:32:22 adamdunkels Exp $ * */ @@ -41,7 +41,7 @@ #include "contiki.h" /* devices */ -#include "dev/serial.h" +#include "dev/serial-line.h" #include "ctk/libconio_arch-small.h" #undef RS232_INTR @@ -75,7 +75,7 @@ PROCESS_THREAD(stest_process, ev, data) clrscr_arch(); #ifdef RS232_INTR - rs232_arch_init(serial_input_byte, 0); + rs232_arch_init(serial_line_input_byte, 0); #endif etimer_set(&timer, CLOCK_SECOND); @@ -90,7 +90,7 @@ PROCESS_THREAD(stest_process, ev, data) etimer_reset(&timer); } - if(ev == serial_event_message) { + if(ev == serial_line_event_message) { log_message(data); } } @@ -106,7 +106,7 @@ main(void) /* start services */ process_start(&etimer_process, NULL); - process_start(&serial_process, NULL); + process_start(&serial_line_process, NULL); #ifndef RS232_INTR process_start(&rs232_process, NULL); #endif diff --git a/platform/stk501/contiki-stk501.h b/platform/stk501/contiki-stk501.h index 651aa9415..17a2bc98d 100644 --- a/platform/stk501/contiki-stk501.h +++ b/platform/stk501/contiki-stk501.h @@ -48,7 +48,7 @@ #include "dev/rs232.h" -#include "dev/serial.h" +#include "dev/serial-line.h" #include "dev/slip.h" void init_lowlevel(void);