OpenHarmony基于HDF简单驱动开发实例
背景
- OpenHarmony-3.0-LTS
- qemu_small_system_demo
- liteos_a
- qemu
添加配置
device/qemu/arm_virt/liteos_a/hdf_config/device_info/device_info.hcs
device_info 新增:
sample_host :: host {
hostName = "sample_host";
sample_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 1;
permission = 0664;
moduleName = "sample_driver";
serviceName = "sample_service";
}
}
}
添加驱动代码
。。。。