From 40efa06eb474229d15dd01c20c230fe78d909587 Mon Sep 17 00:00:00 2001 From: chrysn Date: Sun, 23 Jan 2022 15:56:35 +0100 Subject: [PATCH] examples/rust-gcoap: Add CoAP SAUL demo from module examples --- examples/rust-gcoap/Makefile | 4 ++++ examples/rust-gcoap/src/lib.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/examples/rust-gcoap/Makefile b/examples/rust-gcoap/Makefile index af37358b10..8d66022886 100644 --- a/examples/rust-gcoap/Makefile +++ b/examples/rust-gcoap/Makefile @@ -19,9 +19,13 @@ USEMODULE += ztimer_usec USEMODULE += ztimer_msec USEMODULE += ztimer_sec +# for the "vfs" feature of riot-coap-handler-demos (and vfs.c) USEMODULE += vfs USEMODULE += constfs +# for the "saul" feature of riot-coap-handler-demos +USEMODULE += saul_default + # 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: diff --git a/examples/rust-gcoap/src/lib.rs b/examples/rust-gcoap/src/lib.rs index 4fdcdbba21..0ea3d55b64 100644 --- a/examples/rust-gcoap/src/lib.rs +++ b/examples/rust-gcoap/src/lib.rs @@ -22,6 +22,7 @@ fn main() { let handler = coap_message_demos::full_application_tree(None) .below(&["ps"], riot_coap_handler_demos::ps::ps_tree()) .below(&["vfs"], riot_coap_handler_demos::vfs::vfs("/const")) + .below(&["saul"], riot_coap_handler_demos::saul::SaulHandler::new(&["saul"])) .with_wkc() ; let mut handler = riot_wrappers::coap_handler::GcoapHandler(handler);