Add sr200 support
Implement NxpUwbChip for SR200.
Lifecycle is not yet supported.
Intake from UWB04_SW_Android_U_GPP_SR200_PRC_01.27.02
Bug: 332268554
Test: Fira ranging with phone
Change-Id: I217615a2e7038fe90153b65359cbe2a3f22afdfc
diff --git a/Android.bp b/Android.bp
index 793bb96..88b8c09 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,15 +13,60 @@
// large-scale-change unable to identify any license_text files
}
+soong_config_string_variable {
+ name: "chip",
+ values: [
+ "SR1XX",
+ "SR200",
+ ],
+}
+
+soong_config_module_type {
+ name: "uwb_cc_defaults",
+ module_type: "cc_defaults",
+ config_namespace: "nxp_uwb",
+ variables: ["chip"],
+ properties: [
+ "cflags",
+ "srcs",
+ "local_include_dirs",
+ ],
+}
+
+uwb_cc_defaults {
+ name: "uwb_defaults",
+ soong_config_variables: {
+ chip: {
+ SR200: {
+ cflags: ["-DSR200=TRUE"],
+ srcs: [
+ "halimpl/hal/sr200/*.cc",
+ ],
+ local_include_dirs: [
+ "halimpl/hal/sr200",
+ ],
+ },
+ conditions_default: {
+ cflags: ["-DSR1XX=TRUE"],
+ srcs: [
+ "halimpl/hal/sr1xx/*.cc",
+ ],
+ local_include_dirs: [
+ "halimpl/hal/sr1xx",
+ ],
+ },
+ },
+ },
+}
+
cc_library_shared {
name: "uwb_uci.helios",
defaults: [
"hidl_defaults",
+ "uwb_defaults",
],
proprietary: true,
srcs: [
- "halimpl/hal/sr1xx/*.cc",
- "halimpl/inc/common/*.cc",
"halimpl/hal/*.cc",
"halimpl/log/*.cc",
"halimpl/tml/*.cc",
@@ -54,7 +99,6 @@
],
cflags: [
"-DGENERIC",
- "-DSOC_DEFAULT",
"-DBUILDCFG=1",
"-Wno-deprecated-register",
"-Wno-unused-parameter",