Skip to content

Commit

Permalink
ci auto translate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luatos_bot committed Jul 8, 2024
1 parent 6d2b8bb commit 37df354
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 91 deletions.
2 changes: 1 addition & 1 deletion docs/_static/luatos-emulator/vs/snippet.json

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions docs/api/fatfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,41 @@ <h2>fatfs.mount(mode,mount_point, spiid_or_spidevice, spi_cs, spi_speed, power_p
</div>
</section>
<hr class="docutils"/>
<section id="fatfs-unmount-mount-point">
<h2>fatfs.unmount(mount_point)<a class="headerlink" href="#fatfs-unmount-mount-point" title="Permalink to this headline">#</a></h2>
<p>Unmount fatfs</p>
<p><strong>Parameters</strong></p>
<div class="table-wrapper"><table class="colwidths-auto docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Incoming Value Type</p></th>
<th class="head"><p>Explanation</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>string</p></td>
<td><p>The mount point of the virtual file system. The default value is fatfs and must be consistent with fatfs.mount.</p></td>
</tr>
</tbody>
</table></div>
<p><strong>Return Value</strong></p>
<div class="table-wrapper"><table class="colwidths-auto docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>return value type</p></th>
<th class="head"><p>explanation</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>int</p></td>
<td><p>Return 0 on success, otherwise return failure code</p></td>
</tr>
</tbody>
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">fatfs</span><span class="p">.</span><span class="n">mount</span><span class="p">(</span><span class="s2">"SD"</span><span class="p">)</span>
</pre></div>
</div>
</section>
<hr class="docutils"/>
<section id="fatfs-getfree-mount-point">
<h2>fatfs.getfree(mount_point)<a class="headerlink" href="#fatfs-getfree-mount-point" title="Permalink to this headline">#</a></h2>
<p>Get free space information</p>
Expand Down Expand Up @@ -988,6 +1023,7 @@ <h2>fatfs.debug(value)<a class="headerlink" href="#fatfs-debug-value" title="Per
<ul>
<li><a class="reference internal" href="#">fatfs - read/write fatfs format</a><ul>
<li><a class="reference internal" href="#fatfs-mount-mode-mount-point-spiid-or-spidevice-spi-cs-spi-speed-power-pin-power-on-delay-auto-format">fatfs.mount(mode,mount_point, spiid_or_spidevice, spi_cs, spi_speed, power_pin, power_on_delay, auto_format)</a></li>
<li><a class="reference internal" href="#fatfs-unmount-mount-point">fatfs.unmount(mount_point)</a></li>
<li><a class="reference internal" href="#fatfs-getfree-mount-point">fatfs.getfree(mount_point)</a></li>
<li><a class="reference internal" href="#fatfs-debug-value">fatfs.debug(value)</a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ <h1>🍴 LuatOS-SOC Interface Documentation<a class="headerlink" href="#luatos-s
</li>
<li class="toctree-l1"><a class="reference internal" href="fatfs.html">fatfs - read/write fatfs format</a><ul>
<li class="toctree-l2"><a class="reference internal" href="fatfs.html#fatfs-mount-mode-mount-point-spiid-or-spidevice-spi-cs-spi-speed-power-pin-power-on-delay-auto-format">fatfs.mount(mode,mount_point, spiid_or_spidevice, spi_cs, spi_speed, power_pin, power_on_delay, auto_format)</a></li>
<li class="toctree-l2"><a class="reference internal" href="fatfs.html#fatfs-unmount-mount-point">fatfs.unmount(mount_point)</a></li>
<li class="toctree-l2"><a class="reference internal" href="fatfs.html#fatfs-getfree-mount-point">fatfs.getfree(mount_point)</a></li>
<li class="toctree-l2"><a class="reference internal" href="fatfs.html#fatfs-debug-value">fatfs.debug(value)</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion translated-docs/_static/luatos-emulator/vs/snippet.json

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions translated-docs/api/fatfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,33 @@ mount fatfs

---

## fatfs.unmount(mount_point)



Unmount fatfs

**Parameters**

|Incoming Value Type | Explanation|
|-|-|
|string|The mount point of the virtual file system. The default value is fatfs and must be consistent with fatfs.mount.|

**Return Value**

|return value type | explanation|
|-|-|
|int|Return 0 on success, otherwise return failure code|

**Examples**

```lua
fatfs.mount("SD")

```

---

## fatfs.getfree(mount_point)


Expand Down
182 changes: 94 additions & 88 deletions translation-data/api/fatfs.txt
Original file line number Diff line number Diff line change
@@ -1,88 +1,94 @@
包含的内容有
Included content is
本库有专属demo,[点此链接查看fatfs的demo例子
This library has its own demo,[click this link to view the demo example of fatfs
本页文档由[这个文件](https://gitee.com/openLuat/LuatOS/tree/master/luat/../components/fatfs/luat_lib_fatfs.c)自动生成。如有错误,请提交issue或帮忙修改后pr,谢谢
This page document is automatically generated by [this file](https://gitee.com/openLuat/LuatOS/tree/master/luat/../components/fatfs/luat_lib_fatfs.c). If there is any error, please submit issue or help modify pr, thank you
不使用默认CS脚
Don't use default CS pins
参数
Parameters
成功返回true, 否则返回nil或者
Returns true on success, otherwise it returns nil or
初始化时使用较低的频率
Use lower frequency when initializing
传入值类型|解释
Incoming Value Type | Explanation
传入spi device指针,或者spi的id,或者sdio的
The spi device pointer, or spi id, or sdio
串口
Serial port
导致失败的底层返回值
The underlying return value that caused the failure
读写fatfs格式
read/write fatfs format
返回值
Return Value
返回值类型|解释
return value type | explanation
方法1, 使用SPI模式
Method 1, using SPI mode
挂载
mount
挂载点, 需要跟fatfs.mount传入的值一致
The mount point must be the same as the value passed in by fatfs.mount.
挂载失败是否尝试格式化,默认是true,即自动格式化. 本参数在2023.8.16添加
Whether to try formatting when mounting failure, the default is true, that is, automatic formatting. This parameter is added on 2023.8.16
获取可用空间信息
Get free space information
卡电源复位过程时间,单位ms,默认值是
Card power reset process time, unit ms, default value is
卡电源控制脚,TF卡初始前先拉低复位再拉高,如果没有,或者是内置电源控制方式,这个参数就不需要传
Card power control pin, TF card before the initial pull down reset and then pull up, if not, or built-in power control mode, this parameter does not need to be transmitted
空闲扇区数量
Number of Free Sectors
空闲字节数, 单位
Free bytes, unit
例子
Examples
模式,可选
mode, optional
片选脚的GPIO 号, spi模式有效,若前一个参数传的是spi device,这个参数就不需要传
The GPIO number of the selected pin of the chip, spi mode is valid, if the previous parameter is passed spi device, this parameter does not need to be passed
若成功会返回table,否则返回
Returns table if successful, otherwise
若挂载失败,可以尝试打开调试信息,查找原因
If the mount fails, you can try to open the debugging information to find the reason.
设置调试模式
Set Debug Mode
失败的原因
Reasons for failure
示例
Example
是否进入调试模式,true代表进入调试模式,增加调试日志
Whether to enter the debug mode. True means to enter the debug mode and add debug logs.
数据宽度
Data Width
提醒, 若TF/SD模块带电平转换, 通常不支持10M以上的波特率
Reminder, if TF/SD module with level conversion, usually does not support baud rate above 10M
通常只使用fatfs.mount挂载tf/sd卡,其他操作走io库就可以了
Usually, only fatfs.mount is used to mount the tf/sd card, and the io library is enough for other operations.
往下的操作, 使用 io.open("/sd/xxx", "w+") 等io库的API就可以了
For the next operation, use io.open("/sd/xxx", "w") and other io library API
None
无返回值
No return value
虚拟文件系统的挂载点, 默认是
The mount point of the virtual file system. The default value is
已适配
Adapted
注意,当前扇区大小固定在512字节
Note that the current sector size is fixed at 512 bytes
总扇区数量
Total number of sectors
总字节数,单位
Total bytes, unit
最高速度,默认10M, 若前2个参数传的是spi device,这个参数就不需要传
The highest speed is 10M by default. If the first two parameters are spi device, this parameter does not need to be transmitted.
不使用默认CS脚
Don't use default CS pins
串口
Serial port
传入spi device指针,或者spi的id,或者sdio的
The spi device pointer, or spi id, or sdio
传入值类型|解释
Incoming Value Type | Explanation
例子
Examples
最高速度,默认10M, 若前2个参数传的是spi device,这个参数就不需要传
The highest speed is 10M by default. If the first two parameters are spi device, this parameter does not need to be transmitted.
初始化时使用较低的频率
Use lower frequency when initializing
包含的内容有
Included content is
卡电源复位过程时间,单位ms,默认值是
Card power reset process time, unit ms, default value is
卡电源控制脚,TF卡初始前先拉低复位再拉高,如果没有,或者是内置电源控制方式,这个参数就不需要传
Card power control pin, TF card before the initial pull down reset and then pull up, if not, or built-in power control mode, this parameter does not need to be transmitted
参数
Parameters
取消挂载
Unmount
失败的原因
Reasons for failure
导致失败的底层返回值
The underlying return value that caused the failure
已适配
Adapted
往下的操作, 使用 io.open("/sd/xxx", "w+") 等io库的API就可以了
For the next operation, use io.open("/sd/xxx", "w") and other io library API
总字节数,单位
Total bytes, unit
总扇区数量
Total number of sectors
成功返回0, 否则返回失败码
Return 0 on success, otherwise return failure code
成功返回true, 否则返回nil或者
Returns true on success, otherwise it returns nil or
挂载
mount
挂载失败是否尝试格式化,默认是true,即自动格式化. 本参数在2023.8.16添加
Whether to try formatting when mounting failure, the default is true, that is, automatic formatting. This parameter is added on 2023.8.16
挂载点, 需要跟fatfs.mount传入的值一致
The mount point must be the same as the value passed in by fatfs.mount.
提醒, 若TF/SD模块带电平转换, 通常不支持10M以上的波特率
Reminder, if TF/SD module with level conversion, usually does not support baud rate above 10M
数据宽度
Data Width
方法1, 使用SPI模式
Method 1, using SPI mode
None
无返回值
No return value
是否进入调试模式,true代表进入调试模式,增加调试日志
Whether to enter the debug mode. True means to enter the debug mode and add debug logs.
本库有专属demo,[点此链接查看fatfs的demo例子
This library has its own demo,[click this link to view the demo example of fatfs
本页文档由[这个文件](https://gitee.com/openLuat/LuatOS/tree/master/luat/../components/fatfs/luat_lib_fatfs.c)自动生成。如有错误,请提交issue或帮忙修改后pr,谢谢
This page document is automatically generated by [this file](https://gitee.com/openLuat/LuatOS/tree/master/luat/../components/fatfs/luat_lib_fatfs.c). If there is any error, please submit issue or help modify pr, thank you
模式,可选
mode, optional
注意,当前扇区大小固定在512字节
Note that the current sector size is fixed at 512 bytes
片选脚的GPIO 号, spi模式有效,若前一个参数传的是spi device,这个参数就不需要传
The GPIO number of the selected pin of the chip, spi mode is valid, if the previous parameter is passed spi device, this parameter does not need to be passed
示例
Example
空闲字节数, 单位
Free bytes, unit
空闲扇区数量
Number of Free Sectors
若成功会返回table,否则返回
Returns table if successful, otherwise
若挂载失败,可以尝试打开调试信息,查找原因
If the mount fails, you can try to open the debugging information to find the reason.
获取可用空间信息
Get free space information
虚拟文件系统的挂载点, 默认是
The mount point of the virtual file system. The default value is
虚拟文件系统的挂载点, 默认是 fatfs,必须与fatfs.mount一致
The mount point of the virtual file system. The default value is fatfs and must be consistent with fatfs.mount.
设置调试模式
Set Debug Mode
读写fatfs格式
read/write fatfs format
返回值
Return Value
返回值类型|解释
return value type | explanation
通常只使用fatfs.mount挂载tf/sd卡,其他操作走io库就可以了
Usually, only fatfs.mount is used to mount the tf/sd card, and the io library is enough for other operations.

0 comments on commit 37df354

Please sign in to comment.