Weatherboard GPS
[Device Drivers]


Data Structures

struct  timestamp_struct
 simple time structure. This is a helper structure for usage with the gps_gga_t structure. More...
struct  meter_struct
 represents a measurement. This is a helper structure for usage with the gps_gga_t structure. More...
struct  latitude_struct
 represents a latitude or longitude value This is a helper structure for usage with the gps_gga_t structure. More...
struct  gga_struct
 represents a GPS Fix Data Packet from the GPS. This structure contains all the information available in a GGA Packet from the GPS in parsed form. More...

Defines

#define dev_open_DEV_MICA2_GPS(void)   mos_mutex_lock(&mica2_gps_mutex)
 gain an exclusive lock on the GPS device. Any other threads calling dev_open_DEV_GPS() will block until the owner calls dev_close_DEV_GPS().
#define dev_close_DEV_MICA2_GPS(void)   mos_mutex_unlock(&mica2_gps_mutex)
 release exclusive lock on the GPS device. Any other thread blocking on dev_open_DEV_MICA_GPS() will now unblock.

Typedefs

typedef timestamp_struct timestamp_t
 simple time structure. This is a helper structure for usage with the gps_gga_t structure.
typedef meter_struct measurement_t
 represents a measurement. This is a helper structure for usage with the gps_gga_t structure.
typedef latitude_struct latlong_t
 represents a latitude or longitude value This is a helper structure for usage with the gps_gga_t structure.
typedef gga_struct gps_gga_t
 represents a GPS Fix Data Packet from the GPS. This structure contains all the information available in a GGA Packet from the GPS in parsed form.

Enumerations

enum  GPS_FIX_QUALITY {
  FIX_INVALID = 0,
  FIX_GPS,
  FIX_DGPS,
  FIX_PPS,
  FIX_RTK,
  FIX_FRTK,
  FIX_ESTIMATED,
  FIX_MANUAL,
  FIX_SIMULATION
}
 GPS Fix quality constants. These are simply helper enumerations for usage with the gps_gga_t structure. More...
enum  MICA2_GPS_READ_TYPE {
  MICA2_GPS_READ_STRING,
  MICA2_GPS_READ_GGA
}
 use with dev_ioctl to specify what kind of structure dev_read should expect. More...

Functions

uint16_t dev_read_DEV_MICA2_GPS (void *buf, uint16_t count)
 read data from the GPS into buf. This data can be in either string form or as a gps_gga_t structure. This is configurable via dev_ioctl_DEV_MICA2_GPS().
uint16_t dev_write_DEV_MICA2_GPS (const void *buf, uint16_t count)
 write from buf to the Leadtek GPS device.
uint8_t dev_mode_DEV_MICA2_GPS (uint8_t md)
 change the status of the GPS. Accepted parameters are:
  1. DEV_MODE_OFF: Turn the device off.
  2. DEV_MODE_ON: Turn the device on.

uint8_t dev_ioctl_DEV_MICA2_GPS (int8_t request,...)
 send an IO Control to the GPS Driver. Accepted parameters are:
  1. MICA2_GPS_READ_GGA
  2. MICA2_GPS_READ_STRING

void mica2_gps_print_gga (const gps_gga_t *gga)
 prints a GGA packet to standard out.

Variables

mos_mutex_t mica2_gps_mutex

Detailed Description

This group contains functions associated with the GPS Driver. The Leadtek GPS is found on the Mica Weatherboard, and can be used With either the MICA2 or MICAZ.

Notes: See /src/apps/gps_test/ for an example application which uses this GPS Driver.


Enumeration Type Documentation

enum GPS_FIX_QUALITY
 

Enumerator:
FIX_INVALID  an invalid fix
FIX_GPS  a GPS fix
FIX_DGPS  a DGPS fix
FIX_PPS  a PPS fix
FIX_RTK  a Real Time Kinematic fix
FIX_FRTK  a Float Real Time Kinematic fix
FIX_ESTIMATED  a Dead Reckoning fix
FIX_MANUAL  Manual input mode.
FIX_SIMULATION  Simulation mode.

Definition at line 69 of file mica2-gps.h.

00070 {
00072    FIX_INVALID = 0,
00074    FIX_GPS,
00076    FIX_DGPS,
00078    FIX_PPS,
00080    FIX_RTK,
00082    FIX_FRTK,
00084    FIX_ESTIMATED,
00086    FIX_MANUAL,
00088    FIX_SIMULATION
00089 };

enum MICA2_GPS_READ_TYPE
 

Enumerator:
MICA2_GPS_READ_STRING  read a single gps packet
MICA2_GPS_READ_GGA  wait for the next gga packet and read a struct gps_gga_t.

Definition at line 93 of file mica2-gps.h.

00094 {
00096    MICA2_GPS_READ_STRING,
00098    MICA2_GPS_READ_GGA
00099 };


Function Documentation

uint8_t dev_ioctl_DEV_MICA2_GPS int8_t  request,
  ...
 

Parameters:
request The requested action.
... any required arguments for the specified IOCTL.
Returns:
DEV_OK or DEV_BAD_IOCTL.

uint8_t dev_mode_DEV_MICA2_GPS uint8_t  md  ) 
 

Parameters:
md The mode you wish to change to.
Returns:
DEV_OK or DEV_UNSUPPORTED.

uint16_t dev_read_DEV_MICA2_GPS void *  buf,
uint16_t  count
 

Parameters:
buf the buffer to read data into.
count the size of the buffer.
Returns:
the number of bytes read.

uint16_t dev_write_DEV_MICA2_GPS const void *  buf,
uint16_t  count
 

Parameters:
count the number of bytes to write.
buf the buffer containing the bytes to be written.
Returns:
DEV_OK

void mica2_gps_print_gga const gps_gga_t gga  ) 
 

Parameters:
gga a pointer to the GGA structure to print.


Variable Documentation

mos_mutex_t mica2_gps_mutex
 

For internal use only.

Used by dev_open and dev_close.


Generated on Sun Nov 22 06:26:00 2009 for MANTIS by  doxygen 1.4.6