Quellcode durchsuchen

Deploying to gh-pages from @ cherry-embedded/CherryUSB@55ef0f63096e9937738154de4cbcd310fcbabf29 🚀

sakumisu vor 3 Wochen
Ursprung
Commit
80b199e866
3 geänderte Dateien mit 21 neuen und 4 gelöschten Zeilen
  1. 7 2
      _sources/api/api_host.rst.txt
  2. 14 2
      api/api_host.html
  3. 0 0
      searchindex.js

+ 7 - 2
_sources/api/api_host.rst.txt

@@ -206,10 +206,10 @@ usbh_serial_write
 
 - **serial**  serial 结构体句柄
 - **buffer**  数据缓冲区指针
-- **buflen**  要写入的数据长度,如果是 USB2TTL 设备,一次最高 wMaxPacketSize
+- **buflen**  要写入的数据长度
 - **return**  实际写入的数据长度或者错误码
 
-.. note:: 有无设置波特率都可以使用该 API,当未设置波特率时,长度无限制,如果设置了波特率则为 wMaxPacketSize
+.. note:: 如果没有开启 CONFIG_USB_DCACHE_ENABLE,则 buffer 需要是 nocache区域,否则需要是对齐到 CONFIG_USB_ALIGN_SIZE 的区域
 
 usbh_serial_read
 """"""""""""""""""""""""""""""""""""
@@ -225,6 +225,8 @@ usbh_serial_read
 - **buflen**  要读取的最大数据长度
 - **return**  实际读取的数据长度或者错误码
 
+.. note::  由于内部使用了 ringbuffer,对于用户的 buffer 属性没有限制。
+
 usbh_serial_cdc_write_async
 """"""""""""""""""""""""""""""""""""
 
@@ -241,6 +243,8 @@ usbh_serial_cdc_write_async
 - **arg**  回调函数参数
 - **return**  0 表示正常其他表示错误
 
+.. note:: 如果没有开启 CONFIG_USB_DCACHE_ENABLE,则 buffer 需要是 nocache区域,否则需要是对齐到 CONFIG_USB_ALIGN_SIZE 的区域。
+
 usbh_serial_cdc_read_async
 """"""""""""""""""""""""""""""""""""
 
@@ -257,6 +261,7 @@ usbh_serial_cdc_read_async
 - **arg**  回调函数参数
 - **return**  0 表示正常其他表示错误
 
+.. note:: 如果没有开启 CONFIG_USB_DCACHE_ENABLE,则 buffer 需要是 nocache区域,否则需要是对齐到 CONFIG_USB_ALIGN_SIZE 的区域。
 
 HID
 -----------------

+ 14 - 2
api/api_host.html

@@ -382,12 +382,12 @@
 <ul class="simple">
 <li><p><strong>serial</strong>  serial 结构体句柄</p></li>
 <li><p><strong>buffer</strong>  数据缓冲区指针</p></li>
-<li><p><strong>buflen</strong>  要写入的数据长度,如果是 USB2TTL 设备,一次最高 wMaxPacketSize</p></li>
+<li><p><strong>buflen</strong>  要写入的数据长度</p></li>
 <li><p><strong>return</strong>  实际写入的数据长度或者错误码</p></li>
 </ul>
 <div class="admonition note">
 <p class="admonition-title">Note</p>
-<p>有无设置波特率都可以使用该 API,当未设置波特率时,长度无限制,如果设置了波特率则为 wMaxPacketSize。</p>
+<p>如果没有开启 CONFIG_USB_DCACHE_ENABLE,则 buffer 需要是 nocache区域,否则需要是对齐到 CONFIG_USB_ALIGN_SIZE 的区域。</p>
 </div>
 </section>
 <section id="usbh-serial-read">
@@ -402,6 +402,10 @@
 <li><p><strong>buflen</strong>  要读取的最大数据长度</p></li>
 <li><p><strong>return</strong>  实际读取的数据长度或者错误码</p></li>
 </ul>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>由于内部使用了 ringbuffer,对于用户的 buffer 属性没有限制。</p>
+</div>
 </section>
 <section id="usbh-serial-cdc-write-async">
 <h3>usbh_serial_cdc_write_async<a class="headerlink" href="#usbh-serial-cdc-write-async" title="Link to this heading"></a></h3>
@@ -417,6 +421,10 @@
 <li><p><strong>arg</strong>  回调函数参数</p></li>
 <li><p><strong>return</strong>  0 表示正常其他表示错误</p></li>
 </ul>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>如果没有开启 CONFIG_USB_DCACHE_ENABLE,则 buffer 需要是 nocache区域,否则需要是对齐到 CONFIG_USB_ALIGN_SIZE 的区域。</p>
+</div>
 </section>
 <section id="usbh-serial-cdc-read-async">
 <h3>usbh_serial_cdc_read_async<a class="headerlink" href="#usbh-serial-cdc-read-async" title="Link to this heading"></a></h3>
@@ -432,6 +440,10 @@
 <li><p><strong>arg</strong>  回调函数参数</p></li>
 <li><p><strong>return</strong>  0 表示正常其他表示错误</p></li>
 </ul>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>如果没有开启 CONFIG_USB_DCACHE_ENABLE,则 buffer 需要是 nocache区域,否则需要是对齐到 CONFIG_USB_ALIGN_SIZE 的区域。</p>
+</div>
 </section>
 </section>
 <section id="hid">

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
searchindex.js


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.