[Firebug-cvs] fireboard/fireboard/sensors/leadtek9546 leadtek_9546.h,NONE,1.1 GpsPacket.nc,1.1.1.1,1
Brought to you by:
doolin
From: <do...@us...> - 2004-01-14 17:20:31
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv18035/sensors/leadtek9546 Modified Files: GpsPacket.nc gps_driver.nc Added Files: leadtek_9546.h Removed Files: gps.h Log Message: Moved gps.h to leadtek_9546.h to reflect design changes in sensor drivers. --- NEW FILE: leadtek_9546.h --- /* tab:4 * * * "Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice, the following * two paragraphs and the author appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * 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. * * */ /* * * Authors: * * $Id: leadtek_9546.h,v 1.1 2004/01/14 17:20:28 doolin Exp $ */ /** * Parts of this code were written or modified for FireBug project * funded by the NSF Information Technology Research * initiative. Copyright Regents of the University of * of California, 2003. * * @url http://firebug.sourceforge.net * * @author David. M. Doolin */ #ifndef GPS_H #define GPS_H // The actual values for each of these may vary, // especially characters per field, which may be // application dependent. #define GPS_MSG_LENGTH 100 #define GPS_CHAR 11 #define GPS_FIELDS 8 #define GPS_CHAR_PER_FIELD 10 #define GPS_DELIMITER ',' #define GPS_END_MSG '*' #define GPS_DATA_LENGTH 128 #define GPS_PACKET_START 0x24 //start of gps packet #define GPS_PACKET_END1 0x0D //penultimate byte of NMEA string #define GPS_PACKET_END2 0x0A //ultimate byte of NMEA string // Carriage return, ASCII 13 #define NMEA_END1 "\r" //0x0D //penultimate byte of NMEA string // Line feed, ASCII 10 #define NMEA_END2 "\n" //0x0A //ultimate byte of NMEA string #define NMEA_GSV_MASK 0x0001 #define NMEA_GSA_MASK 0x0002 #define NMEA_ZDA_MASK 0x0004 #define NMEA_PPS_MASK 0x0010 #define NMEA_FOM_MASK 0x0020 #define NMEA_GLL_MASK 0x1000 #define NMEA_GGA_MASK "0x2000" #define NMEA_VTG_MASK "0x4000" #define NMEA_RMC_MASK "0x8000" // This isn't used yet, but should be. #define GPS_POWER_OFF 0 #define GPS_POWER_ON 1 const uint8_t gps_power_on = 0; /** * Predefined "programs" useful for setting various states * of the GPS unit. These are all in NMEA format. */ const uint8_t gps_gga_mask[] = {"$PFST,NMEA," NMEA_GGA_MASK NMEA_END1 NMEA_END2}; const uint8_t gps_rmc_mask[] = {"$PFST,NMEA," NMEA_RMC_MASK NMEA_END1 NMEA_END2}; const uint8_t gps_syncmode_on[] = {"$PFST,SYNCMODE,1" NMEA_END1 NMEA_END2}; const uint8_t gps_syncmode_off[] = {"$PFST,SYNCMODE,0" NMEA_END1 NMEA_END2}; typedef struct _gga_msg GGA_Msg; typedef struct _gps_msg GPS_Msg; typedef GPS_Msg * GPS_MsgPtr; struct _gps_msg { /* The following fields are received on the gps. */ uint8_t length; int8_t data[GPS_DATA_LENGTH]; uint16_t crc; }; struct _gga_msg { uint8_t hours; uint8_t minutes; uint16_t dec_sec; uint8_t Lat_deg; uint16_t Lat_dec_min; uint8_t Long_deg; uint16_t Long_dec_min; uint8_t NSEWind; }; #endif Index: GpsPacket.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/GpsPacket.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** GpsPacket.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- GpsPacket.nc 14 Jan 2004 17:20:28 -0000 1.2 *************** *** 115,122 **** implementation { - - #include "gps.h" - - enum {GPS_SWITCH_IDLE, //GPS I2C switches are not using the I2C bus GPS_PWR_SWITCH_WAIT, //Waiting for GPS I2C power switch to set --- 115,118 ---- Index: gps_driver.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driver.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gps_driver.nc 14 Jan 2004 14:05:34 -0000 1.3 --- gps_driver.nc 14 Jan 2004 17:20:28 -0000 1.4 *************** *** 37,41 **** includes sensorboard; ! includes gps; configuration gps_driver { --- 37,41 ---- includes sensorboard; ! includes leadtek_9546; configuration gps_driver { --- gps.h DELETED --- |