-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from rosetree/feature/external-module
Convert from application to external module
- Loading branch information
Showing
8 changed files
with
83 additions
and
134 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1 @@ | ||
# name of your application | ||
APPLICATION = saul_coap | ||
|
||
# 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)/RIOT | ||
|
||
BOARD_INSUFFICIENT_MEMORY := arduino-duemilanove arduino-leonardo arduino-nano \ | ||
arduino-uno | ||
|
||
# Include packages that pull up and auto-init the link layer. | ||
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present | ||
USEMODULE += gnrc_netdev_default | ||
USEMODULE += auto_init_gnrc_netif | ||
# Specify the mandatory networking modules | ||
USEMODULE += gnrc_ipv6_default | ||
USEMODULE += gcoap | ||
# Additional networking modules that can be dropped if not needed | ||
USEMODULE += gnrc_icmpv6_echo | ||
USEMODULE += gnrc_icmpv6_error | ||
|
||
# Specify the mandatory networking modules for IPv6 routing | ||
USEMODULE += gnrc_ipv6_router_default | ||
|
||
# Required by gcoap example | ||
USEMODULE += od | ||
USEMODULE += fmt | ||
|
||
# we want to use SAUL: | ||
USEMODULE += saul_default | ||
# include the shell: | ||
USEMODULE += shell | ||
USEMODULE += shell_commands | ||
# additional modules for debugging: | ||
USEMODULE += ps | ||
|
||
# Module for registering to Resource Directory (RD) | ||
USEMODULE += cord_ep | ||
|
||
# needed so that the board can be reached | ||
USEMODULE += netstats_l2 | ||
# | ||
# Include tinycbor for data representation | ||
USEPKG += tinycbor | ||
INCLUDE += $(RIOTPKG)/tinycbor/cbor.h | ||
|
||
CFLAGS += -DGNRC_IPV6_NIB_CONF_SLAAC=1 | ||
|
||
# For debugging and demonstration purposes the lifetime is limited to 30s | ||
CFLAGS += -DCORD_LT=30 | ||
|
||
# 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: | ||
DEVELHELP ?= 1 | ||
|
||
# Change this to 0 show compiler invocation lines by default: | ||
QUIET ?= 1 | ||
|
||
include $(RIOTBASE)/Makefile.include | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Include packages that pull up and auto-init the link layer. | ||
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present | ||
USEMODULE += gnrc_netdev_default | ||
USEMODULE += auto_init_gnrc_netif | ||
# Specify the mandatory networking modules | ||
USEMODULE += gnrc_ipv6_default | ||
USEMODULE += gcoap | ||
# Additional networking modules that can be dropped if not needed | ||
USEMODULE += gnrc_icmpv6_echo | ||
USEMODULE += gnrc_icmpv6_error | ||
|
||
# Specify the mandatory networking modules for IPv6 routing | ||
USEMODULE += gnrc_ipv6_router_default | ||
|
||
# Required by gcoap example | ||
USEMODULE += od | ||
USEMODULE += fmt | ||
|
||
# we want to use SAUL: | ||
USEMODULE += saul_default | ||
# include the shell: | ||
USEMODULE += shell | ||
USEMODULE += shell_commands | ||
# additional modules for debugging: | ||
USEMODULE += ps | ||
|
||
# Module for registering to Resource Directory (RD) | ||
USEMODULE += cord_ep | ||
|
||
# needed so that the board can be reached | ||
USEMODULE += netstats_l2 | ||
# | ||
# Include tinycbor for data representation | ||
USEPKG += tinycbor | ||
INCLUDE += $(RIOTPKG)/tinycbor/cbor.h | ||
|
||
CFLAGS += -DGNRC_IPV6_NIB_CONF_SLAAC=1 | ||
|
||
# For debugging and demonstration purposes the lifetime is limited to 30s | ||
CFLAGS += -DCORD_LT=30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Use an immediate variable to evaluate `MAKEFILE_LIST` now | ||
USEMODULE_INCLUDES_saul_coap := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) | ||
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_saul_coap) |
Submodule RIOT
deleted from
b38f48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2019 HAW Hamburg | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
* | ||
* @ingroup pkg | ||
* @{ | ||
* | ||
* @file | ||
* @brief Adapt SAUL registry for CoAP. | ||
* | ||
* @author Micha Rosenbaum <[email protected]> | ||
* | ||
* @} | ||
*/ | ||
#ifndef SAUL_COAP_H | ||
#define SAUL_COAP_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Initialize and register the saul-coap resources. | ||
* | ||
* @warning This function must only be called once (typically during system | ||
* initialization) | ||
*/ | ||
void saul_coap_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* SAUL_COAP_H */ |