From 2fb619ed6eac19afd7ed3b2c7baa4adc253f418e Mon Sep 17 00:00:00 2001 From: turret Date: Sat, 30 Mar 2024 20:35:30 -0500 Subject: net: event handler in subsys.h: include init.h to ensure l5_initcall availability also: add example/ directory to provide some user-code in the skeleton (will likely be made defunct as i make the remainder of the skeleton, such as a /ping command and user action and maybe some buttons, which will require more organisation) --- example/hello.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 example/hello.c (limited to 'example') diff --git a/example/hello.c b/example/hello.c new file mode 100644 index 0000000..f192a52 --- /dev/null +++ b/example/hello.c @@ -0,0 +1,17 @@ +#include + +#include + +#include +#include + +int hello(cJSON *data) +{ + char *string = cJSON_Print(data); + print("hello, world!"); + print("hello data: %s", string); + free(string); + + return 0; +} +declare_event(HELLO, hello); -- cgit v1.2.3