Lines Matching refs:ev
554 sensors_event_t *HubConnection::initEv(sensors_event_t *ev, uint64_t timestamp, uint32_t type, uint… in initEv() argument
556 memset(ev, 0x00, sizeof(sensors_event_t)); in initEv()
557 ev->version = sizeof(sensors_event_t); in initEv()
558 ev->timestamp = timestamp; in initEv()
559 ev->type = type; in initEv()
560 ev->sensor = sensor; in initEv()
562 return ev; in initEv()
787 sensors_event_t *ev; in processSample() local
932 ev = initEv(&nev[cnt++], timestamp, type, sensor); in processSample()
933 ev->data[0] = sample->x; in processSample()
934 ev->data[1] = sample->y; in processSample()
935 ev->data[2] = sample->z; in processSample()
938 ev = initEv(&nev[cnt++], timestamp, type, sensor); in processSample()
944 ev->data[0] = sample->x; in processSample()
945 ev->data[1] = sample->y; in processSample()
946 ev->data[2] = sample->z; in processSample()
947 ev->data[3] = w; in processSample()
948 ev->data[4] = (4 - mMagAccuracy) * heading_accuracy; in processSample()
952 ev = initEv(&nev[cnt++], timestamp, type, sensor); in processSample()
958 ev->data[0] = sample->x; in processSample()
959 ev->data[1] = sample->y; in processSample()
960 ev->data[2] = sample->z; in processSample()
961 ev->data[3] = w; in processSample()
1094 sensors_event_t ev; in processBuf() local
1342 memset(&ev, 0x00, sizeof(sensors_event_t)); in processBuf()
1343 ev.version = META_DATA_VERSION; in processBuf()
1344 ev.timestamp = 0; in processBuf()
1345 ev.type = SENSOR_TYPE_META_DATA; in processBuf()
1346 ev.sensor = 0; in processBuf()
1347 ev.meta_data.what = META_DATA_FLUSH_COMPLETE; in processBuf()
1348 ev.meta_data.sensor = flush.handle; in processBuf()
1363 write(&ev, 1); in processBuf()
1365 ALOGV("flushing %d", ev.meta_data.sensor); in processBuf()
1809 ssize_t HubConnection::read(sensors_event_t *ev, size_t size) { in read() argument
1810 ssize_t n = mRing.read(ev, size); in read()
1822 decrementIfWakeEventLocked(ev[i].sensor); in read()
1828 ssize_t HubConnection::write(const sensors_event_t *ev, size_t n) { in write() argument
1834 if (mRing.write(&ev[i], 1) == 1) { in write()
1837 protectIfWakeEventLocked(ev[i].sensor); in write()
1918 struct input_event ev; in sendFolioEvent() local
1920 memset(&ev, 0, sizeof(ev)); in sendFolioEvent()
1922 ev.type = EV_SW; in sendFolioEvent()
1923 ev.code = SW_LID; in sendFolioEvent()
1924 ev.value = data; in sendFolioEvent()
1925 ret = TEMP_FAILURE_RETRY(::write(mUinputFd, &ev, sizeof(ev))); in sendFolioEvent()
1932 ev.type = EV_SYN; in sendFolioEvent()
1933 ev.code = SYN_REPORT; in sendFolioEvent()
1934 ev.value = 0; in sendFolioEvent()
1935 ret = TEMP_FAILURE_RETRY(::write(mUinputFd, &ev, sizeof(ev))); in sendFolioEvent()