自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Openharmony 添加內(nèi)核驅(qū)動(dòng)(L1)

系統(tǒng) OpenHarmony
此文章以openharmony 3.1代碼基礎(chǔ),介紹liteos-a ipcamera_hispark_taurus上添加khdf步驟。

??想了解更多內(nèi)容,請(qǐng)?jiān)L問(wèn):??

??51CTO和華為官方合作共建的鴻蒙技術(shù)社區(qū)??

??https://ost.51cto.com??

簡(jiǎn)介

此文章以openharmony 3.1代碼基礎(chǔ)

  • 介紹liteos-a ipcamera_hispark_taurus上添加khdf步驟。
  • 介紹驅(qū)動(dòng)的簡(jiǎn)單調(diào)用(3516開(kāi)發(fā)板:HiSpark_AI_Hi3516D_One_Light_VER.B開(kāi)發(fā)板上測(cè)試。

驅(qū)動(dòng)添加

驅(qū)動(dòng)目錄結(jié)構(gòu)

驅(qū)動(dòng)代碼見(jiàn)附件。

驅(qū)動(dòng)目錄以外的文件配置

文件drivers\adapter\khdf\liteos\hdf_lite.mk。

# my sample test
ifeq ($(LOSCFG_DRIVERS_HDF_MY_SAMPLE_DRIVER), y)
LITEOS_BASELIB += -lmy_sample_driver
LIB_SUBDIRS += $(LITEOS_DRIVERS_HDF)/my_sample_driver
endif

文件drivers\adapter\khdf\liteos\Kconfig。

source "../../drivers/adapter/khdf/liteos/my_sample_driver/Kconfig"

文件drivers\adapter\khdf\liteos\BUILD.gn。

文件vendor\hisilicon\hispark_taurus\hdf_config\device_info\device_info.hcs。

  my_sample :: host {
hostName = "my_sample_host";
device_mysample :: device {
device0 :: deviceNode { // DeviceNode of the sample driver
policy = 2; // Driver service release policy. For details, see section Driver Service Management.
priority= 10; // Driver startup priority (0-200). A larger value indicates a lower priority. The default value 100 is recommended. If the priorities are the same, the device loading sequence is random.
preload = 0; // On-demand loading of the driver. For details, see "NOTE" at the end of this section.
permission = 0664; // Permission for the driver to create device nodes.
moduleName = "my_sample_driver"; // Driver name. The value of this field must be the same as the value of moduleName in the driver entry structure.
serviceName = "my_sample_service"; // Name of the service released by the driver. The name must be unique.
}
}
}

驅(qū)動(dòng)編譯配置

從代碼根目錄切換到kernel/liteos_a/。

cd kernel/liteos_a/

執(zhí)行make menuconfig。

選擇driver。

選擇framework support。

選擇my_sample driver。

按q,保存退出。

驅(qū)動(dòng)調(diào)用可執(zhí)行程序

目錄結(jié)構(gòu)

驅(qū)動(dòng)調(diào)用代碼。

驅(qū)動(dòng)調(diào)用可執(zhí)行程序詳細(xì)代碼見(jiàn)附件。

代碼目錄結(jié)構(gòu)之外的文件配置

文件build\lite\components\myapp.json。

{
"components": [
{
"component": "myapp",
"description": "my app",
"optional": "false",
"dirs": [
"myapp"
],
"targets": [
"http://myapp:myapp"
],
"rom": "",
"ram": "",
"output": [
],
"adapted_kernel": [
"liteos_a",
"liteos_m"
],
"features": [],
"deps": {
"third_party": [
"bounds_checking_function"
],
"components": []
}
}
]
}

文件vendor\hisilicon\hispark_taurus\config.json。

 {
"subsystem": "myapp",
"components": [
{ "component": "myapp", "features":[] }
]
}

編譯

編譯環(huán)境參考:??3516應(yīng)用調(diào)用到驅(qū)動(dòng)實(shí)踐??。

執(zhí)行下面2條命令。

hb set
.

執(zhí)行hb build -f。

燒錄測(cè)試

燒錄步驟參考:??3516應(yīng)用調(diào)用到驅(qū)動(dòng)實(shí)踐??。

切換到/bin目錄下執(zhí)行:./my_sample_driver_test。

結(jié)果如圖:

??官網(wǎng)文檔??

??想了解更多內(nèi)容,請(qǐng)?jiān)L問(wèn):??

??51CTO和華為官方合作共建的鴻蒙技術(shù)社區(qū)??

??https://ost.51cto.com??

責(zé)任編輯:jianghua 來(lái)源: 鴻蒙社區(qū)
相關(guān)推薦

2023-02-28 15:49:09

鴻蒙應(yīng)用開(kāi)發(fā)

2022-02-17 17:52:00

openharmon項(xiàng)目開(kāi)發(fā)鴻蒙

2021-10-20 19:14:30

緩存CacheCPU

2025-02-06 09:40:00

2012-10-09 10:57:57

光纖iODN寬帶

2023-01-31 09:12:16

CPU芯片緩存

2023-10-10 15:33:55

機(jī)器學(xué)習(xí)相似性度量

2022-01-07 21:12:46

鴻蒙HarmonyOS應(yīng)用

2022-08-26 14:58:43

區(qū)塊鏈比特幣架構(gòu)

2022-01-06 16:16:21

鴻蒙HarmonyOS應(yīng)用

2023-02-01 16:28:30

Linux內(nèi)核鴻蒙

2023-04-10 09:44:22

內(nèi)核鼠標(biāo)調(diào)試鴻蒙

2023-11-08 15:51:00

AGI人工智能

2022-02-17 16:47:40

OpenharmonIPC通信鴻蒙

2022-04-01 15:18:04

HarmonyHDF 驅(qū)動(dòng)鴻蒙

2022-03-21 15:42:36

智能家居物聯(lián)網(wǎng)MQTT

2023-08-18 14:28:18

UART異步通信

2021-11-26 15:34:27

鴻蒙HarmonyOS應(yīng)用

2022-06-22 09:14:23

事件打點(diǎn)HiSysEvent

2022-02-21 15:38:57

Openharmon操作系統(tǒng)鴻蒙
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)