From ee741a4296f4ce8e2094cd109f7bee6d512ff680 Mon Sep 17 00:00:00 2001 From: kYc0o Date: Wed, 18 Jan 2017 10:53:40 +0100 Subject: [PATCH 1/5] drivers/xbee: add UL to constants for 8 and 16 bit compatibility --- drivers/xbee/xbee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xbee/xbee.c b/drivers/xbee/xbee.c index 4cf538680..58596ff5d 100644 --- a/drivers/xbee/xbee.c +++ b/drivers/xbee/xbee.c @@ -41,11 +41,11 @@ /** * @brief Delay when entering command mode, must be > 1s */ -#define ENTER_CMD_MODE_DELAY (1100U * 1000U) +#define ENTER_CMD_MODE_DELAY (1100UL * US_PER_MS) /** * @brief Delay when resetting the device, 10ms */ -#define RESET_DELAY (10U * 1000U) +#define RESET_DELAY (10UL * US_PER_MS) /** * @brief Timeout for receiving AT command response From a2f54a0e58f5365bde3f455ef80f704e2c9df2b6 Mon Sep 17 00:00:00 2001 From: kYc0o Date: Wed, 18 Jan 2017 10:55:25 +0100 Subject: [PATCH 2/5] tests/driver_xbee: reduce pktbuf size to cover small platforms --- tests/driver_xbee/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/driver_xbee/Makefile b/tests/driver_xbee/Makefile index 884636fc3..d7da42f7a 100644 --- a/tests/driver_xbee/Makefile +++ b/tests/driver_xbee/Makefile @@ -16,11 +16,14 @@ USEMODULE += shell USEMODULE += shell_commands # set default UART to use in case none was defined -XBEE_UART ?= "UART_NUMOF-1" +XBEE_UART ?= "1" # export UART to params file CFLAGS += -DXBEE_UART=$(XBEE_UART) +# No need of big buffer for this test +CFLAGS += -DGNRC_PKTBUF_SIZE=512 + # add current directory to the include path. Putting it in CFLAGS will make # it go to the beginning, before the standard includes. # That way xbee_params.h get's included and auto configuration can pick it up. From 2bee616cfbf9a1a4d51a0e4effdd7605f1878efb Mon Sep 17 00:00:00 2001 From: kYc0o Date: Wed, 18 Jan 2017 11:44:56 +0100 Subject: [PATCH 3/5] examples/gnrc_minimal: change to unambiguous UART port for XBee --- examples/gnrc_minimal/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gnrc_minimal/Makefile b/examples/gnrc_minimal/Makefile index a0cefdc59..d20657694 100644 --- a/examples/gnrc_minimal/Makefile +++ b/examples/gnrc_minimal/Makefile @@ -13,7 +13,7 @@ BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h #USEMODULE += xbee ## set default UART to use in case none was defined -#XBEE_UART ?= "UART_NUMOF-1" +#XBEE_UART ?= "1" ## export UART to params file #CFLAGS += -DXBEE_UART=$(XBEE_UART) From abf6c3e53fd0b733c006fb3099c62fc483bd980d Mon Sep 17 00:00:00 2001 From: kYc0o Date: Wed, 18 Jan 2017 14:28:59 +0100 Subject: [PATCH 4/5] tests/driver_xbee: add DEVELHELP to catch non-valid configs --- tests/driver_xbee/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/driver_xbee/Makefile b/tests/driver_xbee/Makefile index d7da42f7a..22afd8471 100644 --- a/tests/driver_xbee/Makefile +++ b/tests/driver_xbee/Makefile @@ -24,6 +24,11 @@ CFLAGS += -DXBEE_UART=$(XBEE_UART) # No need of big buffer for this test CFLAGS += -DGNRC_PKTBUF_SIZE=512 +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP + # add current directory to the include path. Putting it in CFLAGS will make # it go to the beginning, before the standard includes. # That way xbee_params.h get's included and auto configuration can pick it up. From 51e0aaede48cf28b817396d33cc9f60ad8098bd1 Mon Sep 17 00:00:00 2001 From: kYc0o Date: Wed, 18 Jan 2017 14:29:23 +0100 Subject: [PATCH 5/5] examples/gnrc_minimal: add DEVELHELP to catch non-valid configs --- examples/gnrc_minimal/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gnrc_minimal/Makefile b/examples/gnrc_minimal/Makefile index d20657694..3cf22aff8 100644 --- a/examples/gnrc_minimal/Makefile +++ b/examples/gnrc_minimal/Makefile @@ -18,10 +18,10 @@ BOARD_INSUFFICIENT_MEMORY := chronos msb-430 msb-430h ## export UART to params file #CFLAGS += -DXBEE_UART=$(XBEE_UART) -## add current directory to the include path. Putting it in CFLAGS will make -## it go to the beginning, before the standard includes. -## That way xbee_params.h get's included and auto configuration can pick it up. -#CFLAGS += -I$(CURDIR) +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present