summaryrefslogtreecommitdiff
path: root/utils/loc_log.cpp
diff options
context:
space:
mode:
authorTushar Janefalkar <tusharj@codeaurora.org>2012-11-08 11:41:43 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2013-03-18 15:49:52 -0700
commit5049a4779793ac7c8eeed87114805fd63bf16ac9 (patch)
treec9d5fb6b5d37367872b49a13afaa7847812f3be1 /utils/loc_log.cpp
parentdc72922169d42765ba420c79fe9e3f7fc4082d3e (diff)
downloadgps-5049a4779793ac7c8eeed87114805fd63bf16ac9.tar.gz
Utility to identify target HW
Earlier this identification was done in loc.cpp This change moves that to a separate utility. Also included is a change to not return a handle to the GPS interface if the target is found to be MPQ8064. This change is a re-cherry-pick from change id - I98d5619d2e6e63711a9b56f0af2b3ddd27372871 Change-Id: I058d206c37245b44f1cf74d6065e7ce46f50baf7 CRs-Fixed: 418009
Diffstat (limited to 'utils/loc_log.cpp')
-rw-r--r--utils/loc_log.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/utils/loc_log.cpp b/utils/loc_log.cpp
index 8b064ec..f39667c 100644
--- a/utils/loc_log.cpp
+++ b/utils/loc_log.cpp
@@ -34,7 +34,6 @@
#include <sys/time.h>
#include "loc_log.h"
#include "msg_q.h"
-
#include "log_util.h"
// Logging Improvements
@@ -100,6 +99,35 @@ const char* log_succ_fail_string(int is_succ)
return is_succ? "successful" : "failed";
}
+//Target names
+loc_name_val_s_type target_name[] =
+{
+ NAME_VAL(TARGET_OTHER),
+ NAME_VAL(TARGET_APQ8064_STANDALONE),
+ NAME_VAL(TARGET_APQ8064_FUSION3),
+ NAME_VAL(TARGET_MPQ8064),
+ NAME_VAL(TARGET_MSM8930)
+};
+
+static int target_name_num = sizeof(target_name)/sizeof(loc_name_val_s_type);
+
+/*===========================================================================
+
+FUNCTION loc_get_target_name
+
+DESCRIPTION
+ Returns pointer to a string that contains name of the target
+
+ XX:XX:XX.000\0
+
+RETURN VALUE
+ The target name string
+
+===========================================================================*/
+const char *loc_get_target_name(targetEnumType target)
+{
+ return loc_get_name_from_val(target_name, target_name_num, (long)target);
+}
/*===========================================================================