1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

nanocoap: define default block size

This commit is contained in:
Benjamin Valentin 2022-04-14 00:22:42 +02:00 committed by Benjamin Valentin
parent 078bced8e1
commit ad7d974183
3 changed files with 9 additions and 2 deletions

View File

@ -106,7 +106,7 @@ include $(RIOTBASE)/Makefile.include
# allow to use large blocks to utilize large MTUs (802.15.4g, Ethernet, WiFi)
LARGE_BLOCKS ?= 0
ifeq (1, $(LARGE_BLOCKS))
CFLAGS += -DCONFIG_SUIT_COAP_BLOCKSIZE=COAP_BLOCKSIZE_1024
CFLAGS += -DCONFIG_NANOCOAP_BLOCKSIZE_DEFAULT=COAP_BLOCKSIZE_1024
else
# lower pktbuf size to something sufficient for this application
# Set GNRC_PKTBUF_SIZE via CFLAGS if not being set via Kconfig.

View File

@ -148,6 +148,13 @@ extern "C" {
#define CONFIG_NANOCOAP_BLOCK_SIZE_EXP_MAX (6)
#endif
/**
* @brief CoAP block-wise-transfer size that should be used by default
*/
#ifndef CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT
#define CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT COAP_BLOCKSIZE_64
#endif
/** @brief Maximum length of a query string written to a message */
#ifndef CONFIG_NANOCOAP_QS_MAX
#define CONFIG_NANOCOAP_QS_MAX (64)

View File

@ -76,7 +76,7 @@ extern const coap_resource_subtree_t coap_resource_subtree_suit;
* @brief Coap block-wise-transfer size used for SUIT
*/
#ifndef CONFIG_SUIT_COAP_BLOCKSIZE
#define CONFIG_SUIT_COAP_BLOCKSIZE COAP_BLOCKSIZE_64
#define CONFIG_SUIT_COAP_BLOCKSIZE CONFIG_NANOCOAP_BLOCKSIZE_DEFAULT
#endif
/**