mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-03 03:01:05 +03:00
LwIP: Support disabling LwIP's IPv6 support
This commit is contained in:
1 parent
c4cfe9380c
commit
f4666c2ea9
11 files changed
+77
-16
No files matched your search
@@ -64,11 +64,11 @@ size_t asn1_len(const uint8_t **ptr);
|
||||
*
|
||||
* @param ptr The current asn.1 object tag pointer
|
||||
* @param constructed 1 if current tag is constructed
|
||||
* @param class The current class of the tag
|
||||
* @param cls The current class of the tag
|
||||
*
|
||||
* @return The tag value.@p ptr is updated to be after the tag.
|
||||
*/
|
||||
coap_asn1_tag_t asn1_tag_c(const uint8_t **ptr, int *constructed, int *class);
|
||||
coap_asn1_tag_t asn1_tag_c(const uint8_t **ptr, int *constructed, int *cls);
|
||||
|
||||
/**
|
||||
* Get the asn1 tag and data from the current @p ptr.
|
||||
|
||||
@@ -136,7 +136,7 @@ COAP_STATIC_INLINE void coap_no_log(void) { }
|
||||
*
|
||||
* In a future update, they will get removed.
|
||||
*/
|
||||
#if !defined(RIOT_VERSION)
|
||||
#if !defined(RIOT_VERSION) && !defined(WITH_LWIP) && !defined(WITH_CONTIKI)
|
||||
#ifndef LOG_EMERG
|
||||
# define LOG_EMERG COAP_LOG_EMERG
|
||||
#endif
|
||||
@@ -161,7 +161,7 @@ COAP_STATIC_INLINE void coap_no_log(void) { }
|
||||
#ifndef LOG_DEBUG
|
||||
# define LOG_DEBUG COAP_LOG_DEBUG
|
||||
#endif
|
||||
#endif /* ! RIOT_VERSION */
|
||||
#endif /* ! RIOT_VERSION && ! WITH_LWIP && ! WITH_CONTIKI */
|
||||
|
||||
/**
|
||||
* Get the current logging level.
|
||||
|
||||
@@ -58,7 +58,13 @@ typedef int coap_mutex_t;
|
||||
#define coap_mutex_trylock(a) *(a) = 1
|
||||
#define coap_mutex_unlock(a) *(a) = 0
|
||||
#else /* !NO SYS */
|
||||
#error Need support for LwIP mutex
|
||||
#include <lwip/sys.h>
|
||||
typedef sys_mutex_t *coap_mutex_t;
|
||||
#define TOKENPASTE(x, y) x ## y
|
||||
#define TOKENPASTE2(x, y) TOKENPASTE(x, y)
|
||||
#define COAP_MUTEX_INITIALIZER (&TOKENPASTE2(coapMutexAt, __LINE__))
|
||||
#define coap_mutex_lock(a) sys_mutex_lock(*a)
|
||||
#define coap_mutex_unlock(a) sys_mutex_unlock(*a)
|
||||
#endif /* !NO SYS */
|
||||
|
||||
#elif defined(WITH_CONTIKI)
|
||||
|
||||
Reference in new issue
Block a user