1. Sensor HAL层接口

Google为Sensor提供统一的HAL接口,Android中Sensor的HAL接口定义在:hardware/libhardware/include/hardware/sensors.h

包含: sensor type 宏定义,sensor模块结构体定义(struct sensors_module_t),sensor 数据结构体定义(sensors_event_t),sensor设备结构体(sensor_poll_device_t)poll函数用来获取底层数据,调用时将被阻塞定义如下:int(*poll) (para list...)。控制设备打开/关闭结构体定义如下:

Android Sensor ARCH Introduction--Waiting for update

2. Sensor HAL实现--打开设备流程图

Android Sensor ARCH Introduction--Waiting for update

Refs: http://blog.chinaunix.net/uid-26997997-id-3485501.html

 

相关文章:

  • 2022-02-20
  • 2021-09-24
  • 2021-10-28
  • 2022-01-07
  • 2022-01-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案