提交 89d6ab86 编写于 作者: O openharmony_ci 提交者: Gitee

!375 优化导读和快速入门

Merge pull request !375 from duangavin123/master
......@@ -71,7 +71,7 @@ Driver development based on the HDF consists of two parts: driver implementation
- Use the **Makefile** template provided by the HDF to compile the driver code.
```
include $(LITEOSTOPDIR)/../../drivers/adapter/khdf/liteos/lite.mk # (Mandatory) Import the predefined content of the HDF.
include $(LITEOSTOPDIR)/../../drivers/adapter/lite/khdf/lite.mk # (Mandatory) Import the predefined content of the HDF.
MODULE_NAME := # Generated result file
LOCAL_INCLUDE: = # Header file directory of the driver
LOCAL_SRCS : = # Source code file of the driver
......
......@@ -27,12 +27,12 @@ void SdioTestSample(void)
int32_t ret;
DevHandle handle = NULL;
uint8_t data[TEST_DATA_LEN] = {0};
int16_t busNum = 1;
struct SdioFunctionConfig config = {1, 0x123, 0x456};
uint8_t val;
uint32_t addr;
/* Open an SDIO controller whose bus number is 1. */
handle = SdioOpen(busNum);
handle = SdioOpen(1, &config);
if (handle == NULL) {
HDF_LOGE("SdioOpen: failed!\n");
return;
......@@ -59,25 +59,25 @@ void SdioTestSample(void)
}
/* Read 3-byte data from the incremental address of an SDIO device. */
addr = TEST_FBR_BASE_ADDR * TEST_FUNC_NUM + TEST_ADDR_OFFSET;
ret = SdioReadBytes(handle, data, addr, TEST_DATA_LEN, 0);
ret = SdioReadBytes(handle, data, addr, TEST_DATA_LEN);
if (ret != 0) {
HDF_LOGE("SdioReadBytes: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* Write 3-byte data into the incremental address of an SDIO device. */
ret = SdioWriteBytes(handle, data, addr, TEST_DATA_LEN, 0);
ret = SdioWriteBytes(handle, data, addr, TEST_DATA_LEN);
if (ret != 0) {
HDF_LOGE("SdioWriteBytes: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* Read 1-byte data from the SDIO device. */
ret = SdioReadBytes(handle, &val, addr, 1, 0);
ret = SdioReadBytes(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioReadBytes: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* Write 1-byte data into the SDIO device. */
ret = SdioWriteBytes(handle, &val, addr, 1, 0);
ret = SdioWriteBytes(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioWriteBytes: failed, ret %d\n", ret);
goto COMM_ERR;
......@@ -96,13 +96,13 @@ void SdioTestSample(void)
}
/* Read 1-byte data from SDIO function 0. */
addr = 0x02;
ret = SdioReadBytesFromFunc0(handle, &val, addr, 1, 0);
ret = SdioReadBytesFromFunc0(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioReadBytesFromFunc0: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* Write 1-byte data into SDIO function 0. */
ret = SdioWriteBytesToFunc0(handle, &val, addr, 1, 0);
ret = SdioWriteBytesToFunc0(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioWriteBytesToFunc0: failed, ret %d\n", ret);
goto COMM_ERR;
......
......@@ -24,7 +24,7 @@
Before performing SDIO communication, obtain the device handle of an SDIO controller by calling **SdioOpen**. This function returns the device handle of the SDIO controller with a specified bus number.
DevHandle SdioOpen\(int16\_t busNum\);
DevHandle SdioOpen\(int16\_t mmcBusNum, struct SdioFunctionConfig \*config\);
**Table 1** Parameters and return values of SdioOpen
......@@ -35,9 +35,14 @@ DevHandle SdioOpen\(int16\_t busNum\);
</th>
</tr>
</thead>
<tbody><tr id="row19112195918454"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p11121759124515"><a name="p11121759124515"></a><a name="p11121759124515"></a>busNum</p>
<tbody><tr id="row19112195918454"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p11121759124515"><a name="p11121759124515"></a><a name="p11121759124515"></a>mmcBusNum</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p111121459194519"><a name="p111121459194519"></a><a name="p111121459194519"></a>SDIO bus number.</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p111121459194519"><a name="p111121459194519"></a><a name="p111121459194519"></a>Bus number.</p>
</td>
</tr>
<tr id="row380917163457"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1181091614519"><a name="p1181091614519"></a><a name="p1181091614519"></a>config</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p5810121634514"><a name="p5810121634514"></a><a name="p5810121634514"></a>SDIO functionality configurations.</p>
</td>
</tr>
<tr id="row6112659184518"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1112105919453"><a name="p1112105919453"></a><a name="p1112105919453"></a><strong id="b1358115072811"><a name="b1358115072811"></a><a name="b1358115072811"></a>Return Value</strong></p>
......@@ -62,9 +67,12 @@ The following example shows how to open an SDIO controller.
```
DevHandle handle = NULL;
int16_t busNum = 1;
struct SdioFunctionConfig config;
config.funcNr = 1;
config.vendorId = 0x123;
config.deviceId = 0x456;
/* Open an SDIO controller whose bus number is 1. */
handle = SdioOpen(busNum);
handle = SdioOpen(1, &config);
if (handle == NULL) {
HDF_LOGE("SdioOpen: failed!\n");
}
......@@ -87,7 +95,7 @@ void SdioClaimHost\(DevHandle handle\);
</thead>
<tbody><tr id="row3114205920451"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p181141592457"><a name="p181141592457"></a><a name="p181141592457"></a>handle</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p41144595458"><a name="p41144595458"></a><a name="p41144595458"></a>Device handle of an SDIO controller</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p41144595458"><a name="p41144595458"></a><a name="p41144595458"></a>Device handle of an SDIO controller.</p>
</td>
</tr>
</tbody>
......@@ -218,7 +226,7 @@ if (ret != 0) {
The corresponding function is as follows:
int32\_t SdioWriteBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioWriteBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**Table 5** Parameters and return values of SdioWriteBytes
......@@ -249,11 +257,6 @@ int32\_t SdioWriteBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1288813411413"><a name="p1288813411413"></a><a name="p1288813411413"></a>Length of the data to write.</p>
</td>
</tr>
<tr id="row188213710445"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p08227154415"><a name="p08227154415"></a><a name="p08227154415"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p6821875446"><a name="p6821875446"></a><a name="p6821875446"></a>Timeout duration for writing data, in milliseconds. If the value is <strong id="b62393444422"><a name="b62393444422"></a><a name="b62393444422"></a>0</strong>, the default value is used.</p>
</td>
</tr>
<tr id="row18247654163519"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p486155173610"><a name="p486155173610"></a><a name="p486155173610"></a><strong id="b11356135114216"><a name="b11356135114216"></a><a name="b11356135114216"></a>Return Value</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1686155113620"><a name="p1686155113620"></a><a name="p1686155113620"></a><strong id="b911120524421"><a name="b911120524421"></a><a name="b911120524421"></a>Description</strong></p>
......@@ -279,7 +282,7 @@ int32_t ret;
uint8_t wbuff[] = {1,2,3,4,5};
uint32_t addr = 0x100 + 0x09;
/* Incrementally write 5-byte data into the start address 0x109 of the SDIO device. */
ret = SdioWriteBytes(handle, wbuff, addr, sizeof(wbuff) / sizeof(wbuff[0]), 0);
ret = SdioWriteBytes(handle, wbuff, addr, sizeof(wbuff) / sizeof(wbuff[0]));
if (ret != 0) {
HDF_LOGE("SdioWriteBytes: failed, ret %d\n", ret);
}
......@@ -289,7 +292,7 @@ if (ret != 0) {
The corresponding function is as follows:
int32\_t SdioReadBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioReadBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**Table 6** Parameters and return values of SdioReadBytes
......@@ -320,11 +323,6 @@ int32\_t SdioReadBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint3
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p14676163782210"><a name="p14676163782210"></a><a name="p14676163782210"></a>Length of the data to read.</p>
</td>
</tr>
<tr id="row1823311517494"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p723314152499"><a name="p723314152499"></a><a name="p723314152499"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1323351515493"><a name="p1323351515493"></a><a name="p1323351515493"></a>Timeout duration for reading data, in milliseconds. If the value is <strong id="b1042211934510"><a name="b1042211934510"></a><a name="b1042211934510"></a>0</strong>, the default value is used.</p>
</td>
</tr>
<tr id="row964182643610"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p7833639163612"><a name="p7833639163612"></a><a name="p7833639163612"></a><strong id="b83016222455"><a name="b83016222455"></a><a name="b83016222455"></a>Return Value</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p3833939113619"><a name="p3833939113619"></a><a name="p3833939113619"></a><strong id="b940852318450"><a name="b940852318450"></a><a name="b940852318450"></a>Description</strong></p>
......@@ -350,7 +348,7 @@ int32_t ret;
uint8_t rbuff[5] = {0};
uint32_t addr = 0x100 + 0x09;
/* Incrementally read 5-byte data from the start address 0x109 of the SDIO device. */
ret = SdioReadBytes(handle, rbuff, addr, 5, 0);
ret = SdioReadBytes(handle, rbuff, addr, 5);
if (ret != 0) {
HDF_LOGE("SdioReadBytes: failed, ret %d\n", ret);
}
......@@ -360,7 +358,7 @@ if (ret != 0) {
The corresponding function is as follows:
int32\_t SdioWriteBytesToFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioWriteBytesToFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t scatterLen\);
**Table 7** Parameters and return values of SdioWriteBytesToFixedAddr
......@@ -391,9 +389,9 @@ if (ret != 0) {
<td class="cellrowborder" valign="top" width="51.57000000000001%" headers="mcps1.2.3.1.2 "><p id="p7578181015113"><a name="p7578181015113"></a><a name="p7578181015113"></a>Length of the data to write.</p>
</td>
</tr>
<tr id="row58301911309"><td class="cellrowborder" valign="top" width="48.43%" headers="mcps1.2.3.1.1 "><p id="p570810551107"><a name="p570810551107"></a><a name="p570810551107"></a>timeOut</p>
<tr id="row58301911309"><td class="cellrowborder" valign="top" width="48.43%" headers="mcps1.2.3.1.1 "><p id="p570810551107"><a name="p570810551107"></a><a name="p570810551107"></a>scatterLen</p>
</td>
<td class="cellrowborder" valign="top" width="51.57000000000001%" headers="mcps1.2.3.1.2 "><p id="p17579910915"><a name="p17579910915"></a><a name="p17579910915"></a>Timeout duration for writing data, in milliseconds. If the value is <strong id="b1954414402499"><a name="b1954414402499"></a><a name="b1954414402499"></a>0</strong>, the default value is used.</p>
<td class="cellrowborder" valign="top" width="51.57000000000001%" headers="mcps1.2.3.1.2 "><p id="p17579910915"><a name="p17579910915"></a><a name="p17579910915"></a>Length of the scatter list. If the value is not <strong id="b2073012162455"><a name="b2073012162455"></a><a name="b2073012162455"></a>0</strong>, the data is of the scatter list type.</p>
</td>
</tr>
<tr id="row18215162810212"><td class="cellrowborder" valign="top" width="48.43%" headers="mcps1.2.3.1.1 "><p id="p1521319452211"><a name="p1521319452211"></a><a name="p1521319452211"></a><strong id="b13882204015494"><a name="b13882204015494"></a><a name="b13882204015494"></a>Return Value</strong></p>
......@@ -431,7 +429,7 @@ if (ret != 0) {
The corresponding function is as follows:
int32\_t SdioReadBytesFromFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioReadBytesFromFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t scatterLen\);
**Table 8** Parameters and return values of SdioReadBytesFromFixedAddr
......@@ -462,9 +460,9 @@ if (ret != 0) {
<td class="cellrowborder" valign="top" width="51.300000000000004%" headers="mcps1.2.3.1.2 "><p id="p1954165031214"><a name="p1954165031214"></a><a name="p1954165031214"></a>Length of the data to read.</p>
</td>
</tr>
<tr id="row972552281111"><td class="cellrowborder" valign="top" width="48.699999999999996%" headers="mcps1.2.3.1.1 "><p id="p2753755161114"><a name="p2753755161114"></a><a name="p2753755161114"></a>timeOut</p>
<tr id="row972552281111"><td class="cellrowborder" valign="top" width="48.699999999999996%" headers="mcps1.2.3.1.1 "><p id="p2753755161114"><a name="p2753755161114"></a><a name="p2753755161114"></a>scatterLen</p>
</td>
<td class="cellrowborder" valign="top" width="51.300000000000004%" headers="mcps1.2.3.1.2 "><p id="p3541350111218"><a name="p3541350111218"></a><a name="p3541350111218"></a>Timeout duration for reading data, in milliseconds. If the value is <strong id="b1649405802013"><a name="b1649405802013"></a><a name="b1649405802013"></a>0</strong>, the default value is used.</p>
<td class="cellrowborder" valign="top" width="51.300000000000004%" headers="mcps1.2.3.1.2 "><p id="p3541350111218"><a name="p3541350111218"></a><a name="p3541350111218"></a>Length of the scatter list. If the value is not <strong id="b1853656114520"><a name="b1853656114520"></a><a name="b1853656114520"></a>0</strong>, the data is of the scatter list type.</p>
</td>
</tr>
<tr id="row15725162210117"><td class="cellrowborder" valign="top" width="48.699999999999996%" headers="mcps1.2.3.1.1 "><p id="p681073451314"><a name="p681073451314"></a><a name="p681073451314"></a><strong id="b1289515862016"><a name="b1289515862016"></a><a name="b1289515862016"></a>Return Value</strong></p>
......@@ -503,7 +501,7 @@ if (ret != 0) {
Currently, only 1-byte data can be written. The corresponding function is as follows:
int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**Table 9** Parameters and return values of SdioWriteBytesToFunc0
......@@ -534,11 +532,6 @@ int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t add
<td class="cellrowborder" valign="top" width="50.06%" headers="mcps1.2.3.1.2 "><p id="p71691449141119"><a name="p71691449141119"></a><a name="p71691449141119"></a>Length of the data to write.</p>
</td>
</tr>
<tr id="row1634015181114"><td class="cellrowborder" valign="top" width="49.94%" headers="mcps1.2.3.1.1 "><p id="p9169049161114"><a name="p9169049161114"></a><a name="p9169049161114"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50.06%" headers="mcps1.2.3.1.2 "><p id="p51701849121115"><a name="p51701849121115"></a><a name="p51701849121115"></a>Timeout duration for writing data, in milliseconds. If the value is <strong id="b845193552314"><a name="b845193552314"></a><a name="b845193552314"></a>0</strong>, the default value is used.</p>
</td>
</tr>
<tr id="row123407185111"><td class="cellrowborder" valign="top" width="49.94%" headers="mcps1.2.3.1.1 "><p id="p294173071617"><a name="p294173071617"></a><a name="p294173071617"></a><strong id="b1585213582316"><a name="b1585213582316"></a><a name="b1585213582316"></a>Return Value</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50.06%" headers="mcps1.2.3.1.2 "><p id="p39421830111616"><a name="p39421830111616"></a><a name="p39421830111616"></a><strong id="b37921536122318"><a name="b37921536122318"></a><a name="b37921536122318"></a>Description</strong></p>
......@@ -563,7 +556,7 @@ The following example shows how to write a given length of data into the address
int32_t ret;
uint8_t wbuff = 1;
/* Write 1-byte data into the address 0x2 of SDIO function 0. */
ret = SdioWriteBytesToFunc0(handle, &wbuff, 0x2, 1, 0);
ret = SdioWriteBytesToFunc0(handle, &wbuff, 0x2, 1);
if (ret != 0) {
HDF_LOGE("SdioWriteBytesToFunc0: failed, ret %d\n", ret);
}
......@@ -573,7 +566,7 @@ if (ret != 0) {
Currently, only 1-byte data can be read. The corresponding function is as follows:
int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**Table 10** Parameters and return values of SdioReadBytesFromFunc0
......@@ -604,11 +597,6 @@ int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t ad
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p612921851820"><a name="p612921851820"></a><a name="p612921851820"></a>Length of the data to read.</p>
</td>
</tr>
<tr id="row147201613181"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p3130161831815"><a name="p3130161831815"></a><a name="p3130161831815"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1513031831816"><a name="p1513031831816"></a><a name="p1513031831816"></a>Timeout duration for reading data, in milliseconds. If the value is <strong id="b38794374242"><a name="b38794374242"></a><a name="b38794374242"></a>0</strong>, the default value is used.</p>
</td>
</tr>
<tr id="row167202113189"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1813001881810"><a name="p1813001881810"></a><a name="p1813001881810"></a><strong id="b088853932420"><a name="b088853932420"></a><a name="b088853932420"></a>Return Value</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1313081817184"><a name="p1313081817184"></a><a name="p1313081817184"></a><strong id="b7430114117242"><a name="b7430114117242"></a><a name="b7430114117242"></a>Description</strong></p>
......@@ -633,7 +621,7 @@ The following example shows how to read a given length of data from the address
int32_t ret;
uint8_t rbuff;
/* Read 1-byte data from the address 0x2 of SDIO function 0. */
ret = SdioReadBytesFromFunc0(handle, &rbuff, 0x2, 1, 0);
ret = SdioReadBytesFromFunc0(handle, &rbuff, 0x2, 1);
if (ret != 0) {
HDF_LOGE("SdioReadBytesFromFunc0: failed, ret %d\n", ret);
}
......@@ -754,7 +742,7 @@ void SdioReleaseHost\(DevHandle handle\);
</thead>
<tbody><tr id="row135027411483"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p16502174204816"><a name="p16502174204816"></a><a name="p16502174204816"></a>handle</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p6502164184816"><a name="p6502164184816"></a><a name="p6502164184816"></a>Device handle of an SDIO controller</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p6502164184816"><a name="p6502164184816"></a><a name="p6502164184816"></a>Device handle of an SDIO controller.</p>
</td>
</tr>
</tbody>
......@@ -785,7 +773,7 @@ This function releases the resources requested.
</thead>
<tbody><tr id="row25035434810"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p175028434819"><a name="p175028434819"></a><a name="p175028434819"></a>handle</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p2050274194819"><a name="p2050274194819"></a><a name="p2050274194819"></a>Device handle of an SDIO controller</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p2050274194819"><a name="p2050274194819"></a><a name="p2050274194819"></a>Device handle of an SDIO controller.</p>
</td>
</tr>
</tbody>
......
# Preparing the Ubuntu Build Environment<a name="EN-US_TOPIC_0000001161257591"></a>
- [Setting up an Ubuntu Build Environment Using a Docker Environment](#section1643363843714)
- [Obtaining System Source Code](#section58448331029)
- [Method 1: Setting up an Ubuntu Build Environment Using a Docker Environment](#section1643363843714)
- [Obtaining Standard-System Source Code](#section58448331029)
- [Installing and Using the Docker Environment](#section22916211916)
- [Setting up an Ubuntu Build Environment Using an Installation Package](#section25961010189)
- [Method 2: Setting up an Ubuntu Build Environment Using an Installation Package](#section25961010189)
- [Installing Dependent Tools](#section109262032104819)
- [Obtaining Standard-System Source Code](#section6325556113718)
- [Obtaining prebuilts](#section16453104219209)
- [Configuring the Node.js Environment and Obtaining the Node\_modules Dependency Package](#section133741330192119)
- [Installing the hc-gen Tool](#section149281248182116)
You can use either the Docker environment or installation package provided by OpenHarmony to set up an Ubuntu build environment. This section describes the two methods.
## Setting up an Ubuntu Build Environment Using a Docker Environment<a name="section1643363843714"></a>
## Method 1: Setting up an Ubuntu Build Environment Using a Docker Environment<a name="section1643363843714"></a>
The standard OpenHarmony system provides a Docker environment which encapsulates build tools. To use the Docker environment, perform the following steps:
1. Obtain the system source code.
1. Obtain the standard-system source code.
2. Install and use the Docker environment.
### Obtaining System Source Code<a name="section58448331029"></a>
### Obtaining Standard-System Source Code<a name="section58448331029"></a>
For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
Obtain the [standard-system source code](https://repo.huaweicloud.com/harmonyos/os/2.0/code-2.0-canary.tar.gz). The obtained source code is the static code. If you want to obtain the latest source code from Gitee, use [repo](../get-code/source-code-acquisition.md).
### Installing and Using the Docker Environment<a name="section22916211916"></a>
For details, see [Installing and Using Docker](../get-code/tool-acquisition.md).
## Setting up an Ubuntu Build Environment Using an Installation Package<a name="section25961010189"></a>
## Method 2: Setting up an Ubuntu Build Environment Using an Installation Package<a name="section25961010189"></a>
The procedure is as follows:
1. Install dependent tools.
2. Obtain the system source code.
2. Obtain the standard-system source code.
3. Obtain prebuilts.
4. Configure the Node.js environment and obtain the Node\_modules dependency package.
5. Install the hc-gen tool.
### Installing Dependent Tools<a name="section109262032104819"></a>
......@@ -52,7 +48,7 @@ sudo apt-get install binutils git-core git-lfs gnupg flex bison gperf build-esse
### Obtaining Standard-System Source Code<a name="section6325556113718"></a>
For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
Obtain the [standard-system source code](https://repo.huaweicloud.com/harmonyos/os/2.0/code-2.0-canary.tar.gz). The obtained source code is the static code. If you want to obtain the latest source code from Gitee, use [repo](../get-code/source-code-acquisition.md).
### Obtaining prebuilts<a name="section16453104219209"></a>
......@@ -62,86 +58,12 @@ For details, see [Source Code Acquisition](../get-code/source-code-acquisition.
cd OpenHarmony
```
2. Download the script.
2. Execute the following script:
```
curl https://gitee.com/landwind/script-tools/raw/master/Shell/OpenHarmony/OpenHarmony_2.0_canary_prebuilts_download.sh >./prebuilts_download.sh
build/prebuilts_download.sh
```
3. Download and decompress the prebuilts package in a specified directory.
```
bash ./prebuilts_download.sh
```
By default, binary files are stored in the **OpenHarmony\_2.0\_canary\_prebuilts** directory, which is in the same directory as **OpenHarmony**. To change the storage path, change the value of **bin\_dir** in **prebuilts\_download.sh**.
4. Return to the previous directory.
```
cd -
```
### Configuring the Node.js Environment and Obtaining the Node\_modules Dependency Package<a name="section133741330192119"></a>
To build the JS framework, you need to download and configure Node.js on a Linux server. The procedure is as follows \(the **OpenHarmony** directory in the following steps is the root directory of the current project and is configurable\):
1. Download Node.js on a Linux server.
```
mkdir -p OpenHarmony/prebuilts/build-tools/common/nodejs # Create the nodejs directory.
cd OpenHarmony/prebuilts/build-tools/common/nodejs # Go to the nodejs directory.
wget --no-check-certificate https://nodejs.org/download/release/v12.18.4/node-v12.18.4-linux-x64.tar.gz # Download the Node.js package.
tar -zxvf node-v12.18.4-linux-x64.tar.gz # Decompress the Node.js package.
cd - # Return to the previous directory.
```
2. Configure the Node.js variable and download the **node\_modules** package.
```
cd OpenHarmony/third_party/jsframework # Go to the jsframework directory.
export PATH=../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin:${PATH} # Configure the Node.js variable.
npm install # Download the node_modules package.
cd - # Return to the previous directory.
```
3. Store the **node\_modules** package in the **prebuilts/build-tools/common/js-framework** directory of the OpenHarmony code.
```
mkdir -p OpenHarmony/prebuilts/build-tools/common/js-framework # Create the js-framework directory.
cp -rp OpenHarmony/third_party/jsframework/node_modules OpenHarmony/prebuilts/build-tools/common/js-framework/
```
### Installing the hc-gen Tool<a name="section149281248182116"></a>
hc-gen is used to compile the driver. To install hc-gen, perform the following steps:
1. Start a Linux server.
2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar).
3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server.
```
tar -xvf hc-gen-0.65-linux.tar -C ~/
```
4. Set an environment variable.
```
vim ~/.bashrc
```
Copy the following command to the last line of the **.bashrc** file, save the file, and exit.
```
export PATH=~/hc-gen:$PATH
```
5. Validate the environment variable.
```
source ~/.bashrc
```
By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2.0\_canary\_prebuilts** \(which is in the same directory as **OpenHarmony**\).
......@@ -7,8 +7,7 @@
- [Installing Linux Build Tools](#section182916865219)
- [Changing Linux Shell to Bash](#section1715027152617)
- [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251)
- [Installing a File Packing Tool](#section1969111820270)
- [Installing the JVM](#section1692618112713)
- [Installing File Packing Tools and JVM](#section16199102083717)
## Environment Requirements<a name="section179175261196"></a>
......@@ -108,44 +107,16 @@ sudo ln -s /bin/bash /bin/sh
Install the software.
```
sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev
sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
```
### Installing a File Packing Tool<a name="section1969111820270"></a>
### Installing File Packing Tools and JVM<a name="section16199102083717"></a>
1. Start a Linux server.
2. Install **dosfstools**.
2. Install the dosfstools, mtools, mtd-utils, Java Runtime Environment \(JRE\), and Java SDK.
```
sudo apt-get install dosfstools
```
3. Install **mtools**.
```
sudo apt-get install mtools
```
4. Install **mtd-utils**.
```
sudo apt-get install mtd-utils
```
### Installing the JVM<a name="section1692618112713"></a>
1. Start a Linux server.
2. Install the Java Runtime Environment \(JRE\).
```
sudo apt-get install default-jre
```
3. Install the Java Development Kit \(JDK\).
```
sudo apt-get install default-jdk
sudo apt-get install dosfstools mtools mtd-utils default-jre default-jdk
```
......@@ -5,10 +5,9 @@
- [Software Requirements](#section17315193935817)
- [Installing Linux Build Tools](#section8831868501)
- [Changing Linux Shell to Bash](#section1715027152617)
- [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251)
- [Installing a File Packing Tool](#section1686964015274)
- [Installing hc-gen](#section18706403274)
- [Changing Linux Shell to Bash](#section434110241084)
- [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section25911132141020)
- [Installing File Packing Tools](#section390214473129)
## Environment Requirements<a name="section1724111409282"></a>
......@@ -72,7 +71,7 @@ The following table describes the tools required for setting up the general envi
>- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install **hc-gen**.
>- \(Recommended\) If you obtain the source code via the mirror site or code repository, install **hc-gen**. When installing the compilation tool, ensure that its environment variable path is unique.
### Changing Linux Shell to Bash<a name="section1715027152617"></a>
### Changing Linux Shell to Bash<a name="section434110241084"></a>
Check whether bash is used as the shell.
......@@ -95,62 +94,21 @@ sudo rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
```
### Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)<a name="section45512412251"></a>
### Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)<a name="section25911132141020"></a>
Install the software.
```
sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev
sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
```
### Installing a File Packing Tool<a name="section1686964015274"></a>
### Installing File Packing Tools<a name="section390214473129"></a>
1. Start a Linux server.
2. Install **dosfstools**.
2. Install dosfstools, mtools, and mtd-utils.
```
sudo apt-get install dosfstools
```
3. Install **mtools**.
```
sudo apt-get install mtools
```
4. Install **mtd-utils**.
```
sudo apt-get install mtd-utils
```
### Installing hc-gen<a name="section18706403274"></a>
1. Start a Linux server.
2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar).
3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server.
```
tar -xvf hc-gen-0.65-linux.tar -C ~/
```
4. Set an environment variable.
```
vim ~/.bashrc
```
Copy the following command to the last line of the **.bashrc** file, save the file, and exit.
```
export PATH=~/hc-gen:$PATH
```
5. Validate the environment variable.
```
source ~/.bashrc
sudo apt-get install dosfstools mtools mtd-utils
```
......@@ -105,7 +105,7 @@ The following table lists the tools required for the Hi3861 development board.
Install the software.
```
sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev
sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
```
### Installing Scons<a name="section7438245172514"></a>
......
# Ubuntu Build Environment<a name="EN-US_TOPIC_0000001105407498"></a>
- [Obtaining Source Code and Tools](#section1897711811517)
- [Obtaining OpenHarmony Source Code](#section1545225464016)
- [Obtaining Source Code](#section1545225464016)
- [Installing and Configuring Python](#section1238412211211)
- [Installing gn](#section29216201423)
- [Installing ninja](#section8762358731)
- [Installing hc-gen](#section4924165316437)
- [Installing LLVM](#section12202192215415)
- [Installing hb](#section15794154618411)
- [Prerequisites](#section1083283711515)
......@@ -21,9 +20,8 @@ Perform the following steps to set up the build environment:
2. Install and configure Python.
3. Install GN.
4. Install Ninja.
5. Installing hc-gen
6. Install LLVM.
7. Install hb.
5. Install LLVM.
6. Install hb.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>- Docker is provided for the Ubuntu build environment, which encapsulates related build tools. If you use Docker to prepare the build environment, you do not need to perform the following steps in this section. Instead, refer to [Using Docker to Prepare the Build Environment](../get-code/tool-acquisition.md).
......@@ -73,13 +71,6 @@ The following table describes the tools and source code required for setting up
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p1923373393515"><a name="p1923373393515"></a><a name="p1923373393515"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
</td>
</tr>
<tr id="row18800428194715"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p280042884712"><a name="p280042884712"></a><a name="p280042884712"></a>hc-gen</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p15800428174711"><a name="p15800428174711"></a><a name="p15800428174711"></a>Configures and compiles files.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p10800828174712"><a name="p10800828174712"></a><a name="p10800828174712"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
</td>
</tr>
<tr id="row7531362055"><td class="cellrowborder" rowspan="2" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p1467122152710"><a name="p1467122152710"></a><a name="p1467122152710"></a></p>
<p id="p15217227174016"><a name="p15217227174016"></a><a name="p15217227174016"></a>LLVM</p>
<p id="p689515112108"><a name="p689515112108"></a><a name="p689515112108"></a></p>
......@@ -88,7 +79,7 @@ The following table describes the tools and source code required for setting up
<p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>Functions as the compiler toolchain.</p>
<p id="p108951116109"><a name="p108951116109"></a><a name="p108951116109"></a></p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p5445144091417"><a name="p5445144091417"></a><a name="p5445144091417"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p49091358184"><a name="p49091358184"></a><a name="p49091358184"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz</a></p>
</td>
</tr>
<tr id="row78941113109"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1974322421510"><a name="p1974322421510"></a><a name="p1974322421510"></a>For the OpenHarmony_1.0.1_release, download LLVM from the following link:</p>
......@@ -109,7 +100,7 @@ The following table describes the tools and source code required for setting up
>- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install compilation tools like **gn** and **ninja**.
>- \(Recommended\) If you obtain the source code via the mirror site or code repository, install compilation tools such as **gn**, **ninja**, and LLVM. When installing these tools, ensure that their environment variable paths are unique.
## Obtaining OpenHarmony Source Code<a name="section1545225464016"></a>
## Obtaining Source Code<a name="section1545225464016"></a>
You need to acquire [source code](../get-code/source-code-acquisition.md), download it on a Linux server, and decompress it.
......@@ -247,35 +238,6 @@ You need to acquire [source code](../get-code/source-code-acquisition.md), down
```
## Installing hc-gen<a name="section4924165316437"></a>
1. Start a Linux server.
2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar).
3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server.
```
tar -xvf hc-gen-0.65-linux.tar -C ~/
```
4. Set an environment variable.
```
vim ~/.bashrc
```
Copy the following command to the last line of the **.bashrc** file, save the file, and exit.
```
export PATH=~/hc-gen:$PATH
```
5. Validate the environment variable.
```
source ~/.bashrc
```
## Installing LLVM<a name="section12202192215415"></a>
1. Start a Linux server.
......
# 应用开发导读<a name="ZH-CN_TOPIC_0000001123678714"></a>
应用开发文档用于指导开发者通过OpenHarmony提供的接口完成应用开发。当前应用开发文档提供了在标准系统上开发应用的JS接口。
在这部分中,开发者可以通过“[入门](quick-start/Readme-CN.md)”来了解应用开发的基本方法。完整的接口清单和参考使用指导可参见“[JS参考规范](js-reference/Readme-CN.md)”。
除此之外,为方便开发者对常用功能进行深入理解,还提供了[UI](ui/Readme-CN.md)[媒体](media/Readme-CN.md)[网络与连接](connectivity/Readme-CN.md)三个模块的开发指南。
如果需要了解各子系统的原理和基本信息,可以参考“docs/zh-cn/readme”目录中各子系统readme的介绍。
......@@ -27,12 +27,12 @@ void SdioTestSample(void)
int32_t ret;
DevHandle handle = NULL;
uint8_t data[TEST_DATA_LEN] = {0};
int16_t busNum = 1;
struct SdioFunctionConfig config = {1, 0x123, 0x456};
uint8_t val;
uint32_t addr;
/* 打开总线号为1的SDIO设备 */
handle = SdioOpen(busNum);
handle = SdioOpen(1, &config);
if (handle == NULL) {
HDF_LOGE("SdioOpen: failed!\n");
return;
......@@ -59,25 +59,25 @@ void SdioTestSample(void)
}
/* 从SDIO设备增量地址读取3字节的数据 */
addr = TEST_FBR_BASE_ADDR * TEST_FUNC_NUM + TEST_ADDR_OFFSET;
ret = SdioReadBytes(handle, data, addr, TEST_DATA_LEN, 0);
ret = SdioReadBytes(handle, data, addr, TEST_DATA_LEN);
if (ret != 0) {
HDF_LOGE("SdioReadBytes: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* 向SDIO设备增量地址写入3字节的数据 */
ret = SdioWriteBytes(handle, data, addr, TEST_DATA_LEN, 0);
ret = SdioWriteBytes(handle, data, addr, TEST_DATA_LEN);
if (ret != 0) {
HDF_LOGE("SdioWriteBytes: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* 从SDIO设备读取1字节的数据 */
ret = SdioReadBytes(handle, &val, addr, 1, 0);
ret = SdioReadBytes(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioReadBytes: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* 向SDIO设备写入1字节的数据 */
ret = SdioWriteBytes(handle, &val, addr, 1, 0);
ret = SdioWriteBytes(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioWriteBytes: failed, ret %d\n", ret);
goto COMM_ERR;
......@@ -96,13 +96,13 @@ void SdioTestSample(void)
}
/* 从SDIO function 0读取1字节的数据 */
addr = 0x02;
ret = SdioReadBytesFromFunc0(handle, &val, addr, 1, 0);
ret = SdioReadBytesFromFunc0(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioReadBytesFromFunc0: failed, ret %d\n", ret);
goto COMM_ERR;
}
/* 向SDIO function 0写入1字节的数据 */
ret = SdioWriteBytesToFunc0(handle, &val, addr, 1, 0);
ret = SdioWriteBytesToFunc0(handle, &val, addr, 1);
if (ret != 0) {
HDF_LOGE("SdioWriteBytesToFunc0: failed, ret %d\n", ret);
goto COMM_ERR;
......
......@@ -24,7 +24,7 @@
在使用SDIO进行通信前,首先要调用SdioOpen获取SDIO控制器的设备句柄,该函数会返回指定总线号的SDIO控制器的设备句柄。
DevHandle SdioOpen\(int16\_t busNum\);
DevHandle SdioOpen\(int16\_t mmcBusNum, struct SdioFunctionConfig \*config\);
**表 1** SdioOpen函数的参数和返回值描述
......@@ -35,9 +35,14 @@ DevHandle SdioOpen\(int16\_t busNum\);
</th>
</tr>
</thead>
<tbody><tr id="row19112195918454"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p11121759124515"><a name="p11121759124515"></a><a name="p11121759124515"></a>busNum</p>
<tbody><tr id="row19112195918454"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p11121759124515"><a name="p11121759124515"></a><a name="p11121759124515"></a>mmcBusNum</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p111121459194519"><a name="p111121459194519"></a><a name="p111121459194519"></a>SDIO的总线号</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p111121459194519"><a name="p111121459194519"></a><a name="p111121459194519"></a>总线号</p>
</td>
</tr>
<tr id="row380917163457"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1181091614519"><a name="p1181091614519"></a><a name="p1181091614519"></a>config</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p5810121634514"><a name="p5810121634514"></a><a name="p5810121634514"></a>SDIO功能配置信息</p>
</td>
</tr>
<tr id="row6112659184518"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1112105919453"><a name="p1112105919453"></a><a name="p1112105919453"></a><strong id="b611215594453"><a name="b611215594453"></a><a name="b611215594453"></a>返回值</strong></p>
......@@ -62,9 +67,12 @@ DevHandle SdioOpen\(int16\_t busNum\);
```
DevHandle handle = NULL;
int16_t busNum = 1;
struct SdioFunctionConfig config;
config.funcNr = 1;
config.vendorId = 0x123;
config.deviceId = 0x456;
/* 打开总线号为1的SDIO控制器 */
handle = SdioOpen(busNum);
handle = SdioOpen(1, &config);
if (handle == NULL) {
HDF_LOGE("SdioOpen: failed!\n");
}
......@@ -218,7 +226,7 @@ if (ret != 0) {
对应的接口函数如下所示:
int32\_t SdioWriteBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioWriteBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**表 5** SdioWriteBytes函数的参数和返回值描述
......@@ -249,11 +257,6 @@ int32\_t SdioWriteBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1288813411413"><a name="p1288813411413"></a><a name="p1288813411413"></a>待写入数据的长度</p>
</td>
</tr>
<tr id="row188213710445"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p08227154415"><a name="p08227154415"></a><a name="p08227154415"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p6821875446"><a name="p6821875446"></a><a name="p6821875446"></a>写入数据的最大时间限制,单位毫秒。如果该字段为0,则使用平台对应的默认值。</p>
</td>
</tr>
<tr id="row18247654163519"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p486155173610"><a name="p486155173610"></a><a name="p486155173610"></a><strong id="b169231220183618"><a name="b169231220183618"></a><a name="b169231220183618"></a>返回值</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1686155113620"><a name="p1686155113620"></a><a name="p1686155113620"></a><strong id="b9924152013365"><a name="b9924152013365"></a><a name="b9924152013365"></a>返回值描述</strong></p>
......@@ -279,7 +282,7 @@ int32_t ret;
uint8_t wbuff[] = {1,2,3,4,5};
uint32_t addr = 0x100 + 0x09;
/* 向SDIO设备起始地址0x109,增量写入5个字节的数据 */
ret = SdioWriteBytes(handle, wbuff, addr, sizeof(wbuff) / sizeof(wbuff[0]), 0);
ret = SdioWriteBytes(handle, wbuff, addr, sizeof(wbuff) / sizeof(wbuff[0]));
if (ret != 0) {
HDF_LOGE("SdioWriteBytes: failed, ret %d\n", ret);
}
......@@ -289,7 +292,7 @@ if (ret != 0) {
对应的接口函数如下所示:
int32\_t SdioReadBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioReadBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**表 6** SdioReadBytes函数的参数和返回值描述
......@@ -320,11 +323,6 @@ int32\_t SdioReadBytes\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint3
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p14676163782210"><a name="p14676163782210"></a><a name="p14676163782210"></a>待读取数据的长度</p>
</td>
</tr>
<tr id="row1823311517494"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p723314152499"><a name="p723314152499"></a><a name="p723314152499"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1323351515493"><a name="p1323351515493"></a><a name="p1323351515493"></a>读取数据的最大时间限制,单位毫秒。如果该字段为0,则使用平台对应的默认值。</p>
</td>
</tr>
<tr id="row964182643610"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p7833639163612"><a name="p7833639163612"></a><a name="p7833639163612"></a><strong id="b122757566365"><a name="b122757566365"></a><a name="b122757566365"></a>返回值</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p3833939113619"><a name="p3833939113619"></a><a name="p3833939113619"></a><strong id="b15276185619361"><a name="b15276185619361"></a><a name="b15276185619361"></a>返回值描述</strong></p>
......@@ -350,7 +348,7 @@ int32_t ret;
uint8_t rbuff[5] = {0};
uint32_t addr = 0x100 + 0x09;
/* 从SDIO设备起始地址0x109,增量读取5个字节的数据 */
ret = SdioReadBytes(handle, rbuff, addr, 5, 0);
ret = SdioReadBytes(handle, rbuff, addr, 5);
if (ret != 0) {
HDF_LOGE("SdioReadBytes: failed, ret %d\n", ret);
}
......@@ -360,7 +358,7 @@ if (ret != 0) {
对应的接口函数如下所示:
int32\_t SdioWriteBytesToFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioWriteBytesToFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t scatterLen\);
**表 7** SdioWriteBytesToFixedAddr函数的参数和返回值描述
......@@ -391,9 +389,9 @@ if (ret != 0) {
<td class="cellrowborder" valign="top" width="51.57000000000001%" headers="mcps1.2.3.1.2 "><p id="p7578181015113"><a name="p7578181015113"></a><a name="p7578181015113"></a>待写入数据的长度</p>
</td>
</tr>
<tr id="row58301911309"><td class="cellrowborder" valign="top" width="48.43%" headers="mcps1.2.3.1.1 "><p id="p570810551107"><a name="p570810551107"></a><a name="p570810551107"></a>timeOut</p>
<tr id="row58301911309"><td class="cellrowborder" valign="top" width="48.43%" headers="mcps1.2.3.1.1 "><p id="p570810551107"><a name="p570810551107"></a><a name="p570810551107"></a>scatterLen</p>
</td>
<td class="cellrowborder" valign="top" width="51.57000000000001%" headers="mcps1.2.3.1.2 "><p id="p17579910915"><a name="p17579910915"></a><a name="p17579910915"></a>写入数据的最大时间限制,单位毫秒。如果该字段为0,则使用平台对应的默认值。</p>
<td class="cellrowborder" valign="top" width="51.57000000000001%" headers="mcps1.2.3.1.2 "><p id="p17579910915"><a name="p17579910915"></a><a name="p17579910915"></a>集散表的长度。如果该字段不为0,则data为集散表类型。</p>
</td>
</tr>
<tr id="row18215162810212"><td class="cellrowborder" valign="top" width="48.43%" headers="mcps1.2.3.1.1 "><p id="p1521319452211"><a name="p1521319452211"></a><a name="p1521319452211"></a><strong id="b621312451720"><a name="b621312451720"></a><a name="b621312451720"></a>返回值</strong></p>
......@@ -431,7 +429,7 @@ if (ret != 0) {
对应的接口函数如下所示:
int32\_t SdioReadBytesFromFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioReadBytesFromFixedAddr\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t scatterLen\);
**表 8** SdioReadBytesFromFixedAddr函数的参数和返回值描述
......@@ -462,9 +460,9 @@ if (ret != 0) {
<td class="cellrowborder" valign="top" width="51.300000000000004%" headers="mcps1.2.3.1.2 "><p id="p1954165031214"><a name="p1954165031214"></a><a name="p1954165031214"></a>待读取数据的长度</p>
</td>
</tr>
<tr id="row972552281111"><td class="cellrowborder" valign="top" width="48.699999999999996%" headers="mcps1.2.3.1.1 "><p id="p2753755161114"><a name="p2753755161114"></a><a name="p2753755161114"></a>timeOut</p>
<tr id="row972552281111"><td class="cellrowborder" valign="top" width="48.699999999999996%" headers="mcps1.2.3.1.1 "><p id="p2753755161114"><a name="p2753755161114"></a><a name="p2753755161114"></a>scatterLen</p>
</td>
<td class="cellrowborder" valign="top" width="51.300000000000004%" headers="mcps1.2.3.1.2 "><p id="p3541350111218"><a name="p3541350111218"></a><a name="p3541350111218"></a>读取数据的最大时间限制,单位毫秒。如果该字段为0,则使用平台对应的默认值。</p>
<td class="cellrowborder" valign="top" width="51.300000000000004%" headers="mcps1.2.3.1.2 "><p id="p3541350111218"><a name="p3541350111218"></a><a name="p3541350111218"></a>集散表的长度。如果该字段不为0,则data为集散表类型。</p>
</td>
</tr>
<tr id="row15725162210117"><td class="cellrowborder" valign="top" width="48.699999999999996%" headers="mcps1.2.3.1.1 "><p id="p681073451314"><a name="p681073451314"></a><a name="p681073451314"></a><strong id="b118106344137"><a name="b118106344137"></a><a name="b118106344137"></a>返回值</strong></p>
......@@ -503,7 +501,7 @@ if (ret != 0) {
当前只支持写入一个字节的数据,对应的接口函数如下所示:
int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**表 9** SdioWriteBytesToFunc0函数的参数和返回值描述
......@@ -534,11 +532,6 @@ int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t add
<td class="cellrowborder" valign="top" width="50.06%" headers="mcps1.2.3.1.2 "><p id="p71691449141119"><a name="p71691449141119"></a><a name="p71691449141119"></a>待写入数据的长度</p>
</td>
</tr>
<tr id="row1634015181114"><td class="cellrowborder" valign="top" width="49.94%" headers="mcps1.2.3.1.1 "><p id="p9169049161114"><a name="p9169049161114"></a><a name="p9169049161114"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50.06%" headers="mcps1.2.3.1.2 "><p id="p51701849121115"><a name="p51701849121115"></a><a name="p51701849121115"></a>写入数据的最大时间限制,单位毫秒。如果该字段为0,则使用平台对应的默认值。</p>
</td>
</tr>
<tr id="row123407185111"><td class="cellrowborder" valign="top" width="49.94%" headers="mcps1.2.3.1.1 "><p id="p294173071617"><a name="p294173071617"></a><a name="p294173071617"></a><strong id="b1294103061611"><a name="b1294103061611"></a><a name="b1294103061611"></a>返回值</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50.06%" headers="mcps1.2.3.1.2 "><p id="p39421830111616"><a name="p39421830111616"></a><a name="p39421830111616"></a><strong id="b179429301164"><a name="b179429301164"></a><a name="b179429301164"></a>返回值描述</strong></p>
......@@ -563,7 +556,7 @@ int32\_t SdioWriteBytesToFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t add
int32_t ret;
uint8_t wbuff = 1;
/* 向SDIO function 0地址0x2中写入1字节的数据 */
ret = SdioWriteBytesToFunc0(handle, &wbuff, 0x2, 1, 0);
ret = SdioWriteBytesToFunc0(handle, &wbuff, 0x2, 1);
if (ret != 0) {
HDF_LOGE("SdioWriteBytesToFunc0: failed, ret %d\n", ret);
}
......@@ -573,7 +566,7 @@ if (ret != 0) {
当前只支持读取一个字节的数据,对应的接口函数如下所示:
int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size, uint32\_t timeOut\);
int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t addr, uint32\_t size\);
**表 10** SdioReadBytesFromFunc0函数的参数和返回值描述
......@@ -604,11 +597,6 @@ int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t ad
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p612921851820"><a name="p612921851820"></a><a name="p612921851820"></a>待读取数据的长度</p>
</td>
</tr>
<tr id="row147201613181"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p3130161831815"><a name="p3130161831815"></a><a name="p3130161831815"></a>timeOut</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1513031831816"><a name="p1513031831816"></a><a name="p1513031831816"></a>读取数据的最大时间限制,单位毫秒。如果该字段为0,则使用平台对应的默认值。</p>
</td>
</tr>
<tr id="row167202113189"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1813001881810"><a name="p1813001881810"></a><a name="p1813001881810"></a><strong id="b1130151841813"><a name="b1130151841813"></a><a name="b1130151841813"></a>返回值</strong></p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1313081817184"><a name="p1313081817184"></a><a name="p1313081817184"></a><strong id="b19130141818183"><a name="b19130141818183"></a><a name="b19130141818183"></a>返回值描述</strong></p>
......@@ -633,7 +621,7 @@ int32\_t SdioReadBytesFromFunc0\(DevHandle handle, uint8\_t \*data, uint32\_t ad
int32_t ret;
uint8_t rbuff;
/* 从SDIO function 0设备地址0x2中读取1字节的数据 */
ret = SdioReadBytesFromFunc0(handle, &rbuff, 0x2, 1, 0);
ret = SdioReadBytesFromFunc0(handle, &rbuff, 0x2, 1);
if (ret != 0) {
HDF_LOGE("SdioReadBytesFromFunc0: failed, ret %d\n", ret);
}
......
......@@ -13,7 +13,7 @@
## 使用流程<a name="section47784125013"></a>
使用UART的一般流程如下图所示。
使用UART的一般流程如[图1](#p58686354483)所示。
**图 1** UART使用流程图<a name="fig1852173020185"></a>
......
......@@ -71,7 +71,7 @@ HDF框架以组件化的驱动模型作为核心设计思路,为开发者提
- 驱动代码的编译必须要使用HDF框架提供的Makefile模板进行编译。
```
include $(LITEOSTOPDIR)/../../drivers/adapter/khdf/liteos/lite.mk #导入hdf预定义内容,必需
include $(LITEOSTOPDIR)/../../drivers/adapter/lite/khdf/lite.mk #导入hdf预定义内容,必需
MODULE_NAME := #生成的结果文件
LOCAL_INCLUDE := #本驱动的头文件目录
LOCAL_SRCS := #本驱动的源代码文件
......
......@@ -79,7 +79,7 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
<p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>编译工具链</p>
<p id="p108951116109"><a name="p108951116109"></a><a name="p108951116109"></a></p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p5445144091417"><a name="p5445144091417"></a><a name="p5445144091417"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p49091358184"><a name="p49091358184"></a><a name="p49091358184"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz</a></p>
</td>
</tr>
<tr id="row78941113109"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1974322421510"><a name="p1974322421510"></a><a name="p1974322421510"></a>针对OpenHarmony_1.0.1_release分支使用以下链接下载:</p>
......
......@@ -43,9 +43,9 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p547205817316"><a name="zh-cn_topic_0000001058091994_p547205817316"></a><a name="zh-cn_topic_0000001058091994_p547205817316"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>3.7.4-3.8.x 64位版本</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>V3.7.4~V3.8.x 64位版本</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p1599022403"><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p1599022403"><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a name="zh-cn_topic_0000001058091994_p1599022403"></a>推荐下载:<a href="https://www.python.org/downloads/release/python-388/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/release/python-388/</a></p>
</td>
</tr>
<tr id="zh-cn_topic_0000001058091994_row117316576562"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001058091994_p16405151165717"><a name="zh-cn_topic_0000001058091994_p16405151165717"></a><a name="zh-cn_topic_0000001058091994_p16405151165717"></a>Node.js</p>
......@@ -93,9 +93,9 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
## 安装Python<a name="zh-cn_topic_0000001058091994_section16266553175320"></a>
1. 双击Python安装包进行安装,勾选“**Add Python xx to PATH**”,然后点击**Install Now**开始安装。
1. 双击Python安装包进行安装,勾选“**Add Python 3.8 to PATH**”,然后点击**Install Now**开始安装。
![](figures/zh-cn_image_0000001096154076.png)
![](figures/zh-cn_image_0000001168817327.png)
2. 等待安装完成后,点击**Close**
......@@ -103,7 +103,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
3. 打开命令行工具,输入python --version,检查安装结果。
![](figures/zh-cn_image_0000001143154485.png)
![](figures/zh-cn_image_0000001122419072.png)
4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。
......
......@@ -43,9 +43,9 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p547205817316"><a name="zh-cn_topic_0000001058091994_p547205817316"></a><a name="zh-cn_topic_0000001058091994_p547205817316"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>3.7.4-3.8.x 64位版本</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>V3.7.4~V3.8.x 64位版本</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p1599022403"><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p1599022403"><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a name="zh-cn_topic_0000001058091994_p1599022403"></a>推荐下载:<a href="https://www.python.org/downloads/release/python-388/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/release/python-388/</a></p>
</td>
</tr>
<tr id="zh-cn_topic_0000001058091994_row117316576562"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001058091994_p16405151165717"><a name="zh-cn_topic_0000001058091994_p16405151165717"></a><a name="zh-cn_topic_0000001058091994_p16405151165717"></a>Node.js</p>
......@@ -93,9 +93,9 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
## 安装Python<a name="zh-cn_topic_0000001058091994_section16266553175320"></a>
1. 双击Python安装包进行安装,勾选“**Add Python xx to PATH**”,然后点击**Install Now**开始安装。
1. 双击Python安装包进行安装,勾选“**Add Python 3.8 to PATH**”,然后点击**Install Now**开始安装。
![](figures/zh-cn_image_0000001096154076.png)
![](figures/zh-cn_image_0000001168817327.png)
2. 等待安装完成后,点击**Close**
......@@ -103,7 +103,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
3. 打开命令行工具,输入python --version,检查安装结果。
![](figures/zh-cn_image_0000001143154485.png)
![](figures/zh-cn_image_0000001122419072.png)
4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。
......
......@@ -358,7 +358,7 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
相关步骤在Windows工作台操作。
1. 点击链接[下载CH341SER USB转串口](http://www.wch.cn/search?q=ch340g&t=downloads)驱动程序。
1. 点击链接[下载CH341SER USB转串口](http://www.hihope.org/download/download.aspx?mtt=8)驱动程序。
2. 点击安装包,安装驱动程序。
3. 驱动安装完成后,重新插拔USB接口,串口信息显示如下图所示。
......
# OpenHarmony开发者文档<a name="ZH-CN_TOPIC_0000001054183022"></a>
# OpenHarmony开发者文档<a name="ZH-CN_TOPIC_0000001122921792"></a>
此工程存放OpenHarmony提供的快速入门、开发指南、API参考等开发者文档,欢迎参与OpenHarmony开发者文档开源项目,与我们一起完善开发者文档。
## 设备开发-文档目录结构<a name="section135134412620"></a>
- overview:[导读](device-dev/quick-start/导读.md)
- quick-start:[快速入门](device-dev/quick-start/Readme-CN.md)
- get-code:[获取源码/获取工具](device-dev/get-code/Readme-CN.md)
- docker:[标准系统Docker镜像构建](../docker/standard/Readme.md)[轻量和小型系统Docker镜像构建](../docker/README.md)
- kernel:[内核](device-dev/kernel/Readme-CN.md)
- driver:[驱动](device-dev/driver/Readme-CN.md)
- subsystems:[子系统](device-dev/subsystems/Readme-CN.md)
- [编译构建](device-dev/subsystems/编译构建.md)
- [分布式远程启动](device-dev/subsystems/分布式远程启动.md)
- [图形图像](device-dev/subsystems/图形图像.md)
- [媒体](device-dev/subsystems/媒体.md)
- [公共基础](device-dev/subsystems/公共基础.md)
- [AI框架](device-dev/subsystems/AI框架.md)
- [Sensor服务](device-dev/subsystems/Sensor服务.md)
- [用户程序框架](device-dev/subsystems/用户程序框架.md)
- [OTA升级](device-dev/subsystems/OTA升级.md)
- [安全](device-dev/subsystems/安全.md)
- [启动恢复](device-dev/subsystems/启动恢复.md)
- [测试](device-dev/subsystems/测试.md)
- [DFX](device-dev/subsystems/DFX.md)
- [研发工具链](device-dev/subsystems/研发工具链.md)
- [XTS认证](device-dev/subsystems/XTS认证子系统开发指南.md)
- bundles:[组件开发](device-dev/bundles/Readme-CN.md)
- porting:[三方库移植/三方芯片移植](device-dev/porting/Readme-CN.md)
- guide:[开发示例](device-dev/guide/Readme-CN.md)
- [WLAN连接类产品](device-dev/guide/WLAN连接类产品.md)
- [无屏摄像头类产品](device-dev/guide/无屏摄像头类产品.md)
- [带屏摄像头类产品](device-dev/guide/带屏摄像头类产品.md)
- [时钟应用开发示例](device-dev/guide/时钟应用开发示例.md)
- [平台驱动开发示例](device-dev/guide/平台驱动开发示例.md)
- [外设驱动开发示例](device-dev/guide/外设驱动开发示例.md)
- security:[隐私与安全](device-dev/security/Readme-CN.md)
- glossary:[术语](device-dev/glossary/术语.md)
## 应用开发-文档目录结构
- quick-start:[入门](application-dev/quick-start/Readme-CN.md)
- ui:[UI](application-dev/ui/Readme-CN.md)
- media:[媒体](application-dev/media/Readme-CN.md)
- connectivity:[网络与连接](application-dev/connectivity/Readme-CN.md)
- js-reference:[JS参考规范](application-dev/js-reference/Readme-CN.md)
## 版本更新
参考[Release Notes](release-notes/OpenHarmony-Release-Notes.md)
## 第三方开源软件及许可说明
## 文档目录结构<a name="section5508141817255"></a>
- [Openharmony概述](OpenHarmony-Overview_zh.md)
- 轻量和小型系统开发指导(参考内存<128MB)
- 设备开发
- overview:[设备开发导读](device-dev/quick-start/导读.md)
- quick-start:[快速入门](device-dev/quick-start/Readme-CN.md)(搭建环境、获取源码、编译、烧录等)
- 开发基础能力
- Kernel:[轻内核](device-dev/kernel/轻内核.md)
- Drivers:[驱动](device-dev/driver/Readme-CN.md)
- Subsystems:[子系统](device-dev/subsystems/Readme-CN.md)(编译构建、图形图像、DFX、XTS等子系统)
- Security:[隐私与安全](device-dev/security/Readme-CN.md)
- guide:[开发示例](device-dev/guide/Readme-CN.md)
- [WLAN连接类产品](device-dev/guide/WLAN连接类产品.md)(LED外设控制、集成三方SDK)
- [无屏摄像头类产品](device-dev/guide/无屏摄像头类产品.md)(摄像头控制)
- [带屏摄像头类产品](device-dev/guide/带屏摄像头类产品.md)(屏幕和摄像头控制、视觉应用开发)
- porting:[移植适配](device-dev/porting/Readme-CN.md)
- [三方芯片移植指导](device-dev/porting/三方芯片移植指导.md)
- [三方库移植指导](device-dev/porting/三方库移植指导.md)
- bundles:[组件开发](device-dev/bundles/Readme-CN.md)
- [组件开发规范](device-dev/bundles/组件开发规范.md)
- [组件开发指南](device-dev/bundles/组件开发指南.md)
- [组件开发示例](device-dev/bundles/组件开发示例.md)
- 标准系统开发指导(参考内存≥128MB)
- 设备开发
- overview:[设备开发导读](device-dev/quick-start/导读.md)
- quick-start:[快速入门](device-dev/quick-start/Readme-CN.md)(搭建环境、获取源码、编译、烧录等)
- 开发基础能力
- Kernel:[Linux内核](device-dev/kernel/Linux内核.md)
- Drivers:[驱动](device-dev/driver/Readme-CN.md)
- Subsystems:[子系统](device-dev/subsystems/Readme-CN.md)(编译构建、图形图像、DFX、XTS等子系统)
- Security:[隐私与安全](device-dev/security/Readme-CN.md)
- guide:[开发示例](device-dev/guide/Readme-CN.md)
- [时钟应用](device-dev/guide/时钟应用开发示例.md)
- [平台驱动](device-dev/guide/平台驱动开发示例.md)
- [外设驱动](device-dev/guide/外设驱动开发示例.md)
- porting:[移植适配](device-dev/porting/Readme-CN.md)
- [三方芯片移植指导](device-dev/porting/三方芯片移植指导.md)
- [三方库移植指导](device-dev/porting/三方库移植指导.md)
- bundles:[组件开发](device-dev/bundles/Readme-CN.md)
- [组件开发规范](device-dev/bundles/组件开发规范.md)
- [组件开发指南](device-dev/bundles/组件开发指南.md)
- [组件开发示例](device-dev/bundles/组件开发示例.md)
- 应用开发
- overview:[应用开发导读](application-dev/application-dev-guide.md)
- quick-start:[入门](application-dev/quick-start/Readme-CN.md)
- ui:[UI](application-dev/ui/Readme-CN.md)
- media:[媒体](application-dev/media/Readme-CN.md)
- connectivity:[网络与连接](application-dev/connectivity/Readme-CN.md)
- js-reference:[JS参考规范](application-dev/js-reference/Readme-CN.md)
- glossary:[术语](device-dev/glossary/术语.md)
## 版本更新<a name="section8910101119262"></a>
参考[Release Notes](release-notes/OpenHarmony-Release-Notes.md)
## 第三方开源软件及许可说明<a name="section0300839202619"></a>
3rd-Party-License:[第三方开源软件及许可证说明](contribute/第三方开源软件及许可证说明.md)
## 贡献<a name="section897211181655"></a>
## 贡献<a name="section7772211142710"></a>
非常欢迎您参与[贡献](contribute/参与贡献.md),我们鼓励开发者以各种方式参与文档反馈和贡献。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册