From 30cd9a22cfda64690fc4aa6974e16c20288e3bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Wed, 6 Sep 2023 19:51:25 +0200 Subject: [PATCH] doc: fs: samples: Use new Sphinx extension to document samples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the new code-sample directive and roles to document the filesystem samples so that they show up as "Related samples" when browsing the API documentation. Signed-off-by: Benjamin Cabé --- samples/subsys/fs/format/README.rst | 7 ++++--- samples/subsys/fs/fs_sample/README.rst | 7 ++++--- samples/subsys/fs/littlefs/README.rst | 7 ++++--- samples/subsys/shell/fs/README.rst | 2 +- samples/subsys/usb/mass/README.rst | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/samples/subsys/fs/format/README.rst b/samples/subsys/fs/format/README.rst index f42209fc2f2..20bcad1931a 100644 --- a/samples/subsys/fs/format/README.rst +++ b/samples/subsys/fs/format/README.rst @@ -1,7 +1,8 @@ -.. _fs_format_sample: +.. zephyr:code-sample:: fs-format + :name: Formatting + :relevant-api: file_system_api -FS Format Sample -################ + Format different storage devices for different file systems. Overview *********** diff --git a/samples/subsys/fs/fs_sample/README.rst b/samples/subsys/fs/fs_sample/README.rst index 6a441e201cd..e23cc1db7f9 100644 --- a/samples/subsys/fs/fs_sample/README.rst +++ b/samples/subsys/fs/fs_sample/README.rst @@ -1,7 +1,8 @@ -.. _fs_sample: +.. zephyr:code-sample:: fs + :name: Filesystem manipulation + :relevant-api: file_system_api disk_access_interface -Filesystems Sample Application -################################### + Use filesystem API with various filesystems and storage devices. Overview ******** diff --git a/samples/subsys/fs/littlefs/README.rst b/samples/subsys/fs/littlefs/README.rst index 948da3f635b..40911001dda 100644 --- a/samples/subsys/fs/littlefs/README.rst +++ b/samples/subsys/fs/littlefs/README.rst @@ -1,7 +1,8 @@ -.. _littlefs-sample: +.. zephyr:code-sample:: littlefs + :name: LittleFS filesystem + :relevant-api: file_system_api flash_area_api -littlefs File System Sample Application -####################################### + Use file system API over LittleFS. Overview ******** diff --git a/samples/subsys/shell/fs/README.rst b/samples/subsys/shell/fs/README.rst index 5482b2e050d..ec9d95364a7 100644 --- a/samples/subsys/shell/fs/README.rst +++ b/samples/subsys/shell/fs/README.rst @@ -48,7 +48,7 @@ Particle Xenon ============== This target is customized to support the same SPI NOR partition table as -the :ref:`littlefs-sample`. +the :zephyr:code-sample:`littlefs` sample. .. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/fs diff --git a/samples/subsys/usb/mass/README.rst b/samples/subsys/usb/mass/README.rst index 82a252061c8..75d6f2f388a 100644 --- a/samples/subsys/usb/mass/README.rst +++ b/samples/subsys/usb/mass/README.rst @@ -157,7 +157,7 @@ LittleFS Example This board configures to use the external 64 MiBi QSPI flash chip with a 128 KiBy `littlefs`_ partition compatible with the one produced by the -:ref:`littlefs-sample`. +:zephyr:code-sample:`littlefs` sample. .. zephyr-app-commands:: :zephyr-app: samples/subsys/usb/mass