From ee76f7cf06229bd911647301d11553020fba9035 Mon Sep 17 00:00:00 2001 From: Ed Date: Wed, 4 Oct 2023 08:40:21 +0100 Subject: [PATCH] Tidy docs --- doc/programming_guide/reference/i2c/i2c_master.rst | 2 +- doc/programming_guide/reference/i2c/i2c_slave.rst | 2 +- doc/programming_guide/reference/i2s/i2s.rst | 9 +-------- doc/programming_guide/reference/i2s/i2s_common.rst | 8 +++++++- doc/programming_guide/reference/spi/spi_master.rst | 2 +- doc/programming_guide/reference/spi/spi_slave.rst | 2 +- doc/programming_guide/reference/uart/uart.rst | 3 ++- doc/shared/introduction.rst | 2 +- modules/uart/api/uart.h | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/programming_guide/reference/i2c/i2c_master.rst b/doc/programming_guide/reference/i2c/i2c_master.rst index 9cf8266..2e62996 100644 --- a/doc/programming_guide/reference/i2c/i2c_master.rst +++ b/doc/programming_guide/reference/i2c/i2c_master.rst @@ -12,7 +12,7 @@ The following code snippet demonstrates the basic usage of an |I2C| master devic .. code-block:: c #include - #include + #include "i2c.h" i2c_master_t i2c_ctx; diff --git a/doc/programming_guide/reference/i2c/i2c_slave.rst b/doc/programming_guide/reference/i2c/i2c_slave.rst index 848ceba..60956aa 100644 --- a/doc/programming_guide/reference/i2c/i2c_slave.rst +++ b/doc/programming_guide/reference/i2c/i2c_slave.rst @@ -12,7 +12,7 @@ The following code snippet demonstrates the basic usage of an |I2C| slave device .. code-block:: c #include - #include + #include "i2c.h" port_t p_scl = XS1_PORT_1A; port_t p_sda = XS1_PORT_1B; diff --git a/doc/programming_guide/reference/i2s/i2s.rst b/doc/programming_guide/reference/i2s/i2s.rst index 8198994..dce935e 100644 --- a/doc/programming_guide/reference/i2s/i2s.rst +++ b/doc/programming_guide/reference/i2s/i2s.rst @@ -33,7 +33,7 @@ All |I2S| functions can be accessed via the ``i2s.h`` header: .. code-block:: c - #include + #include "i2s.h" TDM is a protocol between two devices similar to |I2S| where one is the *master* and one is the *slave* which determines who drives the clock lines. The protocol is made up of four signals shown in :ref:`tdm_wire_table`. @@ -54,13 +54,6 @@ TDM is a protocol between two devices similar to |I2S| where one is the *master* the data direction. There may be several data lines in differing directions. -All |I2S| functions can be accessed via the ``i2s.h`` header: - -.. code-block:: c - - #include "i2s.h" - - Currently supported TDM functions can be accessed via the ``i2s_tdm_slave.h`` header: .. code-block:: c diff --git a/doc/programming_guide/reference/i2s/i2s_common.rst b/doc/programming_guide/reference/i2s/i2s_common.rst index fc9c9db..22448d1 100644 --- a/doc/programming_guide/reference/i2s/i2s_common.rst +++ b/doc/programming_guide/reference/i2s/i2s_common.rst @@ -1,14 +1,20 @@ -v.. include:: ../../../substitutions.rst +.. include:: ../../../substitutions.rst **************** |I2S| Common API **************** +|I2S| Instances +=============== + The following structures and functions are used by an |I2S| master or slave instance. .. doxygengroup:: hil_i2s_core :content-only: +TDM Instances +============= + The following structures and functions are used by an TDM master or slave instance. .. doxygengroup:: hil_i2s_tdm_core diff --git a/doc/programming_guide/reference/spi/spi_master.rst b/doc/programming_guide/reference/spi/spi_master.rst index 22be5d5..954c624 100644 --- a/doc/programming_guide/reference/spi/spi_master.rst +++ b/doc/programming_guide/reference/spi/spi_master.rst @@ -12,7 +12,7 @@ The following code snippet demonstrates the basic usage of an SPI master device. .. code-block:: c #include - #include + #include "spi.h" spi_master_t spi_ctx; spi_master_device_t spi_dev; diff --git a/doc/programming_guide/reference/spi/spi_slave.rst b/doc/programming_guide/reference/spi/spi_slave.rst index f3b9f20..440a3b2 100644 --- a/doc/programming_guide/reference/spi/spi_slave.rst +++ b/doc/programming_guide/reference/spi/spi_slave.rst @@ -12,7 +12,7 @@ The following code snippet demonstrates the basic usage of an SPI slave device. .. code-block:: c #include - #include + #include "spi.h" // Setup callbacks // NOTE: See API or SDK examples for more on using the callbacks diff --git a/doc/programming_guide/reference/uart/uart.rst b/doc/programming_guide/reference/uart/uart.rst index 4a8162d..2dd7980 100644 --- a/doc/programming_guide/reference/uart/uart.rst +++ b/doc/programming_guide/reference/uart/uart.rst @@ -30,7 +30,8 @@ All UART functions can be accessed via the ``uart.h`` header: .. code-block:: c - #include + #include "uart.h" + .. toctree:: :maxdepth: 2 diff --git a/doc/shared/introduction.rst b/doc/shared/introduction.rst index 35bb5d1..7f50edd 100644 --- a/doc/shared/introduction.rst +++ b/doc/shared/introduction.rst @@ -8,5 +8,5 @@ The peripheral IO framework is a collection of IO libraries written in C for XCO - UART - transmit and receive - |I2C| - master and slave -- |I2S| - master and slave +- |I2S| - master and slave and TDM slave Tx - SPI - master and slave diff --git a/modules/uart/api/uart.h b/modules/uart/api/uart.h index d800f5d..46a7480 100644 --- a/modules/uart/api/uart.h +++ b/modules/uart/api/uart.h @@ -26,7 +26,7 @@ * Enum type representing the different options * parity types. */ -typedef enum uart_parity_t { +typedef enum uart_parity { UART_PARITY_NONE = 0, UART_PARITY_EVEN, UART_PARITY_ODD