diff options
Diffstat (limited to 'lib/pbdrv/drv/arduino')
-rw-r--r-- | lib/pbdrv/drv/arduino/mod.cpp | 8 | ||||
-rw-r--r-- | lib/pbdrv/drv/arduino/mod.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/pbdrv/drv/arduino/mod.cpp b/lib/pbdrv/drv/arduino/mod.cpp index 8a38a5b..fab9dd5 100644 --- a/lib/pbdrv/drv/arduino/mod.cpp +++ b/lib/pbdrv/drv/arduino/mod.cpp @@ -18,17 +18,17 @@ static void recv_event(int bytes) { while (Wire.available()) data[size++] = Wire.read(); - pbdrv_i2c_recv(data, size); + pb_i2c_recv(data, size); } -void pbdrv_setup() { - Wire.begin((int) PBDRV_MOD_ADDR); +void pb_setup() { + Wire.begin((int) PB_MOD_ADDR); Wire.setWireTimeout(PB_TIMEOUT_US, true); Wire.setClock(PB_CLOCK_SPEED_HZ); Wire.onReceive(recv_event); } -__weak void pbdrv_i2c_send(i2c_addr_t addr, const uint8_t * buf, size_t sz) { +__weak void pb_i2c_send(i2c_addr_t addr, const uint8_t * buf, size_t sz) { Wire.beginTransmission((int) addr); Wire.write(buf, sz); Wire.endTransmission(true); diff --git a/lib/pbdrv/drv/arduino/mod.h b/lib/pbdrv/drv/arduino/mod.h index 079941a..c4cb9ce 100644 --- a/lib/pbdrv/drv/arduino/mod.h +++ b/lib/pbdrv/drv/arduino/mod.h @@ -9,7 +9,7 @@ extern "C" { * * This function should be called from the Arduino \c setup() function. */ -void pbdrv_setup(); +void pb_setup(); #ifdef __cplusplus } |