/drivers/hdf_core/framework/support/platform/src/hdmi/ |
D | hdmi_event.c | 15 static int32_t HdmiEventPostMsg(struct HdmiCntlr *cntlr, struct HdmiEventMsg *event) in HdmiEventPostMsg() argument 22 if (event == NULL) { in HdmiEventPostMsg() 26 if (event->block) { in HdmiEventPostMsg() 27 (void)OsalSemInit(&event->sem, 0); in HdmiEventPostMsg() 29 (void)PlatformQueueAddMsg(cntlr->msgQueue, &event->msg); in HdmiEventPostMsg() 30 if (!event->block) { in HdmiEventPostMsg() 34 ret = OsalSemWait(&event->sem, HDF_WAIT_FOREVER); in HdmiEventPostMsg() 35 (void)OsalSemDestroy(&event->sem); in HdmiEventPostMsg() 36 OsalMemFree(event); in HdmiEventPostMsg() 76 struct HdmiEventMsg *event = NULL; in HdmiAddEventMsgToQueue() local [all …]
|
/drivers/peripheral/input/test/common/src/ |
D | input_callback_impl.cpp | 41 int32_t InputCallbackImpl::HotPlugCallback(const HotPlugEvent &event) in HotPlugCallback() argument 43 if (event.devIndex == 0) { in HotPlugCallback() 48 …HDF_LOGI("%s: status = %d devId= %d type = %d", __func__, event.status, event.devIndex, event.devT… in HotPlugCallback() 50 if (event.status == 0) { in HotPlugCallback() 51 ret = inputInterfaces_->OpenInputDevice(event.devIndex); in HotPlugCallback() 53 HDF_LOGE("%s: open device[%u] failed, ret %d", __func__, event.devIndex, ret); in HotPlugCallback() 57 … ret = inputInterfaces_->RegisterReportCallback(event.devIndex, reportCallback_.GetRefPtr()); in HotPlugCallback() 59 … HDF_LOGE("%s: register callback failed for device[%d], ret %d", __func__, event.devIndex, ret); in HotPlugCallback() 63 ret = inputInterfaces_->UnregisterReportCallback(event.devIndex); in HotPlugCallback() 69 ret = inputInterfaces_->CloseInputDevice(event.devIndex); in HotPlugCallback()
|
/drivers/peripheral/sensor/hdi_service/ |
D | sensor_callback_vdi.cpp | 25 struct HdfSensorEvents event; in OnDataEventVdi() local 32 event.sensorId = eventVdi.sensorId; in OnDataEventVdi() 33 event.version = eventVdi.version; in OnDataEventVdi() 34 event.timestamp = eventVdi.timestamp; in OnDataEventVdi() 35 event.option = eventVdi.option; in OnDataEventVdi() 36 event.mode = eventVdi.mode; in OnDataEventVdi() 37 event.data = eventVdi.data; in OnDataEventVdi() 38 event.dataLen = eventVdi.dataLen; in OnDataEventVdi() 40 int32_t ret = sensorCallback_->OnDataEvent(event); in OnDataEventVdi()
|
/drivers/liteos/hievent/src/ |
D | hiview_hievent.c | 78 static int HiviewHieventConvertString(struct HiviewHievent *event, char **pbuf); 155 struct HiviewHievent *event = NULL; in HiviewHieventCreate() local 158 event = LOS_MemAlloc((VOID *)OS_SYS_MEM_ADDR, sizeof(*event)); in HiviewHieventCreate() 159 if (!event) { in HiviewHieventCreate() 163 (VOID)memset_s(event, sizeof(*event), 0, sizeof(*event)); in HiviewHieventCreate() 164 event->eventid = eventid; in HiviewHieventCreate() 167 return (void *)event; in HiviewHieventCreate() 170 int HiviewHieventPutIntegral(struct HiviewHievent *event, in HiviewHieventPutIntegral() argument 176 if ((!event) || (!key)) { in HiviewHieventPutIntegral() 181 payload = HiviewHieventGetPayload(event->head, key); in HiviewHieventPutIntegral() [all …]
|
/drivers/peripheral/motion/hdi_service/ |
D | motion_callback_vdi.cpp | 25 struct HdfMotionEvent event; in OnDataEventVdi() local 32 event.motion = eventVdi.motion; in OnDataEventVdi() 33 event.result = eventVdi.result; in OnDataEventVdi() 34 event.status = eventVdi.status; in OnDataEventVdi() 35 event.datalen = eventVdi.datalen; in OnDataEventVdi() 36 event.data = eventVdi.data; in OnDataEventVdi() 38 int32_t ret = motionCallback_->OnDataEvent(event); in OnDataEventVdi()
|
/drivers/peripheral/sensor/hal/src/ |
D | sensor_channel.c | 77 void CopyEventData(struct SensorEvents *event) in CopyEventData() argument 79 if (event == NULL || event->data == NULL) { in CopyEventData() 84 for (uint32_t i = 0; i < event->dataLen; i++) { in CopyEventData() 85 g_dumpDate.data[i] = event->data[i]; in CopyEventData() 87 g_dumpDate.dataLen = event->dataLen; in CopyEventData() 88 g_dumpDate.sensorId = event->sensorId; in CopyEventData() 89 g_dumpDate.version = event->version; in CopyEventData() 90 g_dumpDate.timestamp = event->timestamp; in CopyEventData() 91 g_dumpDate.option = event->option; in CopyEventData() 92 g_dumpDate.mode = event->mode; in CopyEventData() [all …]
|
/drivers/peripheral/wlan/client/src/sbuf/ |
D | sbuf_event_adapter.c | 32 static void WifiEventNewStaProcess(const char *ifName, uint32_t event, struct HdfSBuf *reqData) in WifiEventNewStaProcess() argument 49 WifiEventReport(ifName, event, &staInfo); in WifiEventNewStaProcess() 52 static void WifiEventDelStaProcess(const char *ifName, uint32_t event, struct HdfSBuf *reqData) in WifiEventDelStaProcess() argument 61 WifiEventReport(ifName, event, addr); in WifiEventDelStaProcess() 64 static void WifiEventRxMgmtProcess(const char *ifName, uint32_t event, struct HdfSBuf *reqData) in WifiEventRxMgmtProcess() argument 80 WifiEventReport(ifName, event, &rxMgmt); in WifiEventRxMgmtProcess() 83 static void WifiEventTxStatusProcess(const char *ifName, uint32_t event, struct HdfSBuf *reqData) in WifiEventTxStatusProcess() argument 95 WifiEventReport(ifName, event, &txStatus); in WifiEventTxStatusProcess() 98 static void WifiEventScanDoneProcess(const char *ifName, uint32_t event, struct HdfSBuf *reqData) in WifiEventScanDoneProcess() argument 111 WifiEventReport(ifName, event, &status); in WifiEventScanDoneProcess() [all …]
|
/drivers/liteos/hievent/include/ |
D | hiview_hievent.h | 52 int HiviewHieventPutIntegral(struct HiviewHievent *event, 54 int HiviewHieventPutString(struct HiviewHievent *event, 56 int HiviewHieventSetTime(struct HiviewHievent *event, long long seconds); 57 int HiviewHieventAddFilePath(struct HiviewHievent *event, const char *path); 59 void HiviewHieventDestroy(struct HiviewHievent *event);
|
/drivers/peripheral/motion/test/unittest/hdi/ |
D | motion_callback_impl.cpp | 23 int32_t MotionCallbackImpl::OnDataEvent(const HdfMotionEvent &event) in OnDataEvent() argument 25 printf("moton :[%d], result[%d]:, status[%d]\n\r", event.motion, event.result, event.status); in OnDataEvent()
|
/drivers/peripheral/battery/interfaces/hdi_service/src/ |
D | battery_thread.cpp | 167 BatteryInfo event = {}; in UpdateBatteryInfo() local 175 event.capacity = batteryInfo->capacity_; in UpdateBatteryInfo() 176 event.voltage= batteryInfo->voltage_; in UpdateBatteryInfo() 177 event.temperature = batteryInfo->temperature_; in UpdateBatteryInfo() 178 event.healthState = batteryInfo->healthState_; in UpdateBatteryInfo() 179 event.pluggedType = batteryInfo->pluggedType_; in UpdateBatteryInfo() 180 event.pluggedMaxCurrent = batteryInfo->pluggedMaxCurrent_; in UpdateBatteryInfo() 181 event.pluggedMaxVoltage = batteryInfo->pluggedMaxVoltage_; in UpdateBatteryInfo() 182 event.chargeState = batteryInfo->chargeState_; in UpdateBatteryInfo() 183 event.chargeCounter = batteryInfo->chargeCounter_; in UpdateBatteryInfo() [all …]
|
/drivers/peripheral/distributed_camera/hdi_service/test/fuzztest/dcameranotify_fuzzer/ |
D | dcameranotify_fuzzer.cpp | 37 DCameraHDFEvent event; in DcameraNotifyFuzzTest() local 38 event.type_ = *(reinterpret_cast<const int*>(data)); in DcameraNotifyFuzzTest() 39 event.result_ = *(reinterpret_cast<const int*>(data)); in DcameraNotifyFuzzTest() 40 event.content_ = std::string(reinterpret_cast<const char*>(data), size); in DcameraNotifyFuzzTest() 42 DCameraProvider::GetInstance()->Notify(dhBase, event); in DcameraNotifyFuzzTest()
|
/drivers/hdf_core/framework/core/adapter/vnode/src/ |
D | hdf_vnode_adapter.c | 187 static void DevEventFree(struct HdfDevEvent *event) in DevEventFree() argument 189 if (event == NULL) { in DevEventFree() 192 if (event->data != NULL) { in DevEventFree() 193 HdfSbufRecycle(event->data); in DevEventFree() 194 event->data = NULL; in DevEventFree() 196 OsalMemFree(event); in DevEventFree() 254 static int EventDataProcess(struct HdfDevEvent *event, struct HdfWriteReadBuf *bwr, struct HdfWrite… in EventDataProcess() argument 257 size_t eventSize = HdfSbufGetDataSize(event->data); in EventDataProcess() 262 …if (HdfSbufCopyToUser(event->data, (void *)(uintptr_t)bwr->readBuffer, bwr->readSize) != HDF_SUCCE… in EventDataProcess() 266 bwr->cmdCode = (int32_t)event->id; in EventDataProcess() [all …]
|
/drivers/external_device_manager/services/native/driver_extension_manager/src/input_emit_event/ |
D | virtual_device.cpp | 132 struct input_event event {}; in EmitEvent() struct 133 event.type = type; in EmitEvent() 134 event.code = code; in EmitEvent() 135 event.value = value; in EmitEvent() 137 event.type, event.code, event.value); in EmitEvent() 139 gettimeofday(&event.time, nullptr); in EmitEvent() 141 if (write(fd_, &event, sizeof(event)) < static_cast<ssize_t>(sizeof(event))) { in EmitEvent()
|
/drivers/peripheral/sensor/chipset/proximity/ |
D | proximity_apds9960.c | 54 struct SensorReportEvent event; in ReadApds9960Data() local 56 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadApds9960Data() 58 ret = ReadApds9960RawData(data, &rawData, &event.timestamp); in ReadApds9960Data() 63 event.sensorId = SENSOR_TAG_PROXIMITY; in ReadApds9960Data() 64 event.option = 0; in ReadApds9960Data() 65 event.mode = SENSOR_WORK_MODE_ON_CHANGE; in ReadApds9960Data() 73 event.dataLen = sizeof(tmp); in ReadApds9960Data() 74 event.data = (uint8_t *)&tmp; in ReadApds9960Data() 75 ret = ReportSensorEvent(&event); in ReadApds9960Data()
|
/drivers/peripheral/sensor/chipset/als/ |
D | als_bh1750.c | 67 struct SensorReportEvent event; in ReadBh1750Data() local 69 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadBh1750Data() 70 ret = ReadBh1750RawData(data, &rawData, &event.timestamp); in ReadBh1750Data() 76 event.sensorId = SENSOR_TAG_AMBIENT_LIGHT; in ReadBh1750Data() 77 event.option = 0; in ReadBh1750Data() 78 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadBh1750Data() 80 event.dataLen = sizeof(als); in ReadBh1750Data() 81 event.data = (uint8_t *)&als; in ReadBh1750Data() 83 ret = ReportSensorEvent(&event); in ReadBh1750Data()
|
/drivers/peripheral/usb/ddk/device/src/ |
D | usbfn_dev_mgr.c | 353 static void CollectEventHandle(struct UsbFnEventAll *event, struct UsbFnDeviceMgr *devMgr) in CollectEventHandle() argument 359 event->ep0Num = 0; in CollectEventHandle() 360 event->epNum = 0; in CollectEventHandle() 365 event->ep0[event->ep0Num] = funcMgr->fd; in CollectEventHandle() 366 event->ep0Event[event->ep0Num].type = USB_EP0_INVALID; in CollectEventHandle() 367 event->ep0Num++; in CollectEventHandle() 380 event->epx[event->epNum] = handle->fds[j]; in CollectEventHandle() 381 event->reqEvent[event->epNum] = handle->reqEvent[j]; in CollectEventHandle() 382 event->numEvent[event->epNum] = 0; in CollectEventHandle() 383 event->epNum++; in CollectEventHandle() [all …]
|
/drivers/peripheral/sensor/chipset/temperature/ |
D | temperature_sht30.c | 81 struct SensorReportEvent event; in ReadSht30Data() local 84 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadSht30Data() 91 event.timestamp = time.sec * SENSOR_SECOND_CONVERT_NANOSECOND + time.usec * SENSOR_CONVERT_UNIT; in ReadSht30Data() 93 ret = ReadSht30RawData(data, &rawData, &event.timestamp); in ReadSht30Data() 101 event.sensorId = SENSOR_TAG_TEMPERATURE; in ReadSht30Data() 102 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadSht30Data() 103 event.dataLen = sizeof(temperature); in ReadSht30Data() 104 event.data = (uint8_t *)&temperature; in ReadSht30Data() 105 ret = ReportSensorEvent(&event); in ReadSht30Data()
|
D | temperature_aht20.c | 80 struct SensorReportEvent event; in ReadAht20Data() local 83 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadAht20Data() 90 event.timestamp = time.sec * SENSOR_SECOND_CONVERT_NANOSECOND + time.usec * SENSOR_CONVERT_UNIT; in ReadAht20Data() 92 ret = ReadAht20RawData(data, &rawData, &event.timestamp); in ReadAht20Data() 100 event.sensorId = SENSOR_TAG_TEMPERATURE; in ReadAht20Data() 101 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadAht20Data() 102 event.dataLen = sizeof(temperature); in ReadAht20Data() 103 event.data = (uint8_t *)&temperature; in ReadAht20Data() 104 ret = ReportSensorEvent(&event); in ReadAht20Data()
|
/drivers/peripheral/sensor/chipset/humidity/ |
D | humidity_sht30.c | 82 struct SensorReportEvent event; in ReadSht30Data() local 85 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadSht30Data() 92 event.timestamp = time.sec * SENSOR_SECOND_CONVERT_NANOSECOND + time.usec * SENSOR_CONVERT_UNIT; in ReadSht30Data() 94 ret = ReadSht30RawData(data, &rawData, &event.timestamp); in ReadSht30Data() 102 event.sensorId = SENSOR_TAG_HUMIDITY; in ReadSht30Data() 103 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadSht30Data() 104 event.dataLen = sizeof(humidity); in ReadSht30Data() 105 event.data = (uint8_t *)&humidity; in ReadSht30Data() 106 ret = ReportSensorEvent(&event); in ReadSht30Data()
|
D | humidity_aht20.c | 81 struct SensorReportEvent event; in ReadAht20Data() local 84 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadAht20Data() 91 event.timestamp = time.sec * SENSOR_SECOND_CONVERT_NANOSECOND + time.usec * SENSOR_CONVERT_UNIT; in ReadAht20Data() 93 ret = ReadAht20RawData(data, &rawData, &event.timestamp); in ReadAht20Data() 101 event.sensorId = SENSOR_TAG_HUMIDITY; in ReadAht20Data() 102 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadAht20Data() 103 event.dataLen = sizeof(humidity); in ReadAht20Data() 104 event.data = (uint8_t *)&humidity; in ReadAht20Data() 105 ret = ReportSensorEvent(&event); in ReadAht20Data()
|
/drivers/peripheral/sensor/chipset/pedometer/ |
D | pedometer_bmi160.c | 60 struct SensorReportEvent event; in ReadBmi160PedometerData() local 62 ret = memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadBmi160PedometerData() 67 ret = ReadBmi160PedometerRawData(data, &rawData, &event.timestamp); in ReadBmi160PedometerData() 73 event.sensorId = SENSOR_TAG_PEDOMETER; in ReadBmi160PedometerData() 74 event.option = 0; in ReadBmi160PedometerData() 75 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadBmi160PedometerData() 79 event.dataLen = sizeof(tmp); in ReadBmi160PedometerData() 80 event.data = (uint8_t *)&tmp; in ReadBmi160PedometerData() 81 ret = ReportSensorEvent(&event); in ReadBmi160PedometerData()
|
/drivers/hdf_core/framework/test/unittest/sensor/ |
D | hdf_sensor_test.c | 40 struct SensorReportEvent event; in SensorTestDataWorkEntry() local 43 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in SensorTestDataWorkEntry() 47 …event.timestamp = time.sec * SENSOR_SECOND_CONVERT_NANOSECOND + time.usec * SENSOR_CONVERT_UNIT; /… in SensorTestDataWorkEntry() 48 event.sensorId = SENSOR_TAG_NONE; in SensorTestDataWorkEntry() 49 event.option = 0; in SensorTestDataWorkEntry() 50 event.mode = SENSOR_WORK_MODE_REALTIME; in SensorTestDataWorkEntry() 51 event.dataLen = sizeof(value); in SensorTestDataWorkEntry() 52 event.data = (uint8_t *)&value; in SensorTestDataWorkEntry() 53 ReportSensorEvent(&event); in SensorTestDataWorkEntry()
|
/drivers/peripheral/wlan/client/src/ |
D | wifi_driver_client.c | 37 void WifiEventReport(const char *ifName, uint32_t event, void *data) in WifiEventReport() argument 43 (((1 << event) & g_callbackEventMap[i]->eventType) != 0)) { in WifiEventReport() 44 HDF_LOGI("%s: send event = %u, ifName = %s", __FUNCTION__, event, ifName); in WifiEventReport() 45 g_callbackEventMap[i]->onRecFunc(event, data, ifName); in WifiEventReport() 123 struct Hid2dEvent *event = NULL; in WifiRegisterHid2dCallback() local 137 event = (struct Hid2dEvent *)OsalMemCalloc(sizeof(struct Hid2dEvent)); in WifiRegisterHid2dCallback() 138 if (event == NULL) { in WifiRegisterHid2dCallback() 143 if (strcpy_s(event->ifName, IFNAMSIZ + 1, ifName) != RET_CODE_SUCCESS) { in WifiRegisterHid2dCallback() 147 event->func = func; in WifiRegisterHid2dCallback() 150 g_hid2dEventMap[i] = event; in WifiRegisterHid2dCallback() [all …]
|
/drivers/peripheral/sensor/chipset/gyro/ |
D | gyro_bmi160.c | 81 struct SensorReportEvent event; in ReadBmi160GyroData() local 83 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadBmi160GyroData() 85 ret = ReadBmi160GyroRawData(data, &rawData, &event.timestamp); in ReadBmi160GyroData() 90 event.sensorId = SENSOR_TAG_GYROSCOPE; in ReadBmi160GyroData() 91 event.option = 0; in ReadBmi160GyroData() 92 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadBmi160GyroData() 104 event.dataLen = sizeof(tmp); in ReadBmi160GyroData() 105 event.data = (uint8_t *)&tmp; in ReadBmi160GyroData() 106 ret = ReportSensorEvent(&event); in ReadBmi160GyroData()
|
/drivers/peripheral/sensor/chipset/magnetic/ |
D | magnetic_lsm303.c | 81 struct SensorReportEvent event; in ReadLsm303Data() local 83 (void)memset_s(&event, sizeof(event), 0, sizeof(event)); in ReadLsm303Data() 88 int32_t ret = ReadLsm303RawData(data, &rawData, &event.timestamp); in ReadLsm303Data() 94 event.sensorId = SENSOR_TAG_MAGNETIC_FIELD; in ReadLsm303Data() 95 event.option = 0; in ReadLsm303Data() 96 event.mode = SENSOR_WORK_MODE_REALTIME; in ReadLsm303Data() 108 event.dataLen = sizeof(tmp); in ReadLsm303Data() 109 event.data = (uint8_t *)&tmp; in ReadLsm303Data() 110 ret = ReportSensorEvent(&event); in ReadLsm303Data()
|