/drivers/hdf_core/framework/utils/src/ |
D | hdf_sbuf.c | 15 #define HDF_SBUF_IMPL_CHECK_RETURN(sbuf, api, retCode) \ argument 17 if ((sbuf) == NULL || (sbuf)->impl == NULL) { \ 21 if ((sbuf)->impl->api == NULL) { \ 22 HDF_LOGE(#api " is not supported on %u sbuf", (sbuf)->type); \ 27 #define HDF_SBUF_IMPL_CHECK_RETURN_VOID(sbuf, api) \ argument 29 if ((sbuf) == NULL || (sbuf)->impl == NULL) { \ 33 if ((sbuf)->impl->api == NULL) { \ 34 HDF_LOGE(#api " is not supported on %u sbuf", (sbuf)->type); \ 75 uint8_t *HdfSbufGetData(const struct HdfSBuf *sbuf) in HdfSbufGetData() argument 77 HDF_SBUF_IMPL_CHECK_RETURN(sbuf, getData, NULL); in HdfSbufGetData() [all …]
|
D | hdf_sbuf_impl_raw.c | 49 struct HdfSBufRaw *sbuf = SBUF_RAW_CAST(impl); in SbufRawImplRecycle() local 50 if (sbuf != NULL) { in SbufRawImplRecycle() 51 if (sbuf->data != NULL && !sbuf->isBind) { in SbufRawImplRecycle() 52 OsalMemFree(sbuf->data); in SbufRawImplRecycle() 54 OsalMemFree(sbuf); in SbufRawImplRecycle() 58 static size_t SbufRawImplGetLeftWriteSize(struct HdfSBufRaw *sbuf) in SbufRawImplGetLeftWriteSize() argument 60 return (sbuf->capacity < sbuf->writePos) ? 0 : (sbuf->capacity - sbuf->writePos); in SbufRawImplGetLeftWriteSize() 63 static size_t SbufRawImplGetLeftReadSize(struct HdfSBufRaw *sbuf) in SbufRawImplGetLeftReadSize() argument 65 return (sbuf->writePos < sbuf->readPos) ? 0 : (sbuf->writePos - sbuf->readPos); in SbufRawImplGetLeftReadSize() 70 struct HdfSBufRaw *sbuf = SBUF_RAW_CAST(impl); in SbufRawImplWriteRollback() local [all …]
|
/drivers/hdf_core/framework/utils/include/ |
D | hdf_sbuf_impl.h | 26 bool (*writeBuffer)(struct HdfSBufImpl *sbuf, const uint8_t *data, uint32_t writeSize); 27 bool (*writeUnpadBuffer)(struct HdfSBufImpl *sbuf, const uint8_t *data, uint32_t writeSize); 28 bool (*writeUint64)(struct HdfSBufImpl *sbuf, uint64_t value); 29 bool (*writeUint32)(struct HdfSBufImpl *sbuf, uint32_t value); 30 bool (*writeUint16)(struct HdfSBufImpl *sbuf, uint16_t value); 31 bool (*writeUint8)(struct HdfSBufImpl *sbuf, uint8_t value); 32 bool (*writeInt64)(struct HdfSBufImpl *sbuf, int64_t value); 33 bool (*writeInt32)(struct HdfSBufImpl *sbuf, int32_t value); 34 bool (*writeInt16)(struct HdfSBufImpl *sbuf, int16_t value); 35 bool (*writeInt8)(struct HdfSBufImpl *sbuf, int8_t value); [all …]
|
/drivers/hdf_core/interfaces/inner_api/utils/ |
D | hdf_sbuf.h | 67 bool HdfSbufWriteBuffer(struct HdfSBuf *sbuf, const void *data, uint32_t writeSize); 79 bool HdfSbufWriteUnpadBuffer(struct HdfSBuf *sbuf, const uint8_t *data, uint32_t writeSize); 90 bool HdfSbufWriteUint64(struct HdfSBuf *sbuf, uint64_t value); 101 bool HdfSbufWriteUint32(struct HdfSBuf *sbuf, uint32_t value); 112 bool HdfSbufWriteUint16(struct HdfSBuf *sbuf, uint16_t value); 123 bool HdfSbufWriteUint8(struct HdfSBuf *sbuf, uint8_t value); 134 bool HdfSbufWriteInt64(struct HdfSBuf *sbuf, int64_t value); 145 bool HdfSbufWriteInt32(struct HdfSBuf *sbuf, int32_t value); 156 bool HdfSbufWriteInt16(struct HdfSBuf *sbuf, int16_t value); 167 bool HdfSbufWriteInt8(struct HdfSBuf *sbuf, int8_t value); [all …]
|
/drivers/hdf_core/adapter/uhdf2/ipc/src/ |
D | hdf_sbuf_impl_hipc.cpp | 52 static bool SbufMParcelImplWriteBuffer(struct HdfSBufImpl *sbuf, const uint8_t *data, uint32_t writ… in SbufMParcelImplWriteBuffer() argument 54 auto parcel = MParcelCast(sbuf); in SbufMParcelImplWriteBuffer() 61 static bool SbufMParcelImplWriteUnpadBuffer(struct HdfSBufImpl *sbuf, const uint8_t *data, uint32_t… in SbufMParcelImplWriteUnpadBuffer() argument 63 return MParcelCast(sbuf)->WriteUnpadBuffer(static_cast<const void *>(data), writeSize); in SbufMParcelImplWriteUnpadBuffer() 66 static bool SbufMParcelImplWriteUint64(struct HdfSBufImpl *sbuf, uint64_t value) in SbufMParcelImplWriteUint64() argument 68 return MParcelCast(sbuf)->WriteUint64(value); in SbufMParcelImplWriteUint64() 71 static bool SbufMParcelImplWriteUint32(struct HdfSBufImpl *sbuf, uint32_t value) in SbufMParcelImplWriteUint32() argument 73 return MParcelCast(sbuf)->WriteUint32(value); in SbufMParcelImplWriteUint32() 76 static bool SbufMParcelImplWriteUint16(struct HdfSBufImpl *sbuf, uint16_t value) in SbufMParcelImplWriteUint16() argument 78 return MParcelCast(sbuf)->WriteUint16(value); in SbufMParcelImplWriteUint16() [all …]
|
/drivers/hdf_core/adapter/uhdf2/shared/src/ |
D | dev_attribute_serialize.c | 25 bool DeviceAttributeSerialize(const struct HdfDeviceInfo *attribute, struct HdfSBuf *sbuf) in DeviceAttributeSerialize() argument 27 if (attribute == NULL || sbuf == NULL) { in DeviceAttributeSerialize() 31 if (!HdfSbufWriteUint32(sbuf, attribute->deviceId) || in DeviceAttributeSerialize() 32 !HdfSbufWriteUint16(sbuf, attribute->policy) || in DeviceAttributeSerialize() 33 !HdfSbufWriteString(sbuf, attribute->svcName) || in DeviceAttributeSerialize() 34 !HdfSbufWriteString(sbuf, attribute->moduleName) || in DeviceAttributeSerialize() 35 !HdfSbufWriteString(sbuf, attribute->deviceName)) { in DeviceAttributeSerialize() 40 if (!HdfSbufWriteUint32(sbuf, ATTRIBUTE_PRIVATE_DATA_LENGTH_NORMAL) || in DeviceAttributeSerialize() 41 !HdfSbufWriteString(sbuf, attribute->deviceMatchAttr)) { in DeviceAttributeSerialize() 46 if (!HdfSbufWriteUint32(sbuf, ATTRIBUTE_PRIVATE_DATA_LENGTH_NULL)) { in DeviceAttributeSerialize() [all …]
|
/drivers/peripheral/wlan/client/ |
D | BUILD.gn | 22 "src/sbuf/sbuf_cmd_adapter.c", 23 "src/sbuf/sbuf_common_adapter.c", 24 "src/sbuf/sbuf_event_adapter.c", 25 "src/sbuf/sbuf_wpa_cmd_adapter.c", 53 "src/sbuf/sbuf_common_adapter.c", 54 "src/sbuf/sbuf_wpa_cmd_adapter.c", 61 "src/sbuf/sbuf_cmd_adapter.c", 62 "src/sbuf/sbuf_event_adapter.c", 93 "src/sbuf/sbuf_event_adapter.c",
|
/drivers/hdf_core/adapter/uhdf2/shared/include/ |
D | dev_attribute_serialize.h | 26 bool DeviceAttributeSerialize(const struct HdfDeviceInfo *attribute, struct HdfSBuf *sbuf); 27 struct HdfDeviceInfo *DeviceAttributeDeserialize(struct HdfSBuf *sbuf);
|
/drivers/hdf_core/adapter/uhdf2/osal/src/ |
D | osal_sysevent.c | 63 struct HdfSBuf *sbuf = HdfSbufObtain(sizeof(uint64_t)); in FinishEvent() local 65 if (sbuf == NULL) { in FinishEvent() 69 if (!HdfSbufWriteUint64(sbuf, event->syncToken)) { in FinishEvent() 70 HdfSbufRecycle(sbuf); in FinishEvent() 74 int ret = service->dispatcher->Dispatch(&service->object, KEVENT_COMPLETE_EVENT, sbuf, NULL); in FinishEvent() 79 HdfSbufRecycle(sbuf); in FinishEvent()
|
/drivers/peripheral/light/hal/src/ |
D | light_controller.c | 283 struct HdfSBuf *sbuf = NULL; in OnMultiLights() local 294 sbuf = HdfSbufObtain(sizeof(struct LightColor) * count); in OnMultiLights() 295 if (sbuf == NULL) { in OnMultiLights() 300 if (!HdfSbufWriteInt32(sbuf, lightId)) { in OnMultiLights() 306 if (!HdfSbufWriteInt32(sbuf, LIGHT_OPS_IO_CMD_ENABLE_MULTI_LIGHTS)) { in OnMultiLights() 312 if (!HdfSbufWriteBuffer(sbuf, colors, sizeof(*colors))) { in OnMultiLights() 318 if (!HdfSbufWriteInt32(sbuf, count)) { in OnMultiLights() 324 ret = SendLightMsg(LIGHT_IO_CMD_OPS, sbuf, NULL); in OnMultiLights() 330 HdfSbufRecycle(sbuf); in OnMultiLights()
|
/drivers/hdf_core/framework/core/manager/test/unittest/common/ |
D | hdf_sbuf_test.cpp | 64 bool PushDataSequence(HdfSBuf *sbuf) in PushDataSequence() argument 70 ret = HdfSbufWriteUint8(sbuf, *(uint8_t *)dataTable[type]->data); in PushDataSequence() 73 ret = HdfSbufWriteUint16(sbuf, *(uint16_t *)dataTable[type]->data); in PushDataSequence() 76 ret = HdfSbufWriteUint32(sbuf, *(uint32_t *)dataTable[type]->data); in PushDataSequence() 79 ret = HdfSbufWriteUint64(sbuf, *(uint64_t *)dataTable[type]->data); in PushDataSequence() 82 ret = HdfSbufWriteUint8(sbuf, *(int8_t *)dataTable[type]->data); in PushDataSequence() 85 ret = HdfSbufWriteUint16(sbuf, *(uint16_t *)dataTable[type]->data); in PushDataSequence() 88 ret = HdfSbufWriteUint32(sbuf, *(uint32_t *)dataTable[type]->data); in PushDataSequence() 91 ret = HdfSbufWriteUint64(sbuf, *(uint64_t *)dataTable[type]->data); in PushDataSequence() 94 … ret = HdfSbufWriteBuffer(sbuf, (uint8_t *)dataTable[type]->data, dataTable[type]->size); in PushDataSequence() [all …]
|
/drivers/hdf_core/adapter/khdf/liteos/model/usb/host/src/ |
D | usb_pnp_manager.c | 40 bool UsbPnpManagerWriteModuleName(struct HdfSBuf *sbuf, const char *moduleName) in UsbPnpManagerWriteModuleName() argument 42 return HdfSbufWriteString(sbuf, moduleName); in UsbPnpManagerWriteModuleName()
|
/drivers/hdf_core/interfaces/inner_api/ipc/ |
D | hdf_sbuf_ipc.h | 64 int32_t SbufToParcel(struct HdfSBuf *sbuf, OHOS::MessageParcel **parcel);
|
/drivers/peripheral/usb/hdf_usb/include/ |
D | usb_pnp_manager.h | 24 bool UsbPnpManagerWriteModuleName(struct HdfSBuf *sbuf, const char *moduleName);
|
/drivers/hdf_core/framework/model/usb/include/ |
D | usb_pnp_manager.h | 24 bool UsbPnpManagerWriteModuleName(struct HdfSBuf *sbuf, const char *moduleName);
|
/drivers/peripheral/usb/ddk/host/src/ |
D | usb_pnp_manager.c | 37 bool UsbPnpManagerWriteModuleName(struct HdfSBuf *sbuf, const char *moduleName) in UsbPnpManagerWriteModuleName() argument 45 return HdfSbufWriteString(sbuf, modName); in UsbPnpManagerWriteModuleName()
|
/drivers/hdf_core/framework/core/adapter/syscall/src/ |
D | hdf_syscall_adapter.c | 95 struct HdfSBuf *sbuf = NULL; in HdfDevEventDispatchLocked() local 98 sbuf = HdfSbufBind(bwr->readBuffer, bwr->readConsumed); in HdfDevEventDispatchLocked() 100 sbuf = HdfSbufObtain(sizeof(int)); in HdfDevEventDispatchLocked() 103 if (sbuf == NULL) { in HdfDevEventDispatchLocked() 112 (void)listener->onReceive(listener, &adapter->super, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked() 114 (void)listener->callBack(listener->priv, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked() 116 HdfSbufSetDataSize(sbuf, bwr->readConsumed); in HdfDevEventDispatchLocked() 124 (void)listener->onReceive(listener, &adapter->super, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked() 126 (void)listener->callBack(listener->priv, bwr->cmdCode, sbuf); in HdfDevEventDispatchLocked() 128 HdfSbufSetDataSize(sbuf, bwr->readConsumed); in HdfDevEventDispatchLocked() [all …]
|
/drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/ |
D | BUILD.gn | 51 "$hdf_framework_path/ability/sbuf/include", 53 "$hdf_framework_path/ability/sbuf/include",
|
/drivers/hdf_core/framework/core/adapter/vnode/src/ |
D | hdf_vnode_adapter.c | 142 struct HdfSBuf *sbuf = NULL; in HdfSbufCopyFromUser() local 159 sbuf = HdfSbufBind((uintptr_t)kData, size); in HdfSbufCopyFromUser() 160 if (sbuf == NULL) { in HdfSbufCopyFromUser() 163 HdfSbufTransDataOwnership(sbuf); in HdfSbufCopyFromUser() 165 return sbuf; in HdfSbufCopyFromUser() 168 static int HdfSbufCopyToUser(const struct HdfSBuf *sbuf, void *dstUser, size_t dstUserSize) in HdfSbufCopyToUser() argument 170 size_t sbufSize = HdfSbufGetDataSize(sbuf); in HdfSbufCopyToUser() 179 if (CopyToUser(dstUser, HdfSbufGetData(sbuf), sbufSize) != 0) { in HdfSbufCopyToUser()
|
/drivers/hdf_core/framework/support/platform/src/i2c/ |
D | i2c_if_u.c | 71 static int32_t I2cHandleSbufCheckResize(struct HdfSBuf **sbuf) in I2cHandleSbufCheckResize() argument 73 struct HdfSBuf *buf = *sbuf; in I2cHandleSbufCheckResize() 86 *sbuf = buf; in I2cHandleSbufCheckResize()
|
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/resources/templates/lite/ |
D | Linux_Makefile.template | 10 -I$(srctree)/drivers/hdf/framework/ability/sbuf/include \
|
/drivers/hdf_core/framework/sample/platform/uart/dev/ |
D | BUILD.gn | 14 "$hdf_framework_path/ability/sbuf/include",
|
/drivers/hdf_core/framework/sample/platform/uart/dispatch/ |
D | BUILD.gn | 17 "$hdf_framework_path/ability/sbuf/include",
|
/drivers/peripheral/audio/test/audio_utils/audio_mixer/ |
D | audio_mixer_main.c | 315 char *sbuf = buf; in ParseName() local 329 *sbuf++ = *ptr; in ParseName() 340 *sbuf++ = *ptr; in ParseName() 346 *sbuf = (*ptr == '\0') ? *ptr : '\0'; in ParseName()
|
/drivers/hdf_core/adapter/khdf/liteos/model/audio/ |
D | BUILD.gn | 65 "$HDF_FRAMEWORKS_PATH/ability/sbuf/include",
|