From 5b7b3da99cf275784b3fbde91aca98622401a7eb Mon Sep 17 00:00:00 2001 From: joxe Date: Wed, 5 Jan 2011 13:36:38 +0000 Subject: [PATCH] minor fixes of DMA uart code --- cpu/msp430/dev/uart1.c | 6 +++--- cpu/msp430/msp430.c | 6 +++--- cpu/msp430/msp430.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpu/msp430/dev/uart1.c b/cpu/msp430/dev/uart1.c index 7616bb6a2..a3644d04a 100644 --- a/cpu/msp430/dev/uart1.c +++ b/cpu/msp430/dev/uart1.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)$Id: uart1.c,v 1.20 2011/01/05 12:02:02 joxe Exp $ + * @(#)$Id: uart1.c,v 1.21 2011/01/05 13:36:38 joxe Exp $ */ /* @@ -58,7 +58,7 @@ static volatile uint8_t transmitting; #endif /* UART1_CONF_TX_WITH_INTERRUPT */ #ifdef UART1_CONF_RX_WITH_DMA -#define TX_WITH_INTERRUPT UART1_CONF_RX_WITH_DMA +#define RX_WITH_DMA UART1_CONF_RX_WITH_DMA #else /* UART1_CONF_RX_WITH_DMA */ #define RX_WITH_DMA 0 #endif /* UART1_CONF_RX_WITH_DMA */ @@ -82,7 +82,7 @@ handle_rxdma_timer(void *ptr) { uint8_t size; size = DMA0SZ; /* Note: loop requires that size is less or eq to RXBUFSIZE */ - for (;last_size != size; last_size--) { + for(;last_size != size; last_size--) { if(last_size == 0) last_size = RXBUFSIZE; /* printf("read: %c\n", (unsigned char)rxbuf[RXBUFSIZE - last_size]); */ uart1_input_handler((unsigned char)rxbuf[RXBUFSIZE - last_size]); diff --git a/cpu/msp430/msp430.c b/cpu/msp430/msp430.c index 080361be1..afa19163d 100644 --- a/cpu/msp430/msp430.c +++ b/cpu/msp430/msp430.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: msp430.c,v 1.14 2011/01/05 12:02:01 joxe Exp $ + * @(#)$Id: msp430.c,v 1.15 2011/01/05 13:36:38 joxe Exp $ */ #include #include @@ -195,7 +195,7 @@ static char *cur_break = (char *)&_end; void msp430_add_lpm_req(int req) { - if (req <= MSP430_REQUIRE_LPM1) { + if(req <= MSP430_REQUIRE_LPM1) { msp430_dco_required++; } } @@ -203,7 +203,7 @@ msp430_add_lpm_req(int req) void msp430_remove_lpm_req(int req) { - if (req <= MSP430_REQUIRE_LPM1) { + if(req <= MSP430_REQUIRE_LPM1) { msp430_dco_required--; } } diff --git a/cpu/msp430/msp430.h b/cpu/msp430/msp430.h index 7d000ce66..f6501aa19 100644 --- a/cpu/msp430/msp430.h +++ b/cpu/msp430/msp430.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: msp430.h,v 1.3 2011/01/05 12:02:01 joxe Exp $ + * $Id: msp430.h,v 1.4 2011/01/05 13:36:38 joxe Exp $ */ /** @@ -54,7 +54,7 @@ #define MSP430_REQUIRE_LPM2 2 #define MSP430_REQUIRE_LPM3 3 -void msp430_add_lpm_req(); -void msp430_remove_lpm_req(); +void msp430_add_lpm_req(int req); +void msp430_remove_lpm_req(int req); #endif /* __MSP430_H__ */