Implement sensor direct report mode
This change implements direct report for accel, gyro and mag at normal and fast rate level. It supports ashmem shared memory. The direct report and traditional sensor subscription are still tangled up in this implementation. Bug: 30985702 Bug: 33588372 Test: tested via demo app Change-Id: Idc4f626dfe624558718c1b04f16898a0ea247e62
This commit is contained in:
@@ -45,6 +45,13 @@ private:
|
||||
|
||||
int flush(int handle);
|
||||
|
||||
int register_direct_channel(
|
||||
const struct sensors_direct_mem_t* mem, int channel_handle);
|
||||
|
||||
int config_direct_report(
|
||||
int sensor_handle, int channel_handle, const struct sensors_direct_cfg_t * config);
|
||||
|
||||
// static wrappers
|
||||
static int CloseWrapper(struct hw_device_t *dev);
|
||||
|
||||
static int ActivateWrapper(
|
||||
@@ -65,6 +72,11 @@ private:
|
||||
|
||||
static int FlushWrapper(struct sensors_poll_device_1 *dev, int handle);
|
||||
|
||||
static int RegisterDirectChannelWrapper(struct sensors_poll_device_1 *dev,
|
||||
const struct sensors_direct_mem_t* mem, int channel_handle);
|
||||
static int ConfigDirectReportWrapper(struct sensors_poll_device_1 *dev,
|
||||
int sensor_handle, int channel_handle, const struct sensors_direct_cfg_t * config);
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SensorContext);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user