From a3ecfc2a6e6ace7bcb7666afc37ff97f9ce401b4 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 9 Jun 2024 17:37:44 +0200 Subject: WIP rp2040 pbdrv recv outside irq handler --- main/i2c.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'main') 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) { -- cgit v1.2.3