mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Add an optional byte-oriented write method to the MTD interface
This commit is contained in:
@@ -3192,12 +3192,21 @@ extern void up_ledoff(int led);
|
|||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
Some devices may support byte oriented reads (optional).
|
Some devices may support byte oriented reads (optional).
|
||||||
Most MTD devices are inherently block oriented so byte-oriented writing is not supported.
|
Most MTD devices are inherently block oriented so byte-oriented accesses are not supported.
|
||||||
It is recommended that low-level drivers not support read() if it requires buffering.
|
It is recommended that low-level drivers not support read() if it requires buffering.
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<p><code>ssize_t (*read)(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, FAR uint8_t *buffer);</code></p>
|
<p><code>ssize_t (*read)(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, FAR uint8_t *buffer);</code></p>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>
|
||||||
|
Some devices may also support byte oriented writes (optional).
|
||||||
|
Most MTD devices are inherently block oriented so byte-oriented accesses are not supported.
|
||||||
|
It is recommended that low-level drivers not support read() if it requires buffering.
|
||||||
|
This interface is only available if <code>CONFIG_MTD_BYTE_WRITE</code> is defined.
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<p><code>ssize_t (*write)(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, FAR const uint8_t *buffer);</code></p>
|
||||||
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
Support other, less frequently used commands:
|
Support other, less frequently used commands:
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user