diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-14 12:16:36 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-14 12:16:36 +0200 |
commit | ef162ca3445d9adb000d7dfd1b68b181ef958926 (patch) | |
tree | 25c62f409323c0fa6be7c9034bc04ee2bb18ef50 /lib/pbdrv/drv/arduino | |
parent | 2cf895332ffd54ea1a43b090859943665709e420 (diff) |
clean up pbdrv naming
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 } |