1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

net/asymcute : Add 'CONFIG_ASYMCUTE_DEFAULT_PORT'

examples/asymcute : Update macro definition
Update macro definition for UDP port.

Kconfig/asymcute : Add 'ASYMCUTE_DEFAULT_PORT'
This commit is contained in:
Akshai M 2020-11-09 21:38:00 +01:00 committed by Akshai M
parent 2c7dfac7d1
commit 8f36c817eb
3 changed files with 16 additions and 1 deletions

View File

@ -257,7 +257,7 @@ static int _cmd_connect(int argc, char **argv)
return 1;
}
if (ep.port == 0) {
ep.port = MQTTSN_DEFAULT_PORT;
ep.port = CONFIG_ASYMCUTE_DEFAULT_PORT;
}
/* get request context */

View File

@ -63,6 +63,13 @@ extern "C" {
* @ingroup config
* @{
*/
/**
* @brief Default UDP port to listen on
*/
#ifndef CONFIG_ASYMCUTE_DEFAULT_PORT
#define CONFIG_ASYMCUTE_DEFAULT_PORT (1883U)
#endif
/**
* @brief Default buffer size for Asymcute client (as exponent of 2^n)
*

View File

@ -16,6 +16,14 @@ menuconfig KCONFIG_USEMODULE_ASYMCUTE
if KCONFIG_USEMODULE_ASYMCUTE
config ASYMCUTE_DEFAULT_PORT
int "Default UDP port to listen on"
default 1883
help
Default UDP port to listen on (also used as SRC port). This will write
to macro 'CONFIG_ASYMCUTE_DEFAULT_PORT'. Usage can be found in
examples/asymcute_mqttsn
config ASYMCUTE_BUFSIZE_EXP
int "Exponent for the buffer size (resulting in the buffer size 2^n)"
default 7