未验证 提交 20d2bbfe 编写于 作者: K king_he 提交者: Gitee

update en/device-dev/driver/driver-platform-mipicsi-develop.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 986a36fa
# MIPI CSI<a name="EN-US_TOPIC_0000001198067744"></a> # MIPI CSI<a name="EN-US_TOPIC_0000001198067744"></a>
- [Overview](#section72226945170128)
- [Available APIs](#section735525713405)
- [How to Develop](#section378858277170128)
- [Development Example](#section2049027816170128)
## Overview<a name="section72226945170128"></a> ## Overview<a name="section72226945170128"></a>
Defined by the Mobile Industry Processor Interface \(MIPI\) Alliance, the Camera Serial Interface \(CSI\) is a specification that allows data to be transmitted from the camera to the host processor on mobile platforms. In the Hardware Driver Foundation \(HDF\), the MIPI CSI module uses the service-free mode for API adaptation. The service-free mode applies to the devices that do not provide user-mode APIs or the OS that does not distinguish the user mode and the kernel mode. In the service-free mode, DevHandle \(a void pointer\) directly points to the kernel-mode address of the device object. Defined by the Mobile Industry Processor Interface \(MIPI\) Alliance, the Camera Serial Interface \(CSI\) is a specification that allows data to be transmitted from the camera to the host processor on mobile platforms. In the Hardware Driver Foundation \(HDF\), the MIPI CSI module uses the service-free mode for API adaptation. The service-free mode applies to the devices that do not provide user-mode APIs or the OS that does not distinguish the user mode and the kernel mode. In the service-free mode, DevHandle \(a void pointer\) directly points to the kernel-mode address of the device object.
...@@ -213,12 +208,10 @@ The MIPI CSI module adaptation involves the following steps: ...@@ -213,12 +208,10 @@ The MIPI CSI module adaptation involves the following steps:
- Initialize **MipiCsiCntlr**. - Initialize **MipiCsiCntlr**.
- Instantiate **MipiCsiCntlrMethod** in the **MipiCsiCntlr** object. - Instantiate **MipiCsiCntlrMethod** in the **MipiCsiCntlr** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:** For details, see [Available APIs](#available-apis).
>For details, see [Available APIs](#available-apis).
4. Debug the driver. 4. \(Optional\) Debug the driver.
- \(Optional\) For new drivers, verify basic functions, for example, verify the information returned after the connect operation and whether data is successfully transmitted. For new drivers, verify basic functions, for example, verify the information returned after the connect operation and whether data is successfully transmitted.
## Development Example<a name="section2049027816170128"></a> ## Development Example<a name="section2049027816170128"></a>
...@@ -408,9 +401,9 @@ The following uses **mipi\_rx\_hi35xx.c** as an example to present the content ...@@ -408,9 +401,9 @@ The following uses **mipi\_rx\_hi35xx.c** as an example to present the content
HDF_LOGI("%s: enter!", __func__); HDF_LOGI("%s: enter!", __func__);
g_mipiCsi.priv = NULL; // g_mipiTx is a global variable defined. g_mipiCsi.priv = NULL; // g_mipiTx is a global variable defined.
//static struct MipiCsiCntlr g_mipiCsi = { // static struct MipiCsiCntlr g_mipiCsi = {
//.devNo = 0 // .devNo = 0
//}; // };
g_mipiCsi.ops = &g_method; // Connect to the MipiCsiCntlrMethod instance. g_mipiCsi.ops = &g_method; // Connect to the MipiCsiCntlrMethod instance.
#ifdef CONFIG_HI_PROC_SHOW_SUPPORT #ifdef CONFIG_HI_PROC_SHOW_SUPPORT
g_mipiCsi.debugs = &g_debugMethod; g_mipiCsi.debugs = &g_debugMethod;
...@@ -484,7 +477,7 @@ The following uses **mipi\_rx\_hi35xx.c** as an example to present the content ...@@ -484,7 +477,7 @@ The following uses **mipi\_rx\_hi35xx.c** as an example to present the content
struct MipiCsiCntlr *cntlr = NULL; struct MipiCsiCntlr *cntlr = NULL;
... ...
cntlr = MipiCsiCntlrFromDevice(device); // A forced conversion from HdfDeviceObject to MipiCsiCntlr is involved. cntlr = MipiCsiCntlrFromDevice(device); // A forced conversion from HdfDeviceObject to MipiCsiCntlr is involved.
//return (device == NULL) ? NULL : (struct MipiCsiCntlr *)device->service; // return (device == NULL) ? NULL : (struct MipiCsiCntlr *)device->service;
... ...
OsalSpinDestroy(&cntlr->ctxLock); OsalSpinDestroy(&cntlr->ctxLock);
...@@ -498,6 +491,3 @@ The following uses **mipi\_rx\_hi35xx.c** as an example to present the content ...@@ -498,6 +491,3 @@ The following uses **mipi\_rx\_hi35xx.c** as an example to present the content
HDF_LOGI("%s: unload mipi csi driver success!", __func__); HDF_LOGI("%s: unload mipi csi driver success!", __func__);
} }
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册