From bd6a63f2e69ea16851a99b200cd2039186173775 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 12 Jul 2016 09:35:26 -0300 Subject: [media] doc-rst: reorganize LIRC ReST files Reorganize the LIRC rst files, using "-" instead of "_" on their names, and creating a separate chapter for syscalls. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/rc/lirc-write.rst | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/media/uapi/rc/lirc-write.rst (limited to 'Documentation/media/uapi/rc/lirc-write.rst') diff --git a/Documentation/media/uapi/rc/lirc-write.rst b/Documentation/media/uapi/rc/lirc-write.rst new file mode 100644 index 000000000000..dcba3b1bee6e --- /dev/null +++ b/Documentation/media/uapi/rc/lirc-write.rst @@ -0,0 +1,58 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc-write: + +************ +LIRC write() +************ + +Name +==== + +lirc-write - Write to a LIRC device + + +Synopsis +======== + +.. code-block:: c + + #include + + +.. cpp:function:: ssize_t write( int fd, void *buf, size_t count ) + + +Arguments +========= + +``fd`` + File descriptor returned by ``open()``. + +``buf`` +``count`` + + +Description +=========== + +:ref:`write() ` writes up to ``count`` bytes to the device +referenced by the file descriptor ``fd`` from the buffer starting at +``buf``. + +The data written to the chardev is a pulse/space sequence of integer +values. Pulses and spaces are only marked implicitly by their position. +The data must start and end with a pulse, therefore, the data must +always include an uneven number of samples. The write function must +block until the data has been transmitted by the hardware. If more data +is provided than the hardware can send, the driver returns ``EINVAL``. + + +Return Value +============ + +On success, the number of bytes read is returned. It is not an error if +this number is smaller than the number of bytes requested, or the amount +of data required for one frame. On error, -1 is returned, and the ``errno`` +variable is set appropriately. The generic error codes are described at the +:ref:`Generic Error Codes ` chapter. -- cgit v1.2.3