提交 2f34dbdc 编写于 作者: Z zhang

modify hdf document

Signed-off-by: Nzhang <zhangfengxi@huawei.com>
上级 06d101cd
...@@ -99,27 +99,28 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提 ...@@ -99,27 +99,28 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提
``` ```
import("//build/lite/config/component/lite_component.gni") import("//build/lite/config/component/lite_component.gni")
import("//drivers/adapter/khdf/liteos/hdf.gni") import("//drivers/adapter/khdf/liteos/hdf.gni")
module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM) module_switch = defined(LOSCFG_DRIVERS_HDF_xxx)
module_name = "xxx" module_name = "xxx"
hdf_driver(module_name) { hdf_driver(module_name) {
sources = [ sources = [
"xxx/xxx/xxx.c", "xxx/xxx/xxx.c", #模块要编译的源码文件
] ]
public_configs = [ ":public" ] --添加依赖头文件 public_configs = [ ":public" ] #使用依赖的头文件配置
} }
config("public") { --定义依赖的头文件 config("public") { #定义依赖的头文件配置
include_dirs = [ include_dirs = [
] "xxx/xxx/xxx", #依赖的头文件目录
]
} }
``` ```
把新增的BUILD.gn所在的目录添加到/drivers/adapter/khdf/liteos/BUILD.gn里面: 把新增模块的BUILD.gn所在的目录添加到/drivers/adapter/khdf/liteos/BUILD.gn里面:
``` ```
group("liteos") { group("liteos") {
public_deps = [ ":$module_name" ] public_deps = [ ":$module_name" ]
deps = [ deps = [
"xxx/xxx", --新增的BUILD.gn所在的目录 "xxx/xxx", #新增模块BUILD.gn所在的目录,目录结构相对于/drivers/adapter/khdf/liteos
] ]
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册