1.新增设备命令说明。
This commit is contained in:
13
README.md
13
README.md
@@ -73,13 +73,8 @@
|
||||
示例:
|
||||
|
||||
```c
|
||||
struct mr_spi_dev spi_dev;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* 注册SPI10设备(CS低电平有效)到SPI1总线上 */
|
||||
mr_spi_dev_register(&spi_dev, "spi1/spi10", 0, MR_SPI_CS_ACTIVE_LOW);
|
||||
|
||||
/* 打开SPI1总线下的SPI10设备 */
|
||||
int ds = mr_dev_open("spi1/spi10", MR_OFLAG_RDWR);
|
||||
|
||||
@@ -96,6 +91,12 @@ int main(void)
|
||||
}
|
||||
```
|
||||
|
||||
得益于标准化设备接口,所有设备自动支持 `msh` 设备命令,通过命令行可完成所有设备操作。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
----------
|
||||
|
||||
# 配置工具
|
||||
@@ -124,8 +125,8 @@ int main(void)
|
||||
| include | 库头文件 |
|
||||
| source | 库源文件 |
|
||||
| Kconfig | 配置文件 |
|
||||
| kconfig.py | 自动配置脚本 |
|
||||
| LICENSE | 许可证 |
|
||||
| kconfig.py | 自动配置脚本 |
|
||||
| tool.py | 自动构建脚本 |
|
||||
|
||||
----------
|
||||
|
||||
14
README_EN.md
14
README_EN.md
@@ -80,13 +80,8 @@ All operations of the device can be implemented through the following interfaces
|
||||
Example:
|
||||
|
||||
```c
|
||||
struct mr_spi_dev spi_dev;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* Register SPI10 device (CS low active) to SPI1 bus */
|
||||
mr_spi_dev_register(&spi_dev, "spi1/spi10", 0, MR_SPI_CS_ACTIVE_LOW);
|
||||
|
||||
/* Open SPI10 device under SPI1 bus line */
|
||||
int ds = mr_dev_open("spi1/spi10", MR_OFLAG_RDWR);
|
||||
|
||||
@@ -103,6 +98,13 @@ int main(void)
|
||||
}
|
||||
```
|
||||
|
||||
Thanks to the standardized device interface, all devices automatically support the `msh` device command,
|
||||
and all device operations can be completed through the command line.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
----------
|
||||
|
||||
# Configuration tool
|
||||
@@ -134,8 +136,8 @@ the `Python` script automatically generates the configuration file.
|
||||
| include | Library header file |
|
||||
| source | Library source file |
|
||||
| Kconfig | Configuration files |
|
||||
| kconfig.py | Automatic configuration script |
|
||||
| LICENSE | Open-source license |
|
||||
| kconfig.py | Automatic configuration script |
|
||||
| tool.py | Automatic build script |
|
||||
|
||||
----------
|
||||
|
||||
Reference in New Issue
Block a user