diff options
author | Tushar Janefalkar <tusharj@codeaurora.org> | 2012-11-08 11:41:43 -0800 |
---|---|---|
committer | Tushar Janefalkar <tusharj@codeaurora.org> | 2012-11-12 10:28:15 -0800 |
commit | 63c5ac48c7d0b9245abd1a5e3ab45c3f331655d5 (patch) | |
tree | 5648401029edda62c57d3a2d9ffcb1d4055ef25d /utils/loc_log.cpp | |
parent | 686cee4f8afdd7350063e528aaa4ecb85af8641a (diff) | |
download | gps-63c5ac48c7d0b9245abd1a5e3ab45c3f331655d5.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.
CRs-Fixed: 418009
Change-Id: I98d5619d2e6e63711a9b56f0af2b3ddd27372871
Diffstat (limited to 'utils/loc_log.cpp')
-rw-r--r-- | utils/loc_log.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/utils/loc_log.cpp b/utils/loc_log.cpp index e4fb76c..1b4ecee 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); +} /*=========================================================================== |