Home
last modified time | relevance | path

Searched refs:sensorHandle (Results 1 – 18 of 18) sorted by relevance

/device/generic/goldfish/sensors/
Dmultihal_sensors.cpp128 Return<Result> MultihalSensors::activate(const int32_t sensorHandle, in activate() argument
130 if (!isSensorHandleValid(sensorHandle)) { in activate()
135 BatchInfo& batchInfo = m_batchInfo[sensorHandle]; in activate()
138 const SensorInfo* sensor = getSensorInfoByHandle(sensorHandle); in activate()
148 batchEventRef.sensorHandle = sensorHandle; in activate()
155 m_activeSensorsMask = m_activeSensorsMask | (1u << sensorHandle); in activate()
157 m_activeSensorsMask = m_activeSensorsMask & ~(1u << sensorHandle); in activate()
162 Return<Result> MultihalSensors::batch(const int32_t sensorHandle, in batch() argument
167 if (!isSensorHandleValid(sensorHandle)) { in batch()
171 const SensorInfo* sensor = getSensorInfoByHandle(sensorHandle); in batch()
[all …]
Dsensor_list.cpp41 .sensorHandle = kSensorHandleAccelerometer,
59 .sensorHandle = kSensorHandleGyroscope,
77 .sensorHandle = kSensorHandleMagneticField,
95 .sensorHandle = kSensorHandleOrientation,
113 .sensorHandle = kSensorHandleAmbientTemperature,
131 .sensorHandle = kSensorHandleProximity,
150 .sensorHandle = kSensorHandleLight,
168 .sensorHandle = kSensorHandlePressure,
186 .sensorHandle = kSensorHandleRelativeHumidity,
204 .sensorHandle = kSensorHandleMagneticFieldUncalibrated,
[all …]
Dmultihal_sensors.h54 Return<Result> activate(int32_t sensorHandle, bool enabled) override;
55 Return<Result> batch(int32_t sensorHandle,
58 Return<Result> flush(int32_t sensorHandle) override;
65 Return<void> configDirectReport(int32_t sensorHandle,
86 bool isSensorHandleValid(int sensorHandle) const;
87 bool isSensorActive(int sensorHandle) const { in isSensorActive()
88 return m_activeSensorsMask & (1u << sensorHandle); // m_mtx required in isSensorActive()
90 static bool activateQemuSensorImpl(int pipe, int sensorHandle, bool enabled);
118 int sensorHandle = -1; member
Dmultihal_sensors_qemu.cpp56 const int sensorHandle, in activateQemuSensorImpl() argument
61 getQemuSensorNameByHandle(sensorHandle), in activateQemuSensorImpl()
107 event.sensorHandle = kSensorHandleAccelerometer; in parseQemuSensorEvent()
117 event.sensorHandle = kSensorHandleGyroscope; in parseQemuSensorEvent()
129 event.sensorHandle = kSensorHandleGyroscopeFieldUncalibrated; in parseQemuSensorEvent()
139 event.sensorHandle = kSensorHandleOrientation; in parseQemuSensorEvent()
149 event.sensorHandle = kSensorHandleMagneticField; in parseQemuSensorEvent()
161 event.sensorHandle = kSensorHandleMagneticFieldUncalibrated; in parseQemuSensorEvent()
171 event.sensorHandle = kSensorHandleAmbientTemperature; in parseQemuSensorEvent()
183 event.sensorHandle = kSensorHandleProximity; in parseQemuSensorEvent()
[all …]
/device/google/contexthub/firmware/os/inc/
Dsensors.h132 uint32_t sensorHandle; member
273 bool sensorRequest(uint32_t clientTid, uint32_t sensorHandle, uint32_t rate, uint64_t latency);
274 bool sensorRequestRateChange(uint32_t clientTid, uint32_t sensorHandle, uint32_t newRate, uint64_t …
275 bool sensorRelease(uint32_t clientTid, uint32_t sensorHandle);
277 bool sensorTriggerOndemand(uint32_t clientTid, uint32_t sensorHandle);
278 bool sensorFlush(uint32_t sensorHandle);
279 bool sensorCalibrate(uint32_t sensorHandle);
280 bool sensorSelfTest(uint32_t sensorHandle);
281 bool sensorCfgData(uint32_t sensorHandle, void* cfgData);
282 uint32_t sensorGetCurRate(uint32_t sensorHandle);
[all …]
DsyscallDo.h127 static inline bool eOsSensorRequest(uint32_t clientId, uint32_t sensorHandle, uint32_t rate, uint64… in eOsSensorRequest() argument
132 …N, SYSCALL_OS_MAIN_SENSOR, SYSCALL_OS_MAIN_SENSOR_REQUEST), clientId, sensorHandle, rate, latency_… in eOsSensorRequest()
135 static inline bool eOsSensorRequestRateChange(uint32_t clientId, uint32_t sensorHandle, uint32_t ne… in eOsSensorRequestRateChange() argument
140 …, SYSCALL_OS_MAIN_SENSOR, SYSCALL_OS_MAIN_SENSOR_RATE_CHG), clientId, sensorHandle, newRate, newLa… in eOsSensorRequestRateChange()
143 static inline bool eOsSensorRelease(uint32_t clientId, uint32_t sensorHandle) in eOsSensorRelease() argument
145 … SYSCALL_OS_MAIN, SYSCALL_OS_MAIN_SENSOR, SYSCALL_OS_MAIN_SENSOR_RELEASE), clientId, sensorHandle); in eOsSensorRelease()
148 static inline bool eOsSensorTriggerOndemand(uint32_t clientId, uint32_t sensorHandle) in eOsSensorTriggerOndemand() argument
150 … SYSCALL_OS_MAIN, SYSCALL_OS_MAIN_SENSOR, SYSCALL_OS_MAIN_SENSOR_TRIGGER), clientId, sensorHandle); in eOsSensorTriggerOndemand()
153 static inline uint32_t eOsSensorGetCurRate(uint32_t sensorHandle) in eOsSensorGetCurRate() argument
155 …N_OS, SYSCALL_OS_MAIN, SYSCALL_OS_MAIN_SENSOR, SYSCALL_OS_MAIN_SENSOR_GET_CUR_RATE), sensorHandle); in eOsSensorGetCurRate()
[all …]
/device/google/contexthub/firmware/app/chre/common/
Dchre10_app.c47 …id initDataHeader(struct chreSensorDataHeader *header, uint64_t timestamp, uint32_t sensorHandle) { in initDataHeader() argument
49 header->sensorHandle = sensorHandle; in initDataHeader()
54 static void processTripleAxisData(const struct TripleAxisDataEvent *src, uint32_t sensorHandle, uin… in processTripleAxisData() argument
59 initDataHeader(&three.header, src->referenceTime, sensorHandle); in processTripleAxisData()
73 static void processSingleAxisData(const struct SingleAxisDataEvent *src, uint32_t sensorHandle, uin… in processSingleAxisData() argument
82 initDataHeader(&occ.header, src->referenceTime, sensorHandle); in processSingleAxisData()
97 initDataHeader(&flt.header, src->referenceTime, sensorHandle); in processSingleAxisData()
112 initDataHeader(&byte.header, src->referenceTime, sensorHandle); in processSingleAxisData()
129 static void processEmbeddedData(const void *src, uint32_t sensorHandle, uint8_t sensorType) in processEmbeddedData() argument
138 initDataHeader(&occ.header, eOsSensorGetTime(), sensorHandle); in processEmbeddedData()
[all …]
Dchre_app.c47 …id initDataHeader(struct chreSensorDataHeader *header, uint64_t timestamp, uint32_t sensorHandle) { in initDataHeader() argument
49 header->sensorHandle = sensorHandle; in initDataHeader()
54 static void processTripleAxisData(const struct TripleAxisDataEvent *src, uint32_t sensorHandle, uin… in processTripleAxisData() argument
59 initDataHeader(&three.header, src->referenceTime, sensorHandle); in processTripleAxisData()
73 static void processSingleAxisData(const struct SingleAxisDataEvent *src, uint32_t sensorHandle, uin… in processSingleAxisData() argument
82 initDataHeader(&occ.header, src->referenceTime, sensorHandle); in processSingleAxisData()
97 initDataHeader(&flt.header, src->referenceTime, sensorHandle); in processSingleAxisData()
112 initDataHeader(&byte.header, src->referenceTime, sensorHandle); in processSingleAxisData()
129 static void processEmbeddedData(const void *src, uint32_t sensorHandle, uint8_t sensorType) in processEmbeddedData() argument
138 initDataHeader(&occ.header, eOsSensorGetTime(), sensorHandle); in processEmbeddedData()
[all …]
Dchre10_app_syscalls.c96 bool chreGetSensorInfo(uint32_t sensorHandle, struct chreSensorInfo *info) in chreGetSensorInfo() argument
98 return syscallDo2P(SYSCALL_CHRE_API(SENSOR_GET_INFO), sensorHandle, info); in chreGetSensorInfo()
101 bool chreGetSensorSamplingStatus(uint32_t sensorHandle, in chreGetSensorSamplingStatus() argument
104 return syscallDo2P(SYSCALL_CHRE_API(SENSOR_GET_STATUS), sensorHandle, status); in chreGetSensorSamplingStatus()
107 bool chreSensorConfigure(uint32_t sensorHandle, in chreSensorConfigure() argument
115 return syscallDo6P(SYSCALL_CHRE_API(SENSOR_CONFIG), sensorHandle, mode, in chreSensorConfigure()
Dchre11_app_syscalls.c99 bool chreGetSensorInfo(uint32_t sensorHandle, struct chreSensorInfo *info) in chreGetSensorInfo() argument
101 return syscallDo2P(SYSCALL_CHRE_API(SENSOR_GET_INFO), sensorHandle, info); in chreGetSensorInfo()
104 bool chreGetSensorSamplingStatus(uint32_t sensorHandle, in chreGetSensorSamplingStatus() argument
107 return syscallDo2P(SYSCALL_CHRE_API(SENSOR_GET_STATUS), sensorHandle, status); in chreGetSensorSamplingStatus()
110 bool chreSensorConfigure(uint32_t sensorHandle, in chreSensorConfigure() argument
118 return syscallDo6P(SYSCALL_CHRE_API(SENSOR_CONFIG), sensorHandle, mode, in chreSensorConfigure()
Dchre_app_syscalls.c99 bool chreGetSensorInfo(uint32_t sensorHandle, struct chreSensorInfo *info) in chreGetSensorInfo() argument
101 return syscallDo2P(SYSCALL_CHRE_API(SENSOR_GET_INFO), sensorHandle, info); in chreGetSensorInfo()
104 bool chreGetSensorSamplingStatus(uint32_t sensorHandle, in chreGetSensorSamplingStatus() argument
107 return syscallDo2P(SYSCALL_CHRE_API(SENSOR_GET_STATUS), sensorHandle, status); in chreGetSensorSamplingStatus()
110 bool chreSensorConfigure(uint32_t sensorHandle, in chreSensorConfigure() argument
118 return syscallDo6P(SYSCALL_CHRE_API(SENSOR_CONFIG), sensorHandle, mode, in chreSensorConfigure()
/device/google/contexthub/firmware/os/core/
Dsensors.c75 static struct SensorsClientRequest* sensorClientRequestFind(uint32_t sensorHandle, uint32_t clientT… in sensorClientRequestFind() argument
82 if (req && req->handle == sensorHandle && req->clientTid == clientTid) in sensorClientRequestFind()
574 static bool sensorAddRequestor(uint32_t sensorHandle, uint32_t clientTid, uint32_t rate, uint64_t l… in sensorAddRequestor() argument
581 req->handle = sensorHandle; in sensorAddRequestor()
590 static bool sensorGetCurRequestorRate(uint32_t sensorHandle, uint32_t clientTid, uint32_t *rateP) in sensorGetCurRequestorRate() argument
592 struct SensorsClientRequest *req = sensorClientRequestFind(sensorHandle, clientTid); in sensorGetCurRequestorRate()
603 static bool sensorAmendRequestor(uint32_t sensorHandle, uint32_t clientTid, uint32_t newRate, uint6… in sensorAmendRequestor() argument
605 struct SensorsClientRequest *req = sensorClientRequestFind(sensorHandle, clientTid); in sensorAmendRequestor()
616 static bool sensorDeleteRequestor(uint32_t sensorHandle, uint32_t clientTid) in sensorDeleteRequestor() argument
618 struct SensorsClientRequest *req = sensorClientRequestFind(sensorHandle, clientTid); in sensorDeleteRequestor()
[all …]
Dnanohub_chre.c261 static bool osChreSensorGetInfoOld(uint32_t sensorHandle, struct chreSensorInfo *info) in osChreSensorGetInfoOld() argument
263 struct Sensor *s = sensorFindByHandle(sensorHandle); in osChreSensorGetInfoOld()
281 static bool osChreSensorGetInfo(uint32_t sensorHandle, struct chreSensorInfo *info) in osChreSensorGetInfo() argument
283 struct Sensor *s = sensorFindByHandle(sensorHandle); in osChreSensorGetInfo()
318 uint32_t sensorHandle = va_arg(args, uint32_t); in osChreApiSensorGetInfoOld() local
320 *retValP = osChreSensorGetInfoOld(sensorHandle, info); in osChreApiSensorGetInfoOld()
325 uint32_t sensorHandle = va_arg(args, uint32_t); in osChreApiSensorGetInfo() local
327 *retValP = osChreSensorGetInfo(sensorHandle, info); in osChreApiSensorGetInfo()
330 static bool osChreSensorGetSamplingStatus(uint32_t sensorHandle, in osChreSensorGetSamplingStatus() argument
333 struct Sensor *s = sensorFindByHandle(sensorHandle); in osChreSensorGetSamplingStatus()
[all …]
DosApi.c145 uint32_t sensorHandle = va_arg(args, uint32_t); in osExpApiSensorReq() local
151 *retValP = sensorRequest(0, sensorHandle, rate, latency); in osExpApiSensorReq()
157 uint32_t sensorHandle = va_arg(args, uint32_t); in osExpApiSensorRateChg() local
163 *retValP = sensorRequestRateChange(0, sensorHandle, newRate, newLatency); in osExpApiSensorRateChg()
169 uint32_t sensorHandle = va_arg(args, uint32_t); in osExpApiSensorRel() local
171 *retValP = sensorRelease(0, sensorHandle); in osExpApiSensorRel()
177 uint32_t sensorHandle = va_arg(args, uint32_t); in osExpApiSensorTrigger() local
179 *retValP = sensorTriggerOndemand(0, sensorHandle); in osExpApiSensorTrigger()
184 uint32_t sensorHandle = va_arg(args, uint32_t); in osExpApiSensorGetCurRate() local
186 *retValP = sensorGetCurRate(sensorHandle); in osExpApiSensorGetCurRate()
[all …]
DhostIntf.c89 uint32_t sensorHandle; member
570 …if (sensor->sensorHandle == 0 && !buffer->firstSample.biasPresent && !buffer->firstSample.numFlush… in hostIntfPacketDequeue()
1303 sensorFlush(sensor->sensorHandle); in onConfigCmdFlushOne()
1308 if (sensorRequestRateChange(mHostIntfTid, sensor->sensorHandle, cmd->rate, cmd->latency)) { in onConfigCmdEnableOne()
1327 for (uint32_t i = 0; sensorFind(cmd->sensType, i, &sensor->sensorHandle) != NULL; i++) { in onConfigCmdEnableAll()
1335 if (sensorRequest(mHostIntfTid, sensor->sensorHandle, cmd->rate, cmd->latency)) { in onConfigCmdEnableAll()
1345 sensor->sensorHandle = 0; in onConfigCmdEnableAll()
1352 sensorRelease(mHostIntfTid, sensor->sensorHandle); in onConfigCmdDisableOne()
1363 sensor->sensorHandle = 0; in onConfigCmdDisableOne()
1396 if (sensor->sensorHandle) { in onEvtNoSensorConfigEvent()
[all …]
/device/google/contexthub/firmware/os/drivers/vsync/
Dvsync.c78 uint32_t sensorHandle; member
167 sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_POWER_STATE_CHG, on, 0); in vsyncPower()
173 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_FW_STATE_CHG, 1, 0); in vsyncFirmwareUpload()
179 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in vsyncSetRate()
203 mTask.sensorHandle = sensorRegister(&mSensorInfo, &mSensorOps, NULL, true); in startTask()
223 sensorUnregister(mTask.sensorHandle); in endTask()
/device/google/contexthub/firmware/os/drivers/hall/
Dhall.c56 uint32_t sensorHandle; member
154 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_POWER_STATE_CHG, on, 0); in hallPower()
159 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_FW_STATE_CHG, 1, 0); in hallFirmwareUpload()
173 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in hallSetRate()
210 mTask.sensorHandle = sensorRegister(&mSensorInfo, &mSensorOps, NULL, true); in startTask()
224 sensorUnregister(mTask.sensorHandle); in endTask()
/device/google/contexthub/firmware/os/drivers/hall_twopole/
Dhall_twopole.c66 uint32_t sensorHandle; member
175 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_POWER_STATE_CHG, on, 0); in hallPower()
180 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_FW_STATE_CHG, 1, 0); in hallFirmwareUpload()
189 return sensorSignalInternalEvt(mTask.sensorHandle, SENSOR_INTERNAL_EVT_RATE_CHG, rate, latency); in hallSetRate()
226 mTask.sensorHandle = sensorRegister(&mSensorInfo, &mSensorOps, NULL, true); in startTask()
246 sensorUnregister(mTask.sensorHandle); in endTask()