diff --git a/doc/reference/index.rst b/doc/reference/index.rst index 7cc58838f0b..c99b3e8c1f3 100644 --- a/doc/reference/index.rst +++ b/doc/reference/index.rst @@ -23,6 +23,7 @@ API Reference logging/index.rst misc/index misc/data_structures.rst + modbus/index.rst networking/index.rst peripherals/index.rst power_management/index.rst diff --git a/doc/reference/modbus/index.rst b/doc/reference/modbus/index.rst new file mode 100644 index 00000000000..50920ebda72 --- /dev/null +++ b/doc/reference/modbus/index.rst @@ -0,0 +1,9 @@ +.. _modbus: + +MODBUS +###### + +.. toctree:: + :maxdepth: 2 + + modbus.rst diff --git a/doc/reference/modbus/modbus.rst b/doc/reference/modbus/modbus.rst new file mode 100644 index 00000000000..74500bb0941 --- /dev/null +++ b/doc/reference/modbus/modbus.rst @@ -0,0 +1,36 @@ +.. _modbus_api: + +MODBUS over serial line (RTU) +############################# + +Modbus is an industrial messaging protocol. The protocol is specified +for different types of networks or buses. Zephyr RTOS implementation +is currently only available for serial line and may be used +with different physical interfaces, like RS485 or RS232. + +Modbus communication via serial line is based on client/server model. +Only one client may be present on the bus. Client can communicate with several +server devices. Server devices themselves are passive and must not send +requests or unsolicited responses. +Services requested by the client are specified by function codes (FCxx), +and can be found in the specification or documentation of the API below. + +Zephyr RTOS implementation supports both client and server roles. + +More information about Modbus and Modbus RTU can be found on the website +`MODBUS Protocol Specifications`_. + +Samples +******* + +`modbus-rtu-server-sample` and `modbus-rtu-client-sample` give +the possibility to try out RTU server and RTU client implementation with +an evaluation board. + +API Reference +************* + +.. doxygengroup:: modbus + :project: Zephyr + +.. _`MODBUS Protocol Specifications`: https://www.modbus.org/specs.php