概述
说明:项目需求:由于项目没有使用到Hall sensor,因此不需要QSensorTest的APK上显示hall sensor相关的信息。
一、相关的修改如下,
--- a/ssc/build/ssc.scons
+++ b/ssc/build/ssc.scons
@@ -294,7 +294,7 @@ if env.IsKeyEnable(ssc_build_tags) is True:
env.AddUsesFlags(['SNS_ISLAND_INCLUDE_DA_TEST'])
env.AddUsesFlags(['SNS_ISLAND_INCLUDE_AONT'])
- exclude_libs.extend(['lsm6dsm','sns_lsm6ds3','sns_sx931x','sns_bma2x2', 'sns_cm3526',
+ exclude_libs.extend(['lsm6dsm','sns_lsm6ds3','sns_sx931x','sns_bma2x2', 'sns_cm3526','sns_bu52053nvx',
'sns_bmi160','sns_bmg160','sns_bmm150','sns_tmx4903','sns_rpr0521rs'])
二、重新编译slpi,查看sns_static_sensors.c这个文件是否将hall sensor的注册函数删除,下面是编译后的结果已经将hall sensor注册的接口删掉了。
--- a/ssc/framework/src/sns_static_sensors.c
+++ b/ssc/framework/src/sns_static_sensors.c
@@ -12,6 +12,8 @@ sns_rc sns_register_llcm(sns_register_cb const *register_api);
sns_rc sns_register_power_sensor(sns_register_cb const *register_api);
sns_rc sns_register_qcm(sns_register_cb const *register_api);
sns_rc sns_accel_cal_register(sns_register_cb const *register_api);
+sns_rc sns_register_af6133(sns_register_cb const *register_api);
+sns_rc sns_register_af6133e(sns_register_cb const *register_api);
sns_rc sns_register_ak0991x(sns_register_cb const *register_api);
sns_rc sns_amd_register(sns_register_cb const *register_api);
sns_rc sns_aont_register(sns_register_cb const *register_api);
@@ -19,7 +21,6 @@ sns_rc sns_async_com_port_register(sns_register_cb const *register_api);
sns_rc sns_basic_gestures_register(sns_register_cb const *register_api);
sns_rc sns_register_bmp285(sns_register_cb const *register_api);
sns_rc sns_bring_to_ear_register(sns_register_cb const *register_api);
-sns_rc sns_register_bu52053nvx(sns_register_cb const *register_api);
sns_rc sns_ccd_register(sns_register_cb const *register_api);
sns_rc sns_register_cm32181(sns_register_cb const *register_api);
sns_rc sns_cmc_register(sns_register_cb const *register_api);
三、将编译生成的modem镜像烧录系统,在系统启动之后运行如下命令:sns_hal_batch.
修改之前运行sns_hal_batch.的结果,查看是有:bu52053nvx Hall Effect Sensor 相关信息
xxxx:/ # sns_hal_batch | grep "hal"
sns_hal_batch | grep "hal"
HAL open
HAL module_api_version: 0x1
HAL hal_api_version : 0x256
HAL hal_id : sensors
HAL hal_name : QTI Sensors HAL Module
HAL hal_author : Qualcomm Technologies, Inc.
get_sensors_list took 9265288642 nanoseconds
Sensors HAL TEST APP, version 1
Usage:
Choose a sensor to interact with by inputting the sensor's type and whether or not is the wakeup version as shown in the 'Sensors list'
Next, choose a command, by inputting one of the following characters:
a - Activate the sensor that was previously chosen.
d - Deactivate the sensor.
f - Flush the sensor.
b - Batch. The program will prompt for additional information.
e - Exit
Sensors list:
[Type:18] (android.sensor.step_detector) Name:pedometer Wakeup Vendor:qualcomm Version:1 Handle:1
[Type:18] (android.sensor.step_detector) Name:pedometer Non-wakeup Vendor:qualcomm Version:1 Handle:2
[Type:19] (android.sensor.step_counter) Name:pedometer Wakeup Vendor:qualcomm Version:1 Handle:3
[Type:19] (android.sensor.step_counter) Name:pedometer Non-wakeup Vendor:qualcomm Version:1 Handle:4
[Type:29] (Unknown) Name:stationary_detect_wakeup Vendor:qualcomm Version:1 Handle:5
[Type:29] (Unknown) Name:stationary_detect Vendor:qualcomm Version:1 Handle:6
[Type:65540] (Unknown) Name:Stationary Wakeup Vendor:qualcomm Version:1 Handle:7
[Type:17] (android.sensor.significant_motion) Name:sns_smd Wakeup Vendor:qualcomm Version:1 Handle:8
[Type:11] (android.sensor.rotation_vector) Name:Rotation Vector Wakeup Vendor:qualcomm Version:1 Handle:9
[Type:11] (android.sensor.rotation_vector) Name:Rotation Vector Non-wakeup Vendor:qualcomm Version:1 Handle:10
[Type: 8] (android.sensor.proximity) Name:ltr578 Proximity Sensor Wakeup Vendor:Lite-On Version:256 Handle:11
[Type: 8] (android.sensor.proximity) Name:ltr578 Proximity Sensor Non-wakeup Vendor:Lite-On Version:256 Handle:12
[Type: 3] (android.sensor.orientation) Name:Rotation Vector Wakeup Vendor:qualcomm Version:1 Handle:13
[Type: 3] (android.sensor.orientation) Name:Rotation Vector Non-wakeup Vendor:qualcomm Version:1 Handle:14
[Type:30] (Unknown) Name:motion_detect_wakeup Vendor:qualcomm Version:1 Handle:15
[Type:30] (Unknown) Name:motion_detect Vendor:qualcomm Version:1 Handle:16
[Type:14] (android.sensor.magnetic_field_uncalibrated) Name:AF6133 Magnetometer-Uncalibrated Non-wakeup Vendor:Voltafield Version:257 Handle:17
[Type: 2] (android.sensor.magnetic_field) Name:AF6133 Magnetometer Non-wakeup Vendor:Voltafield Version:257 Handle:18
[Type:10] (android.sensor.linear_acceleration) Name:linear_acceleration_wakeup Vendor:qualcomm Version:1 Handle:19
[Type:10] (android.sensor.linear_acceleration) Name:linear_acceleration Vendor:qualcomm Version:1 Handle:20
[Type:65539] (Unknown) Name:Raise to Wake Wakeup Vendor:qualcomm Version:1 Handle:21
[Type: 9] (android.sensor.gravity) Name:gravity Wakeup Vendor:qualcomm Version:1 Handle:22
[Type: 9] (android.sensor.gravity) Name:gravity Non-wakeup Vendor:qualcomm Version:1 Handle:23
[Type:65538] (Unknown) Name:Flip Wakeup Vendor:qualcomm Version:1 Handle:24
[Type:20] (android.sensor.geomagnetic_rotation_vector) Name:sns_geomag_rv Wakeup Vendor:qualcomm Version:1 Handle:25
[Type:20] (android.sensor.geomagnetic_rotation_vector) Name:sns_geomag_rv Non-wakeup Vendor:qualcomm Version:1 Handle:26
[Type:27] (Unknown) Name:Device Orientation Wakeup Vendor:qualcomm Version:1 Handle:27
[Type:27] (Unknown) Name:Device Orientation Non-wakeup Vendor:qualcomm Version:1 Handle:28
[Type: 4] (android.sensor.gyroscope) Name:icm4x6xx Gyroscope Non-wakeup Vendor:TDK-Invensense Version:291 Handle:29
[Type:15] (android.sensor.game_rotation_vector) Name:Game Rotation Vector Wakeup Vendor:qualcomm Version:1 Handle:30
[Type:15] (android.sensor.game_rotation_vector) Name:Game Rotation Vector Non-wakeup Vendor:qualcomm Version:1 Handle:31
[Type:33171002] (com.qti.sensor.facing) Name:bu52053nvx Hall Effect Sensor Wakeup Vendor:ROHM Version:393221 Handle:32
[Type:33171002] (com.qti.sensor.facing) Name:bu52053nvx Hall Effect Sensor Non-wakeup Vendor:ROHM Version:393221 Handle:33
[Type:16] (android.sensor.gyroscope_uncalibrated) Name:icm4x6xx Gyroscope-Uncalibrated Non-wakeup Vendor:TDK-Invensense Version:291 Handle:34
[Type: 5] (android.sensor.light) Name:ltr578 Ambient Light Sensor Wakeup Vendor:Lite-On Version:256 Handle:35
[Type: 5] (android.sensor.light) Name:ltr578 Ambient Light Sensor Non-wakeup Vendor:Lite-On Version:256 Handle:36
[Type:35] (android.sensor.accelerometer_uncalibrated) Name:icm4x6xx Accelerometer-Uncalibrated Non-wakeup Vendor:TDK-Invensense Version:291 Handle:37
[Type: 1] (android.sensor.accelerometer) Name:icm4x6xx Accelerometer Non-wakeup Vendor:TDK-Invensense Version:291 Handle:38
Please choose a listed sensor type to interact with>
修改之后运行sns_hal_batch.的结果,查看没有hall sensor的相关信息,修改成功。
xxxx:/mnt/vendor/persist/sensors # sns_hal_batch
sns_hal_batch
HAL open
HAL module_api_version: 0x1
HAL hal_api_version : 0x256
HAL hal_id : sensors
HAL hal_name : QTI Sensors HAL Module
HAL hal_author : Qualcomm Technologies, Inc.
get_sensors_list took 9228461872 nanoseconds
Sensors HAL TEST APP, version 1
Usage:
Choose a sensor to interact with by inputting the sensor's type and whether or not is the wakeup version as shown in the 'Sensors list'
Next, choose a command, by inputting one of the following characters:
a - Activate the sensor that was previously chosen.
d - Deactivate the sensor.
f - Flush the sensor.
b - Batch. The program will prompt for additional information.
e - Exit
Sensors list:
[Type:18] (android.sensor.step_detector) Name:pedometer Wakeup Vendor:qualcomm Version:1 Handle:1
[Type:18] (android.sensor.step_detector) Name:pedometer Non-wakeup Vendor:qualcomm Version:1 Handle:2
[Type:19] (android.sensor.step_counter) Name:pedometer Wakeup Vendor:qualcomm Version:1 Handle:3
[Type:19] (android.sensor.step_counter) Name:pedometer Non-wakeup Vendor:qualcomm Version:1 Handle:4
[Type:29] (Unknown) Name:stationary_detect_wakeup Vendor:qualcomm Version:1 Handle:5
[Type:29] (Unknown) Name:stationary_detect Vendor:qualcomm Version:1 Handle:6
[Type:65540] (Unknown) Name:Stationary Wakeup Vendor:qualcomm Version:1 Handle:7
[Type:17] (android.sensor.significant_motion) Name:sns_smd Wakeup Vendor:qualcomm Version:1 Handle:8
[Type:11] (android.sensor.rotation_vector) Name:Rotation Vector Wakeup Vendor:qualcomm Version:1 Handle:9
[Type:11] (android.sensor.rotation_vector) Name:Rotation Vector Non-wakeup Vendor:qualcomm Version:1 Handle:10
[Type: 8] (android.sensor.proximity) Name:ltr578 Proximity Sensor Wakeup Vendor:Lite-On Version:256 Handle:11
[Type: 8] (android.sensor.proximity) Name:ltr578 Proximity Sensor Non-wakeup Vendor:Lite-On Version:256 Handle:12
[Type: 3] (android.sensor.orientation) Name:Rotation Vector Wakeup Vendor:qualcomm Version:1 Handle:13
[Type: 3] (android.sensor.orientation) Name:Rotation Vector Non-wakeup Vendor:qualcomm Version:1 Handle:14
[Type:30] (Unknown) Name:motion_detect_wakeup Vendor:qualcomm Version:1 Handle:15
[Type:30] (Unknown) Name:motion_detect Vendor:qualcomm Version:1 Handle:16
[Type:14] (android.sensor.magnetic_field_uncalibrated) Name:AF6133 Magnetometer-Uncalibrated Non-wakeup Vendor:Voltafield Version:257 Handle:17
[Type: 2] (android.sensor.magnetic_field) Name:AF6133 Magnetometer Non-wakeup Vendor:Voltafield Version:257 Handle:18
[Type:10] (android.sensor.linear_acceleration) Name:linear_acceleration_wakeup Vendor:qualcomm Version:1 Handle:19
[Type:10] (android.sensor.linear_acceleration) Name:linear_acceleration Vendor:qualcomm Version:1 Handle:20
[Type:65539] (Unknown) Name:Raise to Wake Wakeup Vendor:qualcomm Version:1 Handle:21
[Type: 9] (android.sensor.gravity) Name:gravity Wakeup Vendor:qualcomm Version:1 Handle:22
[Type: 9] (android.sensor.gravity) Name:gravity Non-wakeup Vendor:qualcomm Version:1 Handle:23
[Type:65538] (Unknown) Name:Flip Wakeup Vendor:qualcomm Version:1 Handle:24
[Type:20] (android.sensor.geomagnetic_rotation_vector) Name:sns_geomag_rv Wakeup Vendor:qualcomm Version:1 Handle:25
[Type:20] (android.sensor.geomagnetic_rotation_vector) Name:sns_geomag_rv Non-wakeup Vendor:qualcomm Version:1 Handle:26
[Type:27] (Unknown) Name:Device Orientation Wakeup Vendor:qualcomm Version:1 Handle:27
[Type:27] (Unknown) Name:Device Orientation Non-wakeup Vendor:qualcomm Version:1 Handle:28
[Type: 4] (android.sensor.gyroscope) Name:icm4x6xx Gyroscope Non-wakeup Vendor:TDK-Invensense Version:291 Handle:29
[Type:15] (android.sensor.game_rotation_vector) Name:Game Rotation Vector Wakeup Vendor:qualcomm Version:1 Handle:30
[Type:15] (android.sensor.game_rotation_vector) Name:Game Rotation Vector Non-wakeup Vendor:qualcomm Version:1 Handle:31
[Type:16] (android.sensor.gyroscope_uncalibrated) Name:icm4x6xx Gyroscope-Uncalibrated Non-wakeup Vendor:TDK-Invensense Version:291 Handle:32
[Type: 5] (android.sensor.light) Name:ltr578 Ambient Light Sensor Wakeup Vendor:Lite-On Version:256 Handle:33
[Type: 5] (android.sensor.light) Name:ltr578 Ambient Light Sensor Non-wakeup Vendor:Lite-On Version:256 Handle:34
[Type:35] (android.sensor.accelerometer_uncalibrated) Name:icm4x6xx Accelerometer-Uncalibrated Non-wakeup Vendor:TDK-Invensense Version:291 Handle:35
[Type: 1] (android.sensor.accelerometer) Name:icm4x6xx Accelerometer Non-wakeup Vendor:TDK-Invensense Version:291 Handle:36
最后
以上就是无聊白开水为你收集整理的高通8150-SSC架构如何去掉hall sensor使之不编译进slpi的全部内容,希望文章能够帮你解决高通8150-SSC架构如何去掉hall sensor使之不编译进slpi所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复