MT2523 API Reference  LinkIt SDK v4
gnss_api.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef GNSS_API_H
36 #define GNSS_API_H
37 #include <stdint.h>
38 
140 typedef enum {
148 
153 typedef struct {
154  int32_t length;
155  int8_t* debug_data;
157 
162 typedef void (*gnss_callback_t)(gnss_notification_type_t type, void *param);
163 
171 extern void gnss_init(gnss_callback_t callback_function);
172 
179 extern void gnss_power_on(void);
180 
187 extern void gnss_power_off(void);
188 
204 extern int32_t gnss_send_command(int8_t *cmd, int32_t cmd_len);
205 
217 extern int32_t gnss_read_sentence (int8_t *data_buffer, int32_t length);
218 
222 #endif /*GNSS_API_H*/
223 
void gnss_power_off(void)
This function powers off the GNSS chip.
gnss_notification_type_t
This enum notifies the user about an incoming event from the GNSS chip.
Definition: gnss_api.h:140
Notify the user to save debugging data.
Definition: gnss_api.h:146
void(* gnss_callback_t)(gnss_notification_type_t type, void *param)
GNSS callback typedef, the registered callback is invoked when a UART or EINT interrupt is triggered...
Definition: gnss_api.h:162
void gnss_power_on(void)
This function powers on the GNSS chip.
Notifies the host to send a command again.
Definition: gnss_api.h:144
Data structure to carry the debugging data.
Definition: gnss_api.h:153
void gnss_init(gnss_callback_t callback_function)
This function initializes the GNSS content.
The event notification is sent once the chip is powered off.
Definition: gnss_api.h:142
int8_t * debug_data
Pointer to the debug data.
Definition: gnss_api.h:155
int32_t length
Debugging data length.
Definition: gnss_api.h:154
The event notification is sent if incoming GNSS data is available.
Definition: gnss_api.h:143
The event notification is sent once the chip is powered on.
Definition: gnss_api.h:141
int32_t gnss_send_command(int8_t *cmd, int32_t cmd_len)
This function sends a PMTK command to the GNSS chip.
The GNSS chip is ready to send positioning data to the host.
Definition: gnss_api.h:145
int32_t gnss_read_sentence(int8_t *data_buffer, int32_t length)
This function reads the incoming NMEA sentence.