Skip to content

Commit

Permalink
docs: misc cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
  • Loading branch information
kmarkus committed May 1, 2020
1 parent c87d87b commit 1744820
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
15 changes: 5 additions & 10 deletions docs/user/developing_blocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,10 @@ Declaring block meta-data
"}";
Additional meta-data can be defined as shown above. The following keys
are supported so far:
are commonly used so far:

- ``doc:`` short descriptive documentation of the block

- ``realtime``: is the block real-time safe, i.e. there are no memory
allocation / deallocation and other non deterministic function
calls in the ``step`` function.
- ``doc``: short descriptive documentation of the block
- ``realtime``: is the block real-time safe, i.e. there are no memory allocation / deallocation and other non deterministic function calls in the ``step`` function.

Declaring/implementing block hook functions
-------------------------------------------
Expand All @@ -149,10 +146,8 @@ life-cycle finite state machine:

They are typically used for the following:

- ``init``: initialize the block, allocate memory, drivers: check if
the device exists. Return zero if OK, non-zero otherwise.
- ``start``: become operational, open/enable device, carry out last
checks. Cache pointers to ports, apply configurations.
- ``init``: initialize the block, allocate memory, drivers: check if the device exists. Return zero if OK, non-zero otherwise.
- ``start``: become operational, open/enable device, carry out last checks. Cache pointers to ports, apply configurations.
- ``step``: read from ports, compute, write to ports
- ``stop``: stop/close device. stop is often not used.
- ``cleanup``: free all memory, release all resources.
Expand Down
11 changes: 5 additions & 6 deletions docs/user/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The only files we will modify are **platform_2dof/platform_2dof.c** and
The file that is auto-generated gives already some hints on how to
approach the programming.

::
.. code:: c
#include "platform_2dof.h"
Expand Down Expand Up @@ -495,7 +495,7 @@ following files:

*Makefile.am*

.. code:: cmake
.. code:: make
ubxmoddir = ${UBX_MODDIR}
Expand All @@ -510,7 +510,7 @@ might be possible that, if some custom types are used in the
configuration, but are not installed, they must be added to the
*CFLAGS*:

.. code:: cmake
.. code:: make
platform_main_CFLAGS = -I${top_srcdir}/libubx -I path/to/other/headers @UBX_CFLAGS@
Expand All @@ -531,7 +531,7 @@ Microblx uses realtime safe functions for logging. For logging from the
scope of a block the functions ``ubx_info``, ``ubx_info``, *etc* are
used. In the main we have to use the functions, ``ubx_log``, *e.g.*

::
.. code:: c
ubx_log(UBX_LOGLEVEL_ERR, &ni, __func__, "failed to init control1");
Expand Down Expand Up @@ -608,7 +608,7 @@ directly, or with a variable, *e.g.*
Double property:
^^^^^^^^^^^^^^^^

::
.. code:: c
d = ubx_config_get_data(control1, "gain");
ubx_data_resize(d, 1);
Expand Down Expand Up @@ -736,5 +736,4 @@ has to be modified accordingly:

.. code:: make
...
platform_main_LDFLAGS = -module -avoid-version -shared -export-dynamic @UBX_LIBS@ -ldl -lpthread

0 comments on commit 1744820

Please sign in to comment.