aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pbdrv/drv/arduino/mod.cpp2
-rw-r--r--puzzle/dummy/main.cpp1
-rw-r--r--puzzle/dummy/makefile1
3 files changed, 4 insertions, 0 deletions
diff --git a/lib/pbdrv/drv/arduino/mod.cpp b/lib/pbdrv/drv/arduino/mod.cpp
index 518a8a4..8a38a5b 100644
--- a/lib/pbdrv/drv/arduino/mod.cpp
+++ b/lib/pbdrv/drv/arduino/mod.cpp
@@ -9,6 +9,7 @@
#include <stdint.h>
#include "../../pb.h"
+#include "../../pb-mod.h"
#include "mod.h"
static void recv_event(int bytes) {
@@ -31,5 +32,6 @@ __weak void pbdrv_i2c_send(i2c_addr_t addr, const uint8_t * buf, size_t sz) {
Wire.beginTransmission((int) addr);
Wire.write(buf, sz);
Wire.endTransmission(true);
+ Wire.setWireTimeout(PB_TIMEOUT_US, true);
}
diff --git a/puzzle/dummy/main.cpp b/puzzle/dummy/main.cpp
index 4abe47a..df5b6f5 100644
--- a/puzzle/dummy/main.cpp
+++ b/puzzle/dummy/main.cpp
@@ -2,6 +2,7 @@
#include <Wire.h>
#include "drv/arduino/mod.h"
+#include "pb-mod.h"
#ifdef TEST_A
#define ADDR_RX 0x69
diff --git a/puzzle/dummy/makefile b/puzzle/dummy/makefile
index 041054e..509d8e3 100644
--- a/puzzle/dummy/makefile
+++ b/puzzle/dummy/makefile
@@ -4,6 +4,7 @@ include ../../lazy.mk
export SERIAL_PORT ?= /dev/ttyACM0
flash: upload-main;
+upload-main: $(TARGET)
test: test_a test_b;