diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index a04df86b2..b3a7a6fc4 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -30,7 +30,7 @@ if (WITH_MAN)
message(FATAL_ERROR "Can not build html DOC from man without man2html")
endif()
message(STATUS "Building html doc pages with man2html")
- file(MAKE_DIRECTORY ${CMAKE_HTML_DEST_DIR}/man3)
+ file(MAKE_DIRECTORY ${CMAKE_HTML_DEST_DIR}/man1 ${CMAKE_HTML_DEST_DIR}/man3)
execute_process(
COMMAND ${MAN2HTML} -r
INPUT_FILE ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/libiio.3
@@ -38,8 +38,7 @@ if (WITH_MAN)
)
endif()
if (WITH_TESTS)
- list(APPEND MAN1 iio_attr.1 iio_info.1 iio_readdev.1 iio_reg.1 iio_writedev.1)
- foreach(_page ${MAN1})
+ foreach(_page ${IIO_TESTS_TARGETS})
execute_process(
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make_util_pages.sh
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_page}.1.in
@@ -49,18 +48,23 @@ if (WITH_MAN)
${CMAKE_CURRENT_BINARY_DIR}/${_page}.1.in
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/${_page}.1 @ONLY
)
- endforeach()
- if (WITH_DOC)
- file(MAKE_DIRECTORY ${CMAKE_HTML_DEST_DIR}/man1)
- foreach(_page ${MAN1})
+
+ if (WITH_DOC)
execute_process(
COMMAND ${MAN2HTML} -r
INPUT_FILE ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/${_page}
OUTPUT_FILE ${CMAKE_HTML_DEST_DIR}/man1/${_page}.html
)
- endforeach()
- endif()
+ endif()
+ endforeach()
endif()
+
+ if (WITH_IIOD)
+ configure_file(iiod.1.in
+ ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}/iiod.1 @ONLY
+ )
+ endif()
+
# install man files into the BINARY directories,
# section 3 = library functions
install(DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_MANDIR}
diff --git a/man/iio_genxml.1.in b/man/iio_genxml.1.in
new file mode 100644
index 000000000..47fa05a77
--- /dev/null
+++ b/man/iio_genxml.1.in
@@ -0,0 +1,46 @@
+.\" Copyright (c) 2018-2020 Robin Getz
+.\" Copyright (c) 2018-2020 Analog Devices Inc.
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" .
+.\" %%%LICENSE_END
+.\"
+.TH iio_genxml 1 "@CMAKE_DATE@" "libiio-@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@" "LibIIO Utilities"
+.IX iio_genxml
+.SH NAME
+iio_genxml \- Generate XML representation of a Libiio context
+.SH SYNOPSIS
+.B iio_genxml
+[
+.I options
+]
+
+.SH DESCRIPTION
+.B iio_genxml
+is a utility for generating a XML representation of a Libiio context.
+
+.SH OPTIONS
+##COMMON_COMMANDS_START##
+##COMMON_COMMANDS_STOP##
+##COMMON_OPTION_START##
+##COMMON_OPTION_STOP##
+
+.SH RETURN VALUE
+If the specified device is not found, a non-zero exit code is returned.
diff --git a/man/iio_stresstest.1.in b/man/iio_stresstest.1.in
new file mode 100644
index 000000000..64a28b320
--- /dev/null
+++ b/man/iio_stresstest.1.in
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2018-2020 Robin Getz
+.\" Copyright (c) 2018-2020 Analog Devices Inc.
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" .
+.\" %%%LICENSE_END
+.\"
+.TH iio_stresstest 1 "@CMAKE_DATE@" "libiio-@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@" "LibIIO Utilities"
+.IX iio_stresstest
+.SH NAME
+iio_stresstest \- Stress test program for Libiio
+.SH SYNOPSIS
+.B iio_stresstest
+[
+.I options
+]
+-u
+.SH DESCRIPTION
+.B iio_stresstest
+is a stress-testing program that can be used to find bugs in Libiio or in the Libiio daemon (IIOD).
+
+
+.SH OPTIONS
+##COMMON_COMMANDS_START##
+##COMMON_COMMANDS_STOP##
+##COMMON_OPTION_START##
+##COMMON_OPTION_STOP##
+.TP
+.B \-a, \-\-auto
+Scan for available contexts and if only one is available use it.
+.TP
+.B \-T, \-\-timeout
+Context timeout in milliseconds. 0 = no timeout (wait forever)
+.TP
+.B \-b, \-\-buffer\-size
+Size of the capture buffer. Default is 256.
+.TP
+.B \-s, \-\-samples
+Number of samples to capture, 0 = infinite. Default is 0.
+.TP
+.B \-d, \-\-duration
+Time to wait (in seconds) before stopping all threads
+.TP
+.B \-t, \-\-threads
+Number of threads to use
+.TP
+.B \-v, \-\-verbose
+Increase verbosity (-vv and -vvv for more)
+
+.SH RETURN VALUE
+If the specified device is not found, a non-zero exit code is returned.
+
diff --git a/man/iiod.1.in b/man/iiod.1.in
new file mode 100644
index 000000000..fce7da40d
--- /dev/null
+++ b/man/iiod.1.in
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2018-2020 Robin Getz
+.\" Copyright (c) 2018-2020 Analog Devices Inc.
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" .
+.\" %%%LICENSE_END
+.\"
+.TH iiod 1 "@CMAKE_DATE@" "libiio-@LIBIIO_VERSION_MAJOR@.@LIBIIO_VERSION_MINOR@" "LibIIO Utilities"
+.IX iiod
+.SH NAME
+iiod \- IIO Daemon
+.SH SYNOPSIS
+.B iiod
+[
+.I options
+]
+
+.SH DESCRIPTION
+.B iiod
+is a server built on top of Libiio which can share a Libiio context across the
+network, USB, or a UART link.
+
+.SH COMMANDS
+.TP
+.B \-V, \-\-version
+Display the version of this program.
+.TP
+.B \-d, \-\-debug
+Use alternative (incompatible) debug interface.
+.TP
+.B \-D, \-\-demux
+Demux channels directly on the server.
+.TP
+.B \-i, \-\-interactive
+Run iiod in the controlling terminal.
+.TP
+.B \-a, \-\-aio
+Use asynchronous I/O.
+.TP
+.B \-F, \-\-ffs
+Use the given FunctionFS mountpoint to serve over USB.
+.TP
+.B \-n, \-\-nb\-pipes
+Specify the number of USB pipes (ep couples) to use.
+.TP
+.B \-s, \-\-serial
+Run iiod on the specified UART.
+.TP
+.B \-p, \-\-port
+Port to listen on (default = 30431).
+Using --port 0 will pick an ephemeral port (dynamic / unused in the range between 32768–60999).
+.TP
+.B \-u, \-\-uri
+The Uniform Resource Identifier
+.I (uri)
+for connecting to devices, can be one of:
+.RS
+.IP ip:[address]
+network address, either numeric (192.168.0.1) or network hostname
+.IP ip:
+blank, if compiled with zeroconf support, will find an IIO device on network
+.IP usb:[device:port:instance]
+normally returned from
+.B iio_info -S
+.IP serial:[port],[baud],[settings]
+which are controlled, and need to match the iiod (or tinyiiod) on the other end of the serial port.
+.RS
+.IP [port]
+is something like '/dev/ttyUSB0' on Linux, and 'COM4' on Windows.
+.IP [baud]
+is is normally one of 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200 [default], 128000 or 256000, but can vary system to system.
+.IP [settings]
+would normally be configured as '8n1' this is controlled by:
+.RS
+.IP data_bits:
+(5, 6, 7, 8 [default], or 9)
+.IP parity_bits:
+('n' none [default], 'o' odd, 'e' even, 'm' mark, or 's' space)
+.IP stop_bits:
+(1 [default, or 2)
+.IP flow_control:
+('0' none [default], 'x' Xon Xoff, 'r' RTSCTS, or 'd' DTRDSR)
+.RE
+.RE
+.IP local:
+with no address part. This is the default.
+.RE
+.TP
+
+.SH RETURN VALUE
+If the specified device is not found, a non-zero exit code is returned.