From c2996a8bd9a136457f31b57b93b59fb44afb84b1 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Fri, 7 Jun 2024 10:15:27 +0200 Subject: [PATCH] Included application interface header in PDF doc. --- documentation/ethercat_doc.tex | 34 ++++++++++++++++++++++++++++------ doxygen-layout | 2 +- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/documentation/ethercat_doc.tex b/documentation/ethercat_doc.tex index 8e90fb5e..3ba7cb58 100644 --- a/documentation/ethercat_doc.tex +++ b/documentation/ethercat_doc.tex @@ -634,9 +634,9 @@ physical memory to logical process data images. The application interface provides functions and data structures for applications to access an EtherCAT master. The complete documentation of the interface is included as Doxygen~\cite{doxygen} comments in the header file -\textit{include/ecrt.h}. It can either be read directly from the file -comments, or as a more comfortable HTML documentation. The HTML generation is -described in \autoref{sec:gendoc}. +\textit{include/ecrt.h} (see \autoref{sec:ecrt}). It can either be read +directly from the file comments, or as a more comfortable HTML documentation. +The HTML generation is described in \autoref{sec:gendoc}. The following sections cover a general description of the application interface. @@ -955,6 +955,27 @@ be found. %------------------------------------------------------------------------------ +\section{Application Interface Header} +\label{sec:ecrt} +\index{Application Interface} + +The application interface of the EtherCAT master is defined in the header file +\textit{include/ecrt.h} (acronym for ``EtherCAT Real-Time'') which is listed +in this section. The calling conventions of all methods are documented in the +comments of this header. There is also a Doxygen-generated online version at +\url{https://docs.etherlab.org}. + +\lstinputlisting[ + basicstyle=\ttfamily\scriptsize, + texcl=false, + escapeinside={//*}{\^^M}, + language=C, + keywordstyle=\textbf, + commentstyle=\color{blue} +]{../include/ecrt.h} + +%------------------------------------------------------------------------------ + \chapter{Ethernet Devices} \label{sec:devices} @@ -2663,8 +2684,8 @@ installation prefix as \textit{libethercat.a} (for static linking), \subsection{Using the Library} -The application interface header \textit{ecrt.h} can be used both in kernel -and in user context. +The application interface header \textit{ecrt.h} (see \autoref{sec:ecrt}) can +be used both in kernel and in user context. The following minimal example shows how to build a program with EtherCAT functionality. An entire example can be found in the \textit{examples/user/} @@ -2805,7 +2826,8 @@ To force an application to use the RTDM interface instead of the normal character device, it has to be linked with the \textit{libethercat\_rtdm} library instead of \textit{libethercat}. The use of the \textit{libethercat\_rtdm} is transparent, so the EtherCAT header -\textit{ecrt.h} with the complete API can be used as usual. +\textit{ecrt.h} (see \autoref{sec:ecrt}) with the complete API can be used as +usual. To make the example in \autoref{lst:linker-user} use the RTDM library, the linker command has to be altered as follows: diff --git a/doxygen-layout b/doxygen-layout index b418f8cc..fa4893ab 160000 --- a/doxygen-layout +++ b/doxygen-layout @@ -1 +1 @@ -Subproject commit b418f8cc9084ba71da0417252afedfdda614e6f3 +Subproject commit fa4893ab56b9f41c9ca84fee7ffa31841805f41a