diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index 4b2ccba4..d70d8348 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -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 * * \section intro_sec Introduction diff --git a/src/api/api_lib.c b/src/api/api_lib.c index 03f083dd..778cacb4 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -36,6 +36,7 @@ /** * @defgroup netconn Netconn API + * @ingroup threadsafe_api * Thread-safe, to be called from non-TCPIP threads only. * TX/RX handling based on @ref netbuf (containing @ref pbuf) * 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. * The corresponding pcb is also created. * diff --git a/src/api/netifapi.c b/src/api/netifapi.c index 9b1c048e..3a02d521 100644 --- a/src/api/netifapi.c +++ b/src/api/netifapi.c @@ -33,6 +33,7 @@ /** * @defgroup netifapi NETIF API + * @ingroup threadsafe_api * Thread-safe functions to be called from non-TCPIP threads * * @defgroup netifapi_netif NETIF related diff --git a/src/api/sockets.c b/src/api/sockets.c index e0b072fe..6547182c 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -40,6 +40,7 @@ /** * @defgroup socket Socket API + * @ingroup threadsafe_api * BSD-style socket API.\n * Thread-safe, to be called from non-TCPIP threads only.\n * Can be activated by defining LWIP_SOCKET to 1.\n diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 60452737..32abf5f8 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -441,6 +441,7 @@ tcpip_trycallback(struct tcpip_callback_msg* msg) } /** + * @ingroup lwIP * Initialize this module: * - initialize all sub modules * - start the tcpip_thread diff --git a/src/core/dns.c b/src/core/dns.c index 5ee482ce..75cf12ee 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -39,6 +39,7 @@ /** * @defgroup dns DNS + * @ingroup callbackstyle_api * * Implements a DNS host name to IP address resolver. * diff --git a/src/core/init.c b/src/core/init.c index 96aa02c7..3cf504f4 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -323,6 +323,7 @@ /** * @ingroup lwIP * Initialize all modules. + * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) diff --git a/src/core/ip.c b/src/core/ip.c index af6e36b3..4a36da18 100644 --- a/src/core/ip.c +++ b/src/core/ip.c @@ -38,8 +38,10 @@ /** * @defgroup ip4 IPv4 + * @ingroup callbackstyle_api * * @defgroup ip6 IPv6 + * @ingroup callbackstyle_api * * @defgroup ipaddr IP address handling * diff --git a/src/core/netif.c b/src/core/netif.c index 7d368e9f..1281fa63 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -36,6 +36,7 @@ /** * @defgroup netif Network interface (NETIF) + * @ingroup callbackstyle_api */ #include "lwip/opt.h" diff --git a/src/core/raw.c b/src/core/raw.c index 8747353f..90f2e302 100644 --- a/src/core/raw.c +++ b/src/core/raw.c @@ -40,6 +40,7 @@ /** * @defgroup raw_api RAW API + * @ingroup callbackstyle_api * @verbinclude "rawapi.txt" */ diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index a919a2d1..bbe45713 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -257,7 +257,6 @@ struct netconn { /** @ingroup netconn_common */ #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) struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback);