Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
gps_mtk.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2011 The Paparazzi Team
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
34#ifndef MTK_H
35#define MTK_H
36
37#include "modules/gps/gps.h"
38#include "mcu_periph/uart.h"
39
41#include "mtk_protocol.h"
42
43#define GPS_MTK_MAX_PAYLOAD 255
44
45#ifndef PRIMARY_GPS
46#define PRIMARY_GPS GPS_MTK
47#endif
48
68
69extern struct GpsMtk gps_mtk;
70
71extern void gps_mtk_event(void);
72extern void gps_mtk_init(void);
73
74#define gps_mtk_periodic_check() gps_periodic_check(&gps_mtk.state)
75
76#ifdef GPS_CONFIGURE
77extern void gps_configure(void);
78extern void gps_configure_uart(void);
79extern bool gps_configuring;
80#define GpsConfigure() { \
81 if (gps_configuring) \
82 gps_configure(); \
83 }
84#else
85#define GpsConfigure() {}
86#endif
87
88
89#endif /* MTK_H */
Device independent GPS code (interface)
data structure for GPS information
Definition gps.h:87
uint8_t sol_flags
Definition gps_mtk.h:64
#define GPS_MTK_MAX_PAYLOAD
Includes macros generated from mtk.xml.
Definition gps_mtk.h:43
uint8_t msg_class
Definition gps_mtk.h:53
uint8_t send_ck_b
Definition gps_mtk.h:59
uint8_t error_last
Definition gps_mtk.h:61
uint8_t send_ck_a
Definition gps_mtk.h:59
uint8_t msg_idx
Definition gps_mtk.h:57
void gps_mtk_event(void)
Definition gps_mtk.c:123
uint8_t msg_id
Definition gps_mtk.h:52
bool msg_available
Definition gps_mtk.h:50
uint8_t error_cnt
Definition gps_mtk.h:60
uint8_t ck_a
Definition gps_mtk.h:58
uint8_t status
Definition gps_mtk.h:55
uint16_t len
Definition gps_mtk.h:56
struct GpsState state
Definition gps_mtk.h:66
uint8_t ck_b
Definition gps_mtk.h:58
void gps_mtk_init(void)
Definition gps_mtk.c:111
struct GpsMtk gps_mtk
Definition gps_mtk.c:83
uint8_t msg_buf[GPS_MTK_MAX_PAYLOAD]
Definition gps_mtk.h:51
uint8_t status_flags
Definition gps_mtk.h:63
uint16_t foo
Definition main_demo5.c:58
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.