From 172ffb74c7dbc63213018074b50fdc01adba6c63 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Wed, 8 Apr 2009 14:56:00 +0000 Subject: [PATCH] fix compiler warnings. patch from Jesper Karlsson. --- cpu/msp430/dev/irq.h | 4 +++- platform/msb430/contiki-msb430-main.c | 3 +++ platform/msb430/dev/msb430-uart1.h | 2 +- platform/msb430/dev/rs232.c | 24 ++++++++++++------------ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cpu/msp430/dev/irq.h b/cpu/msp430/dev/irq.h index e090c5264..5bb3e7ac6 100644 --- a/cpu/msp430/dev/irq.h +++ b/cpu/msp430/dev/irq.h @@ -28,11 +28,13 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: irq.h,v 1.1 2007/03/15 21:37:01 adamdunkels Exp $ + * @(#)$Id: irq.h,v 1.2 2009/04/08 14:56:00 nvt-se Exp $ */ #ifndef __IRQ_H__ #define __IRQ_H__ +#include "lib/sensors.h" + void irq_adc12_activate(const struct sensors_sensor *sensor, unsigned char adcno, unsigned char config); diff --git a/platform/msb430/contiki-msb430-main.c b/platform/msb430/contiki-msb430-main.c index a1f8e920c..aef4c7609 100644 --- a/platform/msb430/contiki-msb430-main.c +++ b/platform/msb430/contiki-msb430-main.c @@ -45,7 +45,10 @@ #include "contiki.h" #include "contiki-msb430.h" +#include "dev/adc.h" #include "dev/serial-line.h" +#include "dev/sht11.h" +#include "dev/watchdog.h" extern volatile bool uart_edge; diff --git a/platform/msb430/dev/msb430-uart1.h b/platform/msb430/dev/msb430-uart1.h index 9739717bd..2fc76526e 100644 --- a/platform/msb430/dev/msb430-uart1.h +++ b/platform/msb430/dev/msb430-uart1.h @@ -87,7 +87,7 @@ extern volatile unsigned char uart_lockcnt; #define UART_WAIT_LOCK(x) ( (uart_mode != x ) && (uart_lockcnt) ) #define UART_MODE_IS(x) ( uart_mode == x ) -typedef unsigned int(*fp_uart_handler)(unsigned char); +typedef int(*fp_uart_handler)(unsigned char); /** * \brief Initialize the UART module diff --git a/platform/msb430/dev/rs232.c b/platform/msb430/dev/rs232.c index a7f1acf81..5b8c92b9a 100644 --- a/platform/msb430/dev/rs232.c +++ b/platform/msb430/dev/rs232.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: rs232.c,v 1.7 2008/10/28 12:42:53 nvt-se Exp $ + * @(#)$Id: rs232.c,v 1.8 2009/04/08 14:56:03 nvt-se Exp $ */ /** \addtogroup esbrs232 @@ -64,17 +64,6 @@ rs232_init(void) rs232_set_speed(RS232_115200); } /*---------------------------------------------------------------------------*/ -void -rs232_send(char c) -{ - /* Check if the UART is in RS232 mode before sending. - This check can be ommitted if every access to rs232 locks the uart - before using it. - */ - - putchar(c); -} -/*---------------------------------------------------------------------------*/ int putchar(int c) { @@ -90,6 +79,17 @@ putchar(int c) } /*---------------------------------------------------------------------------*/ void +rs232_send(char c) +{ + /* Check if the UART is in RS232 mode before sending. + This check can be ommitted if every access to rs232 locks the uart + before using it. + */ + + putchar(c); +} +/*---------------------------------------------------------------------------*/ +void rs232_set_speed(enum rs232_speed speed) { // baud