From 753f8ff0c76e0635ae5524689757cd89fc321b29 Mon Sep 17 00:00:00 2001 From: Tom Burdick Date: Tue, 4 Jun 2024 12:25:07 -0500 Subject: [PATCH] docs: Move sensor.rst to sensor/index.rst Looking to expand the sensor docs and break out significant sections. First though to move this to a directory to allow for multiple sensor related rst docs. Signed-off-by: Tom Burdick --- MAINTAINERS.yml | 2 +- doc/_scripts/redirects.py | 1 + doc/hardware/peripherals/index.rst | 2 +- doc/hardware/peripherals/{sensor.rst => sensor/index.rst} | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) rename doc/hardware/peripherals/{sensor.rst => sensor/index.rst} (98%) diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 4ed3c15422f..f4af2300684 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -1843,7 +1843,7 @@ Release Notes: - dts/bindings/sensor/ - include/zephyr/drivers/sensor/ - include/zephyr/dt-bindings/sensor/ - - doc/hardware/peripherals/sensor.rst + - doc/hardware/peripherals/sensor/ - tests/drivers/build_all/sensor/ labels: - "area: Sensors" diff --git a/doc/_scripts/redirects.py b/doc/_scripts/redirects.py index aa4bd4fdebf..8b2d5e65626 100644 --- a/doc/_scripts/redirects.py +++ b/doc/_scripts/redirects.py @@ -143,6 +143,7 @@ REDIRECTS = [ ('guides/west/workspaces', 'develop/west/workspaces'), ('guides/west/zephyr-cmds', 'develop/west/zephyr-cmds'), ('guides/zephyr_cmake_package', 'build/zephyr_cmake_package'), + ('hardware/peripherals/sensor', 'hardware/peripherals/sensor/index'), ('reference/api/api_lifecycle', 'develop/api/api_lifecycle'), ('reference/api/index', 'develop/api/index'), ('reference/api/overview', 'develop/api/overview'), diff --git a/doc/hardware/peripherals/index.rst b/doc/hardware/peripherals/index.rst index cd75fee0371..9889ca9ac2c 100644 --- a/doc/hardware/peripherals/index.rst +++ b/doc/hardware/peripherals/index.rst @@ -51,7 +51,7 @@ Peripherals reset.rst retained_mem.rst sdhc.rst - sensor.rst + sensor/index.rst spi.rst smbus.rst uart.rst diff --git a/doc/hardware/peripherals/sensor.rst b/doc/hardware/peripherals/sensor/index.rst similarity index 98% rename from doc/hardware/peripherals/sensor.rst rename to doc/hardware/peripherals/sensor/index.rst index 5c7817b627b..ec3cf2028fa 100644 --- a/doc/hardware/peripherals/sensor.rst +++ b/doc/hardware/peripherals/sensor/index.rst @@ -57,7 +57,7 @@ measures ambient temperature and atmospheric pressure. Note that :c:func:`sensor_sample_fetch` is only called once, as it reads and compensates data for both channels. -.. literalinclude:: ../../../samples/sensor/bme280/src/main.c +.. literalinclude:: ../../../../samples/sensor/bme280/src/main.c :language: c :lines: 12- :linenos: @@ -217,7 +217,7 @@ interest of saving power. Since the application has direct access to the kernel config symbols, no trigger is registered when triggering was disabled by the driver's configuration. -.. literalinclude:: ../../../samples/sensor/mcp9808/src/main.c +.. literalinclude:: ../../../../samples/sensor/mcp9808/src/main.c :language: c :lines: 12- :linenos: