Restructure documentation. Create two top-level sections for thread-safe and callback-style APIs.

This commit is contained in:
Dirk Ziegelmeier 2016-07-26 18:39:53 +02:00
parent 8140c77d7d
commit 8a9de94b1f
11 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,13 @@
/**
* @defgroup callbackstyle_api Callback-style APIs
* Non thread-safe APIs, callback style for maximum performance and minimum
* memory footprint.
*
* @defgroup threadsafe_api Thread-safe APIs
* Thread-safe APIs, blocking functions. More overhead, but can be called
* from any thread except TCPIP thread.
*/
/*! \mainpage lwIP Documentation /*! \mainpage lwIP Documentation
* *
* \section intro_sec Introduction * \section intro_sec Introduction

View File

@ -36,6 +36,7 @@
/** /**
* @defgroup netconn Netconn API * @defgroup netconn Netconn API
* @ingroup threadsafe_api
* Thread-safe, to be called from non-TCPIP threads only. * Thread-safe, to be called from non-TCPIP threads only.
* TX/RX handling based on @ref netbuf (containing @ref pbuf) * TX/RX handling based on @ref netbuf (containing @ref pbuf)
* to avoid copying data around. * to avoid copying data around.
@ -115,7 +116,6 @@ netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg)
} }
/** /**
* @ingroup netconn_common
* Create a new netconn (of a specific type) that has a callback function. * Create a new netconn (of a specific type) that has a callback function.
* The corresponding pcb is also created. * The corresponding pcb is also created.
* *

View File

@ -33,6 +33,7 @@
/** /**
* @defgroup netifapi NETIF API * @defgroup netifapi NETIF API
* @ingroup threadsafe_api
* Thread-safe functions to be called from non-TCPIP threads * Thread-safe functions to be called from non-TCPIP threads
* *
* @defgroup netifapi_netif NETIF related * @defgroup netifapi_netif NETIF related

View File

@ -40,6 +40,7 @@
/** /**
* @defgroup socket Socket API * @defgroup socket Socket API
* @ingroup threadsafe_api
* BSD-style socket API.\n * BSD-style socket API.\n
* Thread-safe, to be called from non-TCPIP threads only.\n * Thread-safe, to be called from non-TCPIP threads only.\n
* Can be activated by defining LWIP_SOCKET to 1.\n * Can be activated by defining LWIP_SOCKET to 1.\n

View File

@ -441,6 +441,7 @@ tcpip_trycallback(struct tcpip_callback_msg* msg)
} }
/** /**
* @ingroup lwIP
* Initialize this module: * Initialize this module:
* - initialize all sub modules * - initialize all sub modules
* - start the tcpip_thread * - start the tcpip_thread

View File

@ -39,6 +39,7 @@
/** /**
* @defgroup dns DNS * @defgroup dns DNS
* @ingroup callbackstyle_api
* *
* Implements a DNS host name to IP address resolver. * Implements a DNS host name to IP address resolver.
* *

View File

@ -323,6 +323,7 @@
/** /**
* @ingroup lwIP * @ingroup lwIP
* Initialize all modules. * Initialize all modules.
* Use this in NO_SYS mode. Use tcpip_init() otherwise.
*/ */
void void
lwip_init(void) lwip_init(void)

View File

@ -38,8 +38,10 @@
/** /**
* @defgroup ip4 IPv4 * @defgroup ip4 IPv4
* @ingroup callbackstyle_api
* *
* @defgroup ip6 IPv6 * @defgroup ip6 IPv6
* @ingroup callbackstyle_api
* *
* @defgroup ipaddr IP address handling * @defgroup ipaddr IP address handling
* *

View File

@ -36,6 +36,7 @@
/** /**
* @defgroup netif Network interface (NETIF) * @defgroup netif Network interface (NETIF)
* @ingroup callbackstyle_api
*/ */
#include "lwip/opt.h" #include "lwip/opt.h"

View File

@ -40,6 +40,7 @@
/** /**
* @defgroup raw_api RAW API * @defgroup raw_api RAW API
* @ingroup callbackstyle_api
* @verbinclude "rawapi.txt" * @verbinclude "rawapi.txt"
*/ */

View File

@ -257,7 +257,6 @@ struct netconn {
/** @ingroup netconn_common */ /** @ingroup netconn_common */
#define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL) #define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL)
/** @ingroup netconn_common */
#define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c)
struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
netconn_callback callback); netconn_callback callback);