/drivers/hdf_core/framework/tools/hc-gen/src/ |
H A D | file.cpp | 16 std::string File::AbsPath(const std::string &path) in AbsPath() argument 20 char *p = _fullpath(realPath, path.data(), PATH_MAX); in AbsPath() 25 char *p = realpath(path.data(), realPath); in AbsPath() 30 std::string File::StripSuffix(std::string path) in StripSuffix() argument 32 auto sepPos = path.rfind(OS_SEPARATOR); in StripSuffix() 33 auto dotPos = path.rfind('.'); in StripSuffix() 35 return path.substr(0, dotPos); in StripSuffix() 37 return path; in StripSuffix() 41 std::string File::GetDir(std::string path) in GetDir() argument 43 auto separatorPos = path in GetDir() 50 FileNameBase(const std::string &path) FileNameBase() argument [all...] |
H A D | file.h | 19 static std::string AbsPath(const std::string &path); 20 static std::string StripSuffix(std::string path); 21 static std::string GetDir(std::string path); 22 static std::string FileNameBase(const std::string &path);
|
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/command_line/ |
H A D | hdf_defconfig_patch.py | 32 return os.path.join(self.root, "kernel", self.kernel, "config")
35 return os.path.join(self.root, "kernel", self.kernel, "patches")
37 def add_module(self, path, files, codetype):
38 for filename in os.listdir(path):
39 new_path = os.path.join(path, filename)
40 if not os.path.isdir(new_path):
43 self.add_module(path=new_path, files=files, codetype=codetype)
46 def delete_module(self, path):
47 with open(path, "r [all...] |
H A D | hdf_driver_config_file.py | 30 board_path = os.path.join(self.root, bpp, self.board) 32 if not os.path.exists(board_path): 35 self.config_dir = os.path.join(board_path, 'hdf_config') 36 self.drv_dir = os.path.join(self.config_dir, self.module) 37 self.drv_config_path = os.path.join( 41 manager_hcs_path = os.path.join(self.config_dir, 'device_info', 44 hdf_hcs_path = os.path.join(self.config_dir, 'hdf.hcs') 50 if not os.path.exists(self.drv_dir): 62 if not os.path.exists(self.drv_config_path): 69 if os.path [all...] |
H A D | hdf_add_handler.py | 59 if not os.path.exists(template_path): 67 template_path = os.path.join(templates_dir, template) 68 file_path = os.path.join(out_dir, filename) 75 if os.path.exists(target_dir): 104 if not os.path.exists(framework_hdf): 106 ' framework model path "%s" not exist' % 111 if os.path.exists(framework_drv_root_dir): 126 os.path.join('resources', config_name)) 146 if not os.path.exists(adapter_hdf): 148 ' adapter model path " [all...] |
H A D | hdf_delete_handler.py | 93 board="", driver=" ", path=file_path). \ 117 path=os.path.join(root, dot_path)) 122 for path, dir_name, _ in os.walk(templates_dir_path): 131 os.path.join( 135 config_path = os.path.join( 145 node_name=device, path=config_path) 162 if not os.path.exists(vendor_hdf_dir): 165 mod_dir = os.path.join(vendor_hdf_dir, module) 166 if os.path [all...] |
H A D | hdf_liteos_scann.py | 30 if not os.path.exists(self.build_path):
35 if not os.path.exists(self.framework_dir):
40 if not os.path.exists(self.hcs_path):
85 parent_path_model = os.path.sep.join(
86 self.build_path.split(os.path.sep)[:-1])
89 model_file_path = os.path.join(parent_path_model, model_path[1:-2])
99 for path in value:
100 model_build = os.path.join(path, "BUILD.gn")
101 if not os.path [all...] |
H A D | hdf_get_handler.py | 67 if os.path.exists(vendor_root_dir): 70 if os.path.exists(hdf): 86 return os.path.realpath(target) 93 return os.path.realpath(target) 104 if not os.path.exists(hdf_dir): 108 vendor_k = HdfVendorKconfigFile(root, vendor, kernel=None, path='') 125 root = os.path.realpath(self.args.root_dir) 128 if not os.path.exists(drv_dir): 135 return os.path.realpath(os.path [all...] |
/drivers/hdf_core/framework/model/audio/sapm/src/ |
H A D | audio_sapm.c | 83 struct AudioSapmpath *path = NULL; in ConnectedInputEndPoint() local 103 DLIST_FOR_EACH_ENTRY(path, &sapmComponent->sources, struct AudioSapmpath, listSink) { in ConnectedInputEndPoint() 104 if ((path->source != NULL) && (path->connect == CONNECT_SINK_AND_SOURCE)) { in ConnectedInputEndPoint() 105 count += ConnectedInputEndPoint(path->source); in ConnectedInputEndPoint() 113 struct AudioSapmpath *path = NULL; in ConnectedOutputEndPoint() local 134 DLIST_FOR_EACH_ENTRY(path, &sapmComponent->sinks, struct AudioSapmpath, listSource) { in ConnectedOutputEndPoint() 135 if ((path->sink != NULL) && (path->connect == CONNECT_SINK_AND_SOURCE)) { in ConnectedOutputEndPoint() 136 count += ConnectedOutputEndPoint(path in ConnectedOutputEndPoint() 407 MuxSetPathStatus(const struct AudioSapmComponent *sapmComponent, struct AudioSapmpath *path, const struct AudioEnumKcontrol *enumKtl, int32_t i) MuxSetPathStatus() argument 458 MuxValueSetPathStatus(const struct AudioSapmComponent *sapmComponent, struct AudioSapmpath *path, const struct AudioEnumKcontrol *enumKtl, int32_t i) MuxValueSetPathStatus() argument 511 MixerSetPathStatus(const struct AudioSapmComponent *sapmComponent, struct AudioSapmpath *path, const struct AudioMixerControl *mixerCtrl) MixerSetPathStatus() argument 560 AudioSapmSetPathStatus(const struct AudioSapmComponent *sapmComponent, struct AudioSapmpath *path, int32_t i) AudioSapmSetPathStatus() argument 590 AudioSapmConnectMux(struct AudioCard *audioCard, struct AudioSapmComponent *source, struct AudioSapmComponent *sink, struct AudioSapmpath *path, const char *controlName) AudioSapmConnectMux() argument 627 AudioSapmConnectMixer(struct AudioCard *audioCard, struct AudioSapmComponent *source, struct AudioSapmComponent *sink, struct AudioSapmpath *path, const char *controlName) AudioSapmConnectMixer() argument 668 AudioSampStaticOrDynamicPath(struct AudioCard *audioCard, struct AudioSapmComponent *source, struct AudioSapmComponent *sink, struct AudioSapmpath *path, const struct AudioSapmRoute *route) AudioSampStaticOrDynamicPath() argument 748 struct AudioSapmpath *path = NULL; AudioSapmAddRoute() local 830 struct AudioSapmpath *path = NULL; AudioSapmNewMixerControls() local 930 struct AudioSapmpath *path = NULL; AudioSapmSetPower() local 1224 struct AudioSapmpath *path = NULL; MixerUpdatePowerStatus() local 1263 struct AudioSapmpath *path = NULL; MuxUpdatePowerStatus() local [all...] |
/drivers/hdf_core/framework/tools/hc-gen/test/ |
H A D | hcgen_test.py | 53 if not os.path.exists(file_target): 65 if not os.path.exists(file_target): 83 hcgen_path = os.path.abspath(sys.argv[1]) 95 source_root = os.path.abspath(os.path.join(TestConfig.WORK_DIR, source_root)) 96 hcgen = os.path.join(source_root, compiler_name) 98 hcgen = os.path.join(source_root, TestConfig.CMAKE_GEN_PATH, compiler_name) 108 if os.path.isdir(os.path.join(case_path, dir_name)): 115 result_file_name = os.path [all...] |
H A D | update_case.py | 51 hcgen_path = os.path.abspath(sys.argv[1]) 62 source_root = os.path.abspath(os.path.join(TestConfig.WORK_DIR, source_root)) 63 hcgen_path = os.path.join(source_root, compiler_name) 65 hcgen_path = os.path.join(source_root, TestConfig.CMAKE_GEN_PATH, compiler_name) 76 if os.path.isdir(os.path.join(case_path, directory)): 83 result_file_name = os.path.join(TestConfig.WORK_DIR, case_name, 96 source_file = os.path.join(TestConfig.WORK_DIR, case_name, 'golden.hcb') 97 target_file = os.path [all...] |
/drivers/hdf_core/framework/tools/hdi-gen/util/ |
H A D | file.cpp | 30 File::File(const std::string &path, unsigned int mode) : mode_(mode) in File() argument 32 if (path.empty()) { in File() 37 OpenByRead(path); in File() 42 fd_ = fopen(path.c_str(), "w+"); in File() 44 fd_ = fopen(path.c_str(), "a+"); in File() 48 Logger::E(TAG, "can't open '%s'", path.c_str()); in File() 52 path_ = RealPath(path); in File() 60 void File::OpenByRead(const std::string &path) in OpenByRead() argument 62 if (!CheckValid(path)) { in OpenByRead() 63 Logger::E(TAG, "failed to check path ' in OpenByRead() 194 CreateParentDir(const std::string &path) CreateParentDir() argument 224 AdapterPath(const std::string &path) CreateParentDir() argument 251 AdapterRealPath(const std::string &path) CreateParentDir() argument 259 RealPath(const std::string &path) CreateParentDir() argument 274 CheckValid(const std::string &path) CreateParentDir() argument 343 VerifyRealPath(const std::string &path) CreateParentDir() argument [all...] |
H A D | file.h | 20 File(const std::string &path, unsigned int mode); 24 void OpenByRead(const std::string &path); 64 static bool CreateParentDir(const std::string &path); 66 static std::string AdapterPath(const std::string &path); 68 static std::string AdapterRealPath(const std::string &path); 70 static std::string RealPath(const std::string &path); 72 static bool CheckValid(const std::string &path); 76 static bool VerifyRealPath(const std::string &path);
|
/drivers/hdf_core/framework/tools/hcs-view/hcsVSCode/ |
H A D | extension.js | 17 const path = require('path'); 18 const { dirname } = require('path'); 25 let whiteCutImg = fs.readFileSync(path.join(imgDir, cutImgDict_['whiteCut'])); 27 let circleImg = fs.readFileSync(path.join(imgDir, cutImgDict_['circleCut'])); 29 let cicleOpenImg = fs.readFileSync(path.join(imgDir, cutImgDict_['circleOpenCut'])); 31 let rectangleFocusImg = fs.readFileSync(path.join(imgDir, cutImgDict_['rectangleFocusCut'])); 33 let nodeIconImg = fs.readFileSync(path.join(imgDir, cutImgDict_['nodeIconCut'])); 35 let attrIconImg = fs.readFileSync(path.join(imgDir, cutImgDict_['attrIconCut'])); 37 let rootIconImg = fs.readFileSync(path [all...] |
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/ |
H A D | hdf_utils.py | 162 if dir_path and not os.path.exists(dir_path): 206 return os.path.join(root, 'drivers', 'adapter', 'khdf', 'liteos') 210 return os.path.join(root, 'vendor') 214 return os.path.join(get_vendor_root_dir(root), vendor) 219 return os.path.join(root, relative_path) 224 if not os.path.exists(adapter_framework): 226 ' adapter model path "%s" not exist' % 229 create_file_save_path = os.path.join(adapter_framework, save_file_path) 230 if not os.path.exists(create_file_save_path): 239 return os.path [all...] |
/drivers/hdf_core/framework/tools/hcs-view/hcsWebView/test/public_moudle/ |
H A D | base.py | 43 path = cur_file.replace('\\', '/')
44 url = "file:///{}/index.html".format(path)
90 def get_canvas_point_position(self, path, text):
91 # path:Storage address of screenshot text:The text content to look up
92 self.driver.get_screenshot_as_file(path)
94 result = reader.readtext(path)
110 def get_obtain_point_position(self, path, text):
111 # path:Storage address of screenshot text:The text content to look up
112 self.driver.get_screenshot_as_file(path)
114 result = reader.readtext(path)
[all...] |
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/command_line/driver_add/ |
H A D | hdf_add_driver.py | 34 if not os.path.exists(self.template_file_path):
59 adapter_model_path = os.path.join(adapter_hdf, 'model', self.module)
71 self.board, self.driver, path="")
106 build_file_path = os.path.join(adapter_model_path, file_name)
122 makefile_path = os.path.join(adapter_model_path, file_name)
134 kconfig_path = os.path.join(adapter_model_path, file_name)
161 self.driver, path="")
226 # create driver file path
281 lambda template_name: os.path.join(target_path, template_name),
283 path_list = list(os.path [all...] |
/drivers/peripheral/wlan/chip/hdi_service/ |
H A D | wifi_vendor_hal_list.cpp | 52 std::string path = VENDOR_HAL_PATH; in InitVendorHalsDescriptorList() local 54 if (LoadVendorHalLib(path, desc)) { in InitVendorHalsDescriptorList() 63 bool WifiVendorHalList::LoadVendorHalLib(const std::string& path, WifiHalLibDesc &desc) in LoadVendorHalLib() argument 65 void* h = dlopen(path.c_str(), RTLD_NOW | RTLD_LOCAL); in LoadVendorHalLib() 69 HDF_LOGE("failed to open vendor hal library: %{public}s", path.c_str()); in LoadVendorHalLib() 75 HDF_LOGE("InitWifiVendorHalFuncTable not found in: %{public}s", path.c_str()); in LoadVendorHalLib() 85 path.c_str(), res); in LoadVendorHalLib() 90 HDF_LOGE("early initialization failed in: %{public}s, error: %{public}d", path.c_str(), res); in LoadVendorHalLib()
|
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/command_line/hdi_operate/ |
H A D | hdi_add_handler.py | 87 tempath_path = os.path.join(self.args.root_dir,
93 hdi_template_path = os.path.join(
142 interface_folder_path = os.path.join(
144 if os.path.exists(interface_folder_path):
146 '"%s" is path exist' % interface_folder_path,
149 inter_name_version = os.path.join(interface_folder_path, version)
164 src_path = os.path.join(hdi_template_path, file_src)
166 dst_path = os.path.join(interface_folder_path, file)
167 if not os.path.exists(dst_path):
171 dst_path = os.path [all...] |
/drivers/peripheral/audio/test/sample/tools/gen_cr_by_pr/ |
H A D | gen_cr_by_pr.py | 104 path = url.split('/')[-3:] 106 # path[-3] ���û�����path[-2] �� 'pulls'��path[-1] �� PR �� 108 repo_name = path[-3] # ����Ϊֱ��ȡ�ֿ��� 109 pr_number = path[-1] 116 path = f'{repo_name}{mix}files.json' 117 if os.path.exists(path): 123 print(f'�������ļ���{path}') [all...] |
/drivers/hdf_core/framework/core/host/src/ |
H A D | hdf_load_vdi.c | 26 char path[PATH_MAX + 1] = {0}; in HdfLoadVdi() local 34 if (snprintf_s(path, sizeof(path), sizeof(path) - 1, "%s/%s", VDI_PATH, libName) < 0) { in HdfLoadVdi() 39 if (realpath(path, resolvedPath) == NULL || strncmp(resolvedPath, VDI_PATH, strlen(VDI_PATH)) != 0) { in HdfLoadVdi() 41 __func__, path, resolvedPath, errno); in HdfLoadVdi()
|
/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/command_line/driver_add/liteos/ |
H A D | mk_file_add_config.py | 40 def audio_makefile_file_operation(path, args_tuple):
42 makefile_gn_path = path
90 def makefile_file_operation(path, driver_file_path, head_path,
92 makefile_gn_path = path
112 strip(os.path.sep).split(os.path.sep)))),
115 strip(os.path.sep).split(os.path.sep)))[:-1])}
121 split(os.path.sep)))[:-1]).strip(os.path [all...] |
/drivers/hdf_core/framework/tools/hdi-gen/test/unittest/ |
H A D | unit_test.py | 66 return os.path.isfile(file_path)
78 def get_all_files(path):
80 items = os.listdir(path)
82 item_path = os.path.join(path, item)
83 if not os.path.isdir(item_path):
94 if os.path.splitext(file)[-1] == ".idl":
104 self.idl_dir = os.path.join(self.working_dir, "foo")
105 self.output_dir = os.path.join(working_dir, "out")
106 self.target_dir = os.path [all...] |
/drivers/peripheral/thermal/interfaces/hdi_service/src/ |
H A D | thermal_hdf_utils.cpp | 33 int32_t ThermalHdfUtils::ReadNodeToInt(const std::string& path) in ReadNodeToInt() argument 36 if (!ReadNode(path, content)) { in ReadNodeToInt() 45 bool ThermalHdfUtils::ReadNode(const std::string& path, std::string& out) in ReadNode() argument 47 bool ret = LoadStringFromFile(path, out); in ReadNode()
|
/drivers/peripheral/battery/interfaces/hdi_service/include/ |
H A D | power_supply_provider.h | 97 void SetSysFilePath(const std::string& path); 102 int32_t SetConfigByPath(const std::string& path, const std::string& value); 103 int32_t GetConfigByPath(const std::string& path, std::string& result); 104 int32_t CheckPathExists(const std::string& path, bool& result); 143 void CheckSubfolderNode(const std::string& path); 144 void FormatPath(std::string& path, size_t size, const char* format, const char* basePath, const char* name) const; 146 int32_t ReadSysfsFile(const char* path, char* buf, size_t size); 147 int32_t ReadBatterySysfsToBuff(const char* path, char* buf, size_t size); 153 void CreateFile(const std::string& path, const std::string& content); 159 int32_t WriteConf(std::string path); [all...] |