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: