/drivers/hdf_core/framework/utils/src/hcs_parser/ |
H A D | device_resource_if.c | 13 static void HcsIfaceConstruct(struct DeviceResourceIface *instance) in HcsIfaceConstruct() argument 15 instance->GetRootNode = HcsGetRootNode; in HcsIfaceConstruct() 16 instance->GetBool = HcsGetBool; in HcsIfaceConstruct() 17 instance->GetUint8 = HcsGetUint8; in HcsIfaceConstruct() 18 instance->GetUint8ArrayElem = HcsGetUint8ArrayElem; in HcsIfaceConstruct() 19 instance->GetUint8Array = HcsGetUint8Array; in HcsIfaceConstruct() 20 instance->GetUint16 = HcsGetUint16; in HcsIfaceConstruct() 21 instance->GetUint16ArrayElem = HcsGetUint16ArrayElem; in HcsIfaceConstruct() 22 instance->GetUint16Array = HcsGetUint16Array; in HcsIfaceConstruct() 23 instance in HcsIfaceConstruct() 37 DeviceResourceIfaceConstruct(struct DeviceResourceIface *instance, DeviceResourceType type) DeviceResourceIfaceConstruct() argument 50 static struct DeviceResourceIface *instance = NULL; DeviceResourceGetIfaceInstance() local [all...] |
/drivers/hdf_core/adapter/uhdf2/host/src/ |
H A D | device_token_stub.c | 45 struct DeviceTokenStub *instance = in DeviceTokenStubCreate() local 47 if (instance != NULL) { in DeviceTokenStubCreate() 48 DeviceTokenStubConstruct(instance); in DeviceTokenStubCreate() 50 return (struct HdfObject *)instance; in DeviceTokenStubCreate() 55 struct DeviceTokenStub *instance = (struct DeviceTokenStub *)object; in DeviceTokenStubRelease() local 56 if (instance != NULL) { in DeviceTokenStubRelease() 57 if (instance->remote != NULL) { in DeviceTokenStubRelease() 58 HdfRemoteServiceRecycle(instance->remote); in DeviceTokenStubRelease() 59 instance->remote = NULL; in DeviceTokenStubRelease() 61 OsalMemFree(instance); in DeviceTokenStubRelease() [all...] |
H A D | driver_loader_full.c | 84 struct DriverLoaderFull *instance = in HdfDriverLoaderFullCreate() local 86 if (instance != NULL) { in HdfDriverLoaderFullCreate() 87 HdfDriverLoaderFullConstruct(instance); in HdfDriverLoaderFullCreate() 88 g_fullLoader = instance; in HdfDriverLoaderFullCreate() 96 struct DriverLoaderFull *instance = (struct DriverLoaderFull *)object; in HdfDriverLoaderFullRelease() local 97 if (instance == g_fullLoader) { in HdfDriverLoaderFullRelease() 100 if (instance != NULL) { in HdfDriverLoaderFullRelease() 101 OsalMemFree(instance); in HdfDriverLoaderFullRelease() 107 static struct IDriverLoader *instance = NULL; in HdfDriverLoaderGetInstance() local 108 if (instance in HdfDriverLoaderGetInstance() [all...] |
H A D | device_service_stub.c | 121 struct DeviceServiceStub *instance = (struct DeviceServiceStub *)deviceNode; in DeviceServiceStubRemoveService() local 122 HdfRemoteServiceRecycle(instance->remote); in DeviceServiceStubRemoveService() 123 instance->remote = NULL; in DeviceServiceStubRemoveService() 139 struct DeviceServiceStub *instance = in DeviceServiceStubCreate() local 141 if (instance != NULL) { in DeviceServiceStubCreate() 142 DeviceServiceStubConstruct(instance); in DeviceServiceStubCreate() 144 return (struct HdfObject *)instance; in DeviceServiceStubCreate() 149 struct DeviceServiceStub *instance = (struct DeviceServiceStub *)object; in DeviceServiceStubRelease() local 150 if (instance != NULL) { in DeviceServiceStubRelease() 151 if (instance in DeviceServiceStubRelease() 166 struct DeviceServiceStub *instance = (struct DeviceServiceStub *)devNode; HdfDeviceObjectCheckInterfaceDesc() local [all...] |
H A D | devhost_service_stub.c | 125 static struct DevHostServiceStub *instance = NULL; in DevHostServiceStubCreate() local 126 if (instance != NULL) { in DevHostServiceStubCreate() 127 return (struct HdfObject *)&instance->super; in DevHostServiceStubCreate() 129 instance = (struct DevHostServiceStub *)OsalMemCalloc(sizeof(struct DevHostServiceStub)); in DevHostServiceStubCreate() 130 if (instance != NULL) { in DevHostServiceStubCreate() 131 DevHostServiceStubConstruct(instance); in DevHostServiceStubCreate() 132 return (struct HdfObject *)&instance->super; in DevHostServiceStubCreate() 139 struct DevHostServiceStub *instance = (struct DevHostServiceStub *)object; in DevHostServiceStubRelease() local 140 if (instance != NULL) { in DevHostServiceStubRelease() 141 DevHostServiceFullDestruct(&instance in DevHostServiceStubRelease() [all...] |
H A D | devsvc_manager_proxy.c | 214 struct IDevHostService *instance = DevHostServiceNewInstance(0, NULL); in DevSvcManagerProxyOnRemoteDied() local 216 if (recipient == NULL || service == NULL || instance == NULL) { in DevSvcManagerProxyOnRemoteDied() 221 struct DevHostServiceFull *fullService = (struct DevHostServiceFull *)instance; in DevSvcManagerProxyOnRemoteDied() 243 struct DevSvcManagerProxy *instance = (struct DevSvcManagerProxy *)OsalMemCalloc(sizeof(struct DevSvcManagerProxy)); in DevSvcManagerProxyObtain() local 244 if (instance != NULL) { in DevSvcManagerProxyObtain() 245 DevSvcManagerProxyConstruct(instance, remote); in DevSvcManagerProxyObtain() 247 return (struct IDevSvcManager *)instance; in DevSvcManagerProxyObtain() 252 static struct IDevSvcManager *instance = NULL; in DevSvcManagerProxyCreate() local 253 if (instance == NULL) { in DevSvcManagerProxyCreate() 261 instance in DevSvcManagerProxyCreate() 269 struct DevSvcManagerProxy *instance = (struct DevSvcManagerProxy *)object; DevSvcManagerProxyRelease() local [all...] |
/drivers/hdf_core/framework/test/fuzztest/devsvcmanagerstub_fuzzer/ |
H A D | devsvcmanagerstub_fuzzer.cpp | 36 static struct DevSvcManagerStub *instance;
in GetDevSvcManagerStubInstance() local 37 if (instance != NULL) {
in GetDevSvcManagerStubInstance() 38 return instance;
in GetDevSvcManagerStubInstance() 41 instance = reinterpret_cast<struct DevSvcManagerStub *>(DevSvcManagerStubCreate());
in GetDevSvcManagerStubInstance() 42 if (instance == nullptr) {
in GetDevSvcManagerStubInstance() 48 reinterpret_cast<struct HdfObject *>(instance), &g_servmgrDispatcher);
in GetDevSvcManagerStubInstance() 60 instance->remote = remoteService;
in GetDevSvcManagerStubInstance() 61 return instance;
in GetDevSvcManagerStubInstance() 66 struct DevSvcManagerStub *instance = GetDevSvcManagerStubInstance();
in DevsvcManagerFuzzTest() local 67 if (instance in DevsvcManagerFuzzTest() [all...] |
/drivers/hdf_core/adapter/khdf/liteos_m/core/common/src/ |
H A D | hdf_device_node_ext.c | 68 struct DeviceNodeExt *instance = in DeviceNodeExtCreate() local 70 if (instance != NULL) { in DeviceNodeExtCreate() 71 DeviceNodeExtConstruct(instance); in DeviceNodeExtCreate() 72 instance->ioService = NULL; in DeviceNodeExtCreate() 74 return (struct HdfObject *)instance; in DeviceNodeExtCreate() 79 struct DeviceNodeExt *instance = (struct DeviceNodeExt *)object; in DeviceNodeExtRelease() local 80 if (instance != NULL) { in DeviceNodeExtRelease() 81 HdfDeviceNodeDestruct(&instance->super); in DeviceNodeExtRelease() 82 OsalMemFree(instance); in DeviceNodeExtRelease()
|
/drivers/hdf_core/adapter/khdf/uniproton/core/common/src/ |
H A D | hdf_device_node_ext.c | 64 struct DeviceNodeExt *instance = (struct DeviceNodeExt *)OsalMemCalloc(sizeof(struct DeviceNodeExt)); in DeviceNodeExtCreate() local 65 if (instance != NULL) { in DeviceNodeExtCreate() 66 DeviceNodeExtConstruct(instance); in DeviceNodeExtCreate() 67 instance->ioService = NULL; in DeviceNodeExtCreate() 69 return (struct HdfObject *)instance; in DeviceNodeExtCreate() 74 struct DeviceNodeExt *instance = (struct DeviceNodeExt *)object; in DeviceNodeExtRelease() local 75 if (instance != NULL) { in DeviceNodeExtRelease() 76 HdfDeviceNodeDestruct(&instance->super); in DeviceNodeExtRelease() 77 OsalMemFree(instance); in DeviceNodeExtRelease()
|
H A D | devmgr_service_start.c | 90 struct IDevmgrService *instance = DevmgrServiceGetInstance(); in DeviceManagerStart() local 91 if (instance == NULL || instance->StartService == NULL) { in DeviceManagerStart() 92 HDF_LOGE("Device manager start failed, service instance is null!"); in DeviceManagerStart() 96 int ret = instance->StartService(instance); in DeviceManagerStart()
|
/drivers/hdf_core/framework/test/fuzztest/devmgrservicestub_fuzzer/ |
H A D | devmgrservicestub_fuzzer.cpp | 34 static struct DevmgrServiceStub *instance = nullptr;
in GetDevmgrServiceStubInstance() local 35 if (instance != nullptr) {
in GetDevmgrServiceStubInstance() 36 return instance;
in GetDevmgrServiceStubInstance() 39 instance = reinterpret_cast<struct DevmgrServiceStub *>(DevmgrServiceStubCreate());
in GetDevmgrServiceStubInstance() 40 if (instance == nullptr) {
in GetDevmgrServiceStubInstance() 46 reinterpret_cast<struct HdfObject *>(instance), &g_devmgrDispatcher);
in GetDevmgrServiceStubInstance() 57 instance->remote = remoteService;
in GetDevmgrServiceStubInstance() 58 return instance;
in GetDevmgrServiceStubInstance() 63 struct DevmgrServiceStub *instance = GetDevmgrServiceStubInstance();
in AttachDeviceHostFuzzTest() local 64 if (instance in AttachDeviceHostFuzzTest() [all...] |
/drivers/hdf_core/adapter/uhdf2/manager/ |
H A D | device_manager.c | 32 struct IDevmgrService* instance = DevmgrServiceGetInstance(); in main() local 33 if (instance == NULL) { in main() 34 HDF_LOGE("Getting DevmgrService instance failed"); in main() 38 if (instance->StartService != NULL) { in main() 39 status = instance->StartService(instance); in main() 46 struct DevmgrServiceFull *fullService = (struct DevmgrServiceFull *)instance; in main()
|
/drivers/hdf_core/framework/test/fuzztest/devicemanagerstart_fuzzer/ |
H A D | devicemanagerstart_fuzzer.cpp | 33 struct IDevmgrService* instance = DevmgrServiceGetInstance();
in DeviceManagerStartServiceFuzzTest() local 34 if (instance == NULL) {
in DeviceManagerStartServiceFuzzTest() 35 HDF_LOGE("Getting DevmgrService instance failed");
in DeviceManagerStartServiceFuzzTest() 39 if (instance->StartService != NULL) {
in DeviceManagerStartServiceFuzzTest() 40 status = instance->StartService(instance);
in DeviceManagerStartServiceFuzzTest() 47 struct DevmgrServiceFull *fullService = reinterpret_cast<struct DevmgrServiceFull *>(instance);
in DeviceManagerStartServiceFuzzTest()
|
/drivers/peripheral/codec/hal/src/ |
H A D | codec_callback_type_proxy.c | 25 struct CodecCallbackType instance; member 233 static void CodecCallbackTypeProxyConstruct(struct CodecCallbackType *instance) in CodecCallbackTypeProxyConstruct() argument 235 if (instance == NULL) { in CodecCallbackTypeProxyConstruct() 239 instance->EventHandler = CodecCallbackTypeProxyEventHandler; in CodecCallbackTypeProxyConstruct() 240 instance->EmptyBufferDone = CodecCallbackTypeProxyEmptyBufferDone; in CodecCallbackTypeProxyConstruct() 241 instance->FillBufferDone = CodecCallbackTypeProxyFillBufferDone; in CodecCallbackTypeProxyConstruct() 251 struct CodecCallbackType *instance = (struct CodecCallbackType *)OsalMemAlloc(sizeof(struct CodecCallbackType)); in CodecCallbackTypeGet() local 252 if (instance == NULL) { in CodecCallbackTypeGet() 258 OsalMemFree(instance); in CodecCallbackTypeGet() 263 instance in CodecCallbackTypeGet() 268 CodecCallbackTypeRelease(struct CodecCallbackType *instance) CodecCallbackTypeRelease() argument [all...] |
H A D | codec_component_type_service.c | 274 void CodecComponentTypeServiceConstruct(struct CodecComponentType *instance) in CodecComponentTypeServiceConstruct() argument 276 if (instance == NULL) { in CodecComponentTypeServiceConstruct() 280 instance->GetComponentVersion = CodecComponentTypeGetComponentVersion; in CodecComponentTypeServiceConstruct() 281 instance->SendCommand = CodecComponentTypeSendCommand; in CodecComponentTypeServiceConstruct() 282 instance->GetParameter = CodecComponentTypeGetParameter; in CodecComponentTypeServiceConstruct() 283 instance->SetParameter = CodecComponentTypeSetParameter; in CodecComponentTypeServiceConstruct() 284 instance->GetConfig = CodecComponentTypeGetConfig; in CodecComponentTypeServiceConstruct() 285 instance->SetConfig = CodecComponentTypeSetConfig; in CodecComponentTypeServiceConstruct() 286 instance->GetExtensionIndex = CodecComponentTypeGetExtensionIndex; in CodecComponentTypeServiceConstruct() 287 instance in CodecComponentTypeServiceConstruct() [all...] |
H A D | codec_callback_type_service.c | 41 void CodecCallbackTypeServiceConstruct(struct CodecCallbackType *instance) in CodecCallbackTypeServiceConstruct() argument 43 instance->EventHandler = CodecCallbackTypeEventHandler; in CodecCallbackTypeServiceConstruct() 44 instance->EmptyBufferDone = CodecCallbackTypeEmptyBufferDone; in CodecCallbackTypeServiceConstruct() 45 instance->FillBufferDone = CodecCallbackTypeFillBufferDone; in CodecCallbackTypeServiceConstruct()
|
/drivers/hdf_core/framework/core/manager/src/ |
H A D | devsvc_manager_ext.c | 183 static struct DevSvcManagerExt *instance; in DevSvcManagerExtCreate() local 184 if (instance != NULL) { in DevSvcManagerExtCreate() 185 return (struct HdfObject *)instance; in DevSvcManagerExtCreate() 188 instance = OsalMemCalloc(sizeof(struct DevSvcManagerExt)); in DevSvcManagerExtCreate() 189 if (!DevSvcManagerExtConstruct(instance)) { in DevSvcManagerExtCreate() 190 OsalMemFree(instance); in DevSvcManagerExtCreate() 191 instance = NULL; in DevSvcManagerExtCreate() 194 return (struct HdfObject *)instance; in DevSvcManagerExtCreate() 199 struct DevSvcManagerExt *instance = (struct DevSvcManagerExt *)inst; in DevSvcManagerExtRelease() local 200 if (instance in DevSvcManagerExtRelease() [all...] |
/drivers/hdf_core/framework/utils/src/ |
H A D | hdf_cstring.c | 28 struct HdfCString *instance = NULL; in HdfCStringObtain() local 36 instance = (struct HdfCString *)OsalMemCalloc(size); in HdfCStringObtain() 37 if (instance == NULL) { in HdfCStringObtain() 41 if (strncpy_s(instance->value, strLen + 1, str, strLen) != EOK) { in HdfCStringObtain() 43 OsalMemFree(instance); in HdfCStringObtain() 46 instance->size = (int)strLen; in HdfCStringObtain() 48 return instance; in HdfCStringObtain()
|
/drivers/hdf_core/adapter/uhdf2/host/test/unittest/ |
H A D | devhost_test.cpp | 71 struct IDevmgrService *instance = reinterpret_cast<struct IDevmgrService *>(object); in HWTEST_F() local 73 int32_t ret = instance->AttachDeviceHost(instance, 0, nullptr); in HWTEST_F() 75 ret = instance->AttachDevice(instance, nullptr); in HWTEST_F() 77 ret = instance->LoadDevice(instance, nullptr); in HWTEST_F() 80 ret = instance->LoadDevice(instance, name); in HWTEST_F() 87 ret = instance in HWTEST_F() 109 struct IDevSvcManager *instance = reinterpret_cast<struct IDevSvcManager *>(object); HWTEST_F() local [all...] |
/drivers/hdf_core/adapter/khdf/liteos/model/bus/usb/ |
H A D | hdf_usb.c | 54 static const struct DeviceResourceNode *GetHdfUsbNode(const struct DeviceResourceIface *instance) in GetHdfUsbNode() argument 56 const struct DeviceResourceNode *root = instance->GetRootNode(); in GetHdfUsbNode() 63 return instance->GetNodeByMatchAttr(root, USB_NODE_MATCH_ATTR); in GetHdfUsbNode() 66 static int GetUsbControllerParam(const struct DeviceResourceIface *instance, const struct DeviceResourceNode *node, in GetUsbControllerParam() argument 71 ret = instance->GetUint32(node, "res_type", &cfg->type, 0); in GetUsbControllerParam() 76 ret = instance->GetUint32(node, "res_unit", &cfg->unit, 0); in GetUsbControllerParam() 81 ret = instance->GetUint32(node, "res_start", &cfg->start, 0); in GetUsbControllerParam() 86 ret = instance->GetUint32(node, "res_end", &cfg->end, 0); in GetUsbControllerParam() 91 ret = instance->GetUint32(node, "res_count", &cfg->count, 0); in GetUsbControllerParam() 99 static int ProcControllorParam(const struct DeviceResourceIface *instance, cons argument [all...] |
/drivers/interface/display/buffer/v1_0/hdi_impl/ |
H A D | display_buffer_hdi_impl.cpp | 25 IDisplayBuffer *instance = new HdiDisplayBufferImpl(); in Get() local 26 if (instance == nullptr) { in Get() 29 return instance; in Get()
|
/drivers/hdf_core/adapter/uhdf2/manager/src/ |
H A D | device_token_proxy.c | 26 struct HdfDevTokenProxy *instance = in HdfDevTokenProxyObtain() local 28 if (instance != NULL) { in HdfDevTokenProxyObtain() 29 HdfDevTokenProxyConstruct(instance, remote); in HdfDevTokenProxyObtain() 31 return instance; in HdfDevTokenProxyObtain()
|
/drivers/hdf_core/adapter/uhdf2/host/test/unittest/sample_driver/ |
H A D | sample_hdi_service.cpp | 187 struct IDevHostService *instance = DevHostServiceNewInstance(0, nullptr); in SampleServiceEndHost() local 189 if (instance == nullptr) { in SampleServiceEndHost() 194 struct DevHostServiceFull *fullService = reinterpret_cast<struct DevHostServiceFull *>(instance); in SampleServiceEndHost() 206 struct IDevHostService *instance = DevHostServiceNewInstance(0, nullptr); in InjectPmState() local 208 if (instance == nullptr || instance->PmNotify == nullptr) { in InjectPmState() 212 (void)instance->PmNotify(nullptr, POWER_STATE_RESUME); in InjectPmState() 213 (void)instance->PmNotify(instance, POWER_STATE_RESUME); in InjectPmState() 214 (void)instance in InjectPmState() [all...] |
/drivers/interface/display/buffer/v1_1/hdi_impl/ |
H A D | display_buffer_hdi_impl.cpp | 25 IDisplayBuffer *instance = new V1_1::HdiDisplayBufferImpl(); in Get() local 26 if (instance == nullptr) { in Get() 29 return instance; in Get()
|
/drivers/interface/display/buffer/v1_2/hdi_impl/ |
H A D | display_buffer_hdi_impl.cpp | 25 IDisplayBuffer *instance = new V1_2::HdiDisplayBufferImpl(); in Get() local 26 if (instance == nullptr) { in Get() 29 return instance; in Get()
|