tests/pkg_microcoap: move microcoap_server example to tests

This commit is contained in:
Alexandre Abadie 2017-09-28 22:25:47 +02:00
parent 2d5d42a57b
commit 75bb211c8b
5 changed files with 9 additions and 37 deletions

View File

@ -1,11 +1,5 @@
# name of your application APPLICATION = pkg_microcoap
APPLICATION = microcoap_server include ../Makefile.tests_common
# If no BOARD is found in the environment, use this default:
BOARD ?= native
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h nucleo32-f031 nucleo32-f042 \ BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h nucleo32-f031 nucleo32-f042 \
nucleo32-l031 nucleo-f030 nucleo-l053 pca10000 pca10005 \ nucleo32-l031 nucleo-f030 nucleo-l053 pca10000 pca10005 \
@ -25,7 +19,6 @@ USEMODULE += gnrc_icmpv6_echo
USEMODULE += gnrc_sock_udp USEMODULE += gnrc_sock_udp
USEPKG += microcoap USEPKG += microcoap
CFLAGS += -DMICROCOAP_DEBUG
# include this for printing IP addresses # include this for printing IP addresses
USEMODULE += shell_commands USEMODULE += shell_commands
@ -47,21 +40,4 @@ ifneq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS)))
USEMODULE += prng_minstd USEMODULE += prng_minstd
endif endif
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
include $(RIOTBASE)/Makefile.include include $(RIOTBASE)/Makefile.include
# Set a custom channel if needed
ifneq (,$(filter cc110x,$(USEMODULE))) # radio is cc110x sub-GHz
DEFAULT_CHANNEL ?= 0
CFLAGS += -DCC110X_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
else
ifneq (,$(filter at86rf212b,$(USEMODULE))) # radio is IEEE 802.15.4 sub-GHz
DEFAULT_CHANNEL ?= 5
CFLAGS += -DIEEE802154_DEFAULT_SUBGHZ_CHANNEL=$(DEFAULT_CHANNEL)
else # radio is IEEE 802.15.4 2.4 GHz
DEFAULT_CHANNEL ?= 26
CFLAGS += -DIEEE802154_DEFAULT_CHANNEL=$(DEFAULT_CHANNEL)
endif
endif

View File

@ -1,8 +1,8 @@
microcoap server example microcoap server test
======================== =====================
This application is meant to get you started with implementing a CoAP server on RIOT. This application is meant to get you started with implementing a CoAP server
It uses the GNRC network stack through RIOT's conn socket API. on RIOT. It uses the GNRC network stack through RIOT's conn socket API.
Usage Usage
===== =====

View File

@ -7,11 +7,11 @@
*/ */
/** /**
* @ingroup examples * @ingroup tests
* @{ * @{
* *
* @file * @file
* @brief CoAP example server application (using microcoap) * @brief CoAP test server application (using microcoap)
* *
* @author Kaspar Schleiser <kaspar@schleiser.de> * @author Kaspar Schleiser <kaspar@schleiser.de>
* @} * @}
@ -28,7 +28,7 @@ extern int _netif_config(int argc, char **argv);
int main(void) int main(void)
{ {
puts("RIOT microcoap example application"); puts("RIOT microcoap test application");
puts("Waiting for address autoconfiguration..."); puts("Waiting for address autoconfiguration...");
xtimer_sleep(3); xtimer_sleep(3);

View File

@ -9,11 +9,7 @@
#include "net/af.h" #include "net/af.h"
#include "net/sock/udp.h" #include "net/sock/udp.h"
#ifdef MICROCOAP_DEBUG
#define ENABLE_DEBUG (1)
#else
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#endif
#include "debug.h" #include "debug.h"
#include "coap.h" #include "coap.h"