mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Improve documentation: add compiler abstraction macros to doxygen docs
This commit is contained in:
parent
a420d2530f
commit
8a9ab9968c
@ -47,6 +47,12 @@
|
|||||||
|
|
||||||
#include "arch/cc.h"
|
#include "arch/cc.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup compiler_abstraction Compiler/platform abstraction
|
||||||
|
* @ingroup sys_layer
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
/** Define this to 1 in arch/cc.h of your port if you do not want to
|
/** Define this to 1 in arch/cc.h of your port if you do not want to
|
||||||
* include stddef.h header to get size_t. This cannot be \#defined in
|
* include stddef.h header to get size_t. This cannot be \#defined in
|
||||||
* lwipopts.h since this is not an option of lwIP itself, but an option
|
* lwipopts.h since this is not an option of lwIP itself, but an option
|
||||||
@ -166,43 +172,70 @@ typedef uintptr_t mem_ptr_t;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GCC/clang: Nothing to do */
|
/** Packed structs support.
|
||||||
|
* Placed BEFORE declaration of a packed struct. \n
|
||||||
|
* For examples of packed struct declarations, see include/lwip/prot/ subfolder. \n
|
||||||
|
* Porting to GCC/clang: Nothing to do.
|
||||||
|
*/
|
||||||
#ifndef PACK_STRUCT_BEGIN
|
#ifndef PACK_STRUCT_BEGIN
|
||||||
#define PACK_STRUCT_BEGIN
|
#define PACK_STRUCT_BEGIN
|
||||||
#endif /* PACK_STRUCT_BEGIN */
|
#endif /* PACK_STRUCT_BEGIN */
|
||||||
|
|
||||||
/* GCC/clang: Nothing to do */
|
/** Packed structs support.
|
||||||
|
* Placed AFTER declaration of a packed struct. \n
|
||||||
|
* For examples of packed struct declarations, see include/lwip/prot/ subfolder. \n
|
||||||
|
* Porting to GCC/clang: Nothing to do.
|
||||||
|
*/
|
||||||
#ifndef PACK_STRUCT_END
|
#ifndef PACK_STRUCT_END
|
||||||
#define PACK_STRUCT_END
|
#define PACK_STRUCT_END
|
||||||
#endif /* PACK_STRUCT_END */
|
#endif /* PACK_STRUCT_END */
|
||||||
|
|
||||||
/* GCC/clang: #define PACK_STRUCT_STRUCT __attribute__((packed)) */
|
/** Packed structs support.
|
||||||
|
* Placed between end of declaration of a packed struct and trailing semicolon. \n
|
||||||
|
* For examples of packed struct declarations, see include/lwip/prot/ subfolder. \n
|
||||||
|
* Porting to GCC/clang: \#define PACK_STRUCT_STRUCT __attribute__((packed))
|
||||||
|
*/
|
||||||
#ifndef PACK_STRUCT_STRUCT
|
#ifndef PACK_STRUCT_STRUCT
|
||||||
#define PACK_STRUCT_STRUCT
|
#define PACK_STRUCT_STRUCT
|
||||||
#endif /* PACK_STRUCT_STRUCT */
|
#endif /* PACK_STRUCT_STRUCT */
|
||||||
|
|
||||||
/* GCC/clang: Nothing to do */
|
/** Packed structs support.
|
||||||
|
* Wraps u32_t and u16_t members. \n
|
||||||
|
* For examples of packed struct declarations, see include/lwip/prot/ subfolder. \n
|
||||||
|
* Porting to GCC/clang: Nothing to do.
|
||||||
|
*/
|
||||||
#ifndef PACK_STRUCT_FIELD
|
#ifndef PACK_STRUCT_FIELD
|
||||||
#define PACK_STRUCT_FIELD(x) x
|
#define PACK_STRUCT_FIELD(x) x
|
||||||
#endif /* PACK_STRUCT_FIELD */
|
#endif /* PACK_STRUCT_FIELD */
|
||||||
|
|
||||||
/* Used for struct fields of u8_t,
|
/** Packed structs support.
|
||||||
* where some compilers warn that packing is not necessary */
|
* Wraps u8_t members, where some compilers warn that packing is not necessary. \n
|
||||||
|
* For examples of packed struct declarations, see include/lwip/prot/ subfolder. \n
|
||||||
|
* Porting to GCC/clang: Nothing to do.
|
||||||
|
*/
|
||||||
#ifndef PACK_STRUCT_FLD_8
|
#ifndef PACK_STRUCT_FLD_8
|
||||||
#define PACK_STRUCT_FLD_8(x) PACK_STRUCT_FIELD(x)
|
#define PACK_STRUCT_FLD_8(x) PACK_STRUCT_FIELD(x)
|
||||||
#endif /* PACK_STRUCT_FLD_8 */
|
#endif /* PACK_STRUCT_FLD_8 */
|
||||||
|
|
||||||
/* Used for struct fields of that are packed structs themself,
|
/** Packed structs support.
|
||||||
* where some compilers warn that packing is not necessary */
|
* Wraps members that are packed structs themselves, where some compilers warn that packing is not necessary. \n
|
||||||
|
* For examples of packed struct declarations, see include/lwip/prot/ subfolder. \n
|
||||||
|
* Porting to GCC/clang: Nothing to do.
|
||||||
|
*/
|
||||||
#ifndef PACK_STRUCT_FLD_S
|
#ifndef PACK_STRUCT_FLD_S
|
||||||
#define PACK_STRUCT_FLD_S(x) PACK_STRUCT_FIELD(x)
|
#define PACK_STRUCT_FLD_S(x) PACK_STRUCT_FIELD(x)
|
||||||
#endif /* PACK_STRUCT_FLD_S */
|
#endif /* PACK_STRUCT_FLD_S */
|
||||||
|
|
||||||
|
|
||||||
|
/** Eliminates compiler warning about unused arguments. */
|
||||||
#ifndef LWIP_UNUSED_ARG
|
#ifndef LWIP_UNUSED_ARG
|
||||||
#define LWIP_UNUSED_ARG(x) (void)x
|
#define LWIP_UNUSED_ARG(x) (void)x
|
||||||
#endif /* LWIP_UNUSED_ARG */
|
#endif /* LWIP_UNUSED_ARG */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user