aboutsummaryrefslogtreecommitdiff
path: root/puzzle/dummy
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-18 15:39:03 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-18 15:39:03 +0200
commit1e54994000d1c26e9cbd724b76da5ceb273f9cbb (patch)
tree3c3fb7fab24a7d91438d22555daecc60d7962c30 /puzzle/dummy
parent573ee2dd6790c00c9e0f709f222bc2a68f015d6d (diff)
i2c reply kinda working
Diffstat (limited to 'puzzle/dummy')
-rw-r--r--puzzle/dummy/CMakeLists.txt1
-rw-r--r--puzzle/dummy/FreeRTOSConfig.h2
-rw-r--r--puzzle/dummy/main.cpp20
-rw-r--r--puzzle/dummy/mod.c5
4 files changed, 7 insertions, 21 deletions
diff --git a/puzzle/dummy/CMakeLists.txt b/puzzle/dummy/CMakeLists.txt
index 0d5e1bd..6acc4c8 100644
--- a/puzzle/dummy/CMakeLists.txt
+++ b/puzzle/dummy/CMakeLists.txt
@@ -33,6 +33,7 @@ add_subdirectory(lib/FreeRTOS-Kernel)
add_executable(main
main.cpp
+ mod.c
)
target_link_libraries(main
diff --git a/puzzle/dummy/FreeRTOSConfig.h b/puzzle/dummy/FreeRTOSConfig.h
index f398db9..1cfdd71 100644
--- a/puzzle/dummy/FreeRTOSConfig.h
+++ b/puzzle/dummy/FreeRTOSConfig.h
@@ -20,7 +20,7 @@
// #define configTOTAL_HEAP_SIZE (1024)
#define configTOTAL_HEAP_SIZE (7 * 1024)
#define configCHECK_FOR_STACK_OVERFLOW 0
-#define configUSE_MALLOC_FAILED_HOOK 1
+#define configUSE_MALLOC_FAILED_HOOK 0
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
#define configGENERATE_RUN_TIME_STATS 0
#define configUSE_TRACE_FACILITY 0
diff --git a/puzzle/dummy/main.cpp b/puzzle/dummy/main.cpp
index 217ce94..41d8993 100644
--- a/puzzle/dummy/main.cpp
+++ b/puzzle/dummy/main.cpp
@@ -3,24 +3,8 @@
#include <FreeRTOS.h>
#include <task.h>
-#include "pb-mod.h"
-#include "pb-route.h"
-#include "pb-send.h"
-
-const char * PB_MOD_NAME = "dummy";
-const i2c_addr_t PB_MOD_ADDR = 0x69;
-
void setup() {
Serial.begin(115200);
-
- pb_buf_t buf = pb_send_magic_res();
- Serial.print("response bytes:");
- for (size_t i = 0; i < buf.size; i++) {
- Serial.print(" ");
- Serial.print(buf.data[i]);
- }
- Serial.print("\r\n");
- pb_buf_free(&buf);
}
void loop() {
@@ -28,7 +12,3 @@ void loop() {
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
-void vApplicationMallocFailedHook(void) {
- Serial.println("malloc failed!");
-}
-
diff --git a/puzzle/dummy/mod.c b/puzzle/dummy/mod.c
new file mode 100644
index 0000000..018ea68
--- /dev/null
+++ b/puzzle/dummy/mod.c
@@ -0,0 +1,5 @@
+#include "pb-mod.h"
+
+const char * PB_MOD_NAME = "dummy";
+const i2c_addr_t PB_MOD_ADDR = 0x69;
+