147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. 234ee09551764b045fdc02df754157473125edf60Kevin Tang * 334ee09551764b045fdc02df754157473125edf60Kevin Tang * Redistribution and use in source and binary forms, with or without 434ee09551764b045fdc02df754157473125edf60Kevin Tang * modification, are permitted provided that the following conditions are 534ee09551764b045fdc02df754157473125edf60Kevin Tang * met: 634ee09551764b045fdc02df754157473125edf60Kevin Tang * * Redistributions of source code must retain the above copyright 734ee09551764b045fdc02df754157473125edf60Kevin Tang * notice, this list of conditions and the following disclaimer. 834ee09551764b045fdc02df754157473125edf60Kevin Tang * * Redistributions in binary form must reproduce the above 934ee09551764b045fdc02df754157473125edf60Kevin Tang * copyright notice, this list of conditions and the following 1034ee09551764b045fdc02df754157473125edf60Kevin Tang * disclaimer in the documentation and/or other materials provided 1134ee09551764b045fdc02df754157473125edf60Kevin Tang * with the distribution. 12e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo * * Neither the name of The Linux Foundation nor the names of its 1334ee09551764b045fdc02df754157473125edf60Kevin Tang * contributors may be used to endorse or promote products derived 1434ee09551764b045fdc02df754157473125edf60Kevin Tang * from this software without specific prior written permission. 1534ee09551764b045fdc02df754157473125edf60Kevin Tang * 1634ee09551764b045fdc02df754157473125edf60Kevin Tang * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 1734ee09551764b045fdc02df754157473125edf60Kevin Tang * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1834ee09551764b045fdc02df754157473125edf60Kevin Tang * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 1934ee09551764b045fdc02df754157473125edf60Kevin Tang * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 2034ee09551764b045fdc02df754157473125edf60Kevin Tang * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2134ee09551764b045fdc02df754157473125edf60Kevin Tang * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2234ee09551764b045fdc02df754157473125edf60Kevin Tang * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 2334ee09551764b045fdc02df754157473125edf60Kevin Tang * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2434ee09551764b045fdc02df754157473125edf60Kevin Tang * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 2534ee09551764b045fdc02df754157473125edf60Kevin Tang * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 2634ee09551764b045fdc02df754157473125edf60Kevin Tang * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2734ee09551764b045fdc02df754157473125edf60Kevin Tang * 2834ee09551764b045fdc02df754157473125edf60Kevin Tang */ 29e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#ifndef LOC_TARGET_H 30e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define LOC_TARGET_H 31e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TARGET_SET(gnss,ssc) ( (gnss<<1)|ssc ) 32e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TARGET_DEFAULT TARGET_SET(GNSS_MSM, HAS_SSC) 33e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TARGET_MDM TARGET_SET(GNSS_MDM, HAS_SSC) 34e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TARGET_APQ_SA TARGET_SET(GNSS_GSS, NO_SSC) 35e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TARGET_MPQ TARGET_SET(GNSS_NONE,NO_SSC) 36e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC) 3747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo#define TARGET_QCA1530 TARGET_SET(GNSS_QCA1530, NO_SSC) 38bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo#define TARGET_AUTO TARGET_SET(GNSS_AUTO, NO_SSC) 3947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo#define TARGET_UNKNOWN TARGET_SET(GNSS_UNKNOWN, NO_SSC) 40e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#define getTargetGnssType(target) (target>>1) 4134ee09551764b045fdc02df754157473125edf60Kevin Tang 4234ee09551764b045fdc02df754157473125edf60Kevin Tang#ifdef __cplusplus 4334ee09551764b045fdc02df754157473125edf60Kevin Tangextern "C" 4434ee09551764b045fdc02df754157473125edf60Kevin Tang{ 4534ee09551764b045fdc02df754157473125edf60Kevin Tang#endif 4634ee09551764b045fdc02df754157473125edf60Kevin Tang 4747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russounsigned int loc_get_target(void); 4834ee09551764b045fdc02df754157473125edf60Kevin Tang 4947ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo/*The character array passed to this function should have length 5047ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo of atleast PROPERTY_VALUE_MAX*/ 5147ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russovoid loc_get_target_baseband(char *baseband, int array_length); 5247ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo/*The character array passed to this function should have length 5347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo of atleast PROPERTY_VALUE_MAX*/ 5447ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russovoid loc_get_platform_name(char *platform_name, int array_length); 5547ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo 5647ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo/* Please remember to update 'target_name' in loc_log.cpp, 5747ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo if do any changes to this enum. */ 58e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russotypedef enum { 59e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GNSS_NONE = 0, 60e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GNSS_MSM, 61e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GNSS_GSS, 62e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GNSS_MDM, 6347ad5e4cf2f6810db3c0e7ec79696496a94b6f0dDante Russo GNSS_QCA1530, 64bfff6343845ad9ff062c5fd97bb3b9be1053340eDante Russo GNSS_AUTO, 65e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo GNSS_UNKNOWN 66e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo}GNSS_TARGET; 6734ee09551764b045fdc02df754157473125edf60Kevin Tang 68e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russotypedef enum { 69e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo NO_SSC = 0, 70e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo HAS_SSC 71e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo}SSC_TYPE; 7234ee09551764b045fdc02df754157473125edf60Kevin Tang 7334ee09551764b045fdc02df754157473125edf60Kevin Tang#ifdef __cplusplus 7434ee09551764b045fdc02df754157473125edf60Kevin Tang} 7534ee09551764b045fdc02df754157473125edf60Kevin Tang#endif 7634ee09551764b045fdc02df754157473125edf60Kevin Tang 77e14a6c846df2ce4bb1847e4250991f7c52fd793dDante Russo#endif /*LOC_TARGET_H*/ 78