[Firebug-cvs] fireboard/fireboard/sensors/leadtek9546 HPLUART1M.nc,1.2,1.3 HPLUARTC1.nc,1.1.1.1,1.2
Brought to you by:
doolin
From: <do...@us...> - 2004-01-14 14:54:42
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv12716 Modified Files: HPLUART1M.nc HPLUARTC1.nc gps_driverM.nc Log Message: Updated HPLUART1M.nc from the latest cvs snapshot. Had to add async keywords because it appears to be broken. This file needs to be in the gps driver directory because the baud rate is hardcoded instead of being set by the user. Otherwise, the file is the same as what's in the tos/platform/mica2 directory. Index: HPLUART1M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/HPLUART1M.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HPLUART1M.nc 14 Jan 2004 14:24:29 -0000 1.2 --- HPLUART1M.nc 14 Jan 2004 14:54:39 -0000 1.3 *************** *** 1,9 **** ! /* -*- Mode: C; c-basic-indent: 3; indent-tabs-mode: nil -*- */ ! ! /* ! * ! * ! * "Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * --- 1,6 ---- ! // $Id$ ! /* tab:4 ! * "Copyright (c) 2000-2003 The Regents of the University of California. * All rights reserved. * *************** *** 24,64 **** * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * ! */ ! /* tab:4 ! * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By ! * downloading, copying, installing or using the software you agree to ! * this license. If you do not agree to this license, do not download, ! * install, copy or use the software. ! * ! * Intel Open Source License * ! * Copyright (c) 2002 Intel Corporation ! * All rights reserved. ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions are ! * met: ! * ! * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in the ! * documentation and/or other materials provided with the distribution. ! * Neither the name of the Intel Corporation nor the names of its ! * contributors may be used to endorse or promote products derived from ! * this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ! * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS ! * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ! * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ! * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ! * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ! * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ! * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! * ! * */ /* --- 21,31 ---- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * ! * Copyright (c) 2002-2003 Intel Corporation ! * All rights reserved. * ! * This file is distributed under the terms in the attached INTEL-LICENSE ! * file. If you do not find these files, copies can be found by writing to ! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, ! * 94704. Attention: Intel License Inquiry. */ /* *************** *** 76,87 **** // create a separate component module HPLUART1M { provides interface HPLUART as UART; ! uses interface Interrupt; } implementation { - - async command result_t UART.init() { --- 43,60 ---- // create a separate component + + /** + * @author Jason Hill + * @author David Gay + * @author Philip Levis + * @author Phil Buonadonna + */ + module HPLUART1M { provides interface HPLUART as UART; ! } implementation { async command result_t UART.init() { *************** *** 93,97 **** // 4800 bps 191 ! // Set Baud Rate outp(0,UBRR1H); outp(191, UBRR1L); --- 66,70 ---- // 4800 bps 191 ! // Set at 4800 for communicating with the LeadTek GPS. outp(0,UBRR1H); outp(191, UBRR1L); *************** *** 106,122 **** outp(((1 << RXCIE) | (1 << TXCIE) | (1 << RXEN) | (1 << TXEN)) ,UCSR1B); ! call Interrupt.enable(); return SUCCESS; } async command result_t UART.stop() { - outp(0x00, UCSR1A); - outp(0x00, UCSR1B); - outp(0x00, UCSR1C); return SUCCESS; } ! default async event result_t UART.get(uint8_t data) { return SUCCESS; } ! TOSH_SIGNAL(SIG_UART1_RECV) { if (inp(UCSR1A) & (1 << RXC)) --- 79,91 ---- outp(((1 << RXCIE) | (1 << TXCIE) | (1 << RXEN) | (1 << TXEN)) ,UCSR1B); ! return SUCCESS; } async command result_t UART.stop() { return SUCCESS; } ! async default event result_t UART.get(uint8_t data) { return SUCCESS; } TOSH_SIGNAL(SIG_UART1_RECV) { if (inp(UCSR1A) & (1 << RXC)) *************** *** 124,132 **** } ! default async event result_t UART.putDone() { ! ! return SUCCESS; ! } ! TOSH_INTERRUPT(SIG_UART1_TRANS) { signal UART.putDone(); --- 93,97 ---- } ! async default event result_t UART.putDone() { return SUCCESS; } TOSH_INTERRUPT(SIG_UART1_TRANS) { signal UART.putDone(); *************** *** 134,140 **** async command result_t UART.put(uint8_t data) { - outp(data, UDR1); sbi(UCSR1A, TXC); ! return SUCCESS; } --- 99,104 ---- async command result_t UART.put(uint8_t data) { sbi(UCSR1A, TXC); ! outp(data, UDR1); return SUCCESS; } Index: HPLUARTC1.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/HPLUARTC1.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HPLUARTC1.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- HPLUARTC1.nc 14 Jan 2004 14:54:39 -0000 1.2 *************** *** 77,83 **** implementation { ! components HPLUART1M as HPLUART0M, HPLInterrupt; UART = HPLUART0M; ! HPLUART0M.Interrupt -> HPLInterrupt; } --- 77,83 ---- implementation { ! components HPLUART1M as HPLUART0M;//, HPLInterrupt; UART = HPLUART0M; ! //HPLUART0M.Interrupt -> HPLInterrupt; } Index: gps_driverM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driverM.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gps_driverM.nc 14 Jan 2004 14:21:46 -0000 1.3 --- gps_driverM.nc 14 Jan 2004 14:54:39 -0000 1.4 *************** *** 294,300 **** call Leds.greenToggle(); ! signal Sensor.dataReady(gps_data); ! return SUCCESS; //Don't worry about this for now. --- 294,300 ---- call Leds.greenToggle(); ! signal Sensor.dataReady((void*)gps_data); ! return data; //Don't worry about this for now. |