Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_mtk.h File Reference

Mediatek MT3329 specific code. More...

#include "mcu_periph/uart.h"
#include "mtk_protocol.h"
+ Include dependency graph for gps_mtk.h:

Go to the source code of this file.

Data Structures

struct  GpsMtk
 

Macros

#define GPS_MTK_MAX_PAYLOAD   255
 Includes macros generated from mtk.xml. More...
 
#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 GpsConfigure()   {}
 
#define GpsEvent(_sol_available_callback)
 
#define ReadGpsBuffer()
 

Functions

void gps_mtk_read_message (void)
 
void gps_mtk_parse (uint8_t c)
 

Variables

struct GpsMtk gps_mtk
 

Detailed Description

Mediatek MT3329 specific code.

supports: DIYDrones V1.4 protocol (AXN1.30_2278) DIYDrones V1.6 protocol (AXN1.30_2389)

documentation is partly incorrect, see mtk.xml for what seems to be "real"

Definition in file gps_mtk.h.

Macro Definition Documentation

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

Definition at line 57 of file gps_mtk.h.

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

Definition at line 58 of file gps_mtk.h.

#define GPS_MTK_MAX_PAYLOAD   255

Includes macros generated from mtk.xml.

Definition at line 31 of file gps_mtk.h.

#define GpsBuffer ( )    GpsLink(ChAvailable())

Definition at line 61 of file gps_mtk.h.

#define GpsConfigure ( )    {}

Definition at line 70 of file gps_mtk.h.

#define GpsEvent (   _sol_available_callback)
Value:
{ \
} \
if (gps_mtk.msg_class == MTK_DIY14_ID && \
gps_mtk.msg_id == MTK_DIY14_NAV_ID) { \
} \
_sol_available_callback(); \
} \
if (gps_mtk.msg_class == MTK_DIY16_ID && \
gps_mtk.msg_id == MTK_DIY16_NAV_ID) { \
} \
_sol_available_callback(); \
} \
} \
}
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
Definition: gps.h:85
#define ReadGpsBuffer()
Definition: gps_mtk.h:102
#define GpsBuffer()
Definition: gps_mtk.h:61
#define GpsConfigure()
Definition: gps_mtk.h:70
uint8_t fix
status of fix
Definition: gps.h:78
#define GPS_FIX_3D
Definition: gps.h:43
uint8_t msg_id
Definition: gps_mtk.h:36
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
#define FALSE
Definition: imu_chimu.h:141
struct GpsMtk gps_mtk
Definition: gps_mtk.c:82
void gps_mtk_read_message(void)
Definition: gps_mtk.c:160
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
Definition: sys_time.h:70
bool_t msg_available
Definition: gps_mtk.h:34
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
Definition: gps.h:87
uint8_t msg_class
Definition: gps_mtk.h:37
volatile uint32_t nb_sec
full seconds since startup
Definition: sys_time.h:69
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
Definition: gps.h:86
uint32_t last_msg_time
cpu time in sec at last received GPS message
Definition: gps.h:88
struct GpsState gps
global GPS state
Definition: gps.c:41

Definition at line 73 of file gps_mtk.h.

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

Definition at line 59 of file gps_mtk.h.

#define ReadGpsBuffer ( )
Value:
{ \
while (GpsLink(ChAvailable())&&!gps_mtk.msg_available) \
gps_mtk_parse(GpsLink(Getch())); \
}
#define GpsLink(_x)
Definition: gps_mtk.h:59
void gps_mtk_parse(uint8_t c)
Definition: gps_mtk.c:281
struct GpsMtk gps_mtk
Definition: gps_mtk.c:82
bool_t msg_available
Definition: gps_mtk.h:34

Definition at line 102 of file gps_mtk.h.

Function Documentation

Variable Documentation

struct GpsMtk gps_mtk

Definition at line 82 of file gps_mtk.c.

Referenced by gps_impl_init(), gps_mtk_parse(), and gps_mtk_read_message().