From a5411c45f5b6f8636b02149b35cf94c1405143ea Mon Sep 17 00:00:00 2001 From: Mitchell M Date: Sat, 21 Mar 2026 20:36:08 -0500 Subject: [PATCH] setup cpp --- CMakeLists.txt | 6 ++++-- blk_box.c | 7 ------- blk_box.cpp | 6 ++++++ include/blk_box.h | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 blk_box.c create mode 100644 blk_box.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 3080e7e..112570c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,2 +1,4 @@ -idf_component_register(SRCS "blk_box.c" - INCLUDE_DIRS "include") +idf_component_register( + SRCS "blk_box.cpp" + INCLUDE_DIRS "include" +) diff --git a/blk_box.c b/blk_box.c deleted file mode 100644 index e15d180..0000000 --- a/blk_box.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "blk_box.h" - -void func(void) -{ - -} diff --git a/blk_box.cpp b/blk_box.cpp new file mode 100644 index 0000000..3982225 --- /dev/null +++ b/blk_box.cpp @@ -0,0 +1,6 @@ +#include +#include "blk_box.h" + +const char* get_hello_world() { + return "hello, world!"; +} diff --git a/include/blk_box.h b/include/blk_box.h index f6f3a61..bd56e5d 100644 --- a/include/blk_box.h +++ b/include/blk_box.h @@ -1 +1 @@ -void func(void); +const char* get_hello_world();