Skip to content

Commit bbf68b5

Browse files
committed
bus API method name changes
1 parent b7fce3a commit bbf68b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sfTk/sfDevUltrasonicDist.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ sfTkError_t sfDevUltrasonicDist::triggerAndRead(uint16_t &distance)
5555
uint8_t rawData[2] = {};
5656

5757
// Get the distance
58-
sfTkError_t err = _theBus->readRegisterRegion(kUltrasonicDistanceReadCommand, rawData, numBytes, bytesRead);
58+
sfTkError_t err = _theBus->readRegister(kUltrasonicDistanceReadCommand, rawData, numBytes, bytesRead);
5959

6060
// Check whether the read was successful
6161
if (err != ksfTkErrOk)
@@ -82,7 +82,7 @@ sfTkError_t sfDevUltrasonicDist::changeAddress(uint8_t &address)
8282
return ksfTkErrFail;
8383

8484
// Write the new address to the device. The first bit must be set to 1
85-
err = _theBus->writeByte(address | 0x80);
85+
err = _theBus->writeUInt8(address | 0x80);
8686
}
8787
else if (_fwVersion == kQwiicUltrasonicFWLatest)
8888
{
@@ -96,7 +96,7 @@ sfTkError_t sfDevUltrasonicDist::changeAddress(uint8_t &address)
9696
const uint8_t toWrite[2] = {kUltrasonicAddressChangeCommand, tempAddress};
9797

9898
// Write the new address to the device
99-
err = _theBus->writeRegion(toWrite, numBytes);
99+
err = _theBus->writeData(toWrite, numBytes);
100100
}
101101
else
102102
{

0 commit comments

Comments
 (0)