Skip to content

Commit ba1fdcd

Browse files
tmon-nordiccarlescufi
authored andcommitted
doc: storage: add flashdisk to disk documentation
Include zephyr,flash-disk devicetree sample in disk documentation. Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
1 parent b26fca4 commit ba1fdcd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/services/storage/disk/access.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,26 @@ To read and write files and directories, see the :ref:`file_system_api` in
6565
:zephyr_file:`include/zephyr/fs/fs.h` such as :c:func:`fs_open()`,
6666
:c:func:`fs_read()`, and :c:func:`fs_write()`.
6767

68+
Emulated block device on flash partition support
69+
************************************************
70+
71+
Zephyr flashdisk driver makes it possible to use flash memory partition as
72+
a block device. The flashdisk instances are defined in devicetree:
73+
74+
.. code-block:: devicetree
75+
76+
/ {
77+
msc_disk0 {
78+
compatible = "zephyr,flash-disk";
79+
partition = <&storage_partition>;
80+
disk-name = "NAND";
81+
cache-size = <4096>;
82+
};
83+
};
84+
85+
The cache size specified in :dtcompatible:`zephyr,flash-disk` node should be
86+
equal to backing partition minimum erasable block size.
87+
6888
Disk Access API Configuration Options
6989
*************************************
7090

0 commit comments

Comments
 (0)