| /********************************************************************* |
| * All Rights Reserved |
| * |
| * MARVELL CONFIDENTIAL |
| * Copyright 2012 Marvell International Ltd All Rights Reserved. |
| * The source code contained or described herein and all documents related to |
| * the source code ("Material") are owned by Marvell International Ltd or its |
| * suppliers or licensors. Title to the Material remains with Marvell International Ltd |
| * or its suppliers and licensors. The Material contains trade secrets and |
| * proprietary and confidential information of Marvell or its suppliers and |
| * licensors. The Material is protected by worldwide copyright and trade secret |
| * laws and treaty provisions. No part of the Material may be used, copied, |
| * reproduced, modified, published, uploaded, posted, transmitted, distributed, |
| * or disclosed in any way without Marvell's prior express written permission. |
| * |
| * No license under any patent, copyright, trade secret or other intellectual |
| * property right is granted to or conferred upon you by disclosure or delivery |
| * of the Materials, either expressly, by implication, inducement, estoppel or |
| * otherwise. Any license under such intellectual property rights must be |
| * express and approved by Marvell in writing. |
| * |
| **********************************************************************/ |
| |
| |
| /*! \file hsm_mwif_api.h |
| \brief . |
| |
| */ |
| |
| #ifndef _HSM_API_H_ |
| #define _HSM_API_H_ |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| #include "gps_types.h" |
| #include "gps_oal.h" |
| |
| #define GPS_STATE_SUCCESS 0 |
| #define GPS_STATE_FAIL -1 |
| |
| #define GPS_NMEA_STRING_MAXLEN 1024 |
| #define AGPS_MAX_NOTIFYID_LEN 50 |
| |
| #define GPS_MAX_SVS 32 |
| #define GLN_MAX_SVS 24 |
| |
| #define QZSS_MAX_SVS 5 |
| #define QZSS_MIN_SV_PRN 193 |
| #define QZSS_MAX_SV_PRN 197 |
| |
| #define WAAS_MAX_SVS 19 |
| #define WAAS_MIN_SV_PRN 120 |
| #define WAAS_MAX_SV_PRN 138 |
| |
| #define TRK_CHAN_MAX 40 |
| #define MAX_TESTMODE_SV_NUM 12 |
| #define GPS_DLBLOCK_TIME 40 |
| #define MAX_PDU_SIZE 8192 |
| |
| |
| |
| #define MAX_UTRA_RESULT_FREQS (8) |
| #define MAX_UTRA_RESULT_CELLS (32) /*< This is ASN.1, but can be reduced to save resources */ |
| #define MAX_NMR_CELLS (15) |
| #define GPS_HSM_MEAS_RESULT_LIST_LENGTH (32) |
| |
| #define MRVL_INTEG_TEST_START 0 //test start |
| #define MRVL_INTEG_TEST_1 1 //Integrity test 1,all tracking channels track one SV at one signal level |
| #define MRVL_INTEG_TEST_2 2 //Integrity test 2, all tracking channels track one SV at two signal level |
| #define MRVL_INTEG_TEST_3 3 //week acquisition test |
| #define MRVL_INTEG_TEST_4 4 //CW test |
| #define MRVL_INTEG_TEST_5 5 //Live fix test |
| #define MRVL_INTEG_TEST_6 6 //live fix test for AGPS |
| #define MRVL_INTEG_TEST_7 7 //Glonass single channel test |
| #define MRVL_INTEG_TEST_8 8 //Glonass multi channel test |
| #define MRVL_INTEG_TEST_9 9 //UART communication check |
| #define MRVL_INTEG_TEST_10 10 //CW test on GLN path |
| #define MRVL_INTEG_TEST_MAX (MRVL_INTEG_TEST_10+1) |
| #define MRVL_INTEG_TEST_READ 250 // read |
| #define MRVL_INTEG_TEST_RST 251 // reset chip |
| #define MRVL_INTEG_TEST_END 255 |
| |
| #define MRVLGPS_MAX_FREQ_LAYERS 3 |
| |
| enum |
| { |
| MRVLGPS_WORKMODE_NORMAL, |
| MRVLGPS_WORKMODE_FACTORY_TEST |
| }; |
| |
| typedef enum |
| { |
| MRVL_INTEG_TEST_STATUS_NONE = -2, |
| MRVL_INTEG_TEST_STATUS_RST = -1, |
| MRVL_INTEG_TEST_STATUS_INIT = 0, |
| MRVL_INTEG_TEST_STATUS_MODE1, |
| MRVL_INTEG_TEST_STATUS_MODE2, |
| MRVL_INTEG_TEST_STATUS_MODE3, |
| MRVL_INTEG_TEST_STATUS_MODE4, |
| MRVL_INTEG_TEST_STATUS_MODE5, |
| MRVL_INTEG_TEST_STATUS_MODE6, |
| MRVL_INTEG_TEST_STATUS_MODE7, |
| MRVL_INTEG_TEST_STATUS_MODE8, |
| MRVL_INTEG_TEST_STATUS_MODE9, |
| MRVL_INTEG_TEST_STATUS_MODE10, |
| MRVL_INTEG_TEST_STATUS_MAX |
| } |
| INTEG_TEST_STATUS; |
| |
| enum |
| { |
| GPS_HSM_SENSOR_TYPE_ACC = 1, |
| GPS_HSM_SENSOR_TYPE_MAG = 2, |
| GPS_HSM_SENSOR_TYPE_GYRO = 4, |
| GPS_HSM_SENSOR_TYPE_BARO = 6 |
| }; |
| |
| enum |
| { |
| GPS_HSM_MOLR_PREF_NONE = 0, |
| GPS_HSM_MOLR_PREF_CPLANE = 1, |
| GPS_HSM_MOLR_PREF_SUPL = 2 |
| }; |
| |
| |
| typedef enum Agps_SessionPriorityTag |
| { |
| AGPS_SESS_PRIORITY_UNKNOWN = 0, |
| AGPS_SESS_PRIORITY_EMERGENCY = 1, |
| AGPS_SESS_PRIORITY_LCS = 2, |
| } |
| Agps_SessionPriority_t; |
| |
| typedef enum Rrc_PduTypeTag |
| { |
| RRC_PDUTYPE_MEASCONTROLFAILURE, |
| RRC_PDUTYPE_MEASREPORT, |
| RRC_PDUTYPE_RRCSTATUS, |
| RRC_PDUTYPE_DL_DCCH, |
| RRC_PDUTYPE_SIB_BCH, |
| } |
| Rrc_PduType_t; |
| |
| |
| typedef enum AgpsRrcStateTag |
| { |
| AGPS_RRCSTATE_IDLE = 0, /* Idle State. */ |
| AGPS_RRCSTATE_CELL_DCH, /* Cell DCH Connected State. */ |
| AGPS_RRCSTATE_CELL_FACH, /* Cell FACH Connected State. */ |
| AGPS_RRCSTATE_CELL_PCH, /* Cell PCH Connected State. */ |
| AGPS_RRCSTATE_URA_PCH, /* URA PCH Connected State. */ |
| AGPS_RRCSTATE_INVALID /* Invalid State. */ |
| } |
| AgpsRrcState_t; |
| |
| typedef enum AgpsSystemStateTag |
| { |
| AGPS_SYSTEM_NONE = 0x0, /* None. */ |
| AGPS_SYSTEM_GSM = 0x1, /* GSM system */ |
| AGPS_SYSTEM_WCDMA = 0x2, /* UMTS system */ |
| AGPS_SYSTEM_LTE = 0x20, /* LTE network. */ |
| AGPS_SYSTEM_NETWORK_TYPE_MAX_LAST = 0x7FFFFFFF |
| } |
| mrvlGpsHsmNetworkType_t; |
| |
| typedef enum |
| { |
| AGPS_PROTOCOL_RRC, |
| AGPS_PROTOCOL_RRLP, |
| AGPS_PROTOCOL_LPP, |
| AGPS_PROTOCOL_SUPL, |
| |
| NUM_AGPS_PROTOCOLS, |
| |
| } AgpsProtocol_t; |
| |
| |
| enum |
| { |
| GPS_HSM_DELETE_EPHEMERIS = 0x0001, |
| GPS_HSM_DELETE_ALMANAC = 0x0002, |
| GPS_HSM_DELETE_POSITION = 0x0004, |
| GPS_HSM_DELETE_TIME = 0x0008, |
| GPS_HSM_DELETE_IONO = 0x0010, |
| GPS_HSM_DELETE_UTC = 0x0020, |
| GPS_HSM_DELETE_HEALTH = 0x0040, |
| GPS_HSM_DELETE_SVDIR = 0x0080, |
| GPS_HSM_DELETE_SVSTEER = 0x0100, |
| GPS_HSM_DELETE_SADATA = 0x0200, |
| GPS_HSM_DELETE_RTI = 0x0400, |
| GPS_HSM_DELETE_CELLDB_INFO = 0x8000, |
| GPS_HSM_DELETE_ALL = 0xFFFF |
| }; |
| |
| typedef struct |
| { |
| int prn; |
| float cno; |
| float elevation; /* degrees */ |
| float azimuth; /* degrees */ |
| } mrvlGpsSvInfo_t; |
| |
| typedef struct |
| { |
| U16 num_svs; |
| mrvlGpsSvInfo_t sv_list[GPS_MAX_SVS]; |
| U32 ephemeris_mask; |
| U32 almanac_mask; |
| U32 used_in_fix_mask; |
| } mrvlGpsSvStatus_t; |
| |
| typedef struct |
| { |
| U16 num_svs_gln; |
| mrvlGpsSvInfo_t gln_sv_list[GLN_MAX_SVS]; |
| U32 gln_ephemeris_mask; |
| U32 gln_almanac_mask; |
| U32 gln_used_in_fix_mask; |
| } mrvlGlnSvStatus_t; |
| |
| typedef struct |
| { |
| U16 num_svs_waas; |
| mrvlGpsSvInfo_t waas_sv_list[WAAS_MAX_SVS]; |
| U32 waas_ephemeris_mask; |
| U32 waas_almanac_mask; |
| U32 waas_used_in_fix_mask; |
| } mrvlWaasSvStatus_t; |
| |
| typedef struct |
| { |
| U16 num_svs_qzss; |
| mrvlGpsSvInfo_t qzss_sv_list[QZSS_MAX_SVS]; |
| U32 qzss_ephemeris_mask; |
| U32 qzss_almanac_mask; |
| U32 qzss_used_in_fix_mask; |
| } mrvlQzssSvStatus_t; |
| |
| typedef struct |
| { |
| mrvlGpsSvStatus_t gps_sv_status; |
| mrvlGlnSvStatus_t gln_sv_status; |
| mrvlWaasSvStatus_t waas_sv_status; |
| mrvlQzssSvStatus_t qzss_sv_status; |
| } mrvlGnssSvStatus_t; |
| |
| typedef struct |
| { |
| DBL latitude; |
| DBL longitude; |
| DBL altitude; // wgs84 hae |
| float speed; // speed (horizontal) |
| float bearing; // direction of velocity (degrees) |
| float accuracy; |
| DBL timestamp; |
| U32 weekNumber; |
| FLT vVel; |
| FLT hPosErr; |
| FLT vPosErr; |
| FLT ePosErr; |
| FLT nPosErr; |
| FLT hVelErr; |
| FLT vVelErr; |
| S32 usedAssistance; |
| } mrvlGpsLocation_t; |
| |
| typedef struct |
| { |
| DBL utcTime; |
| U16 msgLen; |
| S8 nmeaInfo[GPS_NMEA_STRING_MAXLEN]; |
| } mrvlGpsNmea_t; |
| |
| |
| typedef enum |
| { |
| GPS_HSM_STOP_INITIAL = 1, |
| GPS_HSM_STOP_NORMAL_APP, |
| GPS_HSM_STOP_NORMAL_HSM, |
| GPS_HSM_STOP_NORMAL_APP_DEFERRED, |
| GPS_HSM_STOP_NORMAL_FAKE |
| } mrvlGpsHsmStopMode_t; |
| |
| typedef enum |
| { |
| GPS_HSM_STATUS_INVALID, |
| GPS_HSM_STATUS_ON, |
| GPS_HSM_STATUS_STARTED, |
| GPS_HSM_STATUS_STOPPED, |
| GPS_HSM_STATUS_OFF |
| } mrvlGpsHsmStatus_t; |
| |
| typedef enum |
| { |
| GPS_HSM_CHIP_STATE_AWAKE, |
| GPS_HSM_CHIP_STATE_SLEEP, |
| GPS_HSM_AGPS_SUPL_NI_START, |
| GPS_HSM_AGPS_SUPL_NI_STOP, |
| GPS_HSM_AGPS_CPLANE_MTLR_START, |
| GPS_HSM_AGPS_CPLANE_MTLR_STOP, |
| GPS_HSM_AGPS_CPLANE_NILR_START, |
| GPS_HSM_AGPS_CPLANE_NILR_STOP, |
| GPS_HSM_AGPS_SUPL_TCP_CONNECT_ATTEMPT, |
| GPS_HSM_AGPS_SUPL_TCP_CONNECT_SUCCESS, |
| GPS_HSM_AGPS_SUPL_TCP_CONNECT_FAILURE, |
| GPS_HSM_AGPS_SUPL_TCP_CONNECT_CLOSED, |
| GPS_HSM_AGPS_SUPL_TLS_CONNECT_ATTEMPT, |
| GPS_HSM_AGPS_SUPL_TLS_CONNECT_SUCCESS, |
| GPS_HSM_AGPS_SUPL_TLS_CONNECT_FAILURE, |
| GPS_HSM_AGPS_ASSISTANCE_RECEIVED, |
| } mrvlGpsHsmSwEventType_t; |
| |
| |
| typedef struct |
| { |
| mrvlGpsHsmSwEventType_t type; |
| union |
| { |
| S32 dummy; |
| } context; |
| } mrvlGpsHsmSwEvent_t; |
| |
| typedef enum |
| { |
| GPS_HSM_GNSS_MODE_AUTONOMOUS = 0, |
| GPS_HSM_GNSS_MODE_GPS = 1, |
| GPS_HSM_GNSS_MODE_GLONASS = 2, |
| GPS_HSM_GNSS_MODE_COMPASS = 4 |
| } mrvlGpsHsmGnssMode_t; |
| |
| typedef enum |
| { |
| AGPS_NI_TYPE_VOICE, |
| AGPS_NI_TYPE_UMTS_SUPL, |
| AGPS_NI_TYPE_UMTS_CTRL_PLANE |
| } |
| mrvlGpsNiType_t; |
| |
| typedef enum |
| { |
| AGPS_NOTIFYTYPE_NONE, |
| AGPS_NOTIFYTYPE_NOTIFYONLY, |
| AGPS_NOTIFYTYPE_NOTIFY_VERIFY_ALLOW, |
| AGPS_NOTIFYTYPE_NOTIFY_VERIFY_DENY |
| } mrvlGpsUserNotificationType_t; |
| |
| typedef enum |
| { |
| AGPS_USRNTFY_IDTYPE_LOGICAL_NAME = 1, |
| AGPS_USRNTFY_IDTYPE_EMAIL, |
| AGPS_USRNTFY_IDTYPE_MSISDN, |
| AGPS_USRNTFY_IDTYPE_URL, |
| AGPS_USRNTFY_IDTYPE_SIP_URI, |
| AGPS_USRNTFY_IDTYPE_MIN, |
| AGPS_USRNTFY_IDTYPE_MDN, |
| AGPS_USRNTFY_IDTYPE_IMPI |
| } mrvlGpsUserNotificationIdType_t; |
| |
| typedef enum |
| { |
| AGPS_USRNTFY_PARAM_REQUESTOR_ID = 0x1, /* \a RequestorId is valid */ |
| AGPS_USRNTFY_PARAM_CLIENT_NAME = 0x2, /* \a ClientName is valid */ |
| } mrvlGpsHsmUserNotifyParamsValid_t; |
| |
| |
| typedef enum |
| { |
| HSM_CHARENC_US_ASCII, /* US-ASCII */ |
| HSM_CHARENC_UTF_8, /* UTF-8 */ |
| HSM_CHARENC_UCS_2, /* UCS-2 */ |
| HSM_CHARENC_GSM_DEFAULT, /* GSM Default 3GPP TS 23.038 */ |
| } S8Enc_t; |
| |
| enum |
| { |
| GPS_HSM_LOCTYPE_GSM_CELLID = 1, |
| GPS_HSM_LOCTYPE_UMTS_CELLID, |
| GPS_HSM_LOCATION_TYPE_MAC, |
| GPS_HSM_LOCTYPE_EUTRAN_CELLID // LTE |
| }; |
| |
| typedef enum |
| { |
| GPS_HSM_AGPS_NONE_SI, |
| GPS_HSM_AGPS_SI, |
| GPS_HSM_AGPS_AUTONOMOUS |
| } |
| mrvlGpsAgpsProcType_t; |
| |
| typedef struct |
| { |
| mrvlGpsUserNotificationIdType_t Type; |
| S32 Encoding; |
| S32 Len; |
| S8 Data[AGPS_MAX_NOTIFYID_LEN]; |
| } mrvlGpsNotificationId_t; |
| |
| typedef struct |
| { |
| mrvlGpsHsmUserNotifyParamsValid_t ValidParams; |
| mrvlGpsNiType_t NiType; |
| mrvlGpsUserNotificationType_t NotifyType; |
| mrvlGpsNotificationId_t RequestorId; |
| mrvlGpsNotificationId_t ClientName; |
| U32 TransactionId; |
| } mrvlGpsUserNotifyParams_t; |
| |
| |
| |
| typedef struct |
| { |
| U32 mode; |
| union |
| { |
| struct |
| { |
| U8 status; /*0-ongoing,1-complete*/ |
| U8 svid; |
| U16 Chan_cnt; |
| U32 ACQ_time;/*millisecond,0-none,the time of successful acquisition*/ |
| U32 Bit_sync_time;/*millisecond,0-none,the time of successful bit sync*/ |
| U16 CN0_mean;/*scale=0.1,0-none,the average CN0 of all channels*/ |
| U16 CN0_var;/*scale = 0.1,the variance of CN0 for all channels*/ |
| U16 CN0_max; |
| U16 CN0_min; |
| S32 Doppler_mean;/*0-none,the average doppler frequcency for all channels*/ |
| S32 Doppler_var;/*0-none,the variance of doppler frequency for all channels*/ |
| U32 ch_map0; |
| U32 ch_map1; |
| U16 CNO_all[TRK_CHAN_MAX]; |
| S32 Doppler_all[TRK_CHAN_MAX]; |
| } integTestResult1; |
| |
| struct |
| { |
| U8 status; /*0-ongoing,1-complete*/ |
| U8 svid; |
| U16 Chan_cnt; |
| U32 ACQ_time;/*millisecond,0-none,the time of successful acquisition*/ |
| U32 Bit_sync_time;/*millisecond,0-none,the time of successful bit sync*/ |
| U16 CN0_mean;/*scale=0.1,0-none,the average CN0 of all channels*/ |
| U16 CN0_var;/*scale = 0.1,the variance of CN0 for all channels*/ |
| U16 CN0_max; |
| U16 CN0_min; |
| S32 Doppler_mean;/*0-none,the average doppler frequcency for all channels*/ |
| S32 Doppler_var;/*0-none,the variance of doppler frequency for all channels*/ |
| U32 ch_map0; |
| U32 ch_map1; |
| U16 CNO_all[TRK_CHAN_MAX]; |
| S32 Doppler_all[TRK_CHAN_MAX]; |
| } integTestResult2; |
| |
| struct |
| { |
| U8 status;/*0-on going,1-complete*/ |
| U8 svCnt; |
| U32 msCount; |
| U32 svList; /*the Visible satellite list,bit0=1-->1# Invsible,bit1=1-->2# Invisible,......*/ |
| DBL Latitude;/*0-none,the latitude of the receiver*/ |
| DBL Longitude;/*0-none,the longitude of the receiver*/ |
| DBL Altitude;/*0-none,the altitude of the receiver*/ |
| FLT Speed;/*0-none,the speed of the receiver*/ |
| DBL RTC_frequency;/*0-none,the frequency of the RTC*/ |
| DBL Clock_offset;/*0-none,the frequency offset of TCXO*/ |
| DBL Clock_drift;/*0-none,the frqency drift of TCXO*/ |
| U16 CN0_mean;/*scale=0.1,0-none,the mean CN0*/ |
| U16 CN0_var;/*0-none,the variance of CN0*/ |
| U16 CN0_max; |
| U16 CN0_min; |
| U8 svID[MAX_TESTMODE_SV_NUM]; |
| U16 CN0[MAX_TESTMODE_SV_NUM]; |
| U8 aiding_flag;//0-without aiding; 1-with aiding |
| } integTestResult3; |
| |
| struct |
| { |
| U8 status; /* 0 = in progress, 1 = complete */ |
| U8 NF_Status[4]; /*0=on going,1=notch filter0 enable,2-notch filter1 enable,4-notch filter2 enable*/ |
| U32 time; /* millisecond */ |
| S32 frequency[4]; /* first spur frequency */ |
| S32 snr[4]; |
| } integTestResult4; |
| |
| struct |
| { |
| U8 status;/*0-on going,1-complete*/ |
| U8 svCnt; |
| U32 msCount; |
| U32 svList; /*the Visible satellite list,bit0=1-->1# Invsible,bit1=1-->2# Invisible,......*/ |
| DBL Latitude;/*0-none,the latitude of the receiver*/ |
| DBL Longitude;/*0-none,the longitude of the receiver*/ |
| DBL Altitude;/*0-none,the altitude of the receiver*/ |
| FLT Speed;/*0-none,the speed of the receiver*/ |
| DBL RTC_frequency;/*0-none,the frequency of the RTC*/ |
| DBL Clock_offset;/*0-none,the frequency offset of TCXO*/ |
| DBL Clock_drift;/*0-none,the frqency drift of TCXO*/ |
| U16 CN0_mean;/*scale=0.1,0-none,the mean CN0*/ |
| U16 CN0_var;/*0-none,the variance of CN0*/ |
| U16 CN0_max; |
| U16 CN0_min; |
| U8 svID[MAX_TESTMODE_SV_NUM]; |
| U16 CN0[MAX_TESTMODE_SV_NUM]; |
| U8 aiding_flag;//0-without aiding; 1-with aiding |
| } integTestResult5; |
| |
| struct |
| { |
| U8 status;/*0-on going,1-complete*/ |
| U8 svCnt; |
| U32 msCount; |
| U32 svList; /*the Visible satellite list,bit0=1-->1# Invsible,bit1=1-->2# Invisible,......*/ |
| DBL Latitude;/*0-none,the latitude of the receiver*/ |
| DBL Longitude;/*0-none,the longitude of the receiver*/ |
| DBL Altitude;/*0-none,the altitude of the receiver*/ |
| FLT Speed;/*0-none,the speed of the receiver*/ |
| DBL RTC_frequency;/*0-none,the frequency of the RTC*/ |
| DBL Clock_offset;/*0-none,the frequency offset of TCXO*/ |
| DBL Clock_drift;/*0-none,the frqency drift of TCXO*/ |
| U16 CN0_mean;/*scale=0.1,0-none,the mean CN0*/ |
| U16 CN0_var;/*0-none,the variance of CN0*/ |
| U16 CN0_max; |
| U16 CN0_min; |
| U8 svID[MAX_TESTMODE_SV_NUM]; |
| U16 CN0[MAX_TESTMODE_SV_NUM]; |
| U8 aiding_flag;//0-without aiding; 1-with aiding |
| } integTestResult6; |
| |
| struct |
| { |
| U8 status;/*0-on going,1-complete*/ |
| U8 svID; |
| U16 CN0; |
| U32 msCount; |
| } integTestResult7; |
| |
| struct |
| { |
| U8 status;/*0-on going,1-complete*/ |
| U8 svCnt; |
| U32 msCount; |
| U32 svList; /*the Visible satellite list,bit0=1-->1# Invsible,bit1=1-->2# Invisible,......*/ |
| DBL Latitude;/*0-none,the latitude of the receiver*/ |
| DBL Longitude;/*0-none,the longitude of the receiver*/ |
| DBL Altitude;/*0-none,the altitude of the receiver*/ |
| FLT Speed;/*0-none,the speed of the receiver*/ |
| DBL RTC_frequency;/*0-none,the frequency of the RTC*/ |
| DBL Clock_offset;/*0-none,the frequency offset of TCXO*/ |
| DBL Clock_drift;/*0-none,the frqency drift of TCXO*/ |
| U16 CN0_mean;/*scale=0.1,0-none,the mean CN0*/ |
| U16 CN0_var;/*0-none,the variance of CN0*/ |
| U16 CN0_max; |
| U16 CN0_min; |
| U8 svID[MAX_TESTMODE_SV_NUM]; |
| U16 CN0[MAX_TESTMODE_SV_NUM]; |
| U8 aiding_flag;//0-without aiding; 1-with aiding |
| } integTestResult8; |
| |
| struct |
| { |
| U8 status; |
| U32 uartProbableErrorBytes; |
| U32 uartGoodBytes; |
| } integTestResult9; |
| |
| struct |
| { |
| U8 status; /* 0 = in progress, 1 = complete */ |
| U8 NF_Status[4]; /*0=on going,1=notch filter0 enable,2-notch filter1 enable,4-notch filter2 enable*/ |
| U32 time; /* millisecond */ |
| S32 frequency[4]; /* first spur frequency */ |
| S32 snr[4]; |
| } integTestResult10; |
| } testRes; |
| } mrvlGpsHsmIntegrityTestResults; |
| |
| |
| /* struct for results of test mode 1&2 */ |
| typedef struct |
| { |
| U8 status; |
| U8 svid; |
| U16 nChannel; |
| U32 acqMsCnt; |
| U32 bitSyncMsCnt; |
| U16 meanCno; |
| U16 varCno; |
| U16 maxCno; |
| U16 minCno; |
| S32 meanDopp; |
| S32 varDopp; |
| U32 chMap0; |
| U32 chMap1; |
| U16 cnoAll[TRK_CHAN_MAX]; |
| S32 doppAll[TRK_CHAN_MAX]; |
| } integrityTestRes_t; |
| |
| /* struct for results of test mode 3&5&6 */ |
| typedef struct |
| { |
| U8 svCnt; |
| U32 MsCnt; |
| U32 sv_list; |
| DBL lat; |
| DBL lon; |
| DBL alt; |
| FLT vel; |
| DBL rtc_freq; |
| DBL clk_offset; |
| DBL clk_drift; |
| U16 meanCno; |
| U16 varCno; |
| U16 maxCno; |
| U16 minCno; |
| U8 sv_id[MAX_TESTMODE_SV_NUM]; |
| U16 cnoAll[MAX_TESTMODE_SV_NUM]; |
| U8 aid_flag;//0-without aiding, 1-with aiding |
| } LiveFixTestRes_t; |
| |
| /* struct for results of test mode 7 */ //add by zhujj |
| typedef struct |
| { |
| U8 status; |
| U8 svid; |
| U16 Cno; |
| U32 MsCnt; |
| } integrityTestResGln_t; |
| |
| |
| |
| typedef struct |
| { |
| unsigned int arfcn; /*< ARFCN (0...1023) */ |
| unsigned int bsic; /*< BSIC (0...63) */ |
| unsigned int rxLev; /*< RXLEV (0...63) */ |
| } mrvlGpsHsmEcidNmr_t; |
| |
| typedef struct |
| { |
| unsigned int mcc; /*< Mobile Country Code (0...999) */ |
| unsigned int mnc; /*< Mobile Network Code (0...99) */ |
| unsigned int lac; /*< Location area code (0...65535) */ |
| unsigned int ci; /*< Cell Identity (0...65535) */ |
| unsigned int numOfCells; /* < Number of cells in nmrCellResult array */ |
| mrvlGpsHsmEcidNmr_t nmr[MAX_NMR_CELLS]; /*< Network measurement result structure */ |
| unsigned int taPresent; /*< TRUE - timing advance present, FALSE - omitted */ |
| unsigned int timingAdv; /*< Timing advance (0...255) */ |
| } mrvlGpsHsmEcidGsmInfo_t; |
| |
| /* E-CID UTRA information provision */ |
| |
| |
| typedef struct |
| { |
| unsigned long ucidPresent; /*< TRUE - present, FALSE - omitted */ |
| unsigned long ucid; /*< Cell Identity (0...268435455). NOTE: this information element contains the Cell Identity sent in SIB3 */ |
| unsigned long psc; /*< Primary scrambling code (0...511) */ |
| unsigned long cpichRscp; /*< CPICH RSCP (0...91, spare, 123...127) */ |
| unsigned long cpichEcN0; /*< CPICH Ec / N0 (0...63) */ |
| unsigned long pathLossPresent; /*< TRUE - path loss present */ |
| unsigned long pathLoss; /*< Path loss (46...173) */ |
| } mrvlGpsHsmEcidCellResult_t; |
| |
| typedef struct |
| { |
| unsigned long numOfCells; /*< Number of cells in cell results list */ |
| mrvlGpsHsmEcidCellResult_t cellResult[MAX_UTRA_RESULT_CELLS]; /*< Cell results list */ |
| } mrvlGpsHsmEcidCellResultList_t; |
| |
| typedef struct |
| { |
| unsigned long uarfcnDl; /*< Downlink UARFCN (0...16383) */ |
| unsigned long rssi; /*< UTRA carrier RSSI (0...127) */ |
| mrvlGpsHsmEcidCellResultList_t cellResultList; |
| } mrvlGpsHsmMeasuredResultInfo_t; |
| |
| typedef struct |
| { |
| unsigned long numUtraReportedFreqs; /*< Number of UTRA reported frequencies (1...8) */ |
| mrvlGpsHsmMeasuredResultInfo_t utraMeasResult[MAX_UTRA_RESULT_FREQS]; /*< UTRA measurement results array */ |
| } mrvlGpsHsmEcidMeasuredResultListInfo_t; |
| |
| typedef struct |
| { |
| unsigned long mcc; /*< Mobile Country Code (0...999) */ |
| unsigned long mnc; /*< Mobile Network Code (0...99) */ |
| unsigned long ucid; /*< Cell Identity (0...268435455). NOTE: this information element contains the Cell Identity sent in SIB3 */ |
| unsigned long uarfcnDl; /*< Downlink UARFCN (0...16383) */ |
| unsigned long uarfcnUl; /*< Uplink UARFCN (0...16383) */ |
| unsigned long psc; /*< Primary scrambling code (0...511) */ |
| unsigned long MeasResultPresent; /*< TRUE - measured result list is present, FALSE - omitted */ |
| mrvlGpsHsmEcidMeasuredResultListInfo_t measResult; /*< UTRA measurement results */ |
| } mrvlGpsHsmEcidUtraInfo_t; |
| |
| /* E-CID EUTRA information provision */ |
| |
| |
| typedef struct |
| { |
| unsigned long mccPresent; |
| unsigned long mcc; |
| unsigned long mnc; |
| unsigned long cellId; |
| } mrvlGpsHsmCelllGlobalId_t; |
| |
| typedef struct |
| { |
| unsigned long physCellId; /*< Physical cell ID, 0...503 */ |
| unsigned long cgiPresent; /*< TRUE - Cell global Identity present */ |
| mrvlGpsHsmCelllGlobalId_t cellGlobalId; /*< Cell global identity */ |
| unsigned long arfcnEutra; /*< EARFCN */ |
| unsigned long sfnPresent; /*< TRUE - systemFrameNumber present */ |
| unsigned long systemFrameNumber; /*< System frame number */ |
| unsigned long rsrpPresent; /*< TRUE - RSRP present */ |
| unsigned long rsrp; /*< RSRP report (0...97), mapped according to 36.133 */ |
| unsigned long rsrqPresent; /*< TRUE - RSRQ present */ |
| unsigned long rsrq; /*< RSRQ report (0...34), mapped according to 36.133 */ |
| unsigned long rxTxTimeDiffPresent; /*< UE Rx-Tx time difference present */ |
| unsigned long rxTxTimeDiff; /*< UE Rx-Tx time difference (0...4095), mapped according to 36.133 */ |
| unsigned long taPresent; /*< TRUE - timing advance present */ |
| unsigned long timingAdvance; /*< Timing advance (0...1282). NTA/16 as per [3GPP 36.213]. |
| Required for E-CID over SUPL2.0 */ |
| unsigned long tacPresent; /*< TRUE - Tracking area code present */ |
| unsigned long trackingAreaCode; /*< Tracking area code. Required for E-CID over SUPL2.0 */ |
| } mrvlGpsHsmMeasuredResultElementInfo_t; |
| |
| /* E-CID provided measurement information during LTE. Provided by ERRC to the upper layers */ |
| typedef struct |
| { |
| unsigned long primaryCellMeasuredResultsPresent; /*< TRUE - primary cell measured results present */ |
| mrvlGpsHsmMeasuredResultElementInfo_t primaryCellMeasuredResults; /*< Primary cell measured results in LTE. primaryCellMeasuredResults |
| field contains measurements for the primary cell, when the target device reports measurements for both primary cell and neighbor |
| cells. This field shall be omitted when the target device reports measurements for the primary cell only, in which case the |
| measurements the primary cell is reported in the measuredResultsList. */ |
| unsigned long measuredResultsListLength; /*< Number of elements in measuredResultsList */ |
| mrvlGpsHsmMeasuredResultElementInfo_t measuredResultsList[GPS_HSM_MEAS_RESULT_LIST_LENGTH]; /*< Neighbor cell measured results */ |
| } mrvlGpsHsmEcidSignalMeasInfo_t; |
| |
| /* E-CID error causes enumerator */ |
| typedef enum |
| { |
| GPS_HSM_ECID_ERROR_CAUSE_UNDEFINED, /*< Unspecified error */ |
| GPS_HSM_ECID_ERROR_CAUSE_REQUESTED_MEASUREMENT_NOT_AVAILABLE, /*< Requested measurement not available */ |
| GPS_HSM_ECID_ERROR_CAUSE_NOT_ALL_REQUESTED_MEASUREMENT_POSSIBLE, |
| GPS_HSM_ECID_ERROR_CAUSE_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmEcidErrocCause_t; |
| |
| /* E-CID target device error causes structure */ |
| typedef struct |
| { |
| mrvlGpsHsmEcidErrocCause_t ecidErrorCauses; /*< E-CID measurement error causes */ |
| unsigned long rsrpMeasurementNotPossible; /*< TRUE - RSRP measurement not possible */ |
| unsigned long rsrqMeasurementNotPossible; /*< TRUE - RSRQ measurement not possible */ |
| unsigned long ueRxTxMeasurementNotPossible; /*< TRUE - UE Rx-Tx time difference measurement not possible */ |
| } mrvlGpsHsmEcidErrorInfo_t; |
| |
| typedef struct |
| { |
| unsigned long ecidSignalMeasurementInformationPresent; /*< TRUE - E-CID information present, FALSE - omitted */ |
| mrvlGpsHsmEcidSignalMeasInfo_t ecidSignalMeasurementInformation; /*< E-CID signal measurement result in LTE */ |
| unsigned long ecidErrorPresent; /*< TRUE - E-CID error present, FALSE - omitted */ |
| mrvlGpsHsmEcidErrorInfo_t ecidError; /*< E-CID measurement error */ |
| } mrvlGpsHsmEcidEutraInfo_t; |
| |
| typedef struct mrvlGpsHsmEcidMeasCnf |
| { |
| mrvlGpsHsmNetworkType_t networkType; |
| union |
| { |
| mrvlGpsHsmEcidGsmInfo_t gsmInfo; |
| mrvlGpsHsmEcidUtraInfo_t utraInfo; |
| mrvlGpsHsmEcidEutraInfo_t eutraInfo; |
| } nt; |
| } mrvlGpsHsmEcidMeasCnf_t; |
| |
| /* E-CID UE AREA Indication */ |
| |
| |
| typedef struct mrvlGpsHsmGsmAreaInfo |
| { |
| unsigned long mcc; /*< Mobile Country Code (0...999) */ |
| unsigned long mnc; /*< Mobile Network Code (0...99) */ |
| unsigned long lac; /*< Location area code (0...65535) */ |
| unsigned long ci; /*< Cell Identity (0...65535) */ |
| } mrvlGpsHsmGsmAreaInfo_t; |
| |
| typedef struct mrvlGpsHsmUtraAreaInfo |
| { |
| unsigned long mcc; /*< Mobile Country Code (0...999) */ |
| unsigned long mnc; /*< Mobile Network Code (0...99) */ |
| unsigned long lac; /*< Location area code (0...65535) */ |
| unsigned long ucid; /*< Cell Identity (0...268435455). NOTE: this information element contains the Cell Identity sent in SIB3 */ |
| } mrvlGpsHsmUtraAreaInfo_t; |
| |
| typedef struct mrvlGpsHsmEutraAreaInfo |
| { |
| unsigned long arfcnEutra; /*< EARFCN */ |
| unsigned long physCellId; /*< Physical cell ID, 0...503 */ |
| unsigned long cgiPresent; /*< TRUE - Cell global Identity present */ |
| mrvlGpsHsmCelllGlobalId_t cellGlobalId; /*< Cell global identity */ |
| } mrvlGpsHsmEutraAreaInfo_t; |
| |
| typedef struct mrvlGpsHsmUeAreaInfo |
| { |
| mrvlGpsHsmNetworkType_t networkType; |
| union |
| { |
| mrvlGpsHsmGsmAreaInfo_t gsmArea; |
| mrvlGpsHsmUtraAreaInfo_t utraArea; |
| mrvlGpsHsmEutraAreaInfo_t eutraArea; |
| } nt; |
| } mrvlGpsHsmUeAreaInfo_t; |
| |
| typedef struct mrvlGpsHsmNLPInfo |
| { |
| double latitude; |
| double longitude; |
| float accuracy; |
| U64 timestamp; |
| } mrvlGpsHsmNLPInfo_t; |
| |
| typedef struct gpsRefLocbyCell |
| { |
| U8 semiMajor; |
| U16 mnc; |
| U16 mcc; |
| U16 lac; |
| U32 cid; |
| DBL lon; |
| DBL lat; |
| DBL alt; |
| } gpsRefLocbyCell_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaServerErrorCauses |
| { |
| GPS_HSM_LP_EOTDOA_LOCATION_SERVER_ERROR_CAUSES_CAUSE_UNDEFINED = 0, |
| GPS_HSM_LP_EOTDOA_LOCATION_SERVER_ERROR_CAUSES_CAUSE_ASSISTANCE_DATA_NOT_SUPPORTED_BY_SERVER, |
| GPS_HSM_LP_EOTDOA_LOCATION_SERVER_ERROR_CAUSES_CAUSE_ASSISTANCE_DATA_SUPPORTED_BUT_CURRENTLY_NOT_AVAILABLE_BY_SERVER, |
| GPS_HSM_LP_EOTDOA_LOCATION_SERVER_ERROR_CAUSE_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaServerErrorCauses_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaErrorTag |
| { |
| GPS_HSM_LP_EOTDOA_ERROR_LOCATION_SERVER_ERROR_CAUSES = 0, |
| GPS_HSM_LP_EOTDOA_ERROR_TARGET_DEVICE_ERROR_CAUSES = 1, |
| GPS_HSM_LP_EOTDOA_ERROR_CAUSES_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaErrorTag_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaErrorCause |
| { |
| GPS_HSM_LP_EOTDOA_TARGET_DEVICE_ERROR_CAUSES_CAUSE_UNDEFINED = 0, |
| GPS_HSM_LP_EOTDOA_TARGET_DEVICE_ERROR_CAUSES_CAUSE_ASSISTANCE_DATA_MISSING, |
| GPS_HSM_LP_EOTDOA_TARGET_DEVICE_ERROR_CAUSES_CAUSE_UNABLE_TO_MEASURE_REFERENCE_CELL, |
| GPS_HSM_LP_EOTDOA_TARGET_DEVICE_ERROR_CAUSES_CAUSE_UNABLE_TO_MEASURE_ANY_NEIGHBOUR_CELL, |
| GPS_HSM_LP_EOTDOA_TARGET_DEVICE_ERROR_CAUSES_CAUSE_ATTEMPTED_BUT_UNABLE_TO_MEASURE_SOME_NEIGHBOUR_CELLS, |
| GPS_HSM_LP_EOTDOA_TARGET_DEVICE_ERROR_CAUSE_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaErrorCause_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaNeighCellInfoElemCpLen |
| { |
| GPS_HSM_LP_EOTDOA_NEIGHBOUR_CELL_INFO_ELEMENT_CP_LENGTH_NORMAL = 0, |
| GPS_HSM_LP_EOTDOA_NEIGHBOUR_CELL_INFO_ELEMENT_CP_LENGTH_EXTENDED, |
| GPS_HSM_LP_EOTDOA_NEIGHBOUR_CELL_INFO_ELEMENT_CP_LENGTH_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaNeighCellInfoElemCpLen_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaNeighCellInfoElemAntPortConfig |
| { |
| GPS_HSM_LP_EOTDOA_NEIGHBOUR_CELL_INFO_ELEMENT_ANTENNA_PORT_CONFIG_PORTS_MINUS_1_OR_MINUS_2 = 0, |
| GPS_HSM_LP_EOTDOA_NEIGHBOUR_CELL_INFO_ELEMENT_ANTENNA_PORT_CONFIG_PORTS_MINUS_4, |
| GPS_HSM_LP_EOTDOA_NEIGHBOUR_CELL_INFO_ELEMENT_ANTENNA_PORT_CONFIG_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaNeighCellInfoElemAntPortConfig_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaRefCellInfoElemAntPortConfig |
| { |
| GPS_HSM_LP_EOTDOA_REFERENCE_CELL_INFO_ANTENNA_PORT_CONFIG_PORTS1_OR_MINUS_2 = 0, |
| GPS_HSM_LP_EOTDOA_REFERENCE_CELL_INFO_ANTENNA_PORT_CONFIG_PORTS4, |
| GPS_HSM_LP_EOTDOA_REFERENCE_CELL_INFO_ANTENNA_PORT_CONFIG_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaRefCellInfoElemAntPortConfig_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaRefCellInfoElemCpLen |
| { |
| GPS_HSM_LP_EOTDOA_REFERENCE_CELL_INFO_CP_LENGTH_NORMAL = 0, |
| GPS_HSM_LP_EOTDOA_REFERENCE_CELL_INFO_CP_LENGTH_EXTENDED, |
| GPS_HSM_LP_EOTDOA_REFERENCE_CELL_INFO_CP_LENGTH_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaRefCellInfoElemCpLen_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaEprsInfoPrsBandwidth |
| { |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_N6 = 0, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_N15, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_N25, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_N50, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_N75, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_N100, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_BANDWIDTH_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaEprsInfoPrsBandwidth_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaEprsInfoNumDlFrames |
| { |
| GPS_HSM_LP_OTDOA_EPRS_INFO_NUM_DL_FRAMES_SF_MINUS_1 = 0, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_NUM_DL_FRAMES_SF_MINUS_2, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_NUM_DL_FRAMES_SF_MINUS_4, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_NUM_DL_FRAMES_SF_MINUS_6, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_NUM_DL_FRAMES_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaEprsInfoNumDlFrames_t; |
| |
| typedef enum mrvlGpsHsmLpOtdoaEprsInfoPrsMutingInfo99 |
| { |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_MUTING_INFO_R9_PO2_R9 = 0, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_MUTING_INFO_R9_PO4_R9 = 1, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_MUTING_INFO_R9_PO8_R9 = 2, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_MUTING_INFO_R9_PO16_R9 = 3, |
| GPS_HSM_LP_OTDOA_EPRS_INFO_PRS_MUTING_INFO_MAX_LAST = 0x7FFFFFFF |
| } mrvlGpsHsmLpOtdoaEprsInfoPrsMutingInfo99_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaEeCgiMcc |
| { |
| unsigned char data [3]; /* 0 to 9 */ |
| } mrvlGpsHsmLpOtdoaEeCgiMcc_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaEeCgiMnc |
| { |
| unsigned short n; /* 2 to 3 */ |
| unsigned char data [3];/* 0 to 9 */ |
| } mrvlGpsHsmLpOtdoaEeCgiMnc_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaEeCgi |
| { |
| mrvlGpsHsmLpOtdoaEeCgiMcc_t mcc; |
| mrvlGpsHsmLpOtdoaEeCgiMnc_t mnc; |
| unsigned int cellIdentity; /* 0 to 268435455 */ |
| } mrvlGpsHsmLpOtdoaEeCgi_t; |
| |
| typedef struct mrvlGpsHsmEprsInfoPrsMutingInfo99 |
| { |
| unsigned char tag; |
| union |
| { |
| /* 0 */ |
| unsigned char po2R9; /* 0 to 3 */ |
| /* 1 */ |
| unsigned char po4R9; /* 0 to 15 */ |
| /* 2 */ |
| unsigned char po8R9; /* 0 to 255 */ |
| /* 3 */ |
| unsigned char po16R9; /* 0 to 65535 */ |
| } po; |
| } mrvlGpsHsmEprsInfoPrsMutingInfo99_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaEprsInfo |
| { |
| unsigned char prsBandwidth; |
| unsigned short prsConfigurationIndex; /* 0 to 4095 */ |
| unsigned char numDlFrames; |
| unsigned char prsMutingInfoR9Present; |
| mrvlGpsHsmEprsInfoPrsMutingInfo99_t prsMutingInfoR9; |
| } mrvlGpsHsmLpOtdoaEprsInfo_t; |
| |
| |
| typedef struct mrvlGpsHsmLpOtdoaRefCellInfo |
| { |
| unsigned short physCellId; /* 0 to 503 */ |
| unsigned char cellGlobalIdPresent; |
| mrvlGpsHsmLpOtdoaEeCgi_t cellGlobalId; |
| unsigned char earfcnRefPresent; |
| unsigned short earfcnRef; |
| unsigned char antennaPortConfigPresent; |
| unsigned char antennaPortConfig; |
| unsigned char cpLength; |
| unsigned char prsInfoPresent; |
| mrvlGpsHsmLpOtdoaEprsInfo_t prsInfo; |
| unsigned char earfcnRefV9a0Present; |
| unsigned int earfcnRefV9a0; |
| } mrvlGpsHsmLpOtdoaRefCellInfo_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaNeighCellInfoElement |
| { |
| unsigned short physCellId; /* 0 to 503 */ |
| unsigned char cellGlobalIdPresent; |
| mrvlGpsHsmLpOtdoaEeCgi_t cellGlobalId; |
| unsigned char earfcnPresent; |
| unsigned short earfcn; |
| unsigned char cpLengthPresent; |
| unsigned char cpLength; |
| unsigned char prsInfoPresent; |
| mrvlGpsHsmLpOtdoaEprsInfo_t prsInfo; |
| unsigned char antennaPortConfigPresent; |
| unsigned char antennaPortConfig; |
| unsigned char slotNumberOffsetPresent; |
| unsigned char slotNumberOffset; /* 0 to 19 */ |
| unsigned char prsSubframeOffsetPresent; |
| unsigned short prsSubframeOffset; /* 0 to 1279 */ |
| unsigned short expectedRstd; /* 0 to 16383 */ |
| unsigned short expectedRstdUncertainty; /* 0 to 1023 */ |
| unsigned char earfcnV9a0Present; |
| unsigned int earfcnV9a0; |
| } mrvlGpsHsmLpOtdoaNeighCellInfoElement_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaNeighFreqInfo |
| { |
| unsigned short n; /* 1 to 24 */ |
| mrvlGpsHsmLpOtdoaNeighCellInfoElement_t data[24]; |
| } mrvlGpsHsmLpOtdoaNeighFreqInfo_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaNeighCellInfoList |
| { |
| unsigned long n; /* 1 to maxFreqLayers */ |
| mrvlGpsHsmLpOtdoaNeighFreqInfo_t data[MRVLGPS_MAX_FREQ_LAYERS]; |
| } mrvlGpsHsmLpOtdoaNeighCellInfoList_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaError |
| { |
| unsigned char tag; |
| union |
| { |
| unsigned char locationServerErrorCauses; |
| unsigned char targetDeviceErrorCauses; |
| } err; |
| } mrvlGpsHsmLpOtdoaError_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaProvideAssistanceData |
| { |
| unsigned char otdoaReferenceCellInfoPresent; |
| mrvlGpsHsmLpOtdoaRefCellInfo_t otdoaReferenceCellInfo; |
| unsigned char otdoaNeighbourCellInfoPresent; |
| mrvlGpsHsmLpOtdoaNeighCellInfoList_t otdoaNeighbourCellInfo; |
| unsigned char otdoaErrorPresent; |
| mrvlGpsHsmLpOtdoaError_t otdoaError; |
| } mrvlGpsHsmLpOtdoaProvideAssistanceData_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaMeasQuality |
| { |
| unsigned char errorResolution; /* 0 to 3 */ |
| unsigned char errorValue; /* 0 to 31 */ |
| unsigned char errorNumSamplesPresent; |
| unsigned char errorNumSamples; /* 0 to 7 */ |
| } mrvlGpsHsmLpOtdoaMeasQuality_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaMeasListElementData |
| { |
| unsigned short physCellIdNeighbor; /* 0 to 503 */ |
| unsigned char cellGlobalIdNeighbourPresent; |
| mrvlGpsHsmLpOtdoaEeCgi_t cellGlobalIdNeighbour; |
| unsigned char earfcnNeighbourPresent; |
| unsigned short earfcnNeighbour; |
| unsigned short rstd; /* 0 to 12711 */ |
| mrvlGpsHsmLpOtdoaMeasQuality_t rstdQuality; |
| unsigned char earfcnNeighbourV9a0Present; |
| unsigned int earfcnNeighbourV9a0; |
| } mrvlGpsHsmLpOtdoaMeasListElementData_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaMeasList |
| { |
| unsigned short n; /* 1 to 24 */ |
| mrvlGpsHsmLpOtdoaMeasListElementData_t data[24]; |
| } mrvlGpsHsmLpOtdoaMeasList_t; |
| |
| typedef struct mrvlGpsHsmLpOtdoaMeasInfo |
| { |
| unsigned short systemFrameNumber; /* 0 to 1023 */ |
| unsigned short physCellIdRef; /* 0 to 503 */ |
| unsigned char cellGlobalIdRefPresent; |
| mrvlGpsHsmLpOtdoaEeCgi_t cellGlobalIdRef; |
| unsigned char earfcnRefPresent; |
| unsigned short earfcnRef; |
| unsigned char referenceQualityPresent; |
| mrvlGpsHsmLpOtdoaMeasQuality_t referenceQuality; |
| mrvlGpsHsmLpOtdoaMeasList_t neighbourMeasurementList; |
| unsigned char earfcnRefV9a0Present; |
| unsigned int earfcnRefV9a0; |
| } mrvlGpsHsmLpOtdoaMeasInfo_t; |
| |
| typedef struct mrvlGpsHsmLpProvideLocInfo |
| { |
| unsigned char otdoaSignalMeasurementInformationPresent; |
| mrvlGpsHsmLpOtdoaMeasInfo_t otdoaSignalMeasurementInformation; |
| unsigned char otdoaErrorPresent; |
| mrvlGpsHsmLpOtdoaError_t otdoaError; |
| } mrvlGpsHsmLpProvideLocInfo_t; |
| |
| typedef struct mrvlGpsHsmOtdoaProvidePrsAssistanceReqMsg |
| { |
| mrvlGpsHsmLpOtdoaProvideAssistanceData_t prsAssistanceData; |
| } mrvlGpsHsmOtdoaProvidePrsAssistanceReqMsg_t; |
| |
| typedef struct mrvlGpsHsmProvideRstdLocInfoMsg |
| { |
| mrvlGpsHsmLpProvideLocInfo_t otdoaProvideLocationInformation; |
| } mrvlGpsHsmProvideRstdLocInfoMsg_t; |
| |
| //typedef enum |
| //{ |
| // /* Normal positioning request */ |
| // NO_EMERGENCY = 0x00, |
| // /* Emergent positioning request such as E911/112 */ |
| // EMERGENCY = 0x01 |
| //} mrvlGpsHsmSessionPriority_t; |
| |
| typedef enum |
| { |
| /* UL RRC message includeds MeasurementReport, which could be MeasuredResults/UE-Positioning-MeasuredResults or EventResults. */ |
| GPS_HSM_RRC_MEAS_REPORT = 0, |
| /* UL RRC MeasurementControlFailure is included. */ |
| GPS_HSM_RRC_MEAS_FAILURE, |
| /* UL RRCStatus is included */ |
| GPS_HSM_RRC_STATUS |
| } mrvlGpsHsmRrcMsgType_t; |
| |
| typedef struct |
| { |
| mrvlGpsHsmRrcMsgType_t rrc_msg_type; |
| struct |
| { |
| unsigned char measurement_identity; /* valid if rrc_msg_type is LSM_RRC_MEAS_REPORT */ |
| /* 0: MeasuredResults or UE-Positioning-MeasuredResults, which is compile time decided inside LPL. |
| 1: EventResults is reported. */ |
| unsigned char measurement_or_event; |
| } meas_report; |
| unsigned long int is_final_response; /* 1: final UL response; 0: more UL message to come. */ |
| } mrvlGpsHsmOtaParams_t; |
| |
| typedef struct |
| { |
| S32 transactionId; |
| S32 errorCodePresent; |
| S32 errorCode; |
| S32 locationPresent; |
| mrvlGpsLocation_t location; |
| } mrvlGpsHsmMolrRespT; |
| |
| typedef struct |
| { |
| S32 transcationId; |
| S32 causePresent; |
| S32 cause; |
| } mrvlGpsHsmReleaseCompleteT; |
| |
| |
| |
| /* HSM to Framework APIs */ |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to update location information |
| * |
| * \param [IN] pGpsLoct Pointer to location information structure |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * S32 mrvlGpsHsmUpdateLocationInfo(mrvlGpsLocation_t* pGpsLoct) |
| * { |
| * gpsOalLog(DOBJ_HSM, DB_INFO, "Lat:Long:Alt is %g,%g,%g\n", pGpsLoct->latitude, pGpsLoct->longitude, pGpsLoct->altitude); |
| * } |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmUpdateLocationInfo(mrvlGpsLocation_t* pGpsLoct); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to update SV information |
| * |
| * \param [IN] pGnssSvStat Pointer to SV information structure, containing all SVs tracked |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * S32 mrvlGpsHsmUpdateSvStatus(mrvlGnssSvStatus_t* pGnssSvStat) |
| * { |
| * gpsOalLog(DOBJ_HSM, DB_INFO, "%d GPS SVs and %d Glonass SVs\n", pGnssSvStat->gps_sv_status.num_svs, pGnssSvStat->gln_sv_status.num_svs_gln); |
| * } |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmUpdateSvStatus(mrvlGnssSvStatus_t* pGnssSvStat); |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to send NMEA strings |
| * |
| * \param [IN] pGpsNmea Pointer to structure containing NMEA |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * S32 mrvlGpsHsmUpdateNMEA(mrvlGpsNmea_t* pGpsNmea) |
| * { |
| * gpsOalLog(DOBJ_HSM, DB_INFO, "NMEA String[%s]\n", pGpsNmea->nmeaInfo); |
| * } |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmUpdateNMEA(mrvlGpsNmea_t* pGpsNmea); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to update GNSS status (on/off/started/stopped) |
| * |
| * \param [IN] status GNSS status |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * mrvlGpsStatusUpdate(mrvlGpsHsmStatus_t status) |
| * { |
| * char *str = NULL; |
| * switch (status) |
| * { |
| * case GPS_HSM_STATUS_INVALID: str = "INVALID"; break; |
| * case GPS_HSM_STATUS_ON: str = "GPS_HSM_STATUS_ON"; break; |
| * case GPS_HSM_STATUS_STARTED: str = "GPS_HSM_STATUS_STARTED"; break; |
| * case GPS_HSM_STATUS_STOPPED: str = "GPS_HSM_STATUS_STOPPED"; break; |
| * case GPS_HSM_STATUS_OFF: str = "GPS_HSM_STATUS_OFF"; break; |
| * case GPS_HSM_STATUS_INVALID: str = "INVALID"; break; |
| * } |
| * gpsOalLog(DOBJ_HSM, DB_INFO, "GPS STATUS[%s]\n", str); |
| * } |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsStatusUpdate(mrvlGpsHsmStatus_t status); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to update software events |
| * |
| * \param [IN] pEvt Pointer to event |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.4.0 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmEventUpdate(mrvlGpsHsmSwEvent_t* pEvt); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to request for cell id. |
| * mrvlGpsHsmUpdateCellid is called as response if UE is already registered, else it is called |
| * when registration is successful |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmRequestCellid(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to request for SET id |
| * mrvlGpsHsmUpdateSetId is called as response to set the SET id (IMSI or MSISDN) |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmRequestSetId(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to request for network connection |
| * mrvlGpsHsmAgpsNwConnOpen is called if network connection is succesfully opened. Else, mrvlGpsHsmAgpsNwConnFail is called |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNwConnReq(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to disconnect previously opened network connection |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNwDisconnReq(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to notify user of MTLR or SUPL NI |
| * and request for verification if needed. As a response, mrvlGpsHsmAgpsNiResp needs to be called |
| * when user accepts/denies the session |
| * |
| * \param [IN] notif Pointer to notification/verification structure including notification Id |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsUserAuthReq(mrvlGpsUserNotifyParams_t* notif); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to spawn a thread using |
| * the integration/system code's thread framework. For e.g., in Android, it will be a thread |
| * created by thread_create_cb function. All the callbacks are called from this thread, so that |
| * the callback, implemented by porting code can use services/APIs available only to porting code |
| * |
| * \param [IN] name Pointer to string containing name of thread |
| * \param [IN] funcPtr Pointer to entry function |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmSpawnAppThread(const char* name, void* funcPtr); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to let the system know |
| * that it cannot enter low power state that will block the host chip from running GNSS software |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAcquireWakeLock(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to let the system |
| * know that it is free to go to low power state and does not need let any GNSS thread execute |
| * during this state. Usuall, this is called when GNSS software goes to sleep |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmReleaseWakeLock(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to initialize the wireless subsystem interface, |
| * including the Control plane interface |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpInterfaceInitHook(void); |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to cleanup the wireless subsystem interface, |
| * including control plane interface |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpInterfaceShutdownHook(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to get the network |
| * registration status |
| * |
| * \param None |
| * |
| * \return TRUE=registered, FALSE=not registered |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern int mrvlGpsHsmGetCPNWRegStatus(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to let the porting/integration code |
| * know that the user verification response for MTLR/SUPL NI |
| * |
| * \param [IN] notifId Notification id |
| * \param [IN] present allow field contains valid value |
| * \param [IN] allow 1 = allowed, 2 = denied |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpPosVerResp(S32 notifId, S32 present, S32 allow); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to send a PDU out |
| * to network via control plane |
| * |
| * \param [IN] protocol Protocol of PDU (RRLP/RRC/LPP/..) |
| * \param [IN] pdu Pointer to PDU |
| * \param [IN] pduLen PDU length |
| * \param [IN] isFinal Is it final part of PDU |
| * \param [IN] protocolMsgType Protocol specific sub type |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpSendUlMsg(AgpsProtocol_t protocol, U8* pdu, S32 pduLen, S32 isFinal, Rrc_PduType_t protocolMsgType, void* pAdditionalInfo, S32 additionInfoLen); |
| #ifdef CPA_ECID |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to request ECID measurements |
| * from wireless interface |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmWrlsEcidMeasReq(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to request LTE cell measurements |
| * |
| * \param [IN] enable_lp_ue_area_info_ind |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmLpUeAreaReq(unsigned int enable_lp_ue_area_info_ind); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to request OTDOA measurement |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmWrlsOtdoaMeasReq(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to provide OTDOA assistance |
| * |
| * \param [IN] p_data Pointer to assistance structure |
| * \param [IN] data_size Size of assistance structure |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmWrlsOtdoaAssistData(unsigned char* p_data, unsigned long int data_size); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to send REGISTER message to indicate MOLR req to network |
| * |
| * \param [IN] transactionId Transaction id of REGISTER message to be sent out |
| * \param [IN] locationEstimatePresent Encode if location estimate is requested |
| * \param [IN] assistPresent Encode if assistance is requested |
| * \param [IN] lppAssistancePdu If not NULL, this PDU is to be encapsulated inside LPP PDUs section of REGISTER |
| * \param [IN] sizeAssistancePdu Size of assistance LPP PDU if present |
| * \param [IN] lppProvideCapabilitiesPdu If not NULL, this PDU is to be encapsulated inside LPP PDUs section of REGISTER |
| * \param [IN] sizeCapabilitiesPdu Size of provide capabilities LPP PDU if present |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpSendSsRegister(S32 transactionId, S32 locationEstimatePresent, S32 assistPresent, U8* lppAssistancePdu, S32 sizeAssistancePdu, U8* lppProvideCapabilitiesPdu, S32 sizeCapabilitiesPdu); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to send RELEASE COMPLETE to network |
| * |
| * \param [IN] transactionId Transaction id of REGISTER message to be sent out |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpSendSsReleaseComplete(S32 transactionId); |
| #endif |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to initialize AGPS logs |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 2.4.0 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| void mrvlGpsHsmAgpsLogInit(void); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to trigger AGNSS diagnostic logs |
| * |
| * \param [IN] filter Diagnostic log level (debug/info/event/warning/error) |
| * \param [IN] code Diagnostic code |
| * \param [IN] sessionNum Session id if applicable |
| * \param [IN] message Pointer to log message |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsLog(gpsOalLogLevelT filter, U32 code, S32 sessionNum, S8* message); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to trigger AGNSS diagnostic interface logs |
| * |
| * \param [IN] direction Direction of message |
| * \param [IN] type Type of interface message |
| * \param [IN] buffer Interface message buffer pointer |
| * \param [IN] len Length of buffer |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsIfLog(U32 direction, U32 type, void* buffer, U32 len); |
| |
| /** |
| * \brief |
| * Implemented as callback by porting/integration code. Used by GNSS software to get the current system reference time |
| * |
| * \param None |
| * |
| * \return Current system reference time |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example implementation</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S64 mrvlGpsGetElapsedRealtime(void); |
| |
| |
| /* Framework to HSM APIs */ |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to check the GNSS chip status (if it is running and functional) |
| * |
| * \param None |
| * |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S8 mrvlGpsHsmChipStatusCheck(void); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to initialize GNSS software |
| * This also involves downloading gnss chip firmware |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmInit(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to cleanup GNSS software |
| * All threads created will be killed. |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCleanup(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to start GNSS software |
| * Multiple calls the this API will still result in only the first call actually starting the |
| * software. Other API call instances will simply increment a reference count to maintain the |
| * number of concurrent start requests. |
| * |
| * \param [IN] type Type of start |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmStart(mrvlGpsAgpsProcType_t type); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to stop GNSS software |
| * In cases where multiple calls to mrvlGpsHsmStart have been invoked, the GNSS software |
| * will stop only when all these instances have called a stop. In other words, the first |
| * mrvlGpsHsmStart api call will start GNSS, and the last mrvlGpsHsmStop will stop the GNSS. |
| * |
| * \param [IN] stopMode Mode indicating purpose of calling stop |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmStop(mrvlGpsHsmStopMode_t stopMode); |
| extern S8 mrvlGpsHsmStopPrepare(void); |
| extern void mrvlGpsHsmStopDelay(void); |
| extern void mrvlGpsHsmForceStartModeByDeleteAiding(void); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to provide cell id to GNSS software |
| * |
| * \param [IN] type Type of cell (GSM/UMTS/LTE) |
| * \param [IN] mcc Mobile country code |
| * \param [IN] mnc Mobile network code |
| * \param [IN] lac Location area code |
| * \param [IN] cid Cell id |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmUpdateCellid(U16 type, U16 mcc, U16 mnc, U16 lac, U32 cid); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to update set id (IMSI/MSISDN) |
| * |
| * \param [IN] setIdType SET id is IMSI or MSISDN |
| * \param [IN] setId Pointer to SET id string |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmUpdateSetId(U16 setIdType, U8* setId); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to update SUPL server |
| * address and port. Can be called either by reading some system configuration file, or |
| * by using the h-slp address stored in the SIM |
| * |
| * \param [IN] serverAddr Pointer to string that contains the fqdn or ip address of SUPL server |
| * \param [IN] port TCP port of SUPL server. Usually 7275 or 7276 for SUPL 1.0/2.0 |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmUpdateSuplServer(U8* serverAddr, U32 port); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to update the path |
| * where the security certificates are stored. These certificates are used during |
| * secure connection with SUPL server |
| * |
| * \param [IN] path Pointer to string containing folder path |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmUpdateCaPath(U8* path); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to send a TSIP command |
| * |
| * \param [IN] type TSIP message type. Please refer to TSIP documentation for details |
| * \param [IN] tsipBuffer Pointer to TSIP buffer. Please refer to TSIP documentation for details |
| * \param [IN] len Length of TSIP buffer |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSendTsipCmd(U8 type, U8* tsipBuffer, S32 len); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to deliver SUPL_INIT message when received |
| * via SMS/WAP/POTAP/UDP |
| * |
| * \param [IN] message Pointer to SUPL_INIT PDU |
| * \param [IN] len Length of SUPL_INIT PDU |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNiMessage(U8* message, U32 len); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to inform the choice by user for a verfication request |
| * |
| * \param [IN] notifId Notification id |
| * \param [IN] status 0=denied, 1=accepted |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNiResp(U32 notifId, U32 status); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to inform GNSS software |
| * that network connection is opened |
| * |
| * \param [IN] apn Pointer to APN related to network connection |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNwConnOpen(U8* apn); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to indicate that the requested network |
| * connection could not be made and the operation failed. |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNwConnFail(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to indicate that the request |
| * to disconnect from network has been processed and network connection is now closed |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmAgpsNwConnClosed(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to retrieve the integrity test results |
| * |
| * \param [IN] status Status to retrieve |
| * \param [IN] data Pointer to structure where results will be stored |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmIntegTestResultGet(INTEG_TEST_STATUS status, void* data); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get the current log level |
| * |
| * \param None |
| * |
| * \return Current log level |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U16 mrvlGpsHsmGetLogLevel(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set current log level |
| * |
| * \param [IN] level |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSetLogLevel(U8 level); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get the configured delay between |
| * NMEA update and location updated. Usually, there is no delay, but can be set using configuration |
| * parameters |
| * |
| * \param None |
| * |
| * \return Delay in milliseconds |
| * |
| * \since |
| * 2.3.3 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmGetLocUpdateDelay(void); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to check if GNSS software is currently in |
| * factory reset mode |
| * |
| * \param None |
| * |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 2.3.3 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U32 mrvlGpsHsmIsFactoryReset(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to check if GNSS software is |
| * currently executing factory test |
| * |
| * \param None |
| * |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 2.3.3 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U32 mrvlGpsHsmIsFactoryTestWorkMode(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set if the GNSS software is |
| * in normal mode or factory test mode |
| * |
| * \param [IN] mode |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.3 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSetMrvlgpsWorkMode(U32 mode); |
| |
| |
| #ifdef MRVL_HSM_INCLUDE_SE |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to enable SE to use a specific type of sensor |
| * |
| * \param [IN] sensorType Type of sensor |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSeEnable(S32 sensorType); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to disable SE from using a specific type of sensor |
| * |
| * \param [IN] sensorType Type of sensor |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSeDisable(S32 sensorType); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to inject sensor reading sample to GNSS software |
| * |
| * \param [IN] type Type of sensor |
| * \param [IN] timestamp Timestamp in nanoseconds |
| * \param [IN] accuracy Accuracy |
| * \param [IN] x X value |
| * \param [IN] y Y value |
| * \param [IN] z Z value |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSeDataInject(U32 type, U64 timestamp, U32 accuracy, FLT x, FLT y, FLT z); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to gete the sensor sampling rate |
| * |
| * \param None |
| * |
| * \return Sensor sampling rate in Hz |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmGetSensorRate(void); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to initialize sensor engine |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U8 mrvlGpsHsmSeInit(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to cleanup sensor engine |
| * |
| * \param None |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSeCleanup(void); |
| #endif |
| extern S32 mrvlGpsHsmGetSuplPrivacyOverrideStatus(void); |
| extern S32 mrvlGpsHsmGetSuplPrivacyLogOverrideStatus(void); |
| extern void mrvlGpsHsmSetSuplPrivacyOverrideStatus(S32 status); |
| extern void mrvlGpsHsmTsipSend(U32 port, U8* apiBuffer); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set the origin plane for MOLR |
| * |
| * \param [IN] origin origin plane for MOLR: SUPL or Control plane |
| * |
| * \return None |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmSetSessionOrigin(S32 origin); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set QOP for MOLR/SUPL SI |
| * |
| * \param [IN] horAcc Horizontal accuracy as specified in ETSI TS 123 032 V10.0.0 |
| * \param [IN] verAcc Vertical accuracy as specified in ETSI TS 123 032 V10.0.0 |
| * \param [IN] timeout Maximum response time allowed in seconds |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmSetSessionQop(S8 horAcc, S8 verAcc, S32 timeout); |
| |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set parameter to be sent out on MOLR command |
| * |
| * \param [IN] requestLocationEstimate Send out locationEstimate on MOLRArg |
| * \param [IN] requestAssistance Send out assistance request on MOLRArg |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmSetMolrReqParams(S32 requestLocationEstimate, S32 requestAssistance); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set the list of allowed |
| * GNSS technologies to be used for calculating position |
| * |
| * \param [IN] gnssMode Bitmap, 0x1 = GPS, 0x2 = GLONASS, 0x4=COMPASS |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmSetGnssMode(U32 gnssMode); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to set the list of allowed |
| * GNSS modes to use assistance from network |
| * |
| * \param [IN] gnssMode Bitmap, 0x1 = AGPS, 0x2 = AGLONASS |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmSetAgnssMode(U32 gnssMode); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get current start mode |
| * GNSS is operating. During normal operations, it will operate in NORMAL_MODE (= 0). Else |
| * It will be COLD(1)/HOT(2)/WARM(3) |
| * |
| * \param None |
| * |
| * \return Operating mode - normal/cold/hot/warm |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U32 mrvlGpsHsmGetStartMode(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to enable power save schemes |
| * |
| * \param [IN] enable Enable power save schemes when available |
| * \param [IN] period Minimum interval between required position fixes |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmPsModeSetStatus(S32 enable, U16 period); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to know if power save |
| * scheme is currently enabled |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmPsModeGetStatus(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to know if chip has downloaded |
| * firmware and started executing it |
| * |
| * \param None |
| * |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U32 mrvlGpsHsmChipInNormalStatus(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to enable/disable EE feature |
| * |
| * \param [IN] eeMode 1=enable, 0=disable |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmSetEEMode(U32 eeMode); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get the currently set EE mode |
| * |
| * \param None |
| * |
| * \return TRUE=enabled, FALSE=disabled |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmGetEEMode(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to reset GNSS settings to factory defaults |
| * This clears QOP, sets default MOLR plane as user plane, enables GPS/GLONASS |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.3 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmRestoreFactoryDefaults(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get current software version |
| * |
| * \param [IN] verString Pointer to string indicating factory version |
| * \param [IN] verLen Pointer to length of verString |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.3 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmGetSwVer(U8* verString, S32* verLen); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to check if ECLK is supported |
| * |
| * \param None |
| * |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmGetEclkSupported(void); |
| extern S32 mrvlGpsHsmGetEclkEnable(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get HAL specific context string. |
| * HAL specific context is stored in configuration per platform type, and the porting code can retrieve the |
| * store context information in form or a string. Interpretation of the string is platform-specific |
| * |
| * \param None |
| * |
| * \return Pointer to HAL context string |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void* mrvlGpsHsmGetHalCtx(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to reset stored GNSS positioning information as specified |
| * This involves time, last known location, navigation parameters etc., |
| * |
| * \param [IN] aidingMask Mask indicating which information needs to be deleted |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmResetStoredPosInfo(U16 aidingMask); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to know if GNSS software maitains |
| * an internal timer mechanism to timeout user verification response. If internal timer is maitained, the |
| * default action for verification on no user response is automatically triggered by the GNSS |
| * software (accept-on-no-answer or reject-on-no-answer) |
| * |
| * \param None |
| * |
| * \return TRUE/FALSE response to query |
| * |
| * \since |
| * 1.2.8 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsGetAgpsInternalAuthTimeoutFlag(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to enable GNSS to maintain internal timer |
| * to detect user verification response timeout. If enabled, default action on no user response is automatically |
| * performed by GNSS software (accept-on-no-answer or reject-on-no-answer) |
| * |
| * \param [IN] flag |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsSetAgpsInternalAuthTimeoutFlag(S32 flag); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get the UDP port on which |
| * SUPL will listen for SUPL_INIT messages. |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmAgpsGetSuplClientPort(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get the interval used |
| * by GNSS software to update positioning information |
| * |
| * \param None |
| * |
| * \return Reporting interval in seconds |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U32 mrvlGpsHsmGetReptInterval(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get path where |
| * GNSS software is storing log files |
| * |
| * \param None |
| * |
| * \return Pointer to the string containing log path |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U8* mrvlGpsHsmGetLogPath(void); |
| |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get path where |
| * GNSS software is storing agps.log and agpsdebug.log file |
| * |
| * \param None |
| * |
| * \return Pointer to the string containing log path |
| * |
| * \since |
| * 2.4.0 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U8* mrvlGpsHsmGetAgpsLogPath(void); |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to send control plane PDU from network into the |
| * GNSS software |
| * |
| * \param [IN] ota_type Protocol of PDU |
| * \param [IN] wrlsPriority Priority (emergency or non-emergency) |
| * \param [IN] p_msg_data Pointer to PDU |
| * \param [IN] msg_size Length of PDU |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpProcessDlMsg(AgpsProtocol_t ota_type, Agps_SessionPriority_t wrlsPriority, unsigned char* p_msg_data, unsigned long int msg_size, void* pAdditionalInfo, S32 len); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to indicate that the RRC measurement session |
| * has terminated |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpMeasTerminatedInd(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to notify RRC state change |
| * |
| * \param [IN] rrc_state RRC state |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpRRCStateEvent(unsigned int rrc_state); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to indicate that E911 or emergency |
| * call has been dialled |
| * |
| * \param None |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpNotfiyE911Dialed(void); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to notify an MTLR from network |
| * |
| * \param [IN] pNotif Pointer to notification |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpMtlrNotifyLocInd(mrvlGpsUserNotifyParams_t* pNotif); |
| #ifdef CPA_ECID |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to send ECID measurements to GNSS software |
| * |
| * \param [IN] pCpaLpEcidMeas Pointer to |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpEcidMeasNotify(mrvlGpsHsmEcidMeasCnf_t* pCpaLpEcidMeas); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to LTE cellular measurements to GNSS software |
| * |
| * \param [IN] pCpaLpUeAreaInfoInd Pointer to LTE cellular measurements |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCpUeAreaInfoNotify(mrvlGpsHsmUeAreaInfo_t* pCpaLpUeAreaInfoInd); |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to notify OTDOA measurements to GNSS software |
| * |
| * \param [IN] pHsmRstdLocInfo Pointer to OTDOA measurements |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmLpOtdoaMeasNotify(mrvlGpsHsmProvideRstdLocInfoMsg_t* pHsmRstdLocInfo); |
| #endif |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to send a CLI command to GNSS software |
| * |
| * \param [IN] s Pointer to CLI command |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern S32 mrvlGpsHsmCliProc(char* s); |
| |
| #ifdef OS_ANDROID |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to inject UTC/Network time wrt current reference |
| * time in the system. Reference time is platform specific |
| * |
| * \param [IN] time |
| * |
| * \param [IN] timeReference |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGpsHsmRecordNetTime(U64 time, U64 timeReference); |
| extern void mrvlGpsHsmRecordNetLocation(double latitude, double longitude, float accuracy); |
| |
| #endif |
| /** |
| * \brief |
| * Implemented by GNSS software. Used by porting/integration code to get the current UTC/Network time from system |
| * It is calculated based on time set using mrvlGpsHsmRecordNetTime() and elapsed time from provided reference time |
| * |
| * \param [IN] wn Pointer to week number |
| * \param [IN] tow_ms Pointer to TOW in milliseconds |
| * |
| * \return SUCCESS/FAILURE if operation succeeds/fails |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern U8 mrvlGpsHsmGetNetTime(U16* wn, U32* tow_ms); |
| extern U8 mrvlGpsHsmGetNetLocation(double* latitude, double* longitude, float* accuracy); |
| |
| |
| /** |
| * \brief |
| * Implemented by GNSS software. This is utility function provided by the GNSS software to convert a given |
| * buffer to a hex string |
| * |
| * \param [IN] inBuf Pointer to input buffer |
| * \param [IN] outBuf Pointer to converted hex string |
| * \param [IN] len Length of hex string |
| * |
| * \return None |
| * |
| * \since |
| * 2.3.5 |
| * |
| * <b>Example usage</b> |
| * \code |
| * |
| * |
| * \endcode |
| * |
| * |
| */ |
| extern void mrvlGPSHsmPrintHexString(char* inBuf, char* outBuf, unsigned long len); |
| |
| |
| extern void mrvlGPSHsmPrintTime(void* fd); |
| extern void mrvlGpsHsmUpdateImsiMncMcc(void); |
| U8 mrvlGpsHsmGetRRCExtEnable(void); |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif |
| |