diff options
Diffstat (limited to 'main/pbdrv.c')
-rw-r--r-- | main/pbdrv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/pbdrv.c b/main/pbdrv.c index d809b86..0624897 100644 --- a/main/pbdrv.c +++ b/main/pbdrv.c @@ -3,7 +3,7 @@ #include "pb.h" #include "pb-types.h" #include "pb-mod.h" -#include "pb-msg.h" +#include "pb-send.h" #include <hardware/i2c.h> #include <hardware/gpio.h> @@ -76,7 +76,7 @@ __weak void pb_i2c_send(i2c_addr_t addr, const uint8_t * buf, size_t sz) { void bus_scan() { i2c_set_slave_mode(PB_I2C, false, PB_MOD_ADDR); - pb_buf_t buf = pb_msg_write_req_magic(); + pb_buf_t buf = pb_send_magic_req(); // check for all 7-bit addresses uint16_t addr_max = 1 << 7; @@ -89,3 +89,7 @@ void bus_scan() { i2c_set_slave_mode(PB_I2C, true, PB_MOD_ADDR); } +void pb_mod_blocking_delay_ms(unsigned long ms) { + vTaskDelay(ms / portTICK_PERIOD_MS); +} + |