aboutsummaryrefslogtreecommitdiff
path: root/puzzle/dummy/main.cpp
blob: 217ce942b9e69ab335523afa6e98745b9aa0517e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <Arduino.h>

#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() {
	Serial.write(".");
	vTaskDelay(1000 / portTICK_PERIOD_MS);
}

void vApplicationMallocFailedHook(void) {
	Serial.println("malloc failed!");
}