liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame^] | 1 | #ifndef __MBTK_LYNQ_GNSS_H__ |
| 2 | #define __MBTK_LYNQ_GNSS_H__ |
| 3 | |
| 4 | typedef enum |
| 5 | { |
| 6 | E_LYNQ_LOC_MSG_ID_STATUS_INFO = 0, |
| 7 | E_LYNQ_LOC_MSG_ID_LOCATION_INFO, |
| 8 | E_LYNQ_LOC_MSG_ID_SV_INFO, |
| 9 | E_LYNQ_LOC_MSG_ID_NMEA_INFO, |
| 10 | E_LYNQ_LOC_MSG_ID_CAPABILITIES_INFO, |
| 11 | E_LYNQ_LOC_MSG_ID_AGPS_STATUS, |
| 12 | E_LYNQ_LOC_MSG_ID_NI_NOTIFICATION, |
| 13 | E_LYNQ_LOC_MSG_ID_XTRA_REPORT_SERVER, |
| 14 | }E_LYNQ_LOC_MSG_ID_T; |
| 15 | |
| 16 | #define LYNQ_LOC_NMEA_MAX_LENGTH 255 /** NMEA string maximum length. */ |
| 17 | typedef struct |
| 18 | { |
| 19 | int64_t timestamp; /**< System Timestamp, marked for when got the nmea data */ |
| 20 | int length; /**< NMEA string length. */ |
| 21 | char nmea[LYNQ_LOC_NMEA_MAX_LENGTH + 1]; /**< NMEA string.*/ |
| 22 | }LYNQ_LOC_NMEA_INFO_T; /* Message */ |
| 23 | |
| 24 | /* callback function register to lynq_gnss_rx_ind_msg_handler |
| 25 | e_msg_id: which kind of msg can be received depend on the bit_mask set in QL_LOC_Set_Indications; |
| 26 | pv_data: depend on the e_msg_id type. |
| 27 | */ |
| 28 | typedef void (*lynq_gnss_rx_ind_msg_handler_t) |
| 29 | ( |
| 30 | uint32 h_loc, |
| 31 | E_LYNQ_LOC_MSG_ID_T e_msg_id, |
| 32 | void *pv_data, |
| 33 | void *contextPtr |
| 34 | ); |
| 35 | |
| 36 | /** |
| 37 | * @brief function description |
| 38 | * |
| 39 | * @details detailed description |
| 40 | * |
| 41 | * @param param |
| 42 | * |
| 43 | * @return return type |
| 44 | */ |
| 45 | int lynq_gnss_init(void); |
| 46 | /** |
| 47 | * @brief function description |
| 48 | * |
| 49 | * @details detailed description |
| 50 | * |
| 51 | * @param param |
| 52 | * |
| 53 | * @return return type |
| 54 | */ |
| 55 | int lynq_gnss_deinit(void); |
| 56 | |
| 57 | /** |
| 58 | * @brief function description |
| 59 | * |
| 60 | * @details detailed description |
| 61 | * |
| 62 | * @param param |
| 63 | * |
| 64 | * @return return type |
| 65 | */ |
| 66 | int lynq_gnss_callback_reg(lynq_gnss_rx_ind_msg_handler_t handlerPtr); |
| 67 | |
| 68 | /** |
| 69 | * @brief function description |
| 70 | * |
| 71 | * @details detailed description |
| 72 | * |
| 73 | * @param param |
| 74 | * |
| 75 | * @return return type |
| 76 | */ |
| 77 | int lynq_gnss_start(void); |
| 78 | /** |
| 79 | * @brief function description |
| 80 | * |
| 81 | * @details detailed description |
| 82 | * |
| 83 | * @param param |
| 84 | * |
| 85 | * @return return type |
| 86 | */ |
| 87 | int lynq_gnss_stop(void); |
| 88 | |
| 89 | /** |
| 90 | * @brief function description |
| 91 | * |
| 92 | * @details detailed description |
| 93 | * |
| 94 | * @param param |
| 95 | * |
| 96 | * @return return type |
| 97 | */ |
| 98 | int lynq_gnss_agps_dataconnopen(void); |
| 99 | /** |
| 100 | * @brief function description |
| 101 | * |
| 102 | * @details detailed description |
| 103 | * |
| 104 | * @param param |
| 105 | * |
| 106 | * @return return type |
| 107 | */ |
| 108 | int lynq_gnss_dev_reset(void); |
| 109 | |
| 110 | /** |
| 111 | * @brief function description |
| 112 | * |
| 113 | * @details detailed description |
| 114 | * |
| 115 | * @param param |
| 116 | * |
| 117 | * @return return type |
| 118 | */ |
| 119 | int lynq_gnss_enable_glonass(void); |
| 120 | |
| 121 | #endif |