Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sys/auto_init/auto_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ void auto_init(void)
openthread_bootstrap();
#endif
#ifdef MODULE_GCOAP
DEBUG("Auto init gcoap module.\n");
gcoap_init();
if (!IS_ACTIVE(GCOAP_NO_AUTO_INIT)) {
DEBUG("Auto init gcoap module.\n");
gcoap_init();
}
#endif
#ifdef MODULE_DEVFS
DEBUG("Mounting /dev\n");
Expand Down
10 changes: 10 additions & 0 deletions sys/include/net/gcoap.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,16 @@ extern "C" {
*/
#define GCOAP_PAYLOAD_MARKER (0xFF)

/**
* @ingroup net_gcoap_conf
* @brief Disables gcoap startup during system auto init
*
* If disabled, gcoap_init() must be called by some other means.
*/
#ifndef GCOAP_NO_AUTO_INIT
#define GCOAP_NO_AUTO_INIT 0
#endif

/**
* @name States for the memo used to track waiting for a response
* @{
Expand Down