Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_sirf.h File Reference

Sirf protocol specific code. More...

#include "std.h"
+ Include dependency graph for gps_sirf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GpsSirf
 
struct  sirf_msg_2
 Message ID 2 from GPS. More...
 
struct  sirf_msg_41
 Message ID 41 from GPS. More...
 

Macros

#define GPS_NB_CHANNELS   16
 
#define SIRF_MAXLEN   255
 
#define UNINIT   0
 
#define GOT_A0   1
 
#define GOT_A2   2
 
#define GOT_B0   3
 
#define Invert2Bytes(x)   ((x>>8) | (x<<8))
 
#define Invert4Bytes(x)   ((x>>24) | ((x<<8) & 0x00FF0000) | ((x>>8) & 0x0000FF00) | (x<<24))
 
#define __GpsLink(dev, _x)   dev##_x
 
#define _GpsLink(dev, _x)   __GpsLink(dev, _x)
 
#define GpsLink(_x)   _GpsLink(GPS_LINK, _x)
 
#define GpsBuffer()   GpsLink(ChAvailable())
 
#define GpsEvent(_sol_available_callback)
 
#define ReadGpsBuffer()
 

Functions

void sirf_parse_char (uint8_t c)
 
void sirf_parse_msg (void)
 

Variables

struct GpsSirf gps_sirf
 

Detailed Description

Sirf protocol specific code.

Definition in file gps_sirf.h.

Macro Definition Documentation

#define __GpsLink (   dev,
  _x 
)    dev##_x

Definition at line 130 of file gps_sirf.h.

#define _GpsLink (   dev,
  _x 
)    __GpsLink(dev, _x)

Definition at line 131 of file gps_sirf.h.

#define GOT_A0   1

Definition at line 39 of file gps_sirf.h.

Referenced by sirf_parse_char().

#define GOT_A2   2

Definition at line 40 of file gps_sirf.h.

Referenced by sirf_parse_char().

#define GOT_B0   3

Definition at line 41 of file gps_sirf.h.

Referenced by sirf_parse_char().

#define GPS_NB_CHANNELS   16

Definition at line 34 of file gps_sirf.h.

#define GpsBuffer ( )    GpsLink(ChAvailable())

Definition at line 134 of file gps_sirf.h.

#define GpsEvent (   _sol_available_callback)
Value:
{ \
} \
} \
_sol_available_callback(); \
} \
} \
}
void sirf_parse_msg(void)
Definition: gps_sirf.c:169
uint32_t last_fix_time
cpu time in sec at last valid fix
Definition: gps.h:86
uint8_t fix
status of fix
Definition: gps.h:78
#define GPS_FIX_3D
Definition: gps.h:43
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
#define FALSE
Definition: imu_chimu.h:141
#define ReadGpsBuffer()
Definition: gps_sirf.h:153
uint32_t last_fix_ticks
cpu time ticks at last valid fix
Definition: gps.h:85
#define GpsBuffer()
Definition: gps_sirf.h:134
bool_t msg_available
Definition: gps_sirf.h:44
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
Definition: sys_time.h:70
bool_t pos_available
Definition: gps_sirf.h:45
struct GpsSirf gps_sirf
Definition: gps_sirf.c:39
volatile uint32_t nb_sec
full seconds since startup
Definition: sys_time.h:69
struct GpsState gps
global GPS state
Definition: gps.c:33

Definition at line 136 of file gps_sirf.h.

#define GpsLink (   _x)    _GpsLink(GPS_LINK, _x)

Definition at line 132 of file gps_sirf.h.

#define Invert2Bytes (   x)    ((x>>8) | (x<<8))

Definition at line 54 of file gps_sirf.h.

Referenced by sirf_parse_2(), and sirf_parse_41().

#define Invert4Bytes (   x)    ((x>>24) | ((x<<8) & 0x00FF0000) | ((x>>8) & 0x0000FF00) | (x<<24))

Definition at line 55 of file gps_sirf.h.

Referenced by sirf_parse_2(), and sirf_parse_41().

#define ReadGpsBuffer ( )
Value:
{ \
while (GpsLink(ChAvailable())&&!gps_sirf.msg_available) \
}
bool_t msg_available
Definition: gps_sirf.h:44
void sirf_parse_char(uint8_t c)
Definition: gps_sirf.c:50
#define GpsLink(_x)
Definition: gps_sirf.h:132
struct GpsSirf gps_sirf
Definition: gps_sirf.c:39

Definition at line 153 of file gps_sirf.h.

#define SIRF_MAXLEN   255

Definition at line 35 of file gps_sirf.h.

#define UNINIT   0

Definition at line 38 of file gps_sirf.h.

Function Documentation

void sirf_parse_char ( uint8_t  c)
void sirf_parse_msg ( void  )

Definition at line 169 of file gps_sirf.c.

References FALSE, gps_sirf, GpsSirf::msg_buf, GpsSirf::msg_len, sys_time::nb_sec, GpsSirf::pos_available, sirf_parse_2(), sirf_parse_41(), start_time2, and ticks2.

+ Here is the call graph for this function:

Variable Documentation

struct GpsSirf gps_sirf