b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * qser_gnss.h |
| 3 | * |
| 4 | * QSER GNSS header file. |
| 5 | * |
| 6 | * Author : lb |
| 7 | * Date : 2023/11/23 11:13:18 |
| 8 | */ |
| 9 | #ifndef _QSER_GNSS_H |
| 10 | #define _QSER_GNSS_H |
| 11 | #include "mbtk_type.h" |
| 12 | |
| 13 | typedef unsigned int Uint_t; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 14 | |
| 15 | typedef enum |
| 16 | { |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 17 | E_MT_LOC_MSG_ID_LOCATION_INFO, /**< pv_data = & mopen_location_info_t */ |
| 18 | E_MT_LOC_MSG_ID_NMEA_INFO, /**< pv_data = & mopen_gnss_nmea_info_t */ |
| 19 | } e_msg_id_t; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 20 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 21 | typedef void (*gnss_handler_func_t) |
| 22 | ( |
| 23 | Uint_t *h_loc, |
| 24 | e_msg_id_t e_msg_id, //消息 ID |
| 25 | void *pv_data, //消息内容,取决于 ID,如下说明 |
| 26 | void *context_ptr //用于区分哪个返回的消息 |
| 27 | )/* lynq_AddRxIndMsgHandler_t*/; |
| 28 | |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 29 | typedef struct |
| 30 | { |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 31 | uint32_t year; // 大于 1980 |
| 32 | uint32_t month; // 1-12 |
| 33 | uint32_t day; // 1-31 |
| 34 | uint32_t hour; // 0-23 |
| 35 | uint32_t minute; // 0-59 |
| 36 | uint32_t second; // 0-59 |
| 37 | uint32_t millisecond; // 0-999 |
| 38 | } LYNQ_INJECT_TIME_INTO_T; /* Message */ |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 39 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 40 | typedef enum { |
| 41 | DELETE_NOTHING = 0, /*不删除数据*/ |
| 42 | DELETE_EPHEMERIS = 1, /*删除星历*/ |
| 43 | DELETE_ALMANAC = 2, /*删除历书*/ |
| 44 | DELETE_POSITION_TIME = 3, /*删除时间和位置信息. */ |
| 45 | DELETE_UTC = 4, /*删除 UTC 时间*/ |
| 46 | DELETE_ALL = 5 /*删除所有*/ |
| 47 | } DELETE_AIDING_DATA_TYPE_T; |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 48 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 49 | int qser_Gnss_Init (uint32_t *h_gnss); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 50 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 51 | int qser_Gnss_Deinit (uint32_t h_gnss); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 52 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 53 | int qser_AddRxIndMsgHandler (gnss_handler_func_t handler_ptr,uint32_t h_gnss); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 54 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 55 | int qser_Set_Indications (uint32_t h_gnss,e_msg_id_t type); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 56 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 57 | int qser_Gnss_Start (uint32_t h_gnss); |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 58 | |
b.liu | 4e243dc | 2023-11-27 11:20:00 +0800 | [diff] [blame^] | 59 | int qser_Gnss_Stop (uint32_t h_gnss); |
| 60 | |
| 61 | int qser_Gnss_InjectTime (uint32_t h_gnss,LYNQ_INJECT_TIME_INTO_T *time_info); |
| 62 | |
| 63 | int qser_Gnss_Delete_Aiding_Data (uint32_t h_gnss,DELETE_AIDING_DATA_TYPE_T flags); |
| 64 | |
| 65 | int qser_Gnss_download_tle(); |
| 66 | |
| 67 | int qser_Gnss_injectEphemeris(uint32_t h_gnss); |
| 68 | |
| 69 | #endif /* _QSER_GNSS_H */ |