aboutsummaryrefslogtreecommitdiff
path: root/puzzle/dummy/main.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-18 14:51:43 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-18 14:51:43 +0200
commit573ee2dd6790c00c9e0f709f222bc2a68f015d6d (patch)
treea37e81ced097ec04dc6bf36efaf072ff69e8efc3 /puzzle/dummy/main.cpp
parent681107dde23e19b0a14e09a59f687cf9978b50ed (diff)
WIP losing my mind
Diffstat (limited to 'puzzle/dummy/main.cpp')
-rw-r--r--puzzle/dummy/main.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/puzzle/dummy/main.cpp b/puzzle/dummy/main.cpp
index 06f7569..217ce94 100644
--- a/puzzle/dummy/main.cpp
+++ b/puzzle/dummy/main.cpp
@@ -5,16 +5,30 @@
#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() {
- Serial.write("Hello world!\r\n");
+ Serial.write(".");
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
+void vApplicationMallocFailedHook(void) {
+ Serial.println("malloc failed!");
+}
+