aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-09 17:37:44 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-09 17:37:44 +0200
commita3ecfc2a6e6ace7bcb7666afc37ff97f9ce401b4 (patch)
tree0b0cb4c159a8cfbe0e07d26ff690adc21573b33c /main
parent4bdabb2dbf8d523e71f22f994070e99f349c2113 (diff)
WIP rp2040 pbdrv recv outside irq handler
Diffstat (limited to 'main')
-rw-r--r--main/i2c.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/i2c.c b/main/i2c.c
index d92a93b..8edb1e8 100644
--- a/main/i2c.c
+++ b/main/i2c.c
@@ -30,6 +30,10 @@
// return array;
// }
+void pbdrv_i2c_recv(const uint8_t * a, size_t b) {
+ printf("%.*s", b, a);
+}
+
void bus_task() {
// scan bus for slaves
// send updates at regular intervals
@@ -42,9 +46,6 @@ void bus_task() {
while (true) {
vTaskDelay(10 / portTICK_PERIOD_MS);
pbdrv_i2c_send(0x69, (uint8_t *) "bbbbbbbb", 9);
-
- // i2c_write_blocking(i2c0, 0x69, (uint8_t *) "bbbbbbbb", 9, false);
- // pbdrv_i2c_recv(NULL, 0);
}
// while(1) {