@@ -95,32 +95,32 @@ The following uses **spi_hi35xx.c** as an example to present the information req
...
@@ -95,32 +95,32 @@ The following uses **spi_hi35xx.c** as an example to present the information req
```
```
root {
root {
device_info {
device_info {
match_attr = "hdf_manager";
match_attr = "hdf_manager";
platform :: host {
platform :: host {
hostName = "platform_host";
hostName = "platform_host";
priority = 50;
priority = 50;
device_spi :: device { // Configure an HDF device node for each SPI controller.
device_spi :: device { // Configure an HDF device node for each SPI controller.
device0 :: deviceNode {
device0 :: deviceNode {
policy = 1;
policy = 1;
priority = 60;
priority = 60;
permission = 0644;
permission = 0644;
moduleName = "HDF_PLATFORM_SPI";
moduleName = "HDF_PLATFORM_SPI";
serviceName = "HDF_PLATFORM_SPI_0";
serviceName = "HDF_PLATFORM_SPI_0";
deviceMatchAttr = "hisilicon_hi35xx_spi_0";
deviceMatchAttr = "hisilicon_hi35xx_spi_0";
}
}
device1 :: deviceNode {
device1 :: deviceNode {
policy = 1;
policy = 1;
priority = 60;
priority = 60;
permission = 0644;
permission = 0644;
moduleName = "HDF_PLATFORM_SPI"; // (Mandatory) Driver name, which must be the same as that of moduleName in the driver entry structure.
moduleName = "HDF_PLATFORM_SPI"; // (Mandatory) Driver name, which must be the same as that of moduleName in the driver entry structure.
serviceName = "HDF_PLATFORM_SPI_1"; // (Mandatory) Unique name of the service published by the driver.
serviceName = "HDF_PLATFORM_SPI_1"; // (Mandatory) Unique name of the service published by the driver.
deviceMatchAttr = "hisilicon_hi35xx_spi_1";// The value must be the same as that of match_attr in the .hcs file.
deviceMatchAttr = "hisilicon_hi35xx_spi_1"; // The value must be the same as that of match_attr in the .hcs file.
}
}
...
...
}
}
}
}
}
}
}
}
```
```
...
@@ -129,9 +129,9 @@ The following uses **spi_hi35xx.c** as an example to present the information req
...
@@ -129,9 +129,9 @@ The following uses **spi_hi35xx.c** as an example to present the information req
```
```
root {
root {
platform {
platform {
spi_config { // Configure private data for each SPI controller.
spi_config { // Configure private data for each SPI controller.
template spi_controller { // Template configuration. In the template, you can configure the common parameters shared by device nodes.
template spi_controller { // Template configuration. In the template, you can configure the common parameters shared by device nodes.
serviceName = "";
serviceName = "";
match_attr = "";
match_attr = "";
transferMode = 0; // Data transfer mode. The value **0** indicates interrupt transfer, **1** indicates flow control transfer, and **2** indicates DMA transfer.
transferMode = 0; // Data transfer mode. The value **0** indicates interrupt transfer, **1** indicates flow control transfer, and **2** indicates DMA transfer.
...
@@ -152,25 +152,25 @@ The following uses **spi_hi35xx.c** as an example to present the information req
...
@@ -152,25 +152,25 @@ The following uses **spi_hi35xx.c** as an example to present the information req