提交 6cb09131 编写于 作者: N NEEN 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/docs into master

......@@ -24,7 +24,7 @@ The message mechanism provides the following features:
</th>
</tr>
</thead>
<tbody><tr id="row1582426174114"><td class="cellrowborder" valign="top" width="46.379999999999995%" headers="mcps1.2.3.1.1 "><p id="p182341916144420"><a name="p182341916144420"></a><a name="p182341916144420"></a>struct HdfIoService *HdfIoServiceBind(const char *serviceName, mode_t permission)</p>
<tbody><tr id="row1582426174114"><td class="cellrowborder" valign="top" width="46.379999999999995%" headers="mcps1.2.3.1.1 "><p id="p182341916144420"><a name="p182341916144420"></a><a name="p182341916144420"></a>struct HdfIoService *HdfIoServiceBind(const char *serviceName)</p>
</td>
<td class="cellrowborder" valign="top" width="53.620000000000005%" headers="mcps1.2.3.1.2 "><p id="p58272614113"><a name="p58272614113"></a><a name="p58272614113"></a>Obtains a specified driver service. After the service is obtained, the <strong id="b9799159433"><a name="b9799159433"></a><a name="b9799159433"></a>Dispatch</strong> function of the service is used to send messages to the driver.</p>
</td>
......@@ -100,7 +100,7 @@ The message mechanism provides the following features:
HDF_LOGE("test msg is null");
return -1;
}
struct HdfIoService *serv = HdfIoServiceBind("sample_driver", 0);
struct HdfIoService *serv = HdfIoServiceBind("sample_driver");
if (serv == NULL) {
HDF_LOGE("fail to get service");
return -1;
......@@ -159,7 +159,7 @@ The message mechanism provides the following features:
```
int RegisterListen()
{
struct HdfIoService *serv = HdfIoServiceBind("sample_driver", 0);
struct HdfIoService *serv = HdfIoServiceBind("sample_driver");
if (serv == NULL) {
HDF_LOGE("fail to get service");
return -1;
......
......@@ -195,7 +195,7 @@ out:
int main()
{
char *sendData = "default event info";
struct HdfIoService *serv = HdfIoServiceBind(SAMPLE_SERVICE_NAME, 0);
struct HdfIoService *serv = HdfIoServiceBind(SAMPLE_SERVICE_NAME);
if (serv == NULL) {
HDF_LOGE("fail to get service %s", SAMPLE_SERVICE_NAME);
return HDF_FAILURE;
......
......@@ -165,7 +165,7 @@ The following table describes the tools required for setting up the general envi
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>Functions as the compiler toolchain.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p871055810226"><a name="p871055810226"></a><a name="p871055810226"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar</a></p>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p871055810226"><a name="p871055810226"></a><a name="p871055810226"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz</a></p>
</td>
</tr>
<tr id="row1644079184919"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p744115914493"><a name="p744115914493"></a><a name="p744115914493"></a>hb</p>
......@@ -350,11 +350,11 @@ Using PuTTY to log in to a Linux server from a PC running Windows
### Installing LLVM<a name="section149564754"></a>
1. Start a Linux server.
2. Download [LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar).
2. Download [LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz).
3. Decompress the LLVM installation package to **\~/llvm**.
```
tar -xvf llvm-linux-9.0.0-36191.tar -C ~/
tar -zxvf llvm.tar.gz -C ~/
```
4. Set an environment variable.
......
......@@ -429,5 +429,6 @@ startup\_init\_lite
## Reference<a name="section6808423133718"></a>
- AI Engine Framework Development Guide
- [AI Engine Framework Development Guide](https://gitee.com/openharmony/docs/blob/master/en/device-dev/subsystems/development-examples.md)
......@@ -195,7 +195,7 @@ out:
int main()
{
char *sendData = "default event info";
struct HdfIoService *serv = HdfIoServiceBind(SAMPLE_SERVICE_NAME, 0);
struct HdfIoService *serv = HdfIoServiceBind(SAMPLE_SERVICE_NAME);
if (serv == NULL) {
HDF_LOGE("fail to get service %s", SAMPLE_SERVICE_NAME);
return HDF_FAILURE;
......
......@@ -24,7 +24,7 @@
</th>
</tr>
</thead>
<tbody><tr id="row1582426174114"><td class="cellrowborder" valign="top" width="46.379999999999995%" headers="mcps1.2.3.1.1 "><p id="p182341916144420"><a name="p182341916144420"></a><a name="p182341916144420"></a>struct HdfIoService *HdfIoServiceBind(const char *serviceName, mode_t permission)</p>
<tbody><tr id="row1582426174114"><td class="cellrowborder" valign="top" width="46.379999999999995%" headers="mcps1.2.3.1.1 "><p id="p182341916144420"><a name="p182341916144420"></a><a name="p182341916144420"></a>struct HdfIoService *HdfIoServiceBind(const char *serviceName)</p>
</td>
<td class="cellrowborder" valign="top" width="53.620000000000005%" headers="mcps1.2.3.1.2 "><p id="p58272614113"><a name="p58272614113"></a><a name="p58272614113"></a>用户态获取驱动的服务,获取该服务之后通过服务中的Dispatch方法向驱动发送消息。</p>
</td>
......@@ -100,7 +100,7 @@
HDF_LOGE("test msg is null");
return -1;
}
struct HdfIoService *serv = HdfIoServiceBind("sample_driver", 0);
struct HdfIoService *serv = HdfIoServiceBind("sample_driver");
if (serv == NULL) {
HDF_LOGE("fail to get service");
return -1;
......@@ -159,7 +159,7 @@
```
int RegisterListen()
{
struct HdfIoService *serv = HdfIoServiceBind("sample_driver", 0);
struct HdfIoService *serv = HdfIoServiceBind("sample_driver");
if (serv == NULL) {
HDF_LOGE("fail to get service");
return -1;
......
......@@ -165,7 +165,7 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
</td>
<td class="cellrowborder" valign="top" width="32.12321232123212%" headers="mcps1.2.4.1.2 "><p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>编译工具链</p>
</td>
<td class="cellrowborder" valign="top" width="54.525452545254524%" headers="mcps1.2.4.1.3 "><p id="p871055810226"><a name="p871055810226"></a><a name="p871055810226"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar</a></p>
<td class="cellrowborder" valign="top" width="66.92669266926693%" headers="mcps1.2.4.1.3 "><p id="p871055810226"><a name="p871055810226"></a><a name="p871055810226"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz</a></p>
</td>
</tr>
<tr id="row1644079184919"><td class="cellrowborder" valign="top" width="13.35133513351335%" headers="mcps1.2.4.1.1 "><p id="p744115914493"><a name="p744115914493"></a><a name="p744115914493"></a>hb</p>
......@@ -350,11 +350,11 @@ Linux编译环境可以通过Docker方式快速安装,具体请参见[Docker
### 安装LLVM<a name="section149564754"></a>
1. 打开Linux编译服务器终端。
2. [下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar)
2. [下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-53907/linux/llvm.tar.gz)
3. 解压LLVM安装包至\~/llvm路径下。
```
tar -xvf llvm-linux-9.0.0-36191.tar -C ~/
tar -zxvf llvm.tar.gz -C ~/
```
4. 设置环境变量。
......
......@@ -429,5 +429,5 @@ startup\_init\_lite
## AI引擎开发导航<a name="section6808423133718"></a>
- 《AI插件开发指南》
- [《AI插件开发指南》](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/%E5%BC%80%E5%8F%91%E7%A4%BA%E4%BE%8B.md)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册